Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into master_hella

hella_vue3
niexiting 8 months ago
parent
commit
cf3e1311fd
  1. 2
      .hbuilderx/launch.json
  2. 179
      src/api/request2.js
  3. 18
      src/common/basic.js
  4. 14
      src/common/detail.js
  5. 52
      src/common/directory.js
  6. 37
      src/common/label.js
  7. 34
      src/common/record.js
  8. 12
      src/mycomponents/detail/comDetailCard.vue
  9. 161
      src/mycomponents/detail/comJobDetailCard.vue
  10. 2
      src/mycomponents/detail/detailBalanceInfo.vue
  11. 2
      src/mycomponents/detail/detailHandleInfo.vue
  12. 4
      src/mycomponents/detail/detailPackageInfo.vue
  13. 2
      src/mycomponents/detail/detailRecommendInfo.vue
  14. 6
      src/mycomponents/detail/jobDetailPopup.vue
  15. 6
      src/mycomponents/job/jobDetailPopup.vue
  16. 6
      src/mycomponents/location/locationCompare.vue
  17. 6
      src/mycomponents/location/requiredLocation.vue
  18. 6
      src/mycomponents/package/packageCard.vue
  19. 4
      src/mycomponents/package/packageDetailPopup.vue
  20. 99
      src/mycomponents/package/packageList.vue
  21. 168
      src/mycomponents/package/packageRecordCard.vue
  22. 195
      src/mycomponents/package/packageRecordList.vue
  23. 4
      src/mycomponents/partCode/partCode.vue
  24. 12
      src/mycomponents/qty/balanceQty.vue
  25. 8
      src/mycomponents/qty/balanceQtyEdit.vue
  26. 6
      src/mycomponents/qty/compareQty.vue
  27. 16
      src/mycomponents/qty/countQtyEdit.vue
  28. 2
      src/mycomponents/qty/inspectQtyEdit.vue
  29. 36
      src/mycomponents/qty/packQty.vue
  30. 22
      src/mycomponents/qty/qty.vue
  31. 4
      src/mycomponents/qty/recommendQty.vue
  32. 27
      src/mycomponents/qty/recommendQtyEdit.vue
  33. 37
      src/mycomponents/qty/stdPackQty.vue
  34. 8
      src/mycomponents/qty/stdUom.vue
  35. 173
      src/mycomponents/record/recordDetailCard.vue
  36. 5
      src/mycomponents/scan/winComScan.vue
  37. 8
      src/mycomponents/scan/winScanJobNumber.vue
  38. 19
      src/mycomponents/scan/winScanLocation.vue
  39. 23
      src/mycomponents/scan/winScanPackAndLocation.vue
  40. 454
      src/mycomponents/scan/winScanPackAndLocationNoBalance.vue
  41. 2
      src/mycomponents/wincom/basicCom/winHint.vue
  42. 128
      src/pages.json
  43. 10
      src/pages/container/record/containerBindRecord.vue
  44. 5
      src/pages/container/record/containerUnBindRecord.vue
  45. 20
      src/pages/count/job/countDetail.vue
  46. 2
      src/pages/count/job/countJob.vue
  47. 28
      src/pages/count/record/countRecord.vue
  48. 16
      src/pages/customerReturn/job/returnDetail.vue
  49. 3
      src/pages/customerReturn/job/returnJob.vue
  50. 14
      src/pages/customerReturn/record/returnRecord.vue
  51. 3
      src/pages/customerReturn/request/customerReturnRequest.vue
  52. 15
      src/pages/customerReturn/request/customerReturnRequestCreate.vue
  53. 2
      src/pages/deliver/coms/comDeliverRequestPopup.vue
  54. 4
      src/pages/deliver/coms/comScanDeliverPack.vue
  55. 1
      src/pages/deliver/job/deliverDetail.vue
  56. 2
      src/pages/deliver/job/deliverJob.vue
  57. 13
      src/pages/deliver/record/deliverRecord.vue
  58. 3
      src/pages/deliver/request/deliverRequest.vue
  59. 1
      src/pages/deliver/request/deliverRequestCreate.vue
  60. 12
      src/pages/demo/demo.vue
  61. 9
      src/pages/index/index.vue
  62. 3
      src/pages/inspect/job/inspectJob.vue
  63. 3
      src/pages/inspect/request/inspectRequest.vue
  64. 12
      src/pages/inventoryMove/coms/comMove.vue
  65. 12
      src/pages/inventoryMove/coms/comMoveRecord.vue
  66. 10
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  67. 3
      src/pages/inventoryMove/job/inventoryMoveJob.vue
  68. 4
      src/pages/issue-按批次推荐/job/issueDetail.vue
  69. 2
      src/pages/issue-按批次推荐/job/issueJob.vue
  70. 6
      src/pages/issue/coms/comIssueRequestPopup.vue
  71. 4
      src/pages/issue/coms/comScanIssuePack.vue
  72. 5
      src/pages/issue/coms/jobInfoPopup.vue
  73. 3
      src/pages/issue/job/issueDetail.vue
  74. 10
      src/pages/issue/job/issueJob.vue
  75. 2
      src/pages/issue/js/issue.js
  76. 2
      src/pages/issue/record/issueRecord.vue
  77. 1
      src/pages/issue/request/issueRequest.vue
  78. 1
      src/pages/issue/request/issueRequestCreate.vue
  79. 159
      src/pages/issue/request/issueScanRequest.vue
  80. 36
      src/pages/package/coms/comOverPackJobCard.vue
  81. 186
      src/pages/package/coms/comOverPackJobDetailCard.vue
  82. 540
      src/pages/package/coms/comScanPackagePack.vue
  83. 305
      src/pages/package/job/overPackageJob.vue
  84. 570
      src/pages/package/job/overPackageJobDetail.vue
  85. 114
      src/pages/package/js/package.js
  86. 9
      src/pages/package/record/mergePackageRecord.vue
  87. 179
      src/pages/package/record/overPackageRecord.vue
  88. 9
      src/pages/package/record/splitPackageRecord.vue
  89. 6
      src/pages/productDismantle/job/productDismantleDetail.vue
  90. 14
      src/pages/productDismantle/record/productDismantleRecord.vue
  91. 16
      src/pages/productPutaway/job/productPutawayDetail.vue
  92. 9
      src/pages/productPutaway/record/productPutawayRecord.vue
  93. 12
      src/pages/productPutaway/request/putawayRequestCreate.vue
  94. 10
      src/pages/productReceipt/coms/comProductDetailCard.vue
  95. 4
      src/pages/productReceipt/coms/detailInfoPopup.vue
  96. 10
      src/pages/productReceipt/coms/productDetailInfoPopup.vue
  97. 288
      src/pages/productReceipt/job/completeReceiveJob.vue
  98. 418
      src/pages/productReceipt/job/completeReceiveJobDetail.vue
  99. 8
      src/pages/productReceipt/job/productReceiptDetail.vue
  100. 3
      src/pages/productReceipt/job/productReceiptJob.vue

2
.hbuilderx/launch.json

@ -17,7 +17,7 @@
"type" : "uni-app:h5" "type" : "uni-app:h5"
}, },
{ {
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]

179
src/api/request2.js

@ -377,6 +377,24 @@ export function getPackageByNumber(number) {
}); });
} }
/**
* 获取包装信息
* @param {*}
*
*/
export function getPackageListByNumber(number) {
var params = {
number: number,
pageNo: 1,
pageSize: 100
}
return request({
url: baseApi + "/wms/package/queryPackageInfo",
method: "get",
data: params,
});
}
/** /**
@ -423,7 +441,7 @@ export function validateItemAndLocation(parmas) {
export function getPutawayRecommendLocation(params) { export function getPutawayRecommendLocation(params) {
return request({ return request({
url: baseApi + "/wms/location/recommendLocation", url: baseApi + "/wms/location/recommendLocationNew",
method: "post", method: "post",
data: params, data: params,
}); });
@ -488,6 +506,24 @@ export function getProductionlineItem(params) {
}); });
} }
/**
* 通过物料查询包装规格
* @param {*} itemCode
*
*/
export function getPackUnitByItemCode(itemCode) {
var params = {
itemCode: itemCode,
pageNo: 1,
pageSize: 100
}
return request({
url: baseApi + "/wms/itempackage/page",
method: "get",
data: params,
});
}
/** /**
* 查询生产线-车间-工位 * 查询生产线-车间-工位
* @param {*} * @param {*}
@ -2011,6 +2047,74 @@ export function productPutawayRecordSubmit(params) {
} }
/**
* 直接备货 任务
* status 任务状态
* 开始日期
* 结束日期
* 获取日期任务列表
* @param {*}
*/
export function getStockUpJobList(params) {
return request({
url: baseApi + "/wms/stockup-main-job/senior",
method: "post",
data: params,
});
}
/**
* 直接备货 获取任务明细
* @param {*} id 任务id
*
*/
export function getStockUpJobDetail(id) {
return request({
url: baseApi + "/wms/stockup-main-job/getStockupMainJobById?id=" + id,
method: "get",
data: {},
});
}
/**
* 直接备货任务 承接
* @param {*} id
*
*/
export function takeStockUpJob(id) {
return request({
url: baseApi + "/wms/stockup-main-job/accept?id=" + id,
method: "put",
data: {},
});
}
/**
* 直接备货任务 放弃承接
* @param {*} id
*
*/
export function cancleTakeStockUpJob(id) {
return request({
url: baseApi + "/wms/stockup-main-job/abandon?id=" + id,
method: "put",
data: {},
});
}
/**
* 直接备货任务 提交
* @param {*} params
*/
export function stockUpJobsubmit(params) {
return request({
url: baseApi + "/wms/stockup-main-job/execute",
method: "put",
data: params,
});
}
/** /**
* 制品拆解 任务 * 制品拆解 任务
* status 任务状态 * status 任务状态
@ -3499,19 +3603,17 @@ export function mergePackageRecordSubmit(params) {
} }
/** /**
* 翻包 提交 * 翻包直接生成记录 提交
* @param {*} params * @param {*} params
*/ */
export function overPackageRecordSubmit(params) { export function overPackageRecordSubmit(params) {
return request({ return request({
url: baseApi + "/wms/packageover-main/create", url: baseApi + "/wms/packageover-record-main/create",
method: "post", method: "post",
data: params, data: params,
}); });
} }
/** /**
* "itemCodes": [], * "itemCodes": [],
"locationCode":"INSPECT" "locationCode":"INSPECT"
@ -3663,3 +3765,70 @@ export function getPackageUnitList(params) {
data: params, data: params,
}); });
} }
/**
* 翻包 任务承接
* @param {*} id
*
*/
export function takeOverPageJob(id) {
return request({
url: baseApi + "/wms/packageover-job-main/accept?id=" + id,
method: "put",
data: {},
});
}
/**
* 翻包 放弃承接
* @param {*} id
*
*/
export function cancleTakeOverPageJob(id) {
return request({
url: baseApi + "/wms/packageover-job-main/abandon?id=" + id,
method: "put",
data: {},
});
}
/**
* 翻包任务 列表
* status 任务状态
* 开始日期
* 结束日期
* 获取日期任务列表
* @param {*}
*/
export function getOverPageJobList(params) {
return request({
url: baseApi + "/wms/packageover-job-main/senior",
method: "post",
data: params,
});
}
/**
* 翻包任务明细
* @param {*} 任务id
*
*/
export function getOverPageJobDetail(id) {
return request({
url: baseApi + "/wms/packageover-job-main/getPackageoverJobById?id=" + id,
method: "get",
data: {},
});
}
/**
* 翻包任务 提交
* @param {*} params
*/
export function overPageSubmit(params) {
return request({
url: baseApi + "/wms/packageover-job-main/execute",
method: "put",
data: params,
});
}

18
src/common/basic.js

@ -7,7 +7,7 @@ import { calc } from '@/common/calc'
let jobStatusList = []; let jobStatusList = [];
let itemStatusList = []; let itemStatusList = [];
let locationTypeList = []; let locationAreaTypeList = [];
let uomList = []; let uomList = [];
let inventoryStatusList = []; let inventoryStatusList = [];
let containerTypeList = []; let containerTypeList = [];
@ -24,7 +24,7 @@ let inspectFailedReasonList = [];
export function clearCacheData() { export function clearCacheData() {
jobStatusList = []; jobStatusList = [];
itemStatusList = []; itemStatusList = [];
locationTypeList = []; locationAreaTypeList = [];
uomList = []; uomList = [];
inventoryStatusList = []; inventoryStatusList = [];
containerTypeList = []; containerTypeList = [];
@ -152,11 +152,11 @@ export function getItemStateInfo(value) {
//获取库位类型 //获取库位类型
export function getLocationTypeInfo(value) { export function getLocationTypeInfo(value) {
var resultInfo = ""; var resultInfo = "";
if (locationTypeList.length == 0) { if (locationAreaTypeList.length == 0) {
locationTypeList = getDirectoryInfo("location_type") locationAreaTypeList = getDirectoryInfo("location_type")
} }
if (locationTypeList.length > 0) { if (locationAreaTypeList.length > 0) {
for (let item of locationTypeList) { for (let item of locationAreaTypeList) {
if (item.value == value) { if (item.value == value) {
resultInfo = item resultInfo = item
break; break;
@ -191,7 +191,7 @@ export function getUomInfo(value) {
} }
//获取包装单位 //获取包装单位
export function getStdPackUnitInfo(value) { export function getPackUnitInfo(value) {
var resultInfo = ""; var resultInfo = "";
if (packUnitList.length == 0) { if (packUnitList.length == 0) {
packUnitList = getDirectoryInfo("pack_unit") packUnitList = getDirectoryInfo("pack_unit")
@ -957,8 +957,8 @@ export function createItemInfo(res) {
let item = { let item = {
itemCode: res.itemCode, itemCode: res.itemCode,
itemName: res.itemName, itemName: res.itemName,
stdPackQty: Number(res.stdPackQty), packQty: Number(res.packQty),
stdPackUnit: res.stdPackUnit, packUnit: res.packUnit,
qty: Number(res.qty), qty: Number(res.qty),
handleQty: 0, handleQty: 0,
uom: res.uom, uom: res.uom,

14
src/common/detail.js

@ -67,8 +67,8 @@ export function createItemInfo(detail) {
let item = { let item = {
itemCode: detail.itemCode, itemCode: detail.itemCode,
itemName: detail.itemName, itemName: detail.itemName,
stdPackQty: Number(detail.stdPackQty) || undefined, packQty: Number(detail.packQty) || undefined,
stdPackUnit: detail.stdPackUnit, packUnit: detail.packUnit,
qty: Number(detail.qty), qty: Number(detail.qty),
handleQty: 0, handleQty: 0,
uom: detail.uom, uom: detail.uom,
@ -118,10 +118,12 @@ export function calcTreeHandleQty(detailSource) {
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { if (detail != undefined && detail.scaned) {
detail.handleQty = new Decimal(0).toNumber(); if(detail.packList.length>0){
for (let pack of detail.packList){ detail.handleQty = new Decimal(0).toNumber();
if(pack!=undefined&&pack.scaned){ for (let pack of detail.packList){
detail.handleQty = calc.add(detail.handleQty, pack.handleQty); if(pack!=undefined&&pack.scaned){
detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
}
} }
} }
item.handleQty = calc.add(item.handleQty, detail.handleQty); item.handleQty = calc.add(item.handleQty, detail.handleQty);

52
src/common/directory.js

@ -6,6 +6,7 @@ let uomList = [];
let inventoryStatusList = []; let inventoryStatusList = [];
let containerTypeList = []; let containerTypeList = [];
let packUnitList = []; let packUnitList = [];
let packUnitInfoList = [];
let requestStatusList = []; let requestStatusList = [];
let unplannedReceiptReasonList = []; let unplannedReceiptReasonList = [];
let unplannedIssueReasonList = []; let unplannedIssueReasonList = [];
@ -18,6 +19,8 @@ let inspectTypeList = [];
let sampleMethodList = []; let sampleMethodList = [];
let transferModeList = []; let transferModeList = [];
let countStageList = []; let countStageList = [];
let locationAreaTypeList = [];
// 获取业务类型字典项 // 获取业务类型字典项
@ -43,6 +46,7 @@ export function clearCacheData() {
inventoryStatusList = []; inventoryStatusList = [];
containerTypeList = []; containerTypeList = [];
packUnitList = []; packUnitList = [];
packUnitInfoList = [];
requestStatusList = []; requestStatusList = [];
unplannedReceiptReasonList = []; unplannedReceiptReasonList = [];
unplannedIssueReasonList = []; unplannedIssueReasonList = [];
@ -55,6 +59,7 @@ export function clearCacheData() {
sampleMethodList = []; sampleMethodList = [];
transferModeList = []; transferModeList = [];
countStageList = []; countStageList = [];
locationAreaTypeList=[]
} }
//获取字典信息 //获取字典信息
@ -142,6 +147,16 @@ export function getJobStateStyle(value) {
} }
} }
//获取库区描述(多个库区)
export function getListLocationAreaTypeDesc(list) {
let desc = '';
list.forEach(res => {
desc += getLocationAreaTypeInfo(res).label + ","
})
desc = desc.slice(0, -1);
return desc;
}
//获取库位描述(多个库位) //获取库位描述(多个库位)
export function getListLocationTypeDesc(list) { export function getListLocationTypeDesc(list) {
let desc = ''; let desc = '';
@ -210,6 +225,23 @@ export function getItemStateInfo(value) {
return resultInfo return resultInfo
} }
//获取库区类型
export function getLocationAreaTypeInfo(value) {
var resultInfo = "";
if (locationAreaTypeList.length == 0) {
locationAreaTypeList = getDirectoryInfo("area_type")
}
if (locationAreaTypeList.length > 0) {
for (let item of locationAreaTypeList) {
if (item.value == value) {
resultInfo = item
break;
}
}
}
return resultInfo
}
//获取库位类型 //获取库位类型
export function getLocationTypeInfo(value) { export function getLocationTypeInfo(value) {
var resultInfo = ""; var resultInfo = "";
@ -226,6 +258,13 @@ export function getLocationTypeInfo(value) {
} }
return resultInfo return resultInfo
} }
//获取库区类型名称
export function getLocationAreaTypeName(value) {
let location = getLocationAreaTypeInfo(value);
return location == '' ? value : location.label;
}
//获取库位类型名称 //获取库位类型名称
export function getLocationTypeName(value) { export function getLocationTypeName(value) {
@ -263,7 +302,7 @@ export function getUomInfo(value) {
} }
//获取包装单位 //获取包装单位
export function getStdPackUnitInfo(value) { export function getPackUnitInfo(value) {
var resultInfo = ""; var resultInfo = "";
if (packUnitList.length == 0) { if (packUnitList.length == 0) {
packUnitList = getDirectoryInfo("pack_unit") packUnitList = getDirectoryInfo("pack_unit")
@ -515,11 +554,11 @@ export function getCountStageName(value) {
//获取包装规格 //获取包装规格
export function getPackUnitName(value) { export function getPackUnitName(value) {
var resultInfo = ""; var resultInfo = "";
if (packUnitList.length == 0) { if (packUnitInfoList.length == 0) {
packUnitList = uni.getStorageSync('packunit'); packUnitInfoList = uni.getStorageSync('packunit');
} }
if (packUnitList.length > 0) { if (packUnitInfoList.length > 0) {
for (let item of packUnitList) { for (let item of packUnitInfoList) {
if (item.code == value) { if (item.code == value) {
resultInfo = item.name resultInfo = item.name
break; break;
@ -528,3 +567,6 @@ export function getPackUnitName(value) {
} }
return resultInfo return resultInfo
} }
locationAreaTypeList

37
src/common/label.js

@ -2,7 +2,7 @@ let labelDic = [];
import { import {
getLabelByHeader, getLabelByHeader,
getPackageByNumber getPackageListByNumber
} from '../api/request2.js'; } from '../api/request2.js';
import { import {
@ -49,17 +49,18 @@ export function getLabelInfo(scanMsg,headerType, callBack) {
getBarCodeInfo('text', 'V1.0', scanMsg, callBack); getBarCodeInfo('text', 'V1.0', scanMsg, callBack);
} }
}else { }else {
let labelResult = { getBarCodeInfo('text', 'V1.0', scanMsg, callBack);
label: { // let labelResult = {
labelType: "", // label: {
barType: '', // labelType: "",
code:"" // barType: '',
}, // code:""
package: null, // },
success: false, // package: null,
message: '标签格式不正确', // success: false,
} // message: '标签格式不正确',
callBack(labelResult); // }
// callBack(labelResult);
} }
} }
@ -106,13 +107,15 @@ export function getLabelItems(labelItem, scanMsg, callBack) {
//查询包装信息 //查询包装信息
let packingNumber = labelResult.label.packingNumber let packingNumber = labelResult.label.packingNumber
if (packingNumber != undefined) { if (packingNumber != undefined) {
getPackageByNumber(packingNumber).then(pack => { getPackageListByNumber(packingNumber).then(pack => {
if (pack.data.list.length == 0) { if (pack.data.reqPackage) {
labelResult.package = pack.data.reqPackage;
labelResult.package.subList = pack.data.subList;
console.log('包装信息', JSON.stringify(labelResult.package))
} else {
labelResult.success = false; labelResult.success = false;
labelResult.message = '包装号[' + packingNumber + ']没有包装信息'; labelResult.message = '包装号[' + packingNumber + ']没有包装信息';
} else {
labelResult.package = pack.data.list[0];
console.log('包装信息', JSON.stringify(labelResult.package))
} }
callBack(labelResult); callBack(labelResult);
}).catch(err => { }).catch(err => {

34
src/common/record.js

@ -15,8 +15,8 @@ export function createItemInfo(balance, pack) {
let item = { let item = {
itemCode: pack.itemCode, itemCode: pack.itemCode,
itemName: pack.itemName, itemName: pack.itemName,
stdPackQty: pack.stdPackQty, packQty: pack.packQty,
stdPackUnit: pack.stdPackUnit, packUnit: pack.packUnit,
qty: new Decimal(balance.qty).toNumber(), qty: new Decimal(balance.qty).toNumber(),
handleQty:new Decimal(0).toNumber(), handleQty:new Decimal(0).toNumber(),
uom: pack.uom, uom: pack.uom,
@ -32,8 +32,8 @@ export function createDetailInfo(balance, pack) {
let detail = deepCopyData(balance); let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber() detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber(); detail.qty = new Decimal(detail.qty).toNumber();
detail.stdPackQty = new Decimal(pack.stdPackQty).toNumber() detail.packQty = new Decimal(pack.packQty).toNumber()
detail.stdPackUnit = pack.stdPackUnit detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber() ; detail.handleQty = new Decimal(detail.qty).toNumber() ;
detail.package = pack; detail.package = pack;
@ -56,12 +56,30 @@ export function calcHandleQty(detailSource) {
} }
} }
export function calcTreeHandleQty(detailSource) {
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
detail.handleQty = new Decimal(0).toNumber();
for (let pack of detail.packList){
if(pack!=undefined&&pack.scaned){
detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
}
}
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
}
}
}
export function getBusinessType(typeCode, callback) { export function getBusinessType(typeCode, callback) {
let result = { let result = {
success: true, success: true,
businessType: '', businessType: '',
fromlocationTypeList: '', fromLocationAreaTypeList:'',
tolocationTypeList: '', toLocationAreaTypeList:'',
itemCodeTypeList:"", itemCodeTypeList:"",
useOnTheWay:"FALSE", useOnTheWay:"FALSE",
fromInventoryStatuses: '', fromInventoryStatuses: '',
@ -71,8 +89,8 @@ export function getBusinessType(typeCode, callback) {
getBusinesstypeByCode(typeCode).then(res => { getBusinesstypeByCode(typeCode).then(res => {
if (res.data.total > 0) { if (res.data.total > 0) {
result.businessType = res.data.list[0]; result.businessType = res.data.list[0];
result.fromlocationTypeList = getDirectoryItemArray(res.data.list[0].outLocationTypes) result.fromLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].outAreaTypes) ;
result.tolocationTypeList = getDirectoryItemArray(res.data.list[0].inLocationTypes) result.toLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].inAreaTypes) ;
result.itemCodeTypeList = getDirectoryItemArray(res.data.list[0].itemTypes) result.itemCodeTypeList = getDirectoryItemArray(res.data.list[0].itemTypes)
result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses; result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses;
result.toInventoryStatuses = res.data.list[0].inInventoryStatuses; result.toInventoryStatuses = res.data.list[0].inInventoryStatuses;

12
src/mycomponents/detail/comDetailCard.vue

@ -7,7 +7,7 @@
</item-compare-qty> </item-compare-qty>
</template> </template>
<u-line></u-line> <u-line></u-line>
<view class="" v-for="(item,index) in dataContent.subList"> <view class="" v-for="(item,index) in dataContent.subList" :key="index">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)" <uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions" :right-options="item.scaned?scanOptions:detailOptions"
@ -21,7 +21,7 @@
</uni-collapse> </uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit> <balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location> :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<comMessage ref="message"></comMessage> <comMessage ref="message"></comMessage>
</view> </view>
</template> </template>
@ -47,11 +47,11 @@
props: { props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: null
}, },
settingParam: { settingParam: {
type: Object, type: Object,
default: {} default: null
}, },
isShowPack: { isShowPack: {
type: Boolean, type: Boolean,
@ -65,9 +65,9 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
locationTypeList: { locationAreaTypeList: {
type: Array, type: Array,
default: [] default: null
}, },
}, },
watch: { watch: {

161
src/mycomponents/detail/comJobDetailCard.vue

@ -0,0 +1,161 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse" style="height: 500px;">
<uni-collapse-item :open="true">
<template v-slot:title>
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowPackUnit="false"></itemCompareQty>
</template>
<package-list :dataContent="dataContent.subList"
:isEdit="settingParam.allowModifyQty=='TRUE'"
:settingParam="settingParam"
@collapseChange="collapseChange"
@updateData="updateData"
></package-list>
</uni-collapse-item>
</uni-collapse>
<recommend-qty-edit ref=" receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import receiptDetailInfoPopup from '@/pages/purchaseReceipt/coms/receiptDetailInfoPopup.vue'
import pack from '@/mycomponents/balance/pack.vue'
import detailList from '@/mycomponents/detail/detailList.vue'
import packageList from '@/mycomponents/package/packageList.vue'
import {
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
export default {
emits: ["updateData"],
components: {
itemCompareQty,
recommend,
recommendQtyEdit,
jobDetailPopup,
receiptDetailInfoPopup,
detailList,
packageList
},
props: {
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
locationAreaTypeList: {
type: Object,
default: null
},
},
watch: {
},
data() {
return {
showItem: {},
editItem: {
record: {
}
},
locatonItem: {},
detailOptions: [],
scanOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
}
},
updated() {
console.log('updated')
},
methods: {
collapseChange(){
setTimeout(() => {
this.resizeCollapse();
}, 500)
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.resize()
});
this.$forceUpdate();
},
refreshCollapse() {
this.$nextTick(r => {
this.$refs.collapse.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
});
this.$forceUpdate();
},
swipeClick(e, item) {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
updateData(){
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

2
src/mycomponents/detail/detailBalanceInfo.vue

@ -32,7 +32,7 @@
<script> <script>
import { import {
getInventoryStatusName, getInventoryStatusName,
getStdPackUnitInfo, getPackUnitInfo,
getUomInfo getUomInfo
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { export default {

2
src/mycomponents/detail/detailHandleInfo.vue

@ -32,7 +32,7 @@
<script> <script>
import { import {
getInventoryStatusName, getInventoryStatusName,
getStdPackUnitInfo getPackUnitInfo
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { export default {
components: {}, components: {},

4
src/mycomponents/detail/detailPackageInfo.vue

@ -21,7 +21,7 @@
<view class="item"> <view class="item">
<text class="item_title">标包 : </text> <text class="item_title">标包 : </text>
<view class="text_wrap"> <view class="text_wrap">
<text class="text_wrap">{{dataContent.stdPackQty}}{{dataContent.stdPackUnit}}</text> <text class="text_wrap">{{dataContent.packQty}}{{dataContent.packUnit}}</text>
</view> </view>
</view> </view>
</view> </view>
@ -30,7 +30,7 @@
<script> <script>
import { import {
getInventoryStatusName, getInventoryStatusName,
getStdPackUnitInfo, getPackUnitInfo,
getUomInfo getUomInfo
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { export default {

2
src/mycomponents/detail/detailRecommendInfo.vue

@ -36,7 +36,7 @@
<script> <script>
import { import {
getInventoryStatusName, getInventoryStatusName,
getStdPackUnitInfo, getPackUnitInfo,
getUomInfo getUomInfo
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { export default {

6
src/mycomponents/detail/jobDetailPopup.vue

@ -9,7 +9,7 @@
<script> <script>
import { import {
getInventoryStatusName, getInventoryStatusName,
getStdPackUnitInfo getPackUnitInfo
} from '@/common/directory.js'; } from '@/common/directory.js';
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
@ -42,8 +42,8 @@
getInventoryStatusInfo(value) { getInventoryStatusInfo(value) {
return getInventoryStatusName(value).label return getInventoryStatusName(value).label
}, },
getStdPackUnit(uom) { getPackUnit(uom) {
let item = getStdPackUnitInfo(uom); let item = getPackUnitInfo(uom);
if (item == '') { if (item == '') {
return uom; return uom;
} else { } else {

6
src/mycomponents/job/jobDetailPopup.vue

@ -9,7 +9,7 @@
<script> <script>
import { import {
getInventoryStatusName, getInventoryStatusName,
getStdPackUnitInfo getPackUnitInfo
} from '@/common/directory.js'; } from '@/common/directory.js';
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue' import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
@ -42,8 +42,8 @@
getInventoryStatusInfo(value) { getInventoryStatusInfo(value) {
return getInventoryStatusName(value).label return getInventoryStatusName(value).label
}, },
getStdPackUnit(uom) { getPackUnit(uom) {
let item = getStdPackUnitInfo(uom); let item = getPackUnitInfo(uom);
if (item == '') { if (item == '') {
return uom; return uom;
} else { } else {

6
src/mycomponents/location/locationCompare.vue

@ -15,7 +15,7 @@
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> <image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
</view> </view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location> :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view> </view>
</template> </template>
@ -48,9 +48,9 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
locationTypeList: { locationAreaTypeList: {
type: Array, type: Array,
default: [] default: null
} }
}, },

6
src/mycomponents/location/requiredLocation.vue

@ -14,7 +14,7 @@
<image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image> <image v-if="isShowEdit" style="width:45rpx;height: 45rpx;" src="/static/icons/icons_edit.svg"></image>
</view> </view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location> :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view> </view>
</template> </template>
@ -43,9 +43,9 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
locationTypeList: { locationAreaTypeList: {
type: Array, type: Array,
default: [] default: null
} }
}, },

6
src/mycomponents/package/packageCard.vue

@ -1,5 +1,5 @@
<template> <template>
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #ffffff; "> <view :class="dataContent.scaned?'scan_view':''" style="background-color: #fff; ">
<!-- border-bottom: 1upx solid #EEEEEE; --> <!-- border-bottom: 1upx solid #EEEEEE; -->
<view class="uni-flex uni-row space-between" style="align-items: center"> <view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉--> <!-- uni-inline-item 暂时拿掉-->
@ -23,7 +23,7 @@
</compare-qty> </compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()"> <view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 25rpx;color: #2979ff; width: 10px; " @click="copy">复制</text> <text style="font-size: 25rpx;color: #2979ff; width: 45rpx; " @click="copy">复制</text>
</view> </view>
</view> </view>
</view> </view>
@ -59,7 +59,7 @@
props: { props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: null
}, },
isShowContainer: { isShowContainer: {
type: Boolean, type: Boolean,

4
src/mycomponents/package/packageDetailPopup.vue

@ -112,10 +112,10 @@
content: this.dataContent.convertRate content: this.dataContent.convertRate
}, { }, {
item_title: '标包数量', item_title: '标包数量',
content: this.dataContent.stdPackQty content: this.dataContent.packQty
}, { }, {
item_title: '标包单位', item_title: '标包单位',
content: this.dataContent.stdPackUnit content: this.dataContent.packUnit
}, { }, {
item_title: '仓库代码', item_title: '仓库代码',
content: this.dataContent.toWarehouseCode content: this.dataContent.toWarehouseCode

99
src/mycomponents/package/packageList.vue

@ -1,17 +1,30 @@
<template> <template>
<view class="" v-for="(item,index) in dataContent" :key="item.id"> <view class="">
<uni-collapse ref="collapse2" @change="collapseChange">
<uni-collapse-item :disabled="false"> <view class="" v-for="(item,index) in dataContent" :key="item.id">
<template v-slot:title> <uni-collapse ref="collapse2" @change="collapseChange">
<package-card :dataContent="item" :isShowLocation="false" <uni-collapse-item :disabled="false">
:isShowFromLocation="false"></package-card> <template v-slot:title>
</template> <package-card :dataContent="item" :isShowLocation="false"
<view v-for="(pack,index) in item.packList" :key="pack.id" style=" width: 90%;"> :isShowFromLocation="isShowFromLocation"></package-card>
<package-card :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false" </template>
:isShowToLocation="false" :isShowBatch="false"></package-card> <view v-for="(pack,index) in item.packList" :key="pack.id"
</view> style=" width: 100%; background-color: antiquewhite;">
</uni-collapse-item> <uni-swipe-action>
</uni-collapse> <uni-swipe-action-item :right-options="(pack.scaned&&isEdit)?editAndRemoveOptions : pack.scaned? removeOptions:options"
@click="swipeClick($event,pack)">
<package-card :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false"
:isShowToLocation="false" :isShowBatch="false"></package-card>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -19,21 +32,35 @@
<script> <script>
import config from '@/static/config.js' import config from '@/static/config.js'
import packageCard from '@/mycomponents/package/packageCard.vue' import packageCard from '@/mycomponents/package/packageCard.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import {
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default { export default {
emits: ["collapseChange"], emits: ["collapseChange", "updateData"],
components: { components: {
packageCard packageCard,
recommendQtyEdit
}, },
data() { data() {
return { return {
editItem: {},
options: [],
removeOptions: [],
editAndRemoveOptions: []
} }
}, },
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
},
props: { props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: null
}, },
isShowContainer: { isShowContainer: {
type: Boolean, type: Boolean,
@ -64,12 +91,43 @@
type: String, type: String,
default: '库位' default: '库位'
}, },
settingParam: {
type: Object,
default: null
},
isEdit: {
type: Boolean,
default: false
}
}, },
watch: { watch: {
}, },
methods: { methods: {
swipeClick(e, item) {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
remove(item) {
this.$refs.comMessage.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null;
this.$emit('updateData')
this.$forceUpdate()
}
});
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
collapseChange() { collapseChange() {
this.$emit("collapseChange"); this.$emit("collapseChange");
this.resizeCollapse(); this.resizeCollapse();
@ -139,13 +197,18 @@
}, },
isDevlement() { isDevlement() {
return config.isDevelopment; return config.isDevelopment;
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit("updateData")
} }
} }
} }
</script> </script>
<style> <style>
.open{ .open {
/* background-color: green !important; */ /* background-color: green !important; */
padding-top: 0px !important; padding-top: 0px !important;
} }

168
src/mycomponents/package/packageRecordCard.vue

@ -0,0 +1,168 @@
<template>
<view :class="dataContent.scaned?'scan_view':''" style="background-color: #fff; ">
<!-- border-bottom: 1upx solid #EEEEEE; -->
<view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉-->
<view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
</container> -->
<pack v-if="isShowPack && dataContent.packingNumber!=null" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch!=null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode">
</location>
<!-- <to-location></to-location> -->
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode">
</to-location>
</view>
<view class="uni-flex uni-row" style="word-break: break-all;">
<qty v-if="true" :dataContent="dataContent"
:isShowStdPack="isShowStdPack" :isShowStatus="isShowStatus"></qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)"
:handleQty="dataContent.handleQty" :isShowStatus="false" :isShowPack="isShowPack">
</compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 25rpx;color: #2979ff; width: 45rpx; " @click="copy">复制</text>
</view>
</view>
</view>
</view>
</template>
<script>
import qty from '@/mycomponents/qty/qty.vue'
import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
import balanceQty from '@/mycomponents/qty/balanceQty.vue'
export default {
components: {
container,
pack,
location,
toLocation,
batch,
recommendQty,
compareQty,
balanceQty,
qty
},
data() {
return {
}
},
props: {
dataContent: {
type: Object,
default: {}
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
locationTitle: {
type: String,
default: '库位'
},
isShowBalanceQty: {
type: Boolean,
default: true
},
showPack: {
type: Boolean,
default: false
},
},
watch: {
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent
.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.dataContent.itemCode + ";P" + this.dataContent.packingNumber + ";B" + this.dataContent
.batch + ";Q" + this.dataContent.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
}
}
}
</script>
<style>
</style>

195
src/mycomponents/package/packageRecordList.vue

@ -0,0 +1,195 @@
<template>
<view class="">
<view class="" v-for="(item,index) in dataContent" :key="item.id">
<uni-collapse ref="collapse2" @change="collapseChange">
<uni-collapse-item :disabled="false">
<template v-slot:title>
<packageRecordCard :dataContent="item" :isShowLocation="false"
:isShowFromLocation="false"></packageRecordCard>
</template>
<view v-for="(pack,index) in item.packList" :key="pack.id" style=" width: 100%; background-color: antiquewhite;">
<uni-swipe-action-item :right-options="editAndRemoveOptions"
@click="swipeClick($event,pack)">
<packageRecordCard :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false"
:isShowToLocation="false" :isShowBatch="false"></packageRecordCard>
</uni-swipe-action-item>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm"></balance-qty-edit>
</view>
</template>
<script>
import config from '@/static/config.js'
import packageRecordCard from '@/mycomponents/package/packageRecordCard.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import {
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
emits: ["collapseChange"],
components: {
packageRecordCard,
balanceQtyEdit
},
data() {
return {
editItem: {},
options: [],
removeOptions: [],
editAndRemoveOptions:[]
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions =getEditRemoveOption()
},
props: {
dataContent: {
type: Object,
default: null
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
locationTitle: {
type: String,
default: '库位'
},
settingParam: {
type: Object,
default: null
},
isEdit:{
type: Boolean,
default: false
}
},
watch: {
},
methods: {
swipeClick(e, item) {
if (e.content.text == "编辑") {
// this.edit(item)
}
},
// edit(item) {
// this.editItem = item;
// this.$refs.balanceQtyEdit.openEditPopup(this.editItem, this.editItem.qty);
// },
collapseChange() {
this.$emit("collapseChange");
this.resizeCollapse();
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse2.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
});
this.$forceUpdate();
},
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
// #endif
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制制品标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制制品标签成功'
})
}
})
// #endif
},
isDevlement() {
return config.isDevelopment;
},
confirm(qty){
this.editItem.qty =qty;
this.$emit('updateData')
}
}
}
</script>
<style>
.open {
/* background-color: green !important; */
padding-top: 0px !important;
}
</style>

4
src/mycomponents/partCode/partCode.vue

@ -17,7 +17,7 @@
<count :countType="countType" <count :countType="countType"
:recommendQty="recommendQty" :recommendQty="recommendQty"
:uom="uom" :uom="uom"
:stdPackQty="stdPackQty" :packQty="packQty"
:handledQty="handledQty"></count> :handledQty="handledQty"></count>
</view> </view>
@ -96,7 +96,7 @@
type: Number, type: Number,
default: 0 default: 0
}, },
stdPackQty: { packQty: {
type: Number, type: Number,
default: 0, default: 0,
}, },

12
src/mycomponents/qty/balanceQty.vue

@ -6,24 +6,26 @@
{{Number(dataContent.qty)}} {{Number(dataContent.qty)}}
</text> </text>
</view> </view>
<uom v-if="dataContent.stdPackQty==undefined" :uom="dataContent.uom"></uom> <uom v-if="dataContent.packQty==undefined" :uom="dataContent.uom"></uom>
</view> </view>
<view class="uni-flex uni-row center"> <view class="uni-flex uni-row center">
<std-pack-qty :dataContent="dataContent"></std-pack-qty> <pack-unit :dataContent="dataContent"></pack-unit>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue' import packQty from '@/mycomponents/qty/packQty.vue'
import uom from '@/mycomponents/qty/uom.vue' import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue' import status from '@/mycomponents/status/status.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default { export default {
components: { components: {
stdPackQty, packQty,
uom, uom,
status status,
packUnit
}, },
data() { data() {
return { return {

8
src/mycomponents/qty/balanceQtyEdit.vue

@ -18,15 +18,15 @@
<view class="uni-flex uni-row u-col-center"> <view class="uni-flex uni-row u-col-center">
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount"> <uni-number-box @change="calcQty($event,stdCount)" :value="stdCount">
</uni-number-box> </uni-number-box>
<std-uom :uom="dataContent.stdPackUnit"></std-uom> <uom :uom="dataContent.uom"></uom>
<!-- <uom :uom="dataContent.stdPackUnit"></uom> --> <!-- <uom :uom="dataContent.packUnit"></uom> -->
</view> </view>
</view> </view>
<u-line /> <u-line />
<view class="uni-flex uni-row space-between padding title u-col-center"> <view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text> <text>标包量 : </text>
<view class="uni-flex u-col-center uni-row"> <view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.stdPackQty)}}</text> <text>{{Number(dataContent.packQty)}}</text>
<uom :uom="dataContent.uom"></uom> <uom :uom="dataContent.uom"></uom>
</view> </view>
</view> </view>
@ -156,7 +156,7 @@
}, },
calcQty(val) { calcQty(val) {
if (val > 0) { if (val > 0) {
this.allQty = val * Number(this.dataContent.stdPackQty); this.allQty = val * Number(this.dataContent.packQty);
} }
}, },
setValue() { setValue() {

6
src/mycomponents/qty/compareQty.vue

@ -41,14 +41,14 @@
</template> </template>
<script> <script>
// import stdPackQty from '@/mycomponents/qty/stdPackQty.vue' // import packQty from '@/mycomponents/qty/packQty.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue' import packUnit from '@/mycomponents/qty/packUnit.vue'
import uom from '@/mycomponents/qty/uom.vue' import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue' import status from '@/mycomponents/status/status.vue'
export default { export default {
components: { components: {
// stdPackQty, // packQty,
packUnit, packUnit,
uom, uom,
status status
@ -67,7 +67,7 @@
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: null
}, },
recommendQty: { recommendQty: {
type: Number, type: Number,

16
src/mycomponents/qty/countQtyEdit.vue

@ -19,7 +19,7 @@
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false"> <uni-number-box @change="calcQty($event,stdCount)" :value="stdCount" :focus="false">
</uni-number-box> </uni-number-box>
<view class="std_pack"> <view class="std_pack">
{{getStdPackUnitInfo(dataContent.stdPackUnit)}} {{getPackUnitInfo(dataContent.packUnit)}}
</view> </view>
</view> </view>
@ -28,7 +28,7 @@
<view class="uni-flex uni-row space-between padding title u-col-center"> <view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text> <text>标包量 : </text>
<view class="uni-flex u-col-center uni-row"> <view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.stdPackQty)}}</text> <text>{{Number(dataContent.packQty)}}</text>
<uom :uom="dataContent.uom"></uom> <uom :uom="dataContent.uom"></uom>
</view> </view>
</view> </view>
@ -83,7 +83,7 @@
import uom from '@/mycomponents/qty/uom.vue' import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import { import {
getStdPackUnitInfo getPackUnitInfo
} from "@/common/directory.js" } from "@/common/directory.js"
import { import {
getInventoryStatusName getInventoryStatusName
@ -162,7 +162,7 @@
// this.dataContent = item // this.dataContent = item
// this.inventoryStatus = this.dataContent.inventoryStatus; // this.inventoryStatus = this.dataContent.inventoryStatus;
// this.allQty = Number(this.dataContent.qty) // this.allQty = Number(this.dataContent.qty)
// this.stdCount = Math.ceil(this.allQty / this.dataContent.stdPackQty); // this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty);
// this.detailList = detailList // this.detailList = detailList
this.showConfirmCountdown = false; this.showConfirmCountdown = false;
this.mode = 'edit'; this.mode = 'edit';
@ -187,7 +187,7 @@
this.dataContent = item; this.dataContent = item;
this.inventoryStatus = this.dataContent.inventoryStatus; this.inventoryStatus = this.dataContent.inventoryStatus;
this.allQty = Number(this.dataContent.handleQty); this.allQty = Number(this.dataContent.handleQty);
this.stdCount = Math.ceil(this.allQty / this.dataContent.stdPackQty); this.stdCount = Math.ceil(this.allQty / this.dataContent.packQty);
this.detailList = detailList; this.detailList = detailList;
}, },
@ -226,7 +226,7 @@
}, },
calcQty(val) { calcQty(val) {
if (val > 0) { if (val > 0) {
this.allQty = val * Number(this.dataContent.stdPackQty); this.allQty = val * Number(this.dataContent.packQty);
} }
}, },
@ -240,8 +240,8 @@
this.inventoryStatus = value this.inventoryStatus = value
}, },
getStdPackUnitInfo(value) { getPackUnitInfo(value) {
return getStdPackUnitInfo(value).name return getPackUnitInfo(value).name
} }
} }
} }

2
src/mycomponents/qty/inspectQtyEdit.vue

@ -133,7 +133,7 @@
this.closeEditPopup(); this.closeEditPopup();
}, },
calcQty(val) { calcQty(val) {
this.allQty = val * Number(this.dataContent.stdPackQty); this.allQty = val * Number(this.dataContent.packQty);
}, },
setValue() { setValue() {
var balanceQty = Number(this.dataContent.qty); var balanceQty = Number(this.dataContent.qty);

36
src/mycomponents/qty/packQty.vue

@ -0,0 +1,36 @@
<template>
<view class="std_pack" v-if="dataContent.packQty!=undefined">
<text>
{{Number(dataContent.packQty)}}{{getPackUnit(dataContent.packUnit)}}
</text>
</view>
</template>
<script>
import {
getPackUnitInfo
} from "@/common/directory.js"
export default {
data() {
return {
};
},
//
props: {
dataContent: {
packQty: 1000,
uom: "EA",
},
},
methods: {
getPackUnit(packUnit) {
let std = getPackUnitInfo(packUnit);
return std == "" ? packUnit : std.label;
}
}
}
</script>
<style>
</style>

22
src/mycomponents/qty/qty.vue

@ -5,25 +5,27 @@
<view class="text_default center"> <view class="text_default center">
{{Number(dataContent.qty)}} {{Number(dataContent.qty)}}
</view> </view>
<uom v-show="!isShowStdPack" :uom="dataContent.uom"></uom> <uom :uom="dataContent.uom"></uom>
</view> </view>
<view> <view>
<std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty> <pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue' import packQty from '@/mycomponents/qty/packQty.vue'
import uom from '@/mycomponents/qty/uom.vue' import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue' import status from '@/mycomponents/status/status.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default { export default {
components: { components: {
stdPackQty, packQty,
status, status,
uom uom,
packUnit
}, },
data() { data() {
return { return {
@ -34,16 +36,20 @@
props: { props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: null
}, },
isShowStatus: { isShowStatus: {
type: Boolean, type: Boolean,
default: true default: true
}, },
isShowStdPack: { isShowPack: {
type: Boolean, type: Boolean,
default: true default: true
} },
isShowPackUnit: {
type: Boolean,
default: true
},
}, },
watch: { watch: {

4
src/mycomponents/qty/recommendQty.vue

@ -16,14 +16,14 @@
</template> </template>
<script> <script>
// import stdPackQty from '@/mycomponents/qty/stdPackQty.vue' // import packQty from '@/mycomponents/qty/packQty.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue' import packUnit from '@/mycomponents/qty/packUnit.vue'
import uom from '@/mycomponents/qty/uom.vue' import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue' import status from '@/mycomponents/status/status.vue'
export default { export default {
components: { components: {
// stdPackQty, // packQty,
packUnit, packUnit,
uom, uom,
status status

27
src/mycomponents/qty/recommendQtyEdit.vue

@ -14,20 +14,19 @@
<view class="uni-flex uni-column" style="background-color: white; height:60%;"> <view class="uni-flex uni-column" style="background-color: white; height:60%;">
<view class="uni-flex uni-column "> <view class="uni-flex uni-column ">
<view class="uni-flex uni-row space-between padding title "> <view class="uni-flex uni-row space-between padding title ">
<text>包个数 : </text> <text>个数 : </text>
<view class="uni-flex uni-row u-col-center"> <view class="uni-flex uni-row u-col-center">
<uni-number-box @change="calcQty($event,stdCount)" :value="stdCount"> <uni-number-box :min="0" @change="calcQty($event,stdCount)" :value="stdCount">
</uni-number-box> </uni-number-box>
<std-uom :uom="dataContent.stdPackUnit"></std-uom> {{getPackUnitName(dataContent.packUnit)}}
</view> </view>
</view> </view>
<u-line /> <u-line />
<view class="uni-flex uni-row space-between padding title u-col-center"> <view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text> <text>包装规格 : </text>
<view class="uni-flex u-col-center uni-row"> <view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.stdPackQty)}}</text> <packUnit :dataContent="dataContent"></packUnit>
<uom :uom="dataContent.uom"></uom>
</view> </view>
</view> </view>
@ -56,12 +55,18 @@
</template> </template>
<script> <script>
import {
getUomInfo,
getPackUnitName
} from '@/common/directory.js';
import uom from '@/mycomponents/qty/uom.vue' import uom from '@/mycomponents/qty/uom.vue'
import stdUom from '@/mycomponents/qty/stdUom.vue' import stdUom from '@/mycomponents/qty/stdUom.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default { export default {
components: { components: {
uom, uom,
stdUom, stdUom,
packUnit
}, },
data() { data() {
return { return {
@ -92,7 +97,7 @@
}, },
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: null
}, },
handleQty: { handleQty: {
type: Number, type: Number,
@ -100,10 +105,14 @@
}, },
settingParam: { settingParam: {
type: Object, type: Object,
default: {} default: null
}, },
}, },
methods: { methods: {
getPackUnitName(packUnit) {
let unit = getPackUnitName(packUnit);
return unit;
},
checkNum(e) { checkNum(e) {
let value = e.detail.value; let value = e.detail.value;
let dot = value.indexOf('.'); // let dot = value.indexOf('.'); //
@ -150,7 +159,7 @@
}, },
calcQty(val) { calcQty(val) {
if (val > 0) { if (val > 0) {
this.allQty = val * this.dataContent.stdPackQty; this.allQty = val * this.dataContent.packQty;
} }
}, },
setValue() { setValue() {

37
src/mycomponents/qty/stdPackQty.vue

@ -1,37 +0,0 @@
<template>
<view class="std_pack" v-if="dataContent.stdPackQty!=undefined">
<text>
{{Number(dataContent.stdPackQty)}}{{getStdPackUnit(dataContent.stdPackUnit)}}
</text>
</view>
</template>
<script>
import {
// getStdPackUnitInfo,
getStdPackUnitInfo
} from "@/common/directory.js"
export default {
data() {
return {
};
},
//
props: {
dataContent: {
stdPackQty: 1000,
uom: "EA",
},
},
methods: {
getStdPackUnit(stdPackUnit) {
let std = getStdPackUnitInfo(stdPackUnit);
return std == "" ? stdPackUnit : std.label;
}
}
}
</script>
<style>
</style>

8
src/mycomponents/qty/stdUom.vue

@ -1,13 +1,13 @@
<template> <template>
<view class="uom"> <view class="uom">
{{getStdPackUnit(uom)}} {{getPackUnit(uom)}}
</view> </view>
</template> </template>
<script> <script>
import { import {
getStdPackUnitInfo getPackUnitInfo
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { export default {
data() { data() {
@ -23,8 +23,8 @@
}, },
}, },
methods: { methods: {
getStdPackUnit(uom) { getPackUnit(uom) {
let item = getStdPackUnitInfo(uom); let item = getPackUnitInfo(uom);
if (item == '') { if (item == '') {
return uom; return uom;
} else { } else {

173
src/mycomponents/record/recordDetailCard.vue

@ -0,0 +1,173 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse" style="height: 500px;">
<uni-collapse-item :open="true">
<template v-slot:title>
<itemQty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowPackUnit="false"></itemQty>
</template>
<packageRecordList :dataContent="dataContent.subList" :isEdit="settingParam.allowModifyQty=='TRUE'" :settingParam="settingParam" @collapseChange="collapseChange"></packageRecordList>
</uni-collapse-item>
</uni-collapse>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<receipt-detail-info-popup ref="jobDetailPopup" :dataContent="showItem"></receipt-detail-info-popup>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import receiptDetailInfoPopup from '@/pages/purchaseReceipt/coms/receiptDetailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import pack from '@/mycomponents/balance/pack.vue'
import packageRecordList from '@/mycomponents/package/packageRecordList.vue'
import {
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
recommendQtyEdit,
jobDetailPopup,
receiptDetailInfoPopup,
winScanLocation,
packageRecordList
},
props: {
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
locationAreaTypeList: {
type: Object,
default: null
},
},
watch: {
},
data() {
return {
showItem: {},
editItem: {
record: {
}
},
locatonItem: {},
detailOptions: [],
scanOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
}
},
updated() {
console.log('updated')
},
methods: {
collapseChange(){
setTimeout(() => {
this.resizeCollapse();
}, 500)
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.resize()
});
this.$forceUpdate();
},
refreshCollapse() {
this.$nextTick(r => {
this.$refs.collapse.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
});
this.$forceUpdate();
},
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
this.$emit('updateData')
},
detail(item) {
this.showItem = item;
this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
}
}
}
</script>
<style>
</style>

5
src/mycomponents/scan/winComScan.vue

@ -108,8 +108,8 @@
document.querySelector('textarea').setAttribute('inputmode', 'none') document.querySelector('textarea').setAttribute('inputmode', 'none')
} }
// #endif // #endif
// #ifdef APP-PLUS
this.hide() this.hide()
// #ifdef APP-PLUS
// //
// this.hide() // this.hide()
// uni.onKeyboardHeightChange(res => { // uni.onKeyboardHeightChange(res => {
@ -146,6 +146,7 @@
}, },
methods: { methods: {
hide() { hide() {
// #ifdef APP-PLUS
// //
var interval = setInterval(function() { var interval = setInterval(function() {
uni.hideKeyboard(); // uni.hideKeyboard(); //
@ -155,6 +156,7 @@
clearInterval(interval); clearInterval(interval);
console.log('停止刷新') console.log('停止刷新')
}, 1000); }, 1000);
// #endif
}, },
getValue() { getValue() {
return this.scanMsg return this.scanMsg
@ -221,6 +223,7 @@
this.$nextTick(r => { this.$nextTick(r => {
that.boxfocus = true; that.boxfocus = true;
}); });
this.hide()
}, },
losefocus() { losefocus() {
let that = this; let that = this;

8
src/mycomponents/scan/winScanJobNumber.vue

@ -13,7 +13,13 @@
</view> </view>
<view class=""> <view class="">
<view class=""> <view class="">
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="false" :isShowHistory="false"> <win-com-scan ref="scan"
@getResult="getScanResult"
:placeholder='title'
:clearResult="false"
:isShowHistory="false"
headerType=""
>
</win-com-scan> </win-com-scan>
</view> </view>
</view> </view>

19
src/mycomponents/scan/winScanLocation.vue

@ -27,8 +27,8 @@
getBasicLocationByCode, getBasicLocationByCode,
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getLocationTypeName, getLocationAreaTypeName,
getListLocationTypeDesc, getListLocationAreaTypeDesc,
checkDirectoryItemExist checkDirectoryItemExist
} from '@/common/directory.js'; } from '@/common/directory.js';
import winComScan from '@/mycomponents/scan/winComScan.vue' import winComScan from '@/mycomponents/scan/winComScan.vue'
@ -42,9 +42,9 @@
type: String, type: String,
default: '' default: ''
}, },
locationTypeList: { locationAreaTypeList: {
type: Array, type: Array,
default: [] default: null
}, },
isShowHistory: { isShowHistory: {
type: Boolean, type: Boolean,
@ -98,15 +98,16 @@
if (res.data.total > 0) { if (res.data.total > 0) {
let result = res.data.list[0]; let result = res.data.list[0];
var type = result.type; var type = result.type;
var areaType = result.areaType
var available = result.available; var available = result.available;
if (available == "TRUE") { if (available == "TRUE") {
if (checkDirectoryItemExist(this.locationTypeList, type)) { if (checkDirectoryItemExist(this.locationAreaTypeList, areaType)) {
this.location = result; this.location = result;
this.callBack(); this.callBack();
} else { } else {
var hint = getListLocationTypeDesc(this.locationTypeList); var hint = getListLocationAreaTypeDesc(this.locationAreaTypeList);
this.showErrorMessage("扫描库位[" + this.code + "]是[" + this.showErrorMessage("扫描库位[" + this.code + "]是[" +
getLocationTypeName(type) + "],需要的库位类型是[" + hint + "]") getLocationAreaTypeName(areaType) + "],需要的库区是[" + hint + "]")
} }
} else { } else {
this.showErrorMessage("扫描库位[" + this.code + "]不可用") this.showErrorMessage("扫描库位[" + this.code + "]不可用")
@ -126,10 +127,10 @@
}, },
checkLocationType(type) { checkLocationType(type) {
var isPass = false; var isPass = false;
if (this.locationTypeList.length == 0) { if (this.locationAreaTypeList.length == 0) {
isPass = true; isPass = true;
} else { } else {
var temp = this.locationTypeList.filter(res => { var temp = this.locationAreaTypeList.filter(res => {
if (res == type) { if (res == type) {
return res return res
} }

23
src/mycomponents/scan/winScanPackAndLocation.vue

@ -62,10 +62,10 @@
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getListLocationTypeDesc, getListLocationAreaTypeDesc,
checkDirectoryItemExist, checkDirectoryItemExist,
getDirectoryItemArray, getDirectoryItemArray,
getLocationTypeName, getLocationAreaTypeName,
getInventoryStatusDesc getInventoryStatusDesc
} from '@/common/directory.js'; } from '@/common/directory.js';
export default { export default {
@ -114,7 +114,7 @@
fromLocationCode: '', fromLocationCode: '',
fromLocation: '', fromLocation: '',
fromLocationList: [], fromLocationList: [],
fromLocationTypeArray: [], fromLocationAreaTypeList: [],
locationOnFocus: false, locationOnFocus: false,
businessType: {}, businessType: {},
inventoryStatus: [], inventoryStatus: [],
@ -138,7 +138,7 @@
} }
this.fromInventoryStatuses = this.businessType.outInventoryStatuses this.fromInventoryStatuses = this.businessType.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); //
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, 500) }, 500)
@ -162,7 +162,7 @@
}, 500) }, 500)
this.fromInventoryStatuses = jobContent.outInventoryStatuses this.fromInventoryStatuses = jobContent.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaCodes); //
}, },
closeScanPopup(content) { closeScanPopup(content) {
@ -194,25 +194,22 @@
mask: true mask: true
}); });
getBasicLocationByCode(this.fromLocationCode).then(res => { getBasicLocationByCode(this.fromLocationCode).then(res => {
uni.hideLoading();
if (res.data.total > 0) { if (res.data.total > 0) {
let result = res.data.list[0]; let result = res.data.list[0];
var type = result.type; var type = result.type;
var available = result.available; var available = result.available;
if (available == "TRUE") { if (available == "TRUE") {
if (checkDirectoryItemExist(this.fromLocationTypeArray, type)) { if (checkDirectoryItemExist(this.fromLocationAreaTypeList, type)) {
this.location = result; this.location = result;
// this.packGetFocus(); // this.packGetFocus();
this.checkPackage(scanResult); this.checkPackage(scanResult);
} else { } else {
uni.hideLoading(); var hint = getListLocationAreaTypeDesc(this.fromLocationAreaTypeList);
var hint = getListLocationTypeDesc(this.fromLocationTypeArray); this.showErrorMessage("扫描库位[" + this.code + "]是[" +
this.showErrorMessage("库位[" + this.fromLocationCode + "]是" + getLocationAreaTypeName(areaType) + "],需要的库区是[" + hint + "]")
getLocationTypeName(type) + ",<br>需要的库位类型是[" + hint + "]", callback => {
this.locationGetFocus();
})
} }
} else { } else {
uni.hideLoading();
this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => { this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => {
this.locationGetFocus(); this.locationGetFocus();
}) })

454
src/mycomponents/scan/winScanPackAndLocationNoBalance.vue

@ -0,0 +1,454 @@
<template>
<view>
<uni-popup ref="popup" @change="change" @maskClick="closeScanPopup()">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描{{title}}
</view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image>
</view>
</view>
<view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
border-radius: 8rpx;
height: 30px;">
<view class="uni-center" style="width: 25%; ">
来源库位
</view>
<!-- style="width: 75%;padding: 8rpx" -->
<view class="">
<!-- <input v-model="fromLocationCode" placeholder="请扫描来源库位" :focus="locationOnFocus"
placeholder-style="font-size:12px" style="padding: 5px;" @confirm="scanLocation" /> -->
<view v-if='allowModifyLocation'>
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位"
style='height: 30rpx;border:1px solid #fff ;'></uni-combox>
</view>
<view v-else>
<text style="padding: 5px">
{{fromLocationCode}}
</text>
</view>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult"
:isShowHistory="isShowHistory" :clearResult="true" :headerType="headerType"></win-com-scan>
</view>
</view>
</view>
</uni-popup>
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select>
</view>
<comMessage ref="comMessage"></comMessage>
</template>
<script>
import winComScan from '@/mycomponents/scan/winComScan.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import {
getBalanceByManagementPrecision,
} from '@/common/balance.js';
import {
getBasicLocationByCode,
} from '@/api/request2.js';
import {
getListLocationTypeDesc,
checkDirectoryItemExist,
getDirectoryItemArray,
getLocationTypeName,
getInventoryStatusDesc
} from '@/common/directory.js';
export default {
name: 'winScanPack',
emits: ["getResult", "close", "getCountScanResult"],
components: {
winComScan,
balanceSelect
},
props: {
title: {
type: String,
default: '箱标签'
},
isShowHistory: {
type: Boolean,
default: true
},
allowNullBalance: {
type: Boolean,
default: false
},
//
noShowBalanceMessage: {
type: Boolean,
default: false
},
//
allowModifyLocation: {
type: Boolean,
default: true
},
headerType: {
type: String,
default: "HPQ,HMQ"
},
},
data() {
return {
scanResult: {},
show: false,
scanList: [],
expand: false,
showScanResult: {},
expendIcon: 'arrow-down',
fromLocationCode: '',
fromLocation: '',
fromLocationList: [],
fromLocationTypeArray: [],
locationOnFocus: false,
businessType: {},
inventoryStatus: [],
managementPrecision: '',
fromInventoryStatuses: "",
isCheck:false
}
},
created() {
},
methods: {
//
openScanPopupForType(fromLocationCode, businessType) {
this.businessType = businessType;
this.fromLocationCode = fromLocationCode;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
this.fromInventoryStatuses = this.businessType.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); //
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
//
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
}
}
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
this.fromInventoryStatuses = jobContent.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //
},
closeScanPopup(content) {
this.$refs.popup.close();
this.$emit("close", '');
},
scanLocation(scanResult) {
var isCheck = false;
if (this.fromLocationCode == '') {
this.showErrorMessage('来源库位不能为空', callback => {
this.locationGetFocus();
})
return;
}
if(this.fromLocationList.length>0){
if(!this.isInLocationList(this.fromLocationCode)){
this.showErrorMessage("扫描库位【"+this.fromLocationCode+'】不在任务来源库位中', callback => {
this.locationGetFocus();
})
return;
}
}
uni.showLoading({
title: '扫描中...',
mask: true
});
getBasicLocationByCode(this.fromLocationCode).then(res => {
if (res.data.total > 0) {
let result = res.data.list[0];
var type = result.type;
var available = result.available;
if (available == "TRUE") {
if (checkDirectoryItemExist(this.fromLocationTypeArray, type)) {
this.location = result;
// this.packGetFocus();
this.checkPackage(scanResult);
} else {
uni.hideLoading();
var hint = getListLocationTypeDesc(this.fromLocationTypeArray);
this.showErrorMessage("库位[" + this.fromLocationCode + "]是" +
getLocationTypeName(type) + ",<br>需要的库位类型是[" + hint + "]", callback => {
this.locationGetFocus();
})
}
} else {
uni.hideLoading();
this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => {
this.locationGetFocus();
})
}
} else {
uni.hideLoading();
this.showErrorMessage('未查询到库位[' + this.fromLocationCode + ']', res => {
this.locationGetFocus();
})
}
}).catch(error => {
uni.hideLoading();
this.showErrorMessage(error, res => {
this.locationGetFocus();
})
})
},
getScanResult(result) {
// console.log("", result)
// if (this.fromLocationCode == '' || this.fromLocationCode == null) {
// this.showMessage('', callback => {
// this.locationGetFocus();
// })
// return;
// } else
this.scanLocation(result);
// debugger
// if(this.isCheck){
// this.checkPackage(result);
// }
},
checkPackage(result){
if (result.label != null) {
this.scanResult = result;
// uni.showLoading({
// title: '...',
// mask: true
// })
getBalanceByManagementPrecision(result.label, this.fromLocationCode, this.fromInventoryStatuses,
res => {
uni.hideLoading();
if (res.success) {
this.managementPrecision = res.managementPrecision
this.afterQueryBalance(res.data.list);
} else {
this.showErrorMessage(res.message, res => {
this.packGetFocus();
})
}
// uni.hideLoading();
});
}
},
afterQueryBalance(datas) {
if (this.allowNullBalance) {
this.allowNoneBalance(datas);
} else if (this.noShowBalanceMessage) {
this.countCallBack(datas);
} else {
this.mustHavaBalance(datas);
}
uni.hideLoading();
},
//
allowNoneBalance(datas) {
this.packCallBack(null);
// if (datas.length == 0) {
// this.packCallBack(null);
// } else {
// this.showErrorMessage('[' + this.fromLocationCode + '],,', res => {
// this.packGetFocus();
// })
// }
},
//
mustHavaBalance(datas) {
if (datas.length == 0) {
this.showErrorMessage(this.getQueryCondition() + '<br>未查找到库存记录', res => {
this.packGetFocus();
})
} else if (datas.length == 1) {
let balance = datas[0];
this.packCallBack(balance);
// 20231228
// if (balance.qty > 0) {
// this.packCallBack(balance);
// } else {
// this.showErrorMessage(this.getQueryCondition() + '<br>[' + balance.qty + "],<br>",
// res => {
// this.packGetFocus();
// })
// }
} else {
this.showBalanceSelect(datas);
}
},
showBalanceSelect(items) {
this.$refs.balanceSelect.openPopup(items);
},
selectBalanceItem(balance) {
this.packCallBack(balance);
// 20231228
// if (balance.qty > 0) {
// this.packCallBack(balance);
// } else {
// this.showErrorMessage(this.getQueryCondition() + '<br>[' + balance.qty + "],",
// res => {
// this.packGetFocus();
// })
// }
},
//
countCallBack(datas) {
this.$refs.comscan.clear();
//
let data = {
label: this.scanResult.label,
package: this.scanResult.package,
balance: datas,
fromLocationCode: this.fromLocationCode,
}
this.packGetFocus();
this.$emit("getCountScanResult", data);
},
packCallBack(item) {
this.$refs.comscan.clear();
//
let data = {
label: this.scanResult.label,
package: this.scanResult.package,
balance: item,
fromLocationCode: this.fromLocationCode,
}
this.packGetFocus();
this.$emit("getResult", data);
},
packGetFocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus();
}
},
packLoseFocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus();
}
},
locationGetFocus() {
this.fromLocationCode = '';
this.locationOnFocus = true;
},
getQueryCondition() {
let condition = '按照以下条件:<br>';
let label = this.scanResult.label;
let status = getInventoryStatusDesc(this.inventoryStatus);
switch (this.managementPrecision) {
case 'BY_PACKAGING':
condition = condition + '物料号=[' + label.itemCode + ']<br>箱码=[' + label.packingNumber +
']<br>批次=[' +
label.batch +
']<br>库位=[' + this.fromLocationCode + ']'
break;
case 'BY_BATCH':
condition = condition + '物料号=[' + label.itemCode + ']<br>批次=[' +
label.batch +
']<br>库位=[' + this.fromLocationCode + ']'
break;
case 'BY_QUANTITY':
condition = condition + '物料号=[' + label.itemCode + ']<br>库位=[' + this.fromLocationCode + ']'
break;
case 'BY_UNIQUEID':
condition = condition + '物料号=[' + label.itemCode + ']'
break;
}
if (this.inventoryStatus.length > 0) {
condition = condition + '<br>库存状态=[' + status + ']'
}
return condition;
},
showMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showMessage(message, callback);
})
},
showErrorMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showErrorMessage(message, callback)
})
},
change(e) {
this.show = e.show
},
isInLocationList(location) {
var item = this.fromLocationList.find(res => res == location)
if (item = undefined) {
return false
}
return true
},
addLocationCode(code) {
if (!this.isInLocationList(code)) {
this.fromLocationList.push(code)
}
}
}
}
</script>
<style lang="scss">
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
</style>

2
src/mycomponents/wincom/basicCom/winHint.vue

@ -21,7 +21,7 @@
数量{{dataContent.recommendQty}} 数量{{dataContent.recommendQty}}
</view> </view>
<view class=""> <view class="">
标包数量{{dataContent.stdPackQty}} 标包数量{{dataContent.packQty}}
</view> </view>
<view class=""> <view class="">
推荐单位{{dataContent.recommendUom}} 推荐单位{{dataContent.recommendUom}}

128
src/pages.json

@ -340,6 +340,13 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "pages/inspect/job/inspectResult",
"style": {
"navigationBarTitleText": "检验详情",
"enablePullDownRefresh": true
}
},
{ {
"path": "pages/putaway/job/putawayJob", "path": "pages/putaway/job/putawayJob",
"style": { "style": {
@ -465,6 +472,13 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/issue/request/issueScanRequest",
"style": {
"navigationBarTitleText": "扫描叫料申请",
"enablePullDownRefresh": false
}
},
{ {
"path": "pages/issue/job/issueJob", "path": "pages/issue/job/issueJob",
@ -1130,6 +1144,75 @@
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, },
{
"path": "pages/productReceipt/job/completeReceiveJob",
"style": {
"navigationBarTitleText": "完工收货任务",
"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/productReceipt/job/completeReceiveJobDetail",
"style": {
"navigationBarTitleText": "完工收货任务详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/stockUp/job/stockUpJob",
"style": {
"navigationBarTitleText": "直接备货任务",
"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/stockUp/job/stockUpJobDetail",
"style": {
"navigationBarTitleText": "直接备货任务详情",
"enablePullDownRefresh": true
}
},
{ {
"path": "pages/scrap/record/scrapRecord", "path": "pages/scrap/record/scrapRecord",
"style": { "style": {
@ -1382,6 +1465,13 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "pages/inventoryMove/record/scrapToHoldRecord",
"style": {
"navigationBarTitleText": "报废转隔离记录",
"enablePullDownRefresh": true
}
},
{ {
"path": "pages/inventoryMove/record/okToHoldRecord", "path": "pages/inventoryMove/record/okToHoldRecord",
"style": { "style": {
@ -1734,9 +1824,47 @@
"navigationBarTitleText": "翻包", "navigationBarTitleText": "翻包",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "pages/package/job/overPackageJob",
"style": {
"navigationBarTitleText": "翻包任务",
"enablePullDownRefresh": false,
"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/package/job/overPackageJobDetail",
"style": {
"navigationBarTitleText": "翻包任务详情",
"enablePullDownRefresh": false
}
} }
], ],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "white", "navigationBarTextStyle": "white",

10
src/pages/container/record/containerBindRecord.vue

@ -98,14 +98,10 @@
id: '', id: '',
scanCount: 0, scanCount: 0,
detailSource: [], // detailSource: [], //
locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
fromLocationInfo: {}, fromLocationInfo: {},
toLocationInfo: {},
containerCode: "", containerCode: "",
containerInfo: {}, containerInfo: {},
fromlocationTypeList: [],
tolocationTypeList: [],
allowModifyLocation: false, allowModifyLocation: false,
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
@ -130,8 +126,6 @@
getBusinessType('ContainerBind', res => { getBusinessType('ContainerBind', res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showContainerPopup(); this.showContainerPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
@ -248,8 +242,8 @@
let item = { let item = {
itemCode: res.itemCode, itemCode: res.itemCode,
itemName: res.itemName, itemName: res.itemName,
stdPackQty: res.stdPackQty, packQty: res.packQty,
stdPackUnit: res.stdPackUnit, packUnit: res.packUnit,
qty: res.qty, qty: res.qty,
handleQty: 0, handleQty: 0,
uom: res.uom, uom: res.uom,

5
src/pages/container/record/containerUnBindRecord.vue

@ -61,7 +61,6 @@
} from '@/common/directory.js'; } from '@/common/directory.js';
import { import {
getBusinessType,
createItemInfo, createItemInfo,
createDetailInfo, createDetailInfo,
calcHandleQty calcHandleQty
@ -193,8 +192,8 @@
let item = { let item = {
itemCode: res.itemCode, itemCode: res.itemCode,
itemName: res.itemName, itemName: res.itemName,
stdPackQty: res.stdPackQty, packQty: res.packQty,
stdPackUnit: res.stdPackUnit, packUnit: res.packUnit,
qty: res.qty, qty: res.qty,
handleQty: 0, handleQty: 0,
uom: res.uom, uom: res.uom,

20
src/pages/count/job/countDetail.vue

@ -224,8 +224,8 @@
let item = { let item = {
itemCode: res.itemCode, itemCode: res.itemCode,
itemName: res.itemName, itemName: res.itemName,
stdPackQty: res.stdPackQty, packQty: res.packQty,
stdPackUnit: res.stdPackUnit, packUnit: res.packUnit,
qty: Number(res.qty), qty: Number(res.qty),
handleQty: 0, handleQty: 0,
uom: res.uom, uom: res.uom,
@ -503,8 +503,8 @@
// this.balance.qty = 0 // this.balance.qty = 0
this.balance.handleQty = Number(this.label.qty); this.balance.handleQty = Number(this.label.qty);
this.balance.balanceQty = this.balance.qty; this.balance.balanceQty = this.balance.qty;
this.balance.stdPackQty = this.package.stdPackQty; this.balance.packQty = this.package.packQty;
this.balance.stdPackUnit = this.package.stdPackUnit; this.balance.packUnit = this.package.packUnit;
this.$refs.countQtyEdit.openEditPopupShowSeconds(this.balance, this.$refs.countQtyEdit.openEditPopupShowSeconds(this.balance,
null); null);
}, },
@ -539,8 +539,8 @@
itemEditInfo.handleQty = qty; itemEditInfo.handleQty = qty;
itemEditInfo.inventoryStatus = inventoryStatus; itemEditInfo.inventoryStatus = inventoryStatus;
itemEditInfo.balanceQty = that.balance.qty; itemEditInfo.balanceQty = that.balance.qty;
itemEditInfo.stdPackQty = that.package.stdPackQty; itemEditInfo.packQty = that.package.packQty;
itemEditInfo.stdPackUnit = that.package.stdPackUnit; itemEditInfo.packUnit = that.package.packUnit;
} }
} }
@ -599,8 +599,8 @@
let item = { let item = {
itemCode: this.package.itemCode, itemCode: this.package.itemCode,
itemName: this.package.itemName, itemName: this.package.itemName,
stdPackQty: this.package.stdPackQty, packQty: this.package.packQty,
stdPackUnit: this.package.stdPackUnit, packUnit: this.package.packUnit,
// qty: Number(qty), // qty: Number(qty),
qty: 0, qty: 0,
handleQty: 0, handleQty: 0,
@ -625,8 +625,8 @@
itemName: this.package.itemName, itemName: this.package.itemName,
itemDesc1: this.package.itemDesc1, itemDesc1: this.package.itemDesc1,
itemDesc2: this.package.itemDesc2, itemDesc2: this.package.itemDesc2,
stdPackQty: this.package.stdPackQty, packQty: this.package.packQty,
stdPackUnit: this.package.stdPackUnit, packUnit: this.package.packUnit,
projectCode: "", projectCode: "",
qty: 0, qty: 0,
handleQty: qty, handleQty: qty,

2
src/pages/count/job/countJob.vue

@ -157,6 +157,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("盘点(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -164,7 +165,6 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("盘点(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

28
src/pages/count/record/countRecord.vue

@ -6,7 +6,7 @@
<view class="page-wraper" v-if="fromLocationCode!=''"> <view class="page-wraper" v-if="fromLocationCode!=''">
<requiredLocation title="盘点库位" :locationCode="fromLocationCode" <requiredLocation title="盘点库位" :locationCode="fromLocationCode"
:isShowEdit="jobContent.allowModifyLocation==1" @getLocation='scanLocationCode' :isShowEdit="jobContent.allowModifyLocation==1" @getLocation='scanLocationCode'
:locationTypeList="locationTypeList"></requiredLocation> :locationAreaTypeList="locationAreaTypeList"></requiredLocation>
<u-line></u-line> <u-line></u-line>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
@ -37,8 +37,8 @@
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="盘点库位" @getLocation='getLocation' <win-scan-location ref="scanFromLocationCode" title="盘点库位" @getLocation='getLocation'
:locationTypeList="fromLocationTypeArray"></win-scan-location> :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<count-qty-edit ref="CountQtyEdit" @confirm="editConfirm" :isShowStatus="true" :allowEditStatus="true"> <count-qty-edit ref="countQtyEdit" @confirm="editConfirm" :isShowStatus="true" :allowEditStatus="true">
</count-qty-edit> </count-qty-edit>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -74,6 +74,7 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue' import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import countQtyEdit from "@/mycomponents/qty/countQtyEdit.vue"
export default { export default {
name: 'receipt_detail', name: 'receipt_detail',
@ -85,7 +86,7 @@
comBlankView, comBlankView,
winScanPackAndLocation, winScanPackAndLocation,
winScanLocation, winScanLocation,
CountQtyEdit countQtyEdit
}, },
data() { data() {
return { return {
@ -97,10 +98,9 @@
jobContent: {}, // jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [], locationAreaTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
fromLocationTypeArray: [],
toLocationTypeArray: [], toLocationTypeArray: [],
fromLocationInfo: {}, fromLocationInfo: {},
fromLocationCode: "", fromLocationCode: "",
@ -113,8 +113,6 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
@ -265,7 +263,7 @@
this.$refs.comMessage.showSelectMessageModal("箱码【" + packingNumber + "】已经完成盘点,是否要编辑数量", this.$refs.comMessage.showSelectMessageModal("箱码【" + packingNumber + "】已经完成盘点,是否要编辑数量",
res => { res => {
if (res) { if (res) {
this.$refs.CountQtyEdit.openEditPopup(this.itemEditInfo, this.$refs.countQtyEdit.openEditPopup(this.itemEditInfo,
detail.subList); detail.subList);
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -273,10 +271,10 @@
}) })
} else { } else {
this.itemEditInfo.scaned = true; this.itemEditInfo.scaned = true;
this.itemEditInfo.stdPackQty = result.package.stdPackQty; this.itemEditInfo.packQty = result.package.packQty;
this.itemEditInfo.stdPackUnit = result.package.stdPackUnit; this.itemEditInfo.packUnit = result.package.packUnit;
this.itemEditInfo.record = this.createRecordInfo(this.itemEditInfo, result.balance); this.itemEditInfo.record = this.createRecordInfo(this.itemEditInfo, result.balance);
this.$refs.CountQtyEdit.openEditPopupShowSeconds(this.itemEditInfo); this.$refs.countQtyEdit.openEditPopupShowSeconds(this.itemEditInfo);
this.calcHandleQty(); this.calcHandleQty();
} }
} }
@ -314,8 +312,8 @@
let item = { let item = {
itemCode: balance.itemCode, itemCode: balance.itemCode,
itemName: pack.itemName, itemName: pack.itemName,
stdPackQty: pack.stdPackQty, packQty: pack.packQty,
stdPackUnit: pack.stdPackUnit, packUnit: pack.packUnit,
qty: balance.qty, qty: balance.qty,
handleQty: 0, handleQty: 0,
uom: pack.uom, uom: pack.uom,
@ -358,7 +356,7 @@
editItem(val) { editItem(val) {
var detail = this.detailSource.find(r => r.itemCode == val.itemCode); var detail = this.detailSource.find(r => r.itemCode == val.itemCode);
this.$refs.CountQtyEdit.openEditPopup(val, this.$refs.countQtyEdit.openEditPopup(val,
detail.subList); detail.subList);
}, },

16
src/pages/customerReturn/job/returnDetail.vue

@ -6,7 +6,7 @@
<view class=""> <view class="">
<com-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="false" <com-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationTypeList="tolocationTypeList"> :locationAreaTypeList="toLocationAreaTypeList">
</com-detail-card> </com-detail-card>
</view> </view>
<u-line /> <u-line />
@ -20,7 +20,7 @@
<view class=""> <view class="">
<locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" <locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode"
@getLocation='scanLocationCode' @getLocation='scanLocationCode'
:locationTypeList="tolocationTypeList"></locationCompare> :locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -87,7 +87,7 @@
managementList: [], managementList: [],
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
tolocationTypeList: [], toLocationAreaTypeList: [],
jobStatus:"", jobStatus:"",
jobToLocationCode:"" jobToLocationCode:""
}; };
@ -169,7 +169,7 @@
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
that.fromLocationCode = that.subList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -268,8 +268,8 @@
itemDetail.inventoryStatus = result.balance.inventoryStatus; itemDetail.inventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty) itemDetail.balance.balanceQty = Number(result.balance.qty)
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.stdPackUnit = result.package.stdPackUnit itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty(); this.calcHandleQty();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -288,8 +288,8 @@
itemDetail.toInventoryStatus = result.balance.inventoryStatus; itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty) itemDetail.balance.balanceQty = Number(result.balance.qty)
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.stdPackUnit = result.package.stdPackUnit itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty(); this.calcHandleQty();
} }
} }

3
src/pages/customerReturn/job/returnJob.vue

@ -153,6 +153,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("客户退货(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -160,7 +161,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("客户退货(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

14
src/pages/customerReturn/record/returnRecord.vue

@ -21,7 +21,7 @@
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' <requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation> :locationAreaTypeList="toLocationAreaTypeList"></requiredLocation>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -35,7 +35,7 @@
</win-scan-pack-and-location> </win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
</view> </view>
</template> </template>
@ -55,7 +55,6 @@
} from '@/common/balance.js'; } from '@/common/balance.js';
import { import {
goHome, goHome,
updateTitle,
getPackingNumberAndBatchByList, getPackingNumberAndBatchByList,
deepCopyData deepCopyData
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -98,12 +97,11 @@
dataContent: {}, // dataContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [], fromLocationAreaTypeList:[],
businessType: {}, businessType: {},
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
fromlocationTypeList: [], toLocationAreaTypeList: [],
tolocationTypeList: [],
managementList: [], managementList: [],
toWarehouseCode: '', toWarehouseCode: '',
}; };
@ -113,8 +111,8 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)

3
src/pages/customerReturn/request/customerReturnRequest.vue

@ -158,6 +158,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("客户退货申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -168,9 +169,7 @@
res.options = options; res.options = options;
}) })
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("客户退货申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

15
src/pages/customerReturn/request/customerReturnRequestCreate.vue

@ -34,7 +34,7 @@
<!-- <view class=""> <!-- <view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' <requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation> :locationAreaTypeList="toLocationAreaTypeList"></requiredLocation>
</view> --> </view> -->
<view class=""> <view class="">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -49,7 +49,7 @@
</win-scan-pack-and-location> </win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
</view> </view>
</template> </template>
@ -72,7 +72,6 @@
} from '@/common/balance.js'; } from '@/common/balance.js';
import { import {
goHome, goHome,
updateTitle,
deepCopyData, deepCopyData,
getPackingNumberAndBatchByList getPackingNumberAndBatchByList
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -112,19 +111,17 @@
dataContent: {}, // dataContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [],
businessType: {}, businessType: {},
fromLocationCode: "", fromLocationCode: "",
fromLocation: {}, fromLocation: {},
toLocationCode: "", toLocationCode: "",
fromlocationTypeList: [], fromLocationAreaTypeList: [],
tolocationTypeList: [], toLocationAreaTypeList: [],
toWarehouseCode: '', toWarehouseCode: '',
customerCode: '', customerCode: '',
showCustomer: false, showCustomer: false,
customerList: [], customerList: [],
customerName: "请选择退货客户", customerName: "请选择退货客户",
customerCode: ""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -132,8 +129,8 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)

2
src/pages/deliver/coms/comDeliverRequestPopup.vue

@ -47,7 +47,7 @@
<uom :uom="uom"></uom> <uom :uom="uom"></uom>
<!-- <view class="" v-if="stdPackInfo!=undefined" style="display: flex;flex-direction: row;margin-left: 10rpx;"> <!-- <view class="" v-if="stdPackInfo!=undefined" style="display: flex;flex-direction: row;margin-left: 10rpx;">
(<stdPackQty :dataContent="stdPackInfo"></stdPackQty>) (<packQty :dataContent="stdPackInfo"></packQty>)
</view> --> </view> -->
</view> </view>

4
src/pages/deliver/coms/comScanDeliverPack.vue

@ -385,8 +385,8 @@
}, },
creatRecord(label, balance, packageInfo) { creatRecord(label, balance, packageInfo) {
balance.stdPackQty = packageInfo.stdPackQty balance.packQty = packageInfo.packQty
balance.stdPackUnit = packageInfo.stdPackUnit balance.packUnit = packageInfo.packUnit
let record = { let record = {
itemCode: label.itemCode, itemCode: label.itemCode,
packingNumber: label.packingNumber, packingNumber: label.packingNumber,

1
src/pages/deliver/job/deliverDetail.vue

@ -61,7 +61,6 @@
import { import {
goHome, goHome,
updateTitle,
navigateBack, navigateBack,
getRemoveOption, getRemoveOption,
getCurrDateTime, getCurrDateTime,

2
src/pages/deliver/job/deliverJob.vue

@ -154,6 +154,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("制品发货任务(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -161,7 +162,6 @@
} }
this.jobList = type === "refresh" ? list : this.receiptList.concat(list); this.jobList = type === "refresh" ? list : this.receiptList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("制品发货任务(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

13
src/pages/deliver/record/deliverRecord.vue

@ -35,7 +35,7 @@
<view class=""> <view class="">
<requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode" <requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode"
@getLocation='scanLocationCode' :isShowEdit="true" @getLocation='scanLocationCode' :isShowEdit="true"
:locationTypeList="tolocationTypeList"></requiredLocation> :locationAreaTypeList="toLocationAreaTypeList"></requiredLocation>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -48,7 +48,7 @@
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' headerType="HMQ"></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' headerType="HMQ"></win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
</view> </view>
</template> </template>
@ -105,11 +105,10 @@
id: '', id: '',
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [],
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
fromlocationTypeList: [], fromLocationAreaTypeList: [],
tolocationTypeList: [], toLocationAreaTypeList: [],
businessType: {}, businessType: {},
customerList: [], customerList: [],
customerText: "", customerText: "",
@ -124,8 +123,8 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)

3
src/pages/deliver/request/deliverRequest.vue

@ -158,6 +158,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("成品发货申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -169,7 +170,7 @@
}) })
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("成品发货申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
updateTitle("成品发货申请"); updateTitle("成品发货申请");

1
src/pages/deliver/request/deliverRequestCreate.vue

@ -35,7 +35,6 @@
import { import {
goHome, goHome,
updateTitle,
getRemoveOption, getRemoveOption,
getISODateTime getISODateTime
} from '@/common/basic.js'; } from '@/common/basic.js';

12
src/pages/demo/demo.vue

@ -449,8 +449,8 @@
itemCode: "LJH16540NAA", itemCode: "LJH16540NAA",
itemName: "门板金属螺丝钉", itemName: "门板金属螺丝钉",
itemDesc1: "门板金属螺丝", itemDesc1: "门板金属螺丝",
stdPackQty: 1000, packQty: 1000,
stdPackUnit: '箱', packUnit: '箱',
uom: 'EA', uom: 'EA',
qty: 3000, qty: 3000,
inventoryStatus: 2, inventoryStatus: 2,
@ -468,8 +468,8 @@
itemCode: "LJH16540NAA", itemCode: "LJH16540NAA",
itemName: "门板金属螺丝钉", itemName: "门板金属螺丝钉",
itemDesc1: "门板金属螺丝", itemDesc1: "门板金属螺丝",
stdPackQty: 1000, packQty: 1000,
stdPackUnit: 'EA', packUnit: 'EA',
uom: 'EA', uom: 'EA',
qty: 500, qty: 500,
inventoryStatus: 2, inventoryStatus: 2,
@ -482,8 +482,8 @@
itemCode: "LJH16540NAA", itemCode: "LJH16540NAA",
itemName: "门板金属螺丝钉", itemName: "门板金属螺丝钉",
itemDesc1: "门板金属螺丝", itemDesc1: "门板金属螺丝",
stdPackQty: 1000, packQty: 1000,
stdPackUnit: 'EA', packUnit: 'EA',
uom: 'EA', uom: 'EA',
qty: 1000, qty: 1000,
UsableQty: 500, UsableQty: 500,

9
src/pages/index/index.vue

@ -35,12 +35,12 @@
</scroll-view> </scroll-view>
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" <scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box"
@scroll="rightScroll"> @scroll="rightScroll">
<view class="page-view" style="margin-bottom: 200rpx;"> <view class="page-view" style="padding-bottom: 100rpx;">
<view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index"> <view class="class-item" :id="'item' + index" v-for="(item , index) in tabbar" :key="index">
<view class="item-title"> <view class="item-title">
<text>{{item.name}}</text> <text>{{item.name}}</text>
</view> </view>
<view class="item-container"> <view class="item-container" >
<view class="thumb-box" v-for="(item1, index1) in item.children" :key="index1" <view class="thumb-box" v-for="(item1, index1) in item.children" :key="index1"
@click="openCheck(item1.path)"> @click="openCheck(item1.path)">
<view class="" style="position: relative; "> <view class="" style="position: relative; ">
@ -93,7 +93,6 @@
forcedLogin: false, forcedLogin: false,
count: 1, count: 1,
position: [-10, -10], position: [-10, -10],
timer: null,
menusCount: {}, menusCount: {},
filterList: [], filterList: [],
serchval: "" serchval: ""
@ -109,7 +108,7 @@
uni.hideLoading() uni.hideLoading()
if (res.menus.length > 0) { if (res.menus.length > 0) {
var menus = res.menus.filter(item => item.name == "PDA菜单管理") var menus = res.menus.filter(item => item.name == "PDA菜单管理")
if (menus.length > 0) { if (menus!=undefined&&menus.length > 0) {
var tab = menus[0].children.filter(res => res.visible == true) var tab = menus[0].children.filter(res => res.visible == true)
tab.forEach(res => { tab.forEach(res => {
for (var i = 0; i < res.children.length; i++) { for (var i = 0; i < res.children.length; i++) {
@ -337,7 +336,7 @@
"inventory_status", "container_type", "pack_unit", "unplanned_receipt_reason", "inventory_status", "container_type", "pack_unit", "unplanned_receipt_reason",
"unplanned_issue_reason", "scrap_reason", "inspect_failed_reason", "unplanned_issue_reason", "scrap_reason", "inspect_failed_reason",
"request_status", "inspect_type", "next_action", "sample_method", "transfer_mode", "request_status", "inspect_type", "next_action", "sample_method", "transfer_mode",
"count_stage", "inspect_result" "count_stage", "inspect_result","area_type"
] ]
} }
getDictionaryItem(params).then(res => { getDictionaryItem(params).then(res => {

3
src/pages/inspect/job/inspectJob.vue

@ -150,6 +150,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("到货检验(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -157,7 +158,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("到货检验(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

3
src/pages/inspect/request/inspectRequest.vue

@ -169,6 +169,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("检验单申请(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -181,7 +182,7 @@
this.requestList = type === "refresh" ? list : this.requestList.concat(list); this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("检验单申请(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

12
src/pages/inventoryMove/coms/comMove.vue

@ -24,7 +24,7 @@
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' <requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="toLocationTypeArray" :isShowEdit="toLocationCode==''"></requiredLocation> :locationAreaTypeList="toLocationTypeArray" :isShowEdit="toLocationCode==''"></requiredLocation>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -36,7 +36,7 @@
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'"> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'">
</win-scan-pack-and-location> </win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -120,8 +120,8 @@
title: "", title: "",
dataContent: {}, dataContent: {},
toWarehouseCode: "", toWarehouseCode: "",
fromlocationTypeList: [], fromLocationAreaTypeList: [],
tolocationTypeList: [], toLocationAreaTypeList: [],
} }
}, },
@ -129,8 +129,8 @@
getBusinessType(this.businessTypeCode, res => { getBusinessType(this.businessTypeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)

12
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -23,7 +23,7 @@
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocation' <requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocation'
:locationTypeList="tolocationTypeList" :isShowEdit="isShowEditLocation"></requiredLocation> :locationAreaTypeList="toLocationAreaTypeList" :isShowEdit="isShowEditLocation"></requiredLocation>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -35,7 +35,7 @@
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'"> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :title="'箱码'">
</win-scan-pack-and-location> </win-scan-pack-and-location>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation' <win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -121,8 +121,8 @@
detailSource: [], // detailSource: [], //
title: "", title: "",
dataContent: {}, dataContent: {},
fromlocationTypeList: [], fromLocationAreaTypeList: [],
tolocationTypeList: [], toLocationAreaTypeList: [],
isShowEditLocation:false isShowEditLocation:false
} }
}, },
@ -131,8 +131,8 @@
getBusinessType(this.businessTypeCode, res => { getBusinessType(this.businessTypeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)

10
src/pages/inventoryMove/job/inventoryMoveDetail.vue

@ -60,7 +60,6 @@
} from '@/common/detail.js'; } from '@/common/detail.js';
import { import {
goHome, goHome,
updateTitle,
navigateBack, navigateBack,
getCurrDateTime, getCurrDateTime,
getPackingNumberAndBatchByList, getPackingNumberAndBatchByList,
@ -94,7 +93,6 @@
detailSource: [], // detailSource: [], //
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
locationTypeList: [],
managementList: [], managementList: [],
businessTypeCode: '', businessTypeCode: '',
toLocationCode: '', toLocationCode: '',
@ -312,8 +310,8 @@
itemDetail.fromInventoryStatus = result.balance.inventoryStatus; itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty); itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.stdPackUnit = result.package.stdPackUnit itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty(); this.calcHandleQty();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -332,8 +330,8 @@
itemDetail.fromInventoryStatus = result.balance.inventoryStatus; itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty); itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.stdPackUnit = result.package.stdPackUnit itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty(); this.calcHandleQty();
} }
} }

3
src/pages/inventoryMove/job/inventoryMoveJob.vue

@ -143,6 +143,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("库存转移(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -150,7 +151,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("库存转移(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();

4
src/pages/issue-按批次推荐/job/issueDetail.vue

@ -226,8 +226,8 @@
let item = { let item = {
itemCode: detail.itemCode, itemCode: detail.itemCode,
itemName: detail.itemName, itemName: detail.itemName,
stdPackQty: detail.stdPackQty, packQty: detail.packQty,
stdPackUnit: detail.stdPackUnit, packUnit: detail.packUnit,
qty: detail.qty, qty: detail.qty,
uom: detail.uom, uom: detail.uom,
handleQty: 0, handleQty: 0,

2
src/pages/issue-按批次推荐/job/issueJob.vue

@ -164,6 +164,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
this.updateTitle();
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -171,7 +172,6 @@
} }
that.issueList = type === "refresh" ? list : this.issueList.concat(list); that.issueList = type === "refresh" ? list : this.issueList.concat(list);
that.pageIndex++; that.pageIndex++;
this.updateTitle();
}).catch(error => { }).catch(error => {
this.loadingType = ""; this.loadingType = "";

6
src/pages/issue/coms/comIssueRequestPopup.vue

@ -62,7 +62,7 @@
<uom :uom="uom"></uom> <uom :uom="uom"></uom>
<view class="" v-if="stdPackInfo!=undefined" <view class="" v-if="stdPackInfo!=undefined"
style="display: flex;flex-direction: row;margin-left: 10rpx;"> style="display: flex;flex-direction: row;margin-left: 10rpx;">
(<stdPackQty :dataContent="stdPackInfo"></stdPackQty>) (<packQty :dataContent="stdPackInfo"></packQty>)
</view> </view>
</view> </view>
</view> </view>
@ -97,7 +97,7 @@
checkDirectoryItemExist checkDirectoryItemExist
} from '@/common/directory.js'; } from '@/common/directory.js';
import uom from '@/mycomponents/qty/uom.vue' import uom from '@/mycomponents/qty/uom.vue'
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue' import packQty from '@/mycomponents/qty/packQty.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue' import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import winScanItem from '@/mycomponents/scan/winScanItem.vue' import winScanItem from '@/mycomponents/scan/winScanItem.vue'
@ -106,7 +106,7 @@
uom, uom,
balanceStatus, balanceStatus,
winScanItem, winScanItem,
stdPackQty, packQty,
}, },
data() { data() {
return { return {

4
src/pages/issue/coms/comScanIssuePack.vue

@ -382,8 +382,8 @@
}, },
creatRecord(label, balance, packageInfo) { creatRecord(label, balance, packageInfo) {
balance.stdPackQty = packageInfo.stdPackQty balance.packQty = packageInfo.packQty
balance.stdPackUnit = packageInfo.stdPackUnit balance.packUnit = packageInfo.packUnit
let record = { let record = {
scaned: true, scaned: true,
itemCode: label.itemCode, itemCode: label.itemCode,

5
src/pages/issue/coms/jobInfoPopup.vue

@ -40,7 +40,10 @@
methods: { methods: {
openPopup(val) { openPopup(val) {
this.dataContent = val; this.dataContent = val;
this.$refs.popup.open('bottom') setTimeout(res=>{
this.$refs.popup.open('bottom')
},100)
}, },
closePopup() { closePopup() {
this.$refs.popup.close() this.$refs.popup.close()

3
src/pages/issue/job/issueDetail.vue

@ -49,7 +49,6 @@
import { import {
goHome, goHome,
updateTitle,
navigateBack, navigateBack,
getRemoveOption, getRemoveOption,
getCurrDateTime, getCurrDateTime,
@ -73,7 +72,6 @@
import comIssueDetailCard from '@/pages/issue/coms/comIssueDetailCard.vue' import comIssueDetailCard from '@/pages/issue/coms/comIssueDetailCard.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue' import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import workStation from '@/mycomponents/workStation/workStation.vue' import workStation from '@/mycomponents/workStation/workStation.vue'
@ -83,7 +81,6 @@
jobDetailPopup, jobDetailPopup,
winScanButton, winScanButton,
comIssueDetailCard, comIssueDetailCard,
comIssueRequestInfo,
comScanIssuePack, comScanIssuePack,
jobTop, jobTop,
workStation workStation

10
src/pages/issue/job/issueJob.vue

@ -1,16 +1,11 @@
<template> <template>
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" <job-filter ref="filter" otherTitle="" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask"> :checkedWaitTask="checkedWaitTask">
</job-filter> </job-filter>
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">
<job-filter ref="filter" otherTitle="" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getByAsnNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask">
</job-filter>
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index"> <view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions" <uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@ -154,6 +149,7 @@
} }
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("发料任务(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -161,7 +157,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("发料任务(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

2
src/pages/issue/js/issue.js

@ -56,7 +56,7 @@ export function createItemInfo(detail) {
productionLineCode: detail.productionLineCode, productionLineCode: detail.productionLineCode,
workStationCode: detail.workStationCode, workStationCode: detail.workStationCode,
stdPackQty: detail.stdPackQty, stdPackQty: detail.stdPackQty,
stdPackUnit: detail.stdPackUnit, packUnit: detail.packUnit,
qty: detail.qty, qty: detail.qty,
uom: detail.uom, uom: detail.uom,
handleQty: 0, handleQty: 0,

2
src/pages/issue/record/issueRecord.vue

@ -56,7 +56,6 @@
import { import {
goHome, goHome,
updateTitle,
getRemoveOption, getRemoveOption,
getISODateTime, getISODateTime,
getCurrDateTime, getCurrDateTime,
@ -129,7 +128,6 @@
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.itemCodeTypeList = res.itemCodeTypeList; this.itemCodeTypeList = res.itemCodeTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.fromInventoryStatuses = res.fromInventoryStatuses this.fromInventoryStatuses = res.fromInventoryStatuses
this.toInventoryStatuses = res.toInventoryStatuses this.toInventoryStatuses = res.toInventoryStatuses
this.goScan(true) this.goScan(true)

1
src/pages/issue/request/issueRequest.vue

@ -175,6 +175,7 @@
if (type === "refresh") { if (type === "refresh") {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
} }
updateTitle("发料申请");
this.loadingType = ""; this.loadingType = "";
that.showMessage(error.errMsg) that.showMessage(error.errMsg)
}) })

1
src/pages/issue/request/issueRequestCreate.vue

@ -90,7 +90,6 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.itemCodeTypeList = res.itemCodeTypeList; this.itemCodeTypeList = res.itemCodeTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.useOnTheWay = res.useOnTheWay; this.useOnTheWay = res.useOnTheWay;
this.fromInventoryStatuses = res.fromInventoryStatuses this.fromInventoryStatuses = res.fromInventoryStatuses
this.toInventoryStatuses = res.toInventoryStatuses this.toInventoryStatuses = res.toInventoryStatuses

159
src/pages/issue/request/issueScanRequest.vue

@ -0,0 +1,159 @@
<template>
<view class="page-wraper">
<view class="" >
<com-blank-view @goScan='goScan()'></com-blank-view>
</view>
</view>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' headerType="HCMQ" title="叫料标签" :isShowHistory="false"></win-scan-pack>
<comMessage ref="comMessage"></comMessage>
</template>
<script>
import {
issueRequestSubmit,
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getBusinessType,
} from '@/common/record.js';
import {
goHome,
updateTitle,
getRemoveOption,
navigateBack,
getCurrDateOneMonthsTimes
} from '@/common/basic.js';
import {
getDataSource
} from '@/pages/issue/js/issue.js';
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue'
import comIssueRequestCreator from '@/pages/issue/coms/comIssueRequestCreator.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
export default {
name: 'issueRequestSubmit',
components: {
comBlankView,
jobDetailPopup,
comScanIssuePack,
comIssueRequestCreator,
winScanPack
},
data() {
return {
jobContent: {}, //
subList: [], //subList
detailSource: {
subList: []
}, //
detailOptions: [],
scanOptions: [],
requestList: [], //
itemCodeTypeList:[],
useOnTheWay:"FALSE"
}
},
mounted() {
},
onLoad(option) {
var typeCode = "Issue"
getBusinessType(typeCode, res => {
if (res.success) {
this.itemCodeTypeList = res.itemCodeTypeList;
this.useOnTheWay = res.useOnTheWay;
this.fromInventoryStatuses = res.fromInventoryStatuses
this.toInventoryStatuses = res.toInventoryStatuses
this.goScan()
} else {
this.showErrorMessage(res.message)
}
});
},
methods: {
goScan() {
this.$refs.scanPopup.openScanPopup();
},
getScanResult(data){
this.detailSource = {
subList:[]
}
var labelInfo = data.label;
var data = {
productionLineCode:labelInfo.productionLineCode,
workStationCode:labelInfo.workStationCode,
itemCode:labelInfo.itemCode,
location:labelInfo.location,
qty:labelInfo.qty,
uom:labelInfo.uom,
packUnit:labelInfo.packUnit
};
this.detailSource.subList.push(data)
this.detailSource.warehouseCode = labelInfo.warehouseCode;
this.detailSource.workshopCode = labelInfo.workshopCode;
this.submit();
},
setParams() {
this.detailSource.dueTime = getCurrDateOneMonthsTimes();
return this.detailSource
},
submit() {
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
issueRequestSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料申请[" + res.data+"]")
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.closeScanPopup();
this.goScan();
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.scanPopupGetFocus()
}
});
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
}
}
</script>
<style>
</style>

36
src/pages/package/coms/comOverPackJobCard.vue

@ -0,0 +1,36 @@
<template>
<job-com-main-card :dataContent="dataContent">
<view class="task_item">
<view class="task_text">
申请单号 {{dataContent.requestNumber}}
</view>
</view>
</job-com-main-card>
</template>
<script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
export default {
components: {
jobComMainCard,
},
data() {
return {};
},
props: {
dataContent: {
type: Object,
default: {}
},
},
methods: {
}
}
</script>
<style lang="scss">
</style>

186
src/pages/package/coms/comOverPackJobDetailCard.vue

@ -0,0 +1,186 @@
<template>
<view>
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> -->
<view v-for="(item,index) in dataContent.Items" :key="index">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true">
<template v-slot:title>
<!-- 物品 -->
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="itemCoceClick($event,item,index)"
:right-options="removeOptions">
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent">
</com-issue-request-info> -->
</template>
<u-line />
<view v-for="(loacation,index) in item.Locations" :key="index">
<view>
<view class="uni-flex uni-row space-between">
<!-- 推荐库位 -->
<location :locationCode="loacation.fromLocationCode">
</location>
</view>
<view v-for="(batch,index) in loacation.Batchs" :key="index">
<recommend-balance style='margin-left: 0rpx;' :detail="batch" :isShowLocation="false"
:isShowPack="batch.packingNumber!=null && batch.packingNumber!=''">
</recommend-balance>
<view class="uni-flex uni-row " v-if='batch.Records.length>0'>
<view class="center " style=" width: 20px;background-color: #0CC2B6; color: #fff; margin-left: 40px;padding: 0px 2px;">
扫描
</view>
<view class="uni-flex uni-column scan_view" style="width: 100%;">
<view v-for="(record,index) in batch.Records" :key="index">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,batch,record,index)"
:right-options="scanOptions">
<handle-balance :detail="record" :isShowLocation="false"
:isShowBatch="batch.packingNumber!=null">
</handle-balance>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
</view>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
import handleBalance from '@/mycomponents/balance/handleBalance.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import {
getDetailOption,
getEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
export default {
emits: ['updateData',"removeItemCode"],
components: {
itemQty,
recommend,
recommendBalance,
handleBalance,
recommendQtyEdit,
requiredLocation,
balanceQtyEdit,
location,
detailInfoPopup,
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
},
watch: {
},
data() {
return {
option: [],
showItem: {},
editItem: {},
batchItem: {},
detailOptions: [],
scanOptions: [],
removeOptions:[]
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
},
methods: {
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.forEach(r => {
r.childrens.forEach(i => {
i.init();
})
r.resize();
})
});
},
swipeClick(e, batch, record, index) {
if (e.content.text == "编辑") {
this.edit(batch, record)
} else if (e.content.text == "移除") {
this.remove(batch, record, index)
}
},
itemCoceClick(e,item,index){
if (e.content.text == "移除") {
this.dataContent.Items.splice(index, 1);
this.$emit('removeItemCode')
}
},
edit(batch, item) {
let that = this;
that.editItem = item;
that.batchItem = batch;
item.balance.balanceQty = item.balance.qty;
that.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(batch, record, index) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
batch.Records.splice(index, 1);
this.resizeCollapse();
this.$emit('updateData', record)
}
});
},
confirm(val) {
this.editItem.qty = val;
this.$emit('updateData', this.editItem)
// let qty = 0;
// this.batchItem.Records.forEach(r => {
// qty += Number(r.qty);
// })
// this.batchItem.handleQty = qty;
}
}
}
</script>
<style>
</style>

540
src/pages/package/coms/comScanPackagePack.vue

@ -0,0 +1,540 @@
<template>
<view>
<uni-popup ref="popup" :maskClick='false'>
<view class="">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描箱码
</view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image>
</view>
</view>
<!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
padding:20rpx;
border-radius: 8rpx;">
<view class="uni-center">
位置 :
</view>
<view class="" style="width: 75%;padding: 0rpx">
<view class="uni-flex u-col-center uni-row" @click="showSelect">
<view class="" style="margin-left: 15rpx;font-size: 30rpx;">
{{positionInfo}}
</view>
<u-select v-model="show" mode="mutil-column-auto" :list="positionList" :defaultValue="defaultValueList"
@confirm="confirmSelect"></u-select>
</view>
</view>
</view> -->
<!-- <u-line class='line_color'></u-line> -->
<view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
margin-top: 8rpx;
border-radius: 8rpx;">
<view class="uni-center" style="width: 25%; ">
来源库位
</view>
<view class="" style="width: 75%; padding: 8rpx;">
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请选择库位"
@confirm="fromLocationUpdate"></uni-combox>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true"
headerType="HPQ,HMQ" :isShowHistory="false">
</win-com-scan>
<view style="width: 100%;">
<view style="width: 100%;" v-if="issueRecord.length>0">
<view class="uni-flex uni-row space-between u-col-center">
<view class="" style="padding: 10rpx;">
历史记录
</view>
<view class="" style="padding-right: 10rpx;">
<u-icon :name="expendIcon" size="35rpx" @click="expands()"></u-icon>
</view>
</view>
<u-line class='line_color' style='padding-top: 10rpx;padding-bottom: 20rpx;'>
</u-line>
<scroll-view scroll-y="true" class="scroll-view"
v-if="expand&&issueRecord.length>0">
<view class="uni-flex u-col" v-for="(record,index) in issueRecord">
<view style="width: 100%;">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,record,index)"
:right-options="scanOptions">
<view style="padding: 0px 10px">
<balance :dataContent="record" :isShowFromLocation="false"
:isShowStdPack="false"></balance>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<u-line class='line_color'></u-line>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
</view>
</view>
</view>
</uni-popup>
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select>
<comMessage ref="comMessage"></comMessage>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
</view>
</template>
<script>
import winComScan from '@/mycomponents/scan/winComScan.vue'
import balance from '@/mycomponents/balance/balance.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import balanceSelect from '@/mycomponents/balance/balanceSelect.vue'
import {
getDetailOption,
getDetailEditRemoveOption
} from '@/common/array.js';
import {
getWorkShopLineStation
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getBalanceByManagementPrecision
} from '@/common/balance.js';
export default {
name: 'winScanPack',
components: {
winComScan,
balance,
balanceQtyEdit,
balanceSelect
},
props: {
title: {
type: String,
default: ''
},
},
data() {
return {
dataContent: {},
jobContent: {},
expendIcon: 'arrow-down',
show: false,
scanList: [],
toLocation: null,
toLocationCode: '',
fromLocationList: [],
fromLocationCode: '',
fromLocation: null,
issueRecord: [], //
expand: true,
scanOptions: {},
editItem: {},
positionInfo: "请选择位置",
positionList: [],
defaultValueList: [],
fromInventoryStatuses: "",
packageInfo: {},
label: {}
}
},
created() {
},
watch: {},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
},
methods: {
openScanPopup(content, jobcontent) {
this.issueRecord = [];
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
},
closeScanPopup() {
this.$refs.popup.close();
this.$emit("closeScan")
//
// Object.assign(this.$data, this.$options.data());
},
initData() {
let that = this;
that.fromLocationList = [];
if (that.dataContent != null) {
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses
that.toLocation = that.dataContent[0];
that.toLocationCode = that.dataContent[0].toLocationCode;
that.fromLocationList = that.getFromLocationList();
}
},
showBalanceSelect(items) {
this.$refs.balanceSelect.openPopup(items);
},
getFromLocationList() {
let list = [];
this.dataContent.forEach(location => {
location.Items.forEach(item => {
item.Locations.forEach(f => {
let item = list.find(l => l == f.fromLocationCode);
if (item == undefined) {
list.push(f.fromLocationCode)
}
})
})
});
this.fromLocationCode = list[0];
return list;
},
fromLocationUpdate(fromlocation) {
let location = this.fromLocationList.find(r => r == fromlocation)
if (location == undefined) {
this.fromLocationCode = ''
this.showErrorMessage('翻包库位【' + fromlocation + '】不存在')
}
},
onScan(result) {
try {
let that = this;
if (that.fromLocationCode == '') {
that.showErrorMessage('请选择来源库位', res => {
that.$refs.toLocationCombox.onFocus();
});
return;
}
that.label = result.label;
that.packageInfo = result.package;
// let packageInfo = result.package;
let itemCode = result.label.itemCode;
let packingCode = result.label.packingNumber;
let lot = result.label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
if (item == undefined) {
that.showErrorMessage('未查找到物料【' + itemCode + '】的翻包明细',
res => {
that.getfocus();
}
)
return;
} else {
// if(that.packageInfo.packUnit!=item.Locations[0].Batchs[0].fromPackUnit){
// that.showErrorMessage(""+that.packageInfo.packUnit+""+item.Locations[0].Batchs[0].fromPackUnit+"",
// res => {
// that.getfocus();
// }
// )
// return;
// }
//
uni.showLoading({
title: '加载中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance, that.packageInfo);
} else {
this.showBalanceSelect(balanceRes.data.list);
}
} else {
this.showErrorMessage(balanceRes.message.message);
}
uni.hideLoading();
});
}
} catch (e) {
this.showErrorMessage(e.stack)
uni.hideLoading();
}
},
selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance, this.packageInfo);
},
afterGetBalance(label, balance, packageInfo) {
let that = this;
try {
let itemCode = label.itemCode;
let packingCode = label.packingNumber;
let lot = label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode);
if (fromLocation != undefined) {
let batch = fromLocation.Batchs.find(r => r.batch == lot);
if (batch != undefined) {
if (batch.Records == undefined) {
batch.Records = [];
}
let record = batch.Records.find(r => r.packingNumber == packingCode);
if (record == undefined) {
//
if (batch.Recommends.length > 0) {
let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
if (recommend != undefined) {
that.addRecord(batch, label, balance, packageInfo)
} else {
//
if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
that.addRecord(batch, label, balance, packageInfo);
} else {
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细',
res => {
that.getfocus();
}
)
}
}
} else {
that.addRecord(batch, label, balance, packageInfo)
}
} else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
res => {
that.getfocus();
}
)
}
} else {
if (this.jobContent.allowModifyBatch == "TRUE") {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的翻包明细,是否要继续翻包?', res => {
if (res) {
let batch = that.createBatchInfo(label, balance, packageInfo);
//details
if (fromLocation.Batchs.length > 0) {
batch.detail = fromLocation.Batchs[0].detail;
}
fromLocation.Batchs.unshift(batch);
}
})
} else {
that.showErrorMessage('未查找到批次【' + lot + '】的翻包明细',
res => {
that.getfocus();
});
}
}
} else {
that.showErrorMessage('未查找到推荐库位【' + that.fromLocationCode + '】的翻包明细',
res => {
that.getfocus();
}
)
}
} catch (e) {
that.showErrorMessage(e.stack,
res => {
that.getfocus();
}
)
}
},
createBatchInfo(data, balance, packageInfo) {
let batch = {
batch: data.batch,
qty: 0,
uom: data.uom,
handleQty: Number(data.qty),
Records: []
}
let record = this.creatRecord(data, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
return batch;
},
creatRecord(label, balance, packageInfo) {
balance.packQty = packageInfo.packQty
balance.packUnit = packageInfo.packUnit
let record = {
scaned: true,
itemCode: label.itemCode,
packingNumber: label.packingNumber,
batch: label.batch,
qty: Number(balance.qty),
// qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
toLocationCode: this.toLocationCode,
supplierCode: label.supplierCode
}
return record;
},
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty = calc.add(handleQty,res.qty)
})
batch.handleQty = handleQty;
},
addRecord(batch, label, balance, packageInfo) {
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.calcBatchHandleQty(batch);
this.getfocus();
},
getfocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus();
}
},
losefocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus();
}
},
expands() {
this.expand = !this.expand;
this.expendIcon = this.expand == true ? "arrow-down" : "arrow-up"
},
swipeClick(e, item, index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
},
edit(item) {
this.editItem = item;
// item.balance.balanceQty = item.balance.qty;
item.balance.balanceQty = item.balance.qty;
this.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(record, index) {
this.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
record.qty = 0;
this.issueRecord.splice(index, 1)
let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode);
if (item != undefined) {
item.Locations.forEach(l => {
let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b
.batch == record.batch);
let rIndex = batch.Records.findIndex(r => r.packingNumber == record
.packingNumber && r
.batch == record.batch);
batch.Records.splice(rIndex, 1);
})
}
this.$emit('updateData', item);
}
});
},
packGetFocus() {
this.$refs.comscan.getfocus();
},
packLoseFocus() {
this.$refs.comscan.losefocus();
},
showMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showMessage(message, callback);
})
},
showErrorMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showErrorMessage(message, callback);
})
},
showQuestionMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessage.showQuestionMessage(message, callback);
})
},
confirm(val) {
this.editItem.qty = Number(val);
this.$emit('updateData', this.editItem)
},
cancle() {
this.closeScanPopup()
}
}
}
</script>
<style lang="scss">
button {
border: none;
}
button::after {
border: none
}
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
padding: 10rpx;
}
</style>

305
src/pages/package/job/overPackageJob.vue

@ -0,0 +1,305 @@
<template>
<view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask">
</job-filter>
<view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@click="swipeClick($event,item)">
<comOverPackJobCard :dataContent="item" @click='openJobDetail(item)'></comOverPackJobCard>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
<job-info-popup ref='jobInfoPopup'></job-info-popup>
<uni-load-more :status="loadingType" v-if="jobList.length>0" />
</view>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
cancleTakeOverPageJob,
getOverPageJobList,
} from '@/api/request2.js';
import {
goHome,
updateTitle
} from '@/common/basic.js';
import {
getDetailOption,
getDetailGiveupOption
} from '@/common/array.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comOverPackJobCard from '@/pages/package/coms/comOverPackJobCard.vue'
import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue'
export default {
name: 'issue',
components: {
comEmptyView,
jobFilter,
comOverPackJobCard,
jobInfoPopup
},
data() {
return {
jobList: [],
pageNo: 1,
pageSize: 10,
totalCount: 0,
loadingType: "nomore",
checkedToday: false,
checkedWaitTask: false,
todayTime: "",
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
};
},
onShow() {
this.getList('refresh');
},
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
onPullDownRefresh() {
this.getList('refresh');
},
//退
onBackPress(options) {
if (options.from === 'navigateBack') {
uni.navigateBack({
delta: 1
})
return false;
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
}
},
methods: {
getList(type) {
let that = this;
uni.showLoading({
title: "加载中­....",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.jobList = [];
}
var filters = []
if (this.checkedToday) {
filters.push({
column: "request_time",
action: "betweeen",
value: this.todayTime
})
}
filters.push({
column: "status",
action: "in",
value: this.status
})
var params = {
filters: filters,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
getOverPageJobList(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
updateTitle("翻包任务(" + this.totalCount + ")");
}).catch(error => {
if (type === "refresh") {
uni.stopPullDownRefresh();
}
updateTitle("翻包任务");
this.loadingType = "";
uni.hideLoading();
that.showMessage(error)
})
},
getByAsnNumber(code) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getPurchasereceiptByAsnNumber(code).then(res => {
uni.hideLoading();
if (res.data.total == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务');
} else if (res.data.total == 1) {
this.$refs.scanAsnNumber.closeScanPopup();
that.openJobDetail(res.data.list[0]);
} else {
this.$refs.scanAsnNumber.closeScanPopup();
that.showItemList(res.data.list);
}
}).catch(error => {
uni.hideLoading();
that.showErrorMessage(error);
})
},
openJobDetail(item) {
uni.navigateTo({
url: './overPackageJobDetail?id=' + item.id + '&status=' + item.status
});
},
showItemList(itemList) {
this.$refs.scanList.openPopup(itemList);
},
selectedItem(item) {
this.openJobDetail(item);
},
swipeClick(e, dataContent) {
if (e.content.text == "详情") {
this.openjobInfoPopup(dataContent);
} else if (e.content.text == "放弃") {
this.$refs.comMessage.showQuestionMessage("确定要放弃当前任务?",
res => {
if (res) {
this.cancleJob(dataContent.id);
}
});
}
},
openjobInfoPopup(item) {
this.$refs.jobInfoPopup.openPopup(item)
},
cancleJob(id) {
cancleTakeOverPageJob(id).then(res => {
if(res.data){
this.getList("refresh")
uni.showToast({
title:"放弃任务成功"
})
}else {
this.showMessage("放弃任务失败")
}
}).catch(error => {
this.showMessage(error)
})
},
switchChangeToday(state, creationTime) {
this.checkedToday = state;
this.todayTime = creationTime;
this.getList("refresh");
},
switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state;
this.status = jobStatus;
this.getList("refresh");
},
getScanNumber(code) {
this.getDataListByType(code)
},
getDataListByType(code) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: code
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getOverPageJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + code + '】的发料任务');
} else if (res.data.list.length == 1) {
that.openJobDetail(res.data.list[0]);
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
},
showMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
}
}
</script>
<style scoped lang="scss">
</style>

570
src/pages/package/job/overPackageJobDetail.vue

@ -0,0 +1,570 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
申请单号 : {{jobContent.requestNumber}}
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view v-for="(toLocation, index) in detailSource" :key="index">
<view class="" style="padding: 20rpx; font-size: 30rpx;">
<view>
原始包装规格 : {{subList[0].fromPackUnit}}
</view>
<view>
原始标包数量 : {{subList[0].fromPackQty}}
</view>
<view>
新包装规格 : {{subList[0].toPackUnit}}
</view>
<view>
新标包数量 : {{subList[0].toPackQty}}
</view>
</view>
<comOverPackJobDetailCard ref='comOverPackJobDetailCard' :dataContent="toLocation"
@updateData='updateData'>
</comOverPackJobDetailCard>
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit()">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanDetailPopup'></win-scan-button>
<comScanPackagePack ref="comScanPackagePack" @closeScan='closeScan' @updateData='updateData'>
</comScanPackagePack>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
takeOverPageJob,
cancleTakeOverPageJob,
getOverPageJobDetail,
overPageSubmit
} from '@/api/request2.js';
import {
goHome,
updateTitle,
navigateBack,
getRemoveOption,
getCurrDateTime,
getDirectoryItemArray,
getPackingNumberAndBatch,
} from '@/common/basic.js';
import {
getDataSource
} from '@/pages/package/js/package.js';
import {
getManagementPrecisions
} from '@/common/balance.js';
import {
calc
} from '@/common/calc.js';
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import comOverPackJobDetailCard from '@/pages/package/coms/comOverPackJobDetailCard.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comScanPackagePack from '@/pages/package/coms/comScanPackagePack.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
import workStation from '@/mycomponents/workStation/workStation.vue'
export default {
name: 'issueDetail',
components: {
jobDetailPopup,
winScanButton,
comOverPackJobDetailCard,
comScanPackagePack,
jobTop,
workStation
},
data() {
return {
id: '',
jobContent: {}, //
subList: [], //subList
detailSource: [], //
detailOptions: [],
scanOptions: [],
jobStatus: ""
};
},
props: {
},
onLoad(option) {
this.id = option.id;
if (this.id != undefined) {
//
if (option.status == "1") {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {
//
if (e.from === 'backbutton') {
if (this.jobStatus == "2") {
//
cancleTakeOverPageJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
watch: {
locationTypes(newVal) {
let value = newVal;
},
},
mounted: function() {
// this.resizeCollapse();
},
methods: {
resizeCollapse() {
this.$nextTick(r => {
this.$refs.comOverPackJobDetailCard.forEach(r => {
r.resizeCollapse();
})
// this.$refs.mainCollapse.forEach(r => {
// r.childrens.forEach(i => {
// i.init();
// })
// r.resize();
// })
});
},
//
receive(callback) {
if (this.id != null) {
takeOverPageJob(this.id).then(res => {
callback();
}).catch(error => {
this.showErrorMessage(error)
})
}
},
getDetail() {
var that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getOverPageJobDetail(that.id).then(res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.jobStatus = res.data.status
that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList)
setTimeout(r => {
that.resizeCollapse();
}, 100)
uni.hideLoading();
} else {
that.showMessage('列表数据为0');
}
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
closeScan() {
this.resizeCollapse();
},
// submit() {
//3.
//:XXX
// var isOutIn = getApp().globalData.feed_configList.filter(
// res => {
// if (res.name == 'feed_isOutIn') {
// return res;
// }
// });
// this.dataContent.itemCodeList.forEach(res => {
// if (res.handleQty > res.recommendQty) {
// this.$refs.modal.showConfirmMessageModal(',?', confirm => {
// if (confirm) {
// //
// uni.showToast({
// title: ""
// })
// }
// })
// } else {
// uni.showToast({
// title: "" + res.handleQty + "][" + res.recommendQty + "]"
// })
// }
// })
// },
submit() {
//
var itemCodes = []
let locationCode = this.detailSource[0].toLocationCode
this.detailSource.forEach(toLocation => {
toLocation.Items.forEach(item => {
itemCodes.push(item.itemCode)
})
})
//使
if (this.jobContent.useOnTheWayLocation == 'TRUE') {
this.checkSubmit();
} else {
//
getManagementPrecisions(itemCodes, locationCode, res => {
if (res.success) {
this.managementList = res.list;
this.checkSubmit();
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
}
},
checkSubmit() {
var tempHandleQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].handleQty
var tempQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].qty
var toPackQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].toPackQty
if (tempHandleQty > tempQty) {
//
this.showCommitMessage("实际数量【" + tempHandleQty + "】大于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty,
toPackQty)
} else if (tempHandleQty < tempQty) {
this.showCommitMessage("实际数量【" + tempHandleQty + "】小于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty,
toPackQty)
} else {
this.packageHint(tempHandleQty, toPackQty)
}
},
packageHint(tempHandleQty, toPackQty) {
//
if (tempHandleQty % toPackQty > 0) {
this.$refs.comMessage.showQuestionMessage("扫描数量【" + tempHandleQty +
"】,将有1个非整包,是否提交?", res => {
if (res) {
this.submitJob()
}
});
} else {
this.submitJob()
}
},
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
overPageSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
setParams() {
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
this.detailSource.forEach(toLocationCode => {
toLocationCode.Items.forEach(item => {
item.Locations.forEach(fromLocation => {
fromLocation.Batchs.forEach(batch => {
let subItem = batch.detail;
if (subItem != undefined) {
subItem.recordList = [];
if (batch.Records.length > 0) {
batch.Records.forEach(r => {
let record = {};
record.handleQty = r.qty;
record.fromPackingNumber = r
.packingNumber;
record.fromBatch = r.batch;
record.fromContainerNumber = r
.ContainerNumber;
record.toContainerNumber = r
.ContainerNumber;
record.toInventoryStatus = r
.inventoryStatus;
record.fromLocationCode = subItem
.toLocationCode;
record.supplierCode = r.supplierCode;
let single_price = r.balance
.singlePrice == null ? 0 : r
.balance
.singlePrice;
record.singlePrice = single_price;
record.amount = single_price * r.qty;
record.fromPackUnit = subItem
.fromPackUnit;
record.toPackUnit = subItem.toPackUnit;
record.fromPackQty = subItem
.fromPackQty;
record.toPackQty = subItem.toPackQty;
record.toBatch = r.batch;
record.toPackingNumber = ""
//使
// if (this.jobContent
// .useOnTheWayLocation ==
// 'TRUE') {
// record.toPackingNumber = r
// .packingNumber;
// record.toBatch = r.batch;
// } else {
// var info =
// getPackingNumberAndBatch(
// this.managementList, r
// .itemCode,
// r.packingNumber, r
// .batch);
// record.toPackingNumber = info
// .packingNumber;
// record.toBatch = info.batch;
// }
subItem.recordList.push(record);
})
subList.push(subItem);
}
}
})
})
})
})
this.jobContent.subList = subList
this.jobContent.createTime = createTime;
this.jobContent.creator = creator;
return this.jobContent;
},
cancel() {
let that = this;
this.$refs.comMessage.showQuestionMessage('是否要清空已扫描的物料和目标库位信息?', res => {
if (res) {
that.clearInfo();
}
});
},
clearInfo() {
this.dataContent.itemCodeList.forEach(res => {
if (res.recommendList != null) {
res.recommendList.forEach(res1 => {
if (res1.locationCodeList != null) {
res1.locationCodeList.forEach(res2 => {
if (res2.packingCodeList != null) {
res2.packingCodeList.forEach(res3 => {
res3.itemCode = "";
res3.qty = 0;
})
}
})
}
})
}
})
},
updateData(record) {
let requestLocation = this.detailSource.find(r => r.toLocationCode == record.toLocationCode);
let item = requestLocation.Items.find(r => r.itemCode == record.itemCode);
let itemHandleQty = 0;
if (item != undefined) {
item.Locations.forEach(l => {
let batch = l.Batchs.find(b => (b.packingNumber == record.packingNumber || b
.packingNumber == null || b.packingNumber == '') && b.batch ==
record.batch);
let handleQty = 0;
if (batch != undefined) {
batch.Records.forEach(res => {
handleQty = calc.add(handleQty, res.qty)
})
batch.handleQty = handleQty;
itemHandleQty = calc.add(itemHandleQty, handleQty)
}
})
}
this.resizeCollapse();
item.handleQty = itemHandleQty;
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.afterCloseMessage()
}
});
},
showCommitMessage(message, tempHandleQty, toPackQty) {
this.$refs.comMessage.showQuestionMessage(message, res => {
if (res) {
this.packageHint(tempHandleQty, toPackQty)
}
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
navigateBack(1)
})
},
showRescanMessage(message) {
this.$refs.comMessage.showRescanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus();
},
confirm(data) {
this.dataContent = data;
},
confirmResult(result) {
this.dataContent = result;
this.$forceUpdate();
},
openScanDetailPopup() {
var datacontent = {}
//
// Object.assign(datacontent, this.detailSource);
this.$refs.comScanPackagePack.openScanPopup(this.detailSource, this.jobContent);
},
closeScanPopup() {
this.updateCommitBtn();
},
}
};
</script>
<style scoped lang="scss">
.uni-numbox__value {
width: 40px;
}
button[disabled] {
background-color: #3C9CFF;
color: #fff;
opacity: 0.7;
}
// /deep/ .input-value {
// font-size: 16px;
// }
// /deep/ .uni-collapse-item__title-text {
// font-size: 16px;
// }
// /deep/ .uni-collapse-item--border {
// border-bottom-width: 0px;
// border-bottom-color: #ebeef5;
// }
// /deep/ .uni-collapse-item--border {
// border-bottom-width: 1px;
// border-bottom-color: #ebeef5;
// }
</style>

114
src/pages/package/js/package.js

@ -0,0 +1,114 @@
import {
calc
} from '@/common/calc.js';
export function getDataSource(list, subList) {
for (var i = 0; i < subList.length; i++) {
let detail = subList[i];
var location = list.find(r =>
r.toLocationCode == detail.toLocationCode)
if (location == undefined) {
location = {
toLocationCode: detail.toLocationCode,
productionLineCode: detail.productionLineCode,
workStationCode: detail.workStationCode,
Items: []
}
list.push(location);
}
createDetailInfo(location, detail);
}
return list;
}
//树形结构:需求库位 -> 物料Items -> 库位 Locations-> 批次Batchs -> 记录Records
export function createDetailInfo(location, detail) {
var item = location.Items.find(r =>
r.itemCode == detail.itemCode)
if (item == undefined) {
item = createItemInfo(detail);
location.Items.push(item)
} else {
item.qty = calc.add(item.qty,detail.qty)
//在物料下查找库位
let location = item.Locations.find(r => r.fromLocationCode == detail.fromLocationCode);
if (location == undefined) {
location = createLocationInfo(detail);
item.Locations.push(location);
} else {
//在库位下查找批次
let batch = location.Batchs.find(r => r.batch == detail.batch);
if (batch == undefined) {
let batch = createBatchInfo(detail);
location.Batchs.push(batch);
} else {
if (detail.packingNumber != "" && detail.packingNumber != null) {
batch.Recommends.push(detail);
}
}
}
}
}
export function createItemInfo(detail) {
let item = {
itemCode: detail.itemCode,
itemName: detail.itemName,
productionLineCode: detail.productionLineCode,
workStationCode: detail.workStationCode,
stdPackQty: detail.stdPackQty,
packUnit: detail.packUnit,
qty: detail.qty,
uom: detail.uom,
handleQty: 0,
Locations: []
}
let location = createLocationInfo(detail);
item.Locations.push(location);
return item;
}
export function createLocationInfo(detail) {
let location = {
fromLocationCode: detail.fromLocationCode,
qty: detail.qty,
uom: detail.uom,
handleQty: 0,
Batchs: []
}
let batch = createBatchInfo(detail);
location.Batchs.push(batch);
return location;
}
export function createBatchInfo(detail) {
let batch = {
detail: detail,
batch: detail.batch,
packingNumber: detail.packingNumber,
qty: detail.qty,
uom: detail.uom,
handleQty: 0,
fromPackUnit:detail.fromPackUnit,
toPackUnit:detail.toPackUnit,
fromPackQty:detail.fromPackQty,
toPackQty:detail.toPackQty,
Recommends: [],
Records: [],
}
//推荐到了箱码和批次
if (detail.packingNumber != "" && detail.packingNumber != null) {
batch.Recommends.push(detail);
}
return batch;
}
export function createRecordInfo(detail) {
var record = {}
detail.scaned = true;
// let record = JSON.parse(JSON.stringify(detail));
//克隆对象,深度克隆,防止双向绑定同一个变量
Object.assign(record, detail)
record.toLocationCode = this.toLocationCode;
return record;
}

9
src/pages/package/record/mergePackageRecord.vue

@ -36,7 +36,7 @@
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false"> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location> </win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -88,11 +88,9 @@
id: '', id: '',
scanCount: 0, scanCount: 0,
detailSource: [], // detailSource: [], //
locationTypeList: [],
fromLocationCode: "", fromLocationCode: "",
isShowLocation: false, isShowLocation: false,
fromlocationTypeList: [], fromLocationAreaTypeList: [],
tolocationTypeList: [],
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
@ -107,8 +105,7 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)

179
src/pages/package/record/overPackageRecord.vue

@ -9,8 +9,18 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<view class="" style="padding: 20rpx; font-size: 32rpx;">
<view> 来源库位 : {{item.subList[0].locationCode}}
</view>
<view> 来源包装规格 :
{{fromPackUnit}}/{{item.subList[0].packQty}}{{getUomInfo(item.subList[0].uom)}}
</view>
</view>
<record-com-detail-card :dataContent="item" :index="index" <record-com-detail-card :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"> @removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"
:isShowFromLocation="false" :isShowToLocation="false">
</record-com-detail-card> </record-com-detail-card>
</view> </view>
<u-line /> <u-line />
@ -22,6 +32,18 @@
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<view class="uni-flex uni-row title u-col-center" style="font-size: 28rpx;">
<text>目标包装规格 :</text>
<view class="uni-flex u-col-center uni-row" @click="showPackage">
<view class="" style="margin-left: 5rpx;width: 100%;">
{{toPackUnitShow}}
</view>
<u-select v-model="show" mode="single-column" :list="packageList"
@confirm="confirmSelect">
</u-select>
</view>
</view>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
@ -35,14 +57,15 @@
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false"> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location> </win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
<script> <script>
import { import {
overPackageRecordSubmit overPackageRecordSubmit,
getPackUnitByItemCode
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
goHome goHome
@ -50,7 +73,9 @@
import { import {
getInventoryStatusDesc, getInventoryStatusDesc,
getDirectoryItemArray getDirectoryItemArray,
getPackUnitName,
getUomInfo
} from '@/common/directory.js'; } from '@/common/directory.js';
import { import {
@ -69,6 +94,7 @@
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue' import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
import packageTarget from '@/mycomponents/package/packageTarget.vue' import packageTarget from '@/mycomponents/package/packageTarget.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue' import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default { export default {
components: { components: {
@ -80,22 +106,27 @@
winScanPackAndLocation, winScanPackAndLocation,
recommendBalance, recommendBalance,
packageTarget, packageTarget,
recordComDetailCard recordComDetailCard,
packUnit
}, },
data() { data() {
return { return {
id: '', id: '',
scanCount: 0, scanCount: 0,
detailSource: [], // detailSource: [], //
locationTypeList: [],
fromLocationCode: "", fromLocationCode: "",
isShowLocation: false, isShowLocation: false,
fromlocationTypeList: [], fromLocationAreaTypeList: [],
tolocationTypeList: [],
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
dataContent: {} dataContent: {},
fromPackUnit: "",
packageList: [],
show: false,
toPackUnitShow: "包装规格",
toPackQty: "",
itemCode: ""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -103,8 +134,7 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)
@ -125,24 +155,67 @@
mounted() {}, mounted() {},
methods: { methods: {
getUomInfo(uom) {
let item = getUomInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
},
scanPopupPack() { scanPopupPack() {
this.$refs.scanPopupPack.openScanPopup(); this.$refs.scanPopupPack.openScanPopup();
}, },
showPackage() {
getPackUnitByItemCode(this.itemCode).then(res => {
if (res.data != null && res.data.list.length > 0) {
res.data.list.forEach(item => {
item.value = item.packQty;
item.label = item.packUnit + "/" + item.packQty + this
.getUomInfo(item.uom);
})
this.packageList = res.data.list
this.show = true;
} else {
this.showErrorMessage("未查找到包装规格");
}
}).catch(error => {
this.showErrorMessage("未查找到包装规格" + error);
})
},
confirmSelect(e) {
if (this.fromPackUnit == e[0].label) {
this.showErrorMessage("来源包装规格【" + this.fromPackUnit + "】与目标包装规格【" + e[0].label + "】不能相等")
return
}
this.toPackUnitShow = e[0].label
var toPackUnit = e[0].label.split("/")[0]
this.toPackUnit =toPackUnit
this.toPackQty = e[0].value
},
getScanResult(result) { getScanResult(result) {
let balance = result.balance; let balance = result.balance;
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
this.fromPackUnit = pack.packUnit;
var item = this.detailSource.find(res => { var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) { if (res.itemCode == balance.itemCode) {
return res return res
} }
}) })
if (item == undefined) { if (item == undefined) {
if (this.itemCode != "" && this.itemCode != balance.itemCode) {
this.showErrorMessage("请扫描物料为【" + this.itemCode + "】的箱码")
return;
}
var itemp = createItemInfo(balance, pack); var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.itemCode = balance.itemCode;
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
@ -163,6 +236,7 @@
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
calcHandleQty() { calcHandleQty() {
@ -178,9 +252,6 @@
}); });
}, },
updateData() {
this.calcHandleQty();
},
removeItem(index, item) { removeItem(index, item) {
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
}, },
@ -218,30 +289,55 @@
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
}, },
commit() { commit() {
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
uni.showLoading({ if (this.toPackUnit == "包装规格") {
title: "提交中....", this.showErrorMessage("请选择目标包装规格")
mask: true return;
}); }
this.checkSubmit();
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
overPackageRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else { } else {
this.showErrorMessage("没有要扫描的数据") this.showErrorMessage("没有要扫描的数据")
} }
},
checkSubmit() {
var tempHandleQty = this.detailSource[0].subList[0].handleQty
var toPackQty = this.toPackQty;
//
if (tempHandleQty % toPackQty > 0) {
// var count = Math.ceil(tempHandleQty / toPackQty);
this.$refs.comMessage.showQuestionMessage( "扫描数量【" + tempHandleQty +
"】,将有1个非整包,是否提交?", res => {
if (res) {
this.submitJob()
}
});
} else {
this.submitJob()
}
},
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
overPackageRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
}, },
@ -264,7 +360,12 @@
subItem.fromPackingNumber = detail.packingNumber; subItem.fromPackingNumber = detail.packingNumber;
subItem.fromBatch = detail.batch; subItem.fromBatch = detail.batch;
subItem.fromLocationCode = detail.locationCode; subItem.fromLocationCode = detail.locationCode;
subItem.package ="" subItem.fromPackUnit = detail.packUnit;
subItem.fromPackQty = detail.packQty;
subItem.toPackQty = this.toPackQty;
subItem.toPackUnit = this.toPackUnit;
subItem.package = ""
subList.push(subItem) subList.push(subItem)
} }
}) })
@ -279,12 +380,8 @@
if (res) {} if (res) {}
}); });
}, },
showErrorMessage(message) { getPackUnitName(packUnit) {
this.$refs.comMessage.showErrorMessage(message, res => { return getPackUnitName(packUnit);
if (res) {
}
});
}, },
showScanMessage(message) { showScanMessage(message) {
@ -310,7 +407,7 @@
this.$refs.comMessage.showSuccessMessage(hint, res => { this.$refs.comMessage.showSuccessMessage(hint, res => {
this.detailSource = [] this.detailSource = []
this.fromLocationCode = ''; this.fromLocationCode = '';
this.dataContent ={} this.dataContent = {}
}) })
}, },

9
src/pages/package/record/splitPackageRecord.vue

@ -34,7 +34,7 @@
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false"> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location> </win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<win-scan-pack title="拆分标签" ref="scanPopupPack" @getResult='getScanPackResult'></win-scan-pack> <win-scan-pack title="拆分标签" ref="scanPopupPack" @getResult='getScanPackResult'></win-scan-pack>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -90,11 +90,9 @@
return { return {
id: '', id: '',
detailSource: [], // detailSource: [], //
locationTypeList: [],
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
fromlocationTypeList: [], fromLocationAreaTypeList: [],
tolocationTypeList: [],
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
@ -108,8 +106,7 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)

6
src/pages/productDismantle/job/productDismantleDetail.vue

@ -30,7 +30,7 @@
<view class=""> <view class="">
<requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode" <requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :isShowEdit="jobContent.allowModifyLocation == 'TRUE'" @getLocation='getToLocationCode' :isShowEdit="jobContent.allowModifyLocation == 'TRUE'"
:locationTypeList="tolocationTypeList"></requiredLocation> :locationAreaTypeList="toLocationAreaTypeList"></requiredLocation>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -108,7 +108,7 @@
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
toLocationInfo: {}, toLocationInfo: {},
tolocationTypeList: [], toLocationAreaTypeList: [],
}; };
}, },
onLoad(option) { onLoad(option) {
@ -184,7 +184,7 @@
that.subList = res.data.subList; that.subList = res.data.subList;
that.fromLocationCode = that.subList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes) that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
that.getLocationInfo(that.toLocationCode); that.getLocationInfo(that.toLocationCode);
} else { } else {

14
src/pages/productDismantle/record/productDismantleRecord.vue

@ -19,7 +19,7 @@
</view> </view>
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' <requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation> :locationAreaTypeList="toLocationAreaTypeList"></requiredLocation>
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
@ -36,7 +36,7 @@
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -92,16 +92,14 @@
jobContent: {}, // jobContent: {}, //
detailList: [], //subList detailList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [],
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
fromLocationInfo: {}, fromLocationInfo: {},
fromLocationCode: "", fromLocationCode: "",
toLocationInfo: {},
toLocationCode: "", toLocationCode: "",
isShowLocation: false, isShowLocation: false,
fromlocationTypeList: [], fromLocationAreaTypeList: [],
tolocationTypeList: [], toLocationAreaTypeList: [],
allowModifyLocation: false, allowModifyLocation: false,
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
@ -113,8 +111,8 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)

16
src/pages/productPutaway/job/productPutawayDetail.vue

@ -15,7 +15,7 @@
<view class=""> <view class="">
<com-detail-card :dataContent="item" :index="index" :settingParam="jobContent" <com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationTypeList='tolocationTypeList'> :locationAreaTypeList='toLocationAreaTypeList'>
</com-detail-card> </com-detail-card>
</view> </view>
<u-line /> <u-line />
@ -28,7 +28,7 @@
<view class=""> <view class="">
<locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" <locationCompare ref='comScanLocation' title="目标库位" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode"
@getLocation='scanLocationCode' @getLocation='scanLocationCode'
:locationTypeList="tolocationTypeList"></locationCompare> :locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -107,7 +107,7 @@
managementList: [], managementList: [],
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
tolocationTypeList: [], toLocationAreaTypeList: [],
jobStatus:"", jobStatus:"",
jobToLocationCode: "", jobToLocationCode: "",
}; };
@ -183,7 +183,7 @@
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.fromLocationCode = that.subList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.tolocationTypeList = getLocationTypeArray(that.jobContent.toLocationTypes) that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
@ -283,8 +283,8 @@
itemDetail.toInventoryStatus = result.balance.inventoryStatus; itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty) itemDetail.balance.balanceQty = Number(result.balance.qty)
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.stdPackUnit = result.package.stdPackUnit itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty(); this.calcHandleQty();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -301,8 +301,8 @@
itemDetail.balance = result.balance; itemDetail.balance = result.balance;
itemDetail.toInventoryStatus = result.balance.inventoryStatus; itemDetail.toInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance.balanceQty = Number(result.balance.qty) itemDetail.balance.balanceQty = Number(result.balance.qty)
itemDetail.balance.stdPackQty = Number(result.package.stdPackQty) itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.stdPackUnit = result.package.stdPackUnit itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty(); this.calcHandleQty();
} }
} }

9
src/pages/productPutaway/record/productPutawayRecord.vue

@ -23,7 +23,7 @@
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode' <requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="tolocationTypeList"></requiredLocation> :locationAreaTypeList="tolocationTypeList"></requiredLocation>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -35,7 +35,7 @@
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult'></win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -93,10 +93,9 @@
dataContent: {}, // dataContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
locationTypeList: [],
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
fromlocationTypeList: [], fromLocationAreaTypeList: [],
tolocationTypeList: [], tolocationTypeList: [],
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
@ -109,7 +108,7 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.tolocationTypeList = res.tolocationTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {

12
src/pages/productPutaway/request/putawayRequestCreate.vue

@ -28,7 +28,7 @@
style="background-color:ghostwhite; width: 100%; "> style="background-color:ghostwhite; width: 100%; ">
<view class=""> <view class="">
<!-- <requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode" <!-- <requiredLocation v-if="showToLoaction" title="目标库位" :locationCode="toLocationCode"
@getLocation='getToLocationCode' :locationTypeList="tolocationTypeList"></requiredLocation> --> @getLocation='getToLocationCode' :locationAreaTypeList="toLocationAreaTypeList"></requiredLocation> -->
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -41,7 +41,7 @@
</win-scan-pack-and-location> </win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getFromLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getFromLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
</view> </view>
</template> </template>
@ -104,8 +104,8 @@
detailSource: [], // detailSource: [], //
fromLocationInfo: {}, fromLocationInfo: {},
fromLocationCode: "", fromLocationCode: "",
fromlocationTypeList: [], fromLocationAreaTypeList: [],
tolocationTypeList: [], toLocationAreaTypeList: [],
inInventoryStatus: "", // inInventoryStatus: "", //
outInventoryStatus: "", // outInventoryStatus: "", //
businessType: {}, businessType: {},
@ -121,8 +121,8 @@
getBusinessType(typeCode, res => { getBusinessType(typeCode, res => {
if (res.success) { if (res.success) {
this.businessType = res.businessType; this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList; this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.tolocationTypeList = res.tolocationTypeList; this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup(); this.showFromLocationPopup();
} else { } else {
this.showErrorMessage(res.message) this.showErrorMessage(res.message)

10
src/pages/productReceipt/coms/comProductDetailCard.vue

@ -22,7 +22,7 @@
@confirm="confirm"> @confirm="confirm">
</recommend-qty-edit> </recommend-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location> :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<productDetailInfoPopup ref="jobDetailPopup" :dataContent="showItem"></productDetailInfoPopup> <productDetailInfoPopup ref="jobDetailPopup" :dataContent="showItem"></productDetailInfoPopup>
<comMessage ref="message"></comMessage> <comMessage ref="message"></comMessage>
</view> </view>
@ -53,15 +53,15 @@
props: { props: {
dataContent: { dataContent: {
type: Object, type: Object,
default: {} default: null
}, },
settingParam: { settingParam: {
type: Object, type: Object,
default: {} default: null
}, },
locationTypeList: { locationAreaTypeList: {
type: Array, type: Array,
default: [] default: null
}, },

4
src/pages/productReceipt/coms/detailInfoPopup.vue

@ -19,11 +19,11 @@
<view class="item"> <view class="item">
<text class="item_title">标包数量 : </text> <text class="item_title">标包数量 : </text>
<text class="text_wrap">{{dataContent.stdPackQty}} </text> <text class="text_wrap">{{dataContent.packQty}} </text>
</view> </view>
<view class="item"> <view class="item">
<text class="item_title">标包单位 : </text> <text class="item_title">标包单位 : </text>
<text class="text_wrap">{{dataContent.stdPackUnit}} </text> <text class="text_wrap">{{dataContent.packUnit}} </text>
</view> </view>
<view class="item"> <view class="item">

10
src/pages/productReceipt/coms/productDetailInfoPopup.vue

@ -6,11 +6,11 @@
<view class="uni-flex uni-column"> <view class="uni-flex uni-column">
<view class="item"> <view class="item">
<text class="item_title">标包数量 : </text> <text class="item_title">标包数量 : </text>
<text class="text_wrap">{{dataContent.stdPackQty}} </text> <text class="text_wrap">{{dataContent.packQty}} </text>
</view> </view>
<view class="item"> <view class="item">
<text class="item_title">标包单位 : </text> <text class="item_title">标包单位 : </text>
<text class="text_wrap">{{getStdPackUnitInfo(dataContent.stdPackUnit)}} </text> <text class="text_wrap">{{getPackUnitInfo(dataContent.packUnit)}} </text>
</view> </view>
</view> </view>
@ -50,7 +50,7 @@
</template> </template>
<script> <script>
import {getStdPackUnitInfo} from "@/common/directory.js" import {getPackUnitInfo} from "@/common/directory.js"
import { import {
dateFormat dateFormat
} from '@/common/basic.js'; } from '@/common/basic.js';
@ -81,8 +81,8 @@
closePopup() { closePopup() {
this.$refs.popup.close() this.$refs.popup.close()
}, },
getStdPackUnitInfo(value){ getPackUnitInfo(value){
return getStdPackUnitInfo(value).label return getPackUnitInfo(value).label
}, },
dateFormat(value){ dateFormat(value){
return dateFormat(value) return dateFormat(value)

288
src/pages/productReceipt/job/completeReceiveJob.vue

@ -0,0 +1,288 @@
<template>
<view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask">
</job-filter>
<view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item
:right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@click="swipeClick($event,item)">
<com-product-job-card :dataContent="item" @click='openJobDetail(item)'></com-product-job-card>
</uni-swipe-action-item>
</view>
</uni-swipe-action>
<job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></job-list-popup>
<job-info-popup ref='jobInfoPopup'></job-info-popup>
<uni-load-more :status="loadingType" v-if="jobList.length>0" />
<comMessage ref="comMessage"></comMessage>
</view>
</view>
</template>
<script>
import {
getProductReceiptJobList,
cancleTakeProductReceiptJob
} from '@/api/request2.js';
import {
goHome,
updateTitle
} from '@/common/basic.js';
import {
getDetailOption,
getDetailGiveupOption
} from '@/common/array.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comProductJobCard from '@/pages/productReceipt/coms/comProductJobCard.vue'
import jobListPopup from '@/pages/productReceipt/coms/jobListPopup.vue'
import jobInfoPopup from '@/pages/productReceipt/coms/jobInfoPopup.vue'
export default {
name: 'receipt',
components: {
comEmptyView,
jobFilter,
comProductJobCard,
jobListPopup,
jobInfoPopup
},
data() {
return {
jobList: [],
pageNo: 1,
pageSize: 10,
totalCount: 0,
loadingType: "nomore",
checkedToday: false,
checkedWaitTask: false,
todayTime: "",
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
};
},
onShow() {
this.getList("refresh")
},
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
onPullDownRefresh() {
this.getList('refresh');
},
//退
onBackPress(options) {
if (options.from === 'navigateBack') {
uni.navigateBack({
delta: 1
})
return false;
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
}
},
methods: {
getList(type) {
let that = this;
uni.showLoading({
title: "加载中­....",
mask: true
});
this.loadingType = "loading";
if (type === "refresh") {
this.pageNo = 1;
this.jobList = [];
}
var filters = []
if (this.checkedToday) {
filters.push({
column: "request_time",
action: "betweeen",
value: this.todayTime
})
}
filters.push({
column: "status",
action: "in",
value: this.status
})
var params = {
filters: filters,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
getProductReceiptJobList(params).then(res => {
uni.hideLoading();
if (type === "refresh") {
uni.stopPullDownRefresh();
}
var list = res.data.list;
this.totalCount = res.data.total
updateTitle("完工收货任务(装配)(" + this.totalCount + ")");
this.loadingType = "loadmore";
if (list == null || list.length == 0) {
this.loadingType = "nomore";
return;
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
}).catch(error => {
if (type === "refresh") {
uni.stopPullDownRefresh();
}
updateTitle("完工收货任务(装配)");
this.loadingType = "";
uni.hideLoading();
that.showMessage(error)
})
},
openJobDetail(item) {
uni.navigateTo({
url: './productReceiptDetail?id=' + item.id + '&status=' + item.status
});
},
showItemList(itemList) {
this.$refs.jobListPopup.openPopup(itemList);
},
selectedItem(item) {
this.openJobDetail(item);
},
swipeClick(e, dataContent) {
if (e.content.text == "详情") {
this.openjobInfoPopup(dataContent);
} else if (e.content.text == "放弃") {
this.$refs.comMessage.showQuestionMessage("确定要放弃当前任务?",
res => {
if (res) {
this.cancleJob(dataContent.id);
}
});
}
},
openjobInfoPopup(item) {
this.$refs.jobInfoPopup.openPopup(item)
},
cancleJob(id) {
cancleTakeProductReceiptJob(id).then(res => {
if(res.data){
this.getList("refresh")
uni.showToast({
title:"放弃任务成功"
})
}else {
this.showMessage("放弃任务失败")
}
}).catch(error => {
this.showMessage(error)
})
},
switchChangeToday(state, creationTime) {
this.checkedToday = state;
this.todayTime = creationTime;
this.getList("refresh");
},
switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state;
this.status = jobStatus;
this.getList("refresh");
},
getScanNumber(code) {
this.getDataListByType(code)
},
getDataListByType(code) {
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: code
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getProductReceiptJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务');
} else if (res.data.list.length == 1) {
that.openJobDetail(res.data.list[0]);
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
},
showMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
}
}
</script>
<style scoped lang="scss">
</style>

418
src/pages/productReceipt/job/completeReceiveJobDetail.vue

@ -0,0 +1,418 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item">
申请单号 : {{jobContent.requestNumber}}
</view>
<u-line color="#D8D8D8"></u-line>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList'>
</comProductDetailCard>
</view>
<u-line />
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<locationCompare title="收货库位" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode"
@getLocation='scanLocationCode'
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view>
<view class="uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack ref="scanPopup" @getResult='getScanResult' :title="'制品标签'" headerType="HMQ"></win-scan-pack>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
getManagementPrecisions
} from '@/common/balance.js';
import {
getProductReceiptJobDetail,
takeProductReceiptJob,
cancleTakeProductReceiptJob,
productReceiptJobsubmit
} from '@/api/request2.js';
import {
goHome,
navigateBack,
getPackingNumberAndBatch,
} from '@/common/basic.js';
import {
getDirectoryItemArray,
getInventoryStatusName
} from '@/common/directory.js';
import {
getDataSource,
createRecordInfo,
calcHandleQty,
getScanCount
} from '@/common/detail.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue'
import winScanPack from "@/mycomponents/scan/winScanPack.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
export default {
name: 'receipt_detail',
components: {
winScanButton,
comDetailCard,
locationCompare,
winScanPack,
jobTop,
comProductDetailCard
},
data() {
return {
id: '',
receiptJob: {},
toLocationCode: '',
isShowPackingCode: true,
scanCount: 0,
jobContent: {}, //
subList: [], //subList
detailSource: [], //
toLocationAreaTypeList: [],
managementList: [],
jobStatus:"",
jobToLocationCode:""
};
},
onLoad(option) {
this.id = option.id;
if (this.id != undefined) {
//
if (option.status == "1") {
this.receive((callback => {
this.getDetail();
}));
} else {
this.getDetail();
}
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
}
},
//
onBackPress(e) {
//
if (e.from == 'backbutton') {
if (this.jobStatus=="2") {
//
cancleTakeProductReceiptJob(this.id).then(res => {
uni.navigateBack();
}).catch(error => {
uni.navigateBack();
})
} else {
uni.navigateBack();
}
return true;
}
},
onPullDownRefresh() {
this.getDetail();
uni.stopPullDownRefresh();
},
mounted() {
},
methods: {
//
receive(callback) {
if (this.id != null) {
takeProductReceiptJob(this.id).then(res => {
callback();
}).catch(error => {
this.showErrorMessage(error)
})
}
},
getDetail() {
var that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
getProductReceiptJobDetail(that.id).then(res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
} else {
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.subList = res.data.subList;
that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');
}
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
getScanResult(result) {
let label = result.label;
var packingNumber = label.packingNumber;
var batch = label.batch;
var qty = label.qty;
var itemCode = label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = detail.subList.find(r =>
r.packingNumber == packingNumber &&
r.batch == batch);
if (itemDetail == undefined) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]不在任务列表中")
} else {
if (itemDetail.scaned) {
this.showErrorMessage("箱码[" + packingNumber + "]" + "批次[" + batch + "]已经扫描")
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
}
}
}
},
//
continueScan() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == this.subList.length) {
this.closeScanPopup();
} else {
this.scanPopupGetFocus();
}
},
updateData() {
calcHandleQty(this.detailSource);
},
openScanPopup() {
this.$refs.scanPopup.openScanPopup();
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
},
scanLocationCode(location, code) {
this.$refs.comMessage.showQuestionMessage("是否把所有的目标库位都变成默认库位[" + code + "]", res => {
this.toLocationCode = code
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
detail.toLocationCode = code
})
})
})
},
checkLocation() {
var isPass = true;
if (this.toLocationCode == "" || this.toLocationCode == null) {
this.showMessageHint('请扫描收货库位', callback => {
this.$refs.comScanLocation.showLocation();
})
return isPass = false;
}
return isPass;
},
showMessageHint(hint, callback) {
this.$refs.comMessage.showErrorMessage(hint, res => {
if (res) {
callback()
}
});
},
commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描")
return;
}
//
if (!this.checkLocation()) {
return
}
//
if (this.scanCount == this.subList.length) {
this.submitJob();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.submitJob();
} else {
//
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length +
"]");
}
}
},
submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams();
console.log("提交参数", JSON.stringify(params));
productReceiptJobsubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品收货记录<br>" + res.data, )
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
if (detail.scaned) {
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode
subList.push(detail)
}
})
})
this.jobContent.subList = subList
this.jobContent.creator = creator;
return this.jobContent;
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
}
},
scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
showMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {
if (res) {
this.scanPopupGetFocus();
}
});
})
},
showErrorMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.scanPopupGetFocus();
}
});
})
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
navigateBack(1)
})
},
}
}
</script>
<style scoped lang="scss">
</style>

8
src/pages/productReceipt/job/productReceiptDetail.vue

@ -15,7 +15,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false" <comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'> @remove="updateData" @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList'>
</comProductDetailCard> </comProductDetailCard>
</view> </view>
<u-line /> <u-line />
@ -29,7 +29,7 @@
<view class=""> <view class="">
<locationCompare title="收货库位" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode" <locationCompare title="收货库位" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode"
@getLocation='scanLocationCode' @getLocation='scanLocationCode'
:locationTypeList="toLocationTypeList"></locationCompare> :locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -101,7 +101,7 @@
jobContent: {}, // jobContent: {}, //
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
toLocationTypeList: [], toLocationAreaTypeList: [],
managementList: [], managementList: [],
jobStatus:"", jobStatus:"",
jobToLocationCode:"" jobToLocationCode:""
@ -184,7 +184,7 @@
that.subList = res.data.subList; that.subList = res.data.subList;
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
} else { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');

3
src/pages/productReceipt/job/productReceiptJob.vue

@ -155,6 +155,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle("制品收货(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -162,7 +163,7 @@
} }
this.jobList = type === "refresh" ? list : this.jobList.concat(list); this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++; this.pageNo++;
updateTitle("制品收货(" + this.totalCount + ")");
}).catch(error => { }).catch(error => {
if (type === "refresh") { if (type === "refresh") {

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save