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. 54
      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. 101
      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. 185
      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"
},
{
"playground" : "custom",
"playground" : "standard",
"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) {
return request({
url: baseApi + "/wms/location/recommendLocation",
url: baseApi + "/wms/location/recommendLocationNew",
method: "post",
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 {*}
@ -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 任务状态
@ -3499,19 +3603,17 @@ export function mergePackageRecordSubmit(params) {
}
/**
* 翻包 提交
* 翻包直接生成记录 提交
* @param {*} params
*/
export function overPackageRecordSubmit(params) {
return request({
url: baseApi + "/wms/packageover-main/create",
url: baseApi + "/wms/packageover-record-main/create",
method: "post",
data: params,
});
}
/**
* "itemCodes": [],
"locationCode":"INSPECT"
@ -3662,4 +3764,71 @@ export function getPackageUnitList(params) {
method: "post",
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 itemStatusList = [];
let locationTypeList = [];
let locationAreaTypeList = [];
let uomList = [];
let inventoryStatusList = [];
let containerTypeList = [];
@ -24,7 +24,7 @@ let inspectFailedReasonList = [];
export function clearCacheData() {
jobStatusList = [];
itemStatusList = [];
locationTypeList = [];
locationAreaTypeList = [];
uomList = [];
inventoryStatusList = [];
containerTypeList = [];
@ -152,11 +152,11 @@ export function getItemStateInfo(value) {
//获取库位类型
export function getLocationTypeInfo(value) {
var resultInfo = "";
if (locationTypeList.length == 0) {
locationTypeList = getDirectoryInfo("location_type")
if (locationAreaTypeList.length == 0) {
locationAreaTypeList = getDirectoryInfo("location_type")
}
if (locationTypeList.length > 0) {
for (let item of locationTypeList) {
if (locationAreaTypeList.length > 0) {
for (let item of locationAreaTypeList) {
if (item.value == value) {
resultInfo = item
break;
@ -191,7 +191,7 @@ export function getUomInfo(value) {
}
//获取包装单位
export function getStdPackUnitInfo(value) {
export function getPackUnitInfo(value) {
var resultInfo = "";
if (packUnitList.length == 0) {
packUnitList = getDirectoryInfo("pack_unit")
@ -957,8 +957,8 @@ export function createItemInfo(res) {
let item = {
itemCode: res.itemCode,
itemName: res.itemName,
stdPackQty: Number(res.stdPackQty),
stdPackUnit: res.stdPackUnit,
packQty: Number(res.packQty),
packUnit: res.packUnit,
qty: Number(res.qty),
handleQty: 0,
uom: res.uom,

14
src/common/detail.js

@ -67,8 +67,8 @@ export function createItemInfo(detail) {
let item = {
itemCode: detail.itemCode,
itemName: detail.itemName,
stdPackQty: Number(detail.stdPackQty) || undefined,
stdPackUnit: detail.stdPackUnit,
packQty: Number(detail.packQty) || undefined,
packUnit: detail.packUnit,
qty: Number(detail.qty),
handleQty: 0,
uom: detail.uom,
@ -118,10 +118,12 @@ export function calcTreeHandleQty(detailSource) {
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);
if(detail.packList.length>0){
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);

54
src/common/directory.js

@ -6,6 +6,7 @@ let uomList = [];
let inventoryStatusList = [];
let containerTypeList = [];
let packUnitList = [];
let packUnitInfoList = [];
let requestStatusList = [];
let unplannedReceiptReasonList = [];
let unplannedIssueReasonList = [];
@ -18,6 +19,8 @@ let inspectTypeList = [];
let sampleMethodList = [];
let transferModeList = [];
let countStageList = [];
let locationAreaTypeList = [];
// 获取业务类型字典项
@ -43,6 +46,7 @@ export function clearCacheData() {
inventoryStatusList = [];
containerTypeList = [];
packUnitList = [];
packUnitInfoList = [];
requestStatusList = [];
unplannedReceiptReasonList = [];
unplannedIssueReasonList = [];
@ -55,6 +59,7 @@ export function clearCacheData() {
sampleMethodList = [];
transferModeList = [];
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) {
let desc = '';
@ -210,6 +225,23 @@ export function getItemStateInfo(value) {
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) {
var resultInfo = "";
@ -226,6 +258,13 @@ export function getLocationTypeInfo(value) {
}
return resultInfo
}
//获取库区类型名称
export function getLocationAreaTypeName(value) {
let location = getLocationAreaTypeInfo(value);
return location == '' ? value : location.label;
}
//获取库位类型名称
export function getLocationTypeName(value) {
@ -263,7 +302,7 @@ export function getUomInfo(value) {
}
//获取包装单位
export function getStdPackUnitInfo(value) {
export function getPackUnitInfo(value) {
var resultInfo = "";
if (packUnitList.length == 0) {
packUnitList = getDirectoryInfo("pack_unit")
@ -515,11 +554,11 @@ export function getCountStageName(value) {
//获取包装规格
export function getPackUnitName(value) {
var resultInfo = "";
if (packUnitList.length == 0) {
packUnitList = uni.getStorageSync('packunit');
if (packUnitInfoList.length == 0) {
packUnitInfoList = uni.getStorageSync('packunit');
}
if (packUnitList.length > 0) {
for (let item of packUnitList) {
if (packUnitInfoList.length > 0) {
for (let item of packUnitInfoList) {
if (item.code == value) {
resultInfo = item.name
break;
@ -527,4 +566,7 @@ export function getPackUnitName(value) {
}
}
return resultInfo
}
}
locationAreaTypeList

37
src/common/label.js

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

34
src/common/record.js

@ -15,8 +15,8 @@ export function createItemInfo(balance, pack) {
let item = {
itemCode: pack.itemCode,
itemName: pack.itemName,
stdPackQty: pack.stdPackQty,
stdPackUnit: pack.stdPackUnit,
packQty: pack.packQty,
packUnit: pack.packUnit,
qty: new Decimal(balance.qty).toNumber(),
handleQty:new Decimal(0).toNumber(),
uom: pack.uom,
@ -32,8 +32,8 @@ export function createDetailInfo(balance, pack) {
let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
detail.stdPackQty = new Decimal(pack.stdPackQty).toNumber()
detail.stdPackUnit = pack.stdPackUnit
detail.packQty = new Decimal(pack.packQty).toNumber()
detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber() ;
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) {
let result = {
success: true,
businessType: '',
fromlocationTypeList: '',
tolocationTypeList: '',
fromLocationAreaTypeList:'',
toLocationAreaTypeList:'',
itemCodeTypeList:"",
useOnTheWay:"FALSE",
fromInventoryStatuses: '',
@ -71,8 +89,8 @@ export function getBusinessType(typeCode, callback) {
getBusinesstypeByCode(typeCode).then(res => {
if (res.data.total > 0) {
result.businessType = res.data.list[0];
result.fromlocationTypeList = getDirectoryItemArray(res.data.list[0].outLocationTypes)
result.tolocationTypeList = getDirectoryItemArray(res.data.list[0].inLocationTypes)
result.fromLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].outAreaTypes) ;
result.toLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].inAreaTypes) ;
result.itemCodeTypeList = getDirectoryItemArray(res.data.list[0].itemTypes)
result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses;
result.toInventoryStatuses = res.data.list[0].inInventoryStatuses;

12
src/mycomponents/detail/comDetailCard.vue

@ -7,7 +7,7 @@
</item-compare-qty>
</template>
<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-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions"
@ -21,7 +21,7 @@
</uni-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location>
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<comMessage ref="message"></comMessage>
</view>
</template>
@ -47,11 +47,11 @@
props: {
dataContent: {
type: Object,
default: {}
default: null
},
settingParam: {
type: Object,
default: {}
default: null
},
isShowPack: {
type: Boolean,
@ -65,9 +65,9 @@
type: Boolean,
default: true
},
locationTypeList: {
locationAreaTypeList: {
type: Array,
default: []
default: null
},
},
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>
import {
getInventoryStatusName,
getStdPackUnitInfo,
getPackUnitInfo,
getUomInfo
} from '@/common/directory.js';
export default {

2
src/mycomponents/detail/detailHandleInfo.vue

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

4
src/mycomponents/detail/detailPackageInfo.vue

@ -21,7 +21,7 @@
<view class="item">
<text class="item_title">标包 : </text>
<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>
@ -30,7 +30,7 @@
<script>
import {
getInventoryStatusName,
getStdPackUnitInfo,
getPackUnitInfo,
getUomInfo
} from '@/common/directory.js';
export default {

2
src/mycomponents/detail/detailRecommendInfo.vue

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

6
src/mycomponents/detail/jobDetailPopup.vue

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

6
src/mycomponents/job/jobDetailPopup.vue

@ -9,7 +9,7 @@
<script>
import {
getInventoryStatusName,
getStdPackUnitInfo
getPackUnitInfo
} from '@/common/directory.js';
import detailCommonInfo from '@/mycomponents/detail/detailCommonInfo.vue'
@ -42,8 +42,8 @@
getInventoryStatusInfo(value) {
return getInventoryStatusName(value).label
},
getStdPackUnit(uom) {
let item = getStdPackUnitInfo(uom);
getPackUnit(uom) {
let item = getPackUnitInfo(uom);
if (item == '') {
return uom;
} 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>
</view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location>
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view>
</template>
@ -48,9 +48,9 @@
type: Boolean,
default: true
},
locationTypeList: {
locationAreaTypeList: {
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>
</view>
<win-scan-location ref="scanLocationCode" :title="title" @getLocation='getLocation'
:locationTypeList="locationTypeList"></win-scan-location>
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
</view>
</template>
@ -43,9 +43,9 @@
type: Boolean,
default: true
},
locationTypeList: {
locationAreaTypeList: {
type: Array,
default: []
default: null
}
},

6
src/mycomponents/package/packageCard.vue

@ -1,5 +1,5 @@
<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; -->
<view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉-->
@ -23,7 +23,7 @@
</compare-qty>
<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>
@ -59,7 +59,7 @@
props: {
dataContent: {
type: Object,
default: {}
default: null
},
isShowContainer: {
type: Boolean,

4
src/mycomponents/package/packageDetailPopup.vue

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

101
src/mycomponents/package/packageList.vue

@ -1,17 +1,30 @@
<template>
<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>
<package-card :dataContent="item" :isShowLocation="false"
:isShowFromLocation="false"></package-card>
</template>
<view v-for="(pack,index) in item.packList" :key="pack.id" style=" width: 90%;">
<package-card :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false"
:isShowToLocation="false" :isShowBatch="false"></package-card>
</view>
</uni-collapse-item>
</uni-collapse>
<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>
<package-card :dataContent="item" :isShowLocation="false"
:isShowFromLocation="isShowFromLocation"></package-card>
</template>
<view v-for="(pack,index) in item.packList" :key="pack.id"
style=" width: 100%; background-color: antiquewhite;">
<uni-swipe-action>
<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>
</template>
@ -19,21 +32,35 @@
<script>
import config from '@/static/config.js'
import packageCard from '@/mycomponents/package/packageCard.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import {
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
emits: ["collapseChange"],
emits: ["collapseChange", "updateData"],
components: {
packageCard
packageCard,
recommendQtyEdit
},
data() {
return {
editItem: {},
options: [],
removeOptions: [],
editAndRemoveOptions: []
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
},
props: {
dataContent: {
type: Object,
default: {}
default: null
},
isShowContainer: {
type: Boolean,
@ -64,12 +91,43 @@
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)
} 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() {
this.$emit("collapseChange");
this.resizeCollapse();
@ -82,7 +140,7 @@
})
r.resize();
})
});
this.$forceUpdate();
},
@ -139,13 +197,18 @@
},
isDevlement() {
return config.isDevelopment;
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit("updateData")
}
}
}
</script>
<style>
.open{
.open {
/* background-color: green !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"
:recommendQty="recommendQty"
:uom="uom"
:stdPackQty="stdPackQty"
:packQty="packQty"
:handledQty="handledQty"></count>
</view>
@ -96,7 +96,7 @@
type: Number,
default: 0
},
stdPackQty: {
packQty: {
type: Number,
default: 0,
},

12
src/mycomponents/qty/balanceQty.vue

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

8
src/mycomponents/qty/balanceQtyEdit.vue

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

6
src/mycomponents/qty/compareQty.vue

@ -41,14 +41,14 @@
</template>
<script>
// import stdPackQty from '@/mycomponents/qty/stdPackQty.vue'
// import packQty from '@/mycomponents/qty/packQty.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
// stdPackQty,
// packQty,
packUnit,
uom,
status
@ -67,7 +67,7 @@
dataContent: {
type: Object,
default: {}
default: null
},
recommendQty: {
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>
<view class="std_pack">
{{getStdPackUnitInfo(dataContent.stdPackUnit)}}
{{getPackUnitInfo(dataContent.packUnit)}}
</view>
</view>
@ -28,7 +28,7 @@
<view class="uni-flex uni-row space-between padding title u-col-center">
<text>标包量 : </text>
<view class="uni-flex u-col-center uni-row">
<text>{{Number(dataContent.stdPackQty)}}</text>
<text>{{Number(dataContent.packQty)}}</text>
<uom :uom="dataContent.uom"></uom>
</view>
</view>
@ -83,7 +83,7 @@
import uom from '@/mycomponents/qty/uom.vue'
import balanceStatus from '@/mycomponents/status/balanceStatus.vue'
import {
getStdPackUnitInfo
getPackUnitInfo
} from "@/common/directory.js"
import {
getInventoryStatusName
@ -162,7 +162,7 @@
// this.dataContent = item
// this.inventoryStatus = this.dataContent.inventoryStatus;
// 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.showConfirmCountdown = false;
this.mode = 'edit';
@ -187,7 +187,7 @@
this.dataContent = item;
this.inventoryStatus = this.dataContent.inventoryStatus;
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;
},
@ -226,7 +226,7 @@
},
calcQty(val) {
if (val > 0) {
this.allQty = val * Number(this.dataContent.stdPackQty);
this.allQty = val * Number(this.dataContent.packQty);
}
},
@ -240,8 +240,8 @@
this.inventoryStatus = value
},
getStdPackUnitInfo(value) {
return getStdPackUnitInfo(value).name
getPackUnitInfo(value) {
return getPackUnitInfo(value).name
}
}
}

2
src/mycomponents/qty/inspectQtyEdit.vue

@ -133,7 +133,7 @@
this.closeEditPopup();
},
calcQty(val) {
this.allQty = val * Number(this.dataContent.stdPackQty);
this.allQty = val * Number(this.dataContent.packQty);
},
setValue() {
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">
{{Number(dataContent.qty)}}
</view>
<uom v-show="!isShowStdPack" :uom="dataContent.uom"></uom>
<uom :uom="dataContent.uom"></uom>
</view>
<view>
<std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty>
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit>
</view>
</view>
</template>
<script>
import stdPackQty from '@/mycomponents/qty/stdPackQty.vue'
import packQty from '@/mycomponents/qty/packQty.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default {
components: {
stdPackQty,
packQty,
status,
uom
uom,
packUnit
},
data() {
return {
@ -34,16 +36,20 @@
props: {
dataContent: {
type: Object,
default: {}
default: null
},
isShowStatus: {
type: Boolean,
default: true
},
isShowStdPack: {
isShowPack: {
type: Boolean,
default: true
}
},
isShowPackUnit: {
type: Boolean,
default: true
},
},
watch: {

4
src/mycomponents/qty/recommendQty.vue

@ -16,14 +16,14 @@
</template>
<script>
// import stdPackQty from '@/mycomponents/qty/stdPackQty.vue'
// import packQty from '@/mycomponents/qty/packQty.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
export default {
components: {
// stdPackQty,
// packQty,
packUnit,
uom,
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 ">
<view class="uni-flex uni-row space-between padding title ">
<text>包个数 : </text>
<text>个数 : </text>
<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>
<std-uom :uom="dataContent.stdPackUnit"></std-uom>
{{getPackUnitName(dataContent.packUnit)}}
</view>
</view>
<u-line />
<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">
<text>{{Number(dataContent.stdPackQty)}}</text>
<uom :uom="dataContent.uom"></uom>
<packUnit :dataContent="dataContent"></packUnit>
</view>
</view>
@ -56,12 +55,18 @@
</template>
<script>
import {
getUomInfo,
getPackUnitName
} from '@/common/directory.js';
import uom from '@/mycomponents/qty/uom.vue'
import stdUom from '@/mycomponents/qty/stdUom.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default {
components: {
uom,
stdUom,
packUnit
},
data() {
return {
@ -92,7 +97,7 @@
},
dataContent: {
type: Object,
default: {}
default: null
},
handleQty: {
type: Number,
@ -100,10 +105,14 @@
},
settingParam: {
type: Object,
default: {}
default: null
},
},
methods: {
getPackUnitName(packUnit) {
let unit = getPackUnitName(packUnit);
return unit;
},
checkNum(e) {
let value = e.detail.value;
let dot = value.indexOf('.'); //
@ -150,7 +159,7 @@
},
calcQty(val) {
if (val > 0) {
this.allQty = val * this.dataContent.stdPackQty;
this.allQty = val * this.dataContent.packQty;
}
},
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>
<view class="uom">
{{getStdPackUnit(uom)}}
{{getPackUnit(uom)}}
</view>
</template>
<script>
import {
getStdPackUnitInfo
getPackUnitInfo
} from '@/common/directory.js';
export default {
data() {
@ -23,8 +23,8 @@
},
},
methods: {
getStdPackUnit(uom) {
let item = getStdPackUnitInfo(uom);
getPackUnit(uom) {
let item = getPackUnitInfo(uom);
if (item == '') {
return uom;
} 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')
}
// #endif
// #ifdef APP-PLUS
this.hide()
// #ifdef APP-PLUS
//
// this.hide()
// uni.onKeyboardHeightChange(res => {
@ -146,6 +146,7 @@
},
methods: {
hide() {
// #ifdef APP-PLUS
//
var interval = setInterval(function() {
uni.hideKeyboard(); //
@ -155,6 +156,7 @@
clearInterval(interval);
console.log('停止刷新')
}, 1000);
// #endif
},
getValue() {
return this.scanMsg
@ -221,6 +223,7 @@
this.$nextTick(r => {
that.boxfocus = true;
});
this.hide()
},
losefocus() {
let that = this;

8
src/mycomponents/scan/winScanJobNumber.vue

@ -13,7 +13,13 @@
</view>
<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>
</view>
</view>

19
src/mycomponents/scan/winScanLocation.vue

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

23
src/mycomponents/scan/winScanPackAndLocation.vue

@ -62,10 +62,10 @@
} from '@/api/request2.js';
import {
getListLocationTypeDesc,
getListLocationAreaTypeDesc,
checkDirectoryItemExist,
getDirectoryItemArray,
getLocationTypeName,
getLocationAreaTypeName,
getInventoryStatusDesc
} from '@/common/directory.js';
export default {
@ -114,7 +114,7 @@
fromLocationCode: '',
fromLocation: '',
fromLocationList: [],
fromLocationTypeArray: [],
fromLocationAreaTypeList: [],
locationOnFocus: false,
businessType: {},
inventoryStatus: [],
@ -138,7 +138,7 @@
}
this.fromInventoryStatuses = this.businessType.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); //
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
@ -162,7 +162,7 @@
}, 500)
this.fromInventoryStatuses = jobContent.outInventoryStatuses
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaCodes); //
},
closeScanPopup(content) {
@ -194,25 +194,22 @@
mask: true
});
getBasicLocationByCode(this.fromLocationCode).then(res => {
uni.hideLoading();
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)) {
if (checkDirectoryItemExist(this.fromLocationAreaTypeList, 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();
})
var hint = getListLocationAreaTypeDesc(this.fromLocationAreaTypeList);
this.showErrorMessage("扫描库位[" + this.code + "]是[" +
getLocationAreaTypeName(areaType) + "],需要的库区是[" + hint + "]")
}
} else {
uni.hideLoading();
this.showErrorMessage("扫描库位[" + this.fromLocationCode + "]不可用", res => {
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}}
</view>
<view class="">
标包数量{{dataContent.stdPackQty}}
标包数量{{dataContent.packQty}}
</view>
<view class="">
推荐单位{{dataContent.recommendUom}}

128
src/pages.json

@ -340,6 +340,13 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/inspect/job/inspectResult",
"style": {
"navigationBarTitleText": "检验详情",
"enablePullDownRefresh": true
}
},
{
"path": "pages/putaway/job/putawayJob",
"style": {
@ -465,6 +472,13 @@
"enablePullDownRefresh": false
}
},
{
"path": "pages/issue/request/issueScanRequest",
"style": {
"navigationBarTitleText": "扫描叫料申请",
"enablePullDownRefresh": false
}
},
{
"path": "pages/issue/job/issueJob",
@ -1130,6 +1144,75 @@
"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",
"style": {
@ -1382,6 +1465,13 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/inventoryMove/record/scrapToHoldRecord",
"style": {
"navigationBarTitleText": "报废转隔离记录",
"enablePullDownRefresh": true
}
},
{
"path": "pages/inventoryMove/record/okToHoldRecord",
"style": {
@ -1734,7 +1824,45 @@
"navigationBarTitleText": "翻包",
"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
}
}
],

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

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

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

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

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

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

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

@ -157,6 +157,7 @@
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";
@ -164,7 +165,6 @@
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
updateTitle("盘点(" + this.totalCount + ")");
}).catch(error => {
if (type === "refresh") {

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

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

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

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

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

@ -153,6 +153,7 @@
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";
@ -160,7 +161,7 @@
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
updateTitle("客户退货(" + this.totalCount + ")");
}).catch(error => {
if (type === "refresh") {
uni.stopPullDownRefresh();

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

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

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

@ -158,6 +158,7 @@
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";
@ -168,9 +169,7 @@
res.options = options;
})
this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++;
updateTitle("客户退货申请(" + this.totalCount + ")");
}).catch(error => {
if (type === "refresh") {

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

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

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

@ -47,7 +47,7 @@
<uom :uom="uom"></uom>
<!-- <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>

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

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

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

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

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

@ -154,6 +154,7 @@
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";
@ -161,7 +162,6 @@
}
this.jobList = type === "refresh" ? list : this.receiptList.concat(list);
this.pageNo++;
updateTitle("制品发货任务(" + this.totalCount + ")");
}).catch(error => {
if (type === "refresh") {

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

@ -35,7 +35,7 @@
<view class="">
<requiredLocation ref='comScanLocation' title="目标库位" :locationCode="toLocationCode"
@getLocation='scanLocationCode' :isShowEdit="true"
:locationTypeList="tolocationTypeList"></requiredLocation>
:locationAreaTypeList="toLocationAreaTypeList"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<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>
<comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
</view>
</template>
@ -105,11 +105,10 @@
id: '',
subList: [], //subList
detailSource: [], //
locationTypeList: [],
fromLocationCode: "",
toLocationCode: "",
fromlocationTypeList: [],
tolocationTypeList: [],
fromLocationAreaTypeList: [],
toLocationAreaTypeList: [],
businessType: {},
customerList: [],
customerText: "",
@ -124,8 +123,8 @@
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)

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

@ -158,6 +158,7 @@
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";
@ -169,7 +170,7 @@
})
this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++;
updateTitle("成品发货申请(" + this.totalCount + ")");
}).catch(error => {
updateTitle("成品发货申请");

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

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

12
src/pages/demo/demo.vue

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

9
src/pages/index/index.vue

@ -35,12 +35,12 @@
</scroll-view>
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box"
@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="item-title">
<text>{{item.name}}</text>
</view>
<view class="item-container">
<view class="item-container" >
<view class="thumb-box" v-for="(item1, index1) in item.children" :key="index1"
@click="openCheck(item1.path)">
<view class="" style="position: relative; ">
@ -93,7 +93,6 @@
forcedLogin: false,
count: 1,
position: [-10, -10],
timer: null,
menusCount: {},
filterList: [],
serchval: ""
@ -109,7 +108,7 @@
uni.hideLoading()
if (res.menus.length > 0) {
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)
tab.forEach(res => {
for (var i = 0; i < res.children.length; i++) {
@ -337,7 +336,7 @@
"inventory_status", "container_type", "pack_unit", "unplanned_receipt_reason",
"unplanned_issue_reason", "scrap_reason", "inspect_failed_reason",
"request_status", "inspect_type", "next_action", "sample_method", "transfer_mode",
"count_stage", "inspect_result"
"count_stage", "inspect_result","area_type"
]
}
getDictionaryItem(params).then(res => {

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

@ -150,6 +150,7 @@
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";
@ -157,7 +158,7 @@
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
updateTitle("到货检验(" + this.totalCount + ")");
}).catch(error => {
if (type === "refresh") {
uni.stopPullDownRefresh();

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

@ -169,6 +169,7 @@
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";
@ -181,7 +182,7 @@
this.requestList = type === "refresh" ? list : this.requestList.concat(list);
this.pageNo++;
updateTitle("检验单申请(" + this.totalCount + ")");
}).catch(error => {
if (type === "refresh") {

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

@ -24,7 +24,7 @@
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocationCode'
:locationTypeList="toLocationTypeArray" :isShowEdit="toLocationCode==''"></requiredLocation>
:locationAreaTypeList="toLocationTypeArray" :isShowEdit="toLocationCode==''"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<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>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
@ -120,8 +120,8 @@
title: "",
dataContent: {},
toWarehouseCode: "",
fromlocationTypeList: [],
tolocationTypeList: [],
fromLocationAreaTypeList: [],
toLocationAreaTypeList: [],
}
},
@ -129,8 +129,8 @@
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)

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

@ -23,7 +23,7 @@
style="background-color:ghostwhite; width: 100%; ">
<view class="">
<requiredLocation title="目标库位" :locationCode="toLocationCode" @getLocation='getToLocation'
:locationTypeList="tolocationTypeList" :isShowEdit="isShowEditLocation"></requiredLocation>
:locationAreaTypeList="toLocationAreaTypeList" :isShowEdit="isShowEditLocation"></requiredLocation>
</view>
<view class=" uni-flex uni-row">
<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>
<win-scan-location ref="scanFromLocationCode" title="来源库位" @getLocation='getFromLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
@ -121,8 +121,8 @@
detailSource: [], //
title: "",
dataContent: {},
fromlocationTypeList: [],
tolocationTypeList: [],
fromLocationAreaTypeList: [],
toLocationAreaTypeList: [],
isShowEditLocation:false
}
},
@ -131,8 +131,8 @@
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.toLocationAreaTypeList = res.toLocationAreaTypeList;
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)

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

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

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

@ -143,6 +143,7 @@
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";
@ -150,7 +151,7 @@
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
updateTitle("库存转移(" + this.totalCount + ")");
}).catch(error => {
if (type === "refresh") {
uni.stopPullDownRefresh();

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

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

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

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

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

@ -62,7 +62,7 @@
<uom :uom="uom"></uom>
<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>
@ -97,7 +97,7 @@
checkDirectoryItemExist
} from '@/common/directory.js';
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 winScanItem from '@/mycomponents/scan/winScanItem.vue'
@ -106,7 +106,7 @@
uom,
balanceStatus,
winScanItem,
stdPackQty,
packQty,
},
data() {
return {

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

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

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

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

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

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

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

@ -1,16 +1,11 @@
<template>
<view class="">
<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"
:checkedWaitTask="checkedWaitTask">
</job-filter>
<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">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.status=='2'?detailGiveupOptions:detailOptions"
@ -154,6 +149,7 @@
}
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";
@ -161,7 +157,7 @@
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
updateTitle("发料任务(" + this.totalCount + ")");
}).catch(error => {
if (type === "refresh") {

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

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

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

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

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

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

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

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

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

@ -9,8 +9,18 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
<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"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack"
:isShowFromLocation="false" :isShowToLocation="false">
</record-com-detail-card>
</view>
<u-line />
@ -22,7 +32,19 @@
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<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 class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -35,14 +57,15 @@
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationTypeList="fromlocationTypeList"></win-scan-location>
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
overPackageRecordSubmit
overPackageRecordSubmit,
getPackUnitByItemCode
} from '@/api/request2.js';
import {
goHome
@ -50,7 +73,9 @@
import {
getInventoryStatusDesc,
getDirectoryItemArray
getDirectoryItemArray,
getPackUnitName,
getUomInfo
} from '@/common/directory.js';
import {
@ -69,6 +94,7 @@
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
import packageTarget from '@/mycomponents/package/packageTarget.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
export default {
components: {
@ -80,22 +106,27 @@
winScanPackAndLocation,
recommendBalance,
packageTarget,
recordComDetailCard
recordComDetailCard,
packUnit
},
data() {
return {
id: '',
scanCount: 0,
detailSource: [], //
locationTypeList: [],
fromLocationCode: "",
isShowLocation: false,
fromlocationTypeList: [],
tolocationTypeList: [],
fromLocationAreaTypeList: [],
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
dataContent: {}
dataContent: {},
fromPackUnit: "",
packageList: [],
show: false,
toPackUnitShow: "包装规格",
toPackQty: "",
itemCode: ""
};
},
onLoad(option) {
@ -103,8 +134,7 @@
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)
@ -125,24 +155,67 @@
mounted() {},
methods: {
getUomInfo(uom) {
let item = getUomInfo(uom);
if (item == '') {
return uom;
} else {
return item.label
}
},
scanPopupPack() {
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) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
this.fromPackUnit = pack.packUnit;
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
if (this.itemCode != "" && this.itemCode != balance.itemCode) {
this.showErrorMessage("请扫描物料为【" + this.itemCode + "】的箱码")
return;
}
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
this.itemCode = balance.itemCode;
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
@ -163,6 +236,7 @@
}
this.calcHandleQty();
},
calcHandleQty() {
@ -178,9 +252,6 @@
});
},
updateData() {
this.calcHandleQty();
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
@ -218,30 +289,55 @@
this.$refs.scanPopup.getfocus();
}
},
commit() {
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
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)
})
if (this.toPackUnit == "包装规格") {
this.showErrorMessage("请选择目标包装规格")
return;
}
this.checkSubmit();
} else {
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.fromBatch = detail.batch;
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)
}
})
@ -279,12 +380,8 @@
if (res) {}
});
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
getPackUnitName(packUnit) {
return getPackUnitName(packUnit);
},
showScanMessage(message) {
@ -310,7 +407,7 @@
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.detailSource = []
this.fromLocationCode = '';
this.dataContent ={}
this.dataContent = {}
})
},
@ -363,4 +460,4 @@
background: #e0e0e0;
}
</style>
</style>

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>
<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>
<comMessage ref="comMessage"></comMessage>
</view>
@ -90,11 +90,9 @@
return {
id: '',
detailSource: [], //
locationTypeList: [],
fromLocationCode: "",
toLocationCode: "",
fromlocationTypeList: [],
tolocationTypeList: [],
fromLocationAreaTypeList: [],
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
@ -108,8 +106,7 @@
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromlocationTypeList = res.fromlocationTypeList;
this.tolocationTypeList = res.tolocationTypeList;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -6,11 +6,11 @@
<view class="uni-flex uni-column">
<view class="item">
<text class="item_title">标包数量 : </text>
<text class="text_wrap">{{dataContent.stdPackQty}} </text>
<text class="text_wrap">{{dataContent.packQty}} </text>
</view>
<view class="item">
<text class="item_title">标包单位 : </text>
<text class="text_wrap">{{getStdPackUnitInfo(dataContent.stdPackUnit)}} </text>
<text class="text_wrap">{{getPackUnitInfo(dataContent.packUnit)}} </text>
</view>
</view>
@ -50,7 +50,7 @@
</template>
<script>
import {getStdPackUnitInfo} from "@/common/directory.js"
import {getPackUnitInfo} from "@/common/directory.js"
import {
dateFormat
} from '@/common/basic.js';
@ -81,8 +81,8 @@
closePopup() {
this.$refs.popup.close()
},
getStdPackUnitInfo(value){
return getStdPackUnitInfo(value).label
getPackUnitInfo(value){
return getPackUnitInfo(value).label
},
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="">
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'>
@remove="updateData" @updateData="updateData" :locationAreaTypeList='toLocationAreaTypeList'>
</comProductDetailCard>
</view>
<u-line />
@ -29,7 +29,7 @@
<view class="">
<locationCompare title="收货库位" :recommendLocationCode="jobToLocationCode" :locationCode="toLocationCode"
@getLocation='scanLocationCode'
:locationTypeList="toLocationTypeList"></locationCompare>
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
@ -101,7 +101,7 @@
jobContent: {}, //
subList: [], //subList
detailSource: [], //
toLocationTypeList: [],
toLocationAreaTypeList: [],
managementList: [],
jobStatus:"",
jobToLocationCode:""
@ -184,7 +184,7 @@
that.subList = res.data.subList;
that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList)
} else {
that.showMessage('列表数据为0');

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

@ -155,6 +155,7 @@
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";
@ -162,7 +163,7 @@
}
this.jobList = type === "refresh" ? list : this.jobList.concat(list);
this.pageNo++;
updateTitle("制品收货(" + this.totalCount + ")");
}).catch(error => {
if (type === "refresh") {

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

Loading…
Cancel
Save