Browse Source

fix: 11月14号到12月9号的修改

hella_vue3
张立 2 months ago
parent
commit
25daf96696
  1. 14
      .env.development
  2. 18
      src/api/request2.js
  3. 79
      src/common/detail.js
  4. 39
      src/common/directory.js
  5. 31
      src/common/label.js
  6. 6
      src/common/record.js
  7. 4
      src/common/utils/storage.js
  8. 228
      src/manifest.json
  9. 9
      src/mycomponents/balance/balance.vue
  10. 137
      src/mycomponents/detail/comRecommendDetailCard.vue
  11. 20
      src/mycomponents/package/packageCard.vue
  12. 48
      src/mycomponents/package/packageList.vue
  13. 4
      src/plugins/storage.js
  14. BIN
      test.keystore

14
.env.development

@ -1,11 +1,15 @@
VITE_BASE_URL=http://172.22.32.9:81/api/admin-api VITE_BASE_URL=http://localhost:12080/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api #VITE_BASE_URL=http://dev.ccwin-in.com:28051/api/admin-api
# VITE_BASE_URL_IMAGE=http://172.22.32.9:81/admin-api
# 租户配置 # 租户配置
VITE_TENANT='[{"text":"成都","value":2}]' VITE_TENANT='[{"text":"英泰","value":1}]'
# 是否是测试环境 # 是否是测试环境
VITE_isDevelopment=false VITE_isDevelopment=true
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.9:90' VITE_JMREPORT_BASE_URL='http://172.22.32.9:90'
# 项目管理模式 批次货/包装
VITE_MANAGE_MODEL="BY_BATCH"

18
src/api/request2.js

@ -586,6 +586,16 @@ export function cancleTakePurchaseReceiptJob(id) {
export function getPurchaseReceiptJobDetail(id) { export function getPurchaseReceiptJobDetail(id) {
return http.get("/wms/purchasereceipt-job-main/getPurchasereceiptJobyId?id=" + id) return http.get("/wms/purchasereceipt-job-main/getPurchasereceiptJobyId?id=" + id)
} }
/**
* 采购收货 获取收货记录的列表
* @param {*} id 任务id
*
*/
export function getPurchaseReceiptJobDetailListByNmber(requestNumber) {
return http.get("/wms/purchasereceipt-record-detail/listByNmber?requestNumber=" + requestNumber)
}
/** /**
* 采购收货 任务提交 * 采购收货 任务提交
* @param {*} 任务id * @param {*} 任务id
@ -2675,6 +2685,14 @@ export function containerUnBindRecordSubmit(params) {
export function splitPackageRecordSubmit(params) { export function splitPackageRecordSubmit(params) {
return http.post("/wms/packagesplit-main/create" ,params) return http.post("/wms/packagesplit-main/create" ,params)
} }
/**
* 拆包 英泰 提交
* @param {*} params
*/
export function splitPackageRecordForYtSubmit(data) {
return http.post("/wms/packagesplit-main/createForYT" ,data)
}
/** /**
* 合包 提交 * 合包 提交
* @param {*} params * @param {*} params

79
src/common/detail.js

@ -46,50 +46,51 @@ export function getTreeDataSource(dataList) {
} }
export function getThreeDataSource(data) { export function getThreeDataSource(data) {
let items = [] let items = []
// let obj ={ let obj ={
// ...data.subList[0] ...data.subList[0]
// } }
// console.log(12) console.log(12)
// data.subList.forEach((item)=>{
// item.threeList = [{
// fromLocationCode:item.fromLocationCode,
// batch:item.batch,
// handleQty:0,
// qty:item.qty,
// inventoryStatus:item.inventoryStatus,
// toLocationCode:item.toLocationCode,
// }]
// item.packList=[{
// scaned : false,
// scanDate: new Date()
// }]
// })
// obj.subList = data.subList
// items.push(obj)
// return items;
data.subList.forEach((item)=>{ data.subList.forEach((item)=>{
item.subList = [{ item.threeList = [{
fromLocationCode:item.fromLocationCode, fromLocationCode:item.fromLocationCode,
batch:item.batch, batch:item.batch,
handleQty:0, handleQty:0,
qty:item.qty, qty:item.qty,
inventoryStatus:item.inventoryStatus, inventoryStatus:item.inventoryStatus,
toLocationCode:item.toLocationCode, toLocationCode:item.toLocationCode,
// packList:[{
// scaned : false,
// scanDate: new Date()
// }]
}] }]
item.packList=[{
scaned : false,
scanDate: new Date()
}]
})
obj.subList = data.subList
items.push(obj)
return items;
}
export function getDataSourceBatch(subList) {
let items = [];
subList.forEach(detail => {
var item = items.find(r =>
r.itemCode == detail.itemCode )
if (item == undefined) {
item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
items.push(item)
} else {
item.qty = calc.add(item.qty, detail.qty)
let newDetail = createDetailInfo(detail); //
item.subList.push(newDetail);
}
}) })
items = data.subList
return items; return items;
} }
export function getDataSource(subList) { export function getDataSource(subList) {
let items = []; let items = [];
subList.forEach(detail => { subList.forEach(detail => {
var item = items.find(r => var item = items.find(r =>
r.itemCode == detail.itemCode && r.batch == detail.batch) r.itemCode == detail.itemCode)
if (item == undefined) { if (item == undefined) {
item = createItemInfo(detail); item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); // let newDetail = createDetailInfo(detail); //
@ -155,6 +156,24 @@ export function calcHandleQty(detailSource) {
} }
} }
} }
//计算计划外入库实际数量和任务数量
export function calcHandleQtyPlanOut(detailSource) {
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
item.qty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined) {
if (detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
console.log(detail.isRecommend)
if(detail.isRecommend){
item.qty = calc.add(item.qty, detail.qty);
}
}
}
}
}
//计算推荐和扫描的不是用一个的数量 //计算推荐和扫描的不是用一个的数量
export function calcHandleNewQty(detailSource) { export function calcHandleNewQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {
@ -187,6 +206,8 @@ export function calcTreeHandleQty(detailSource) {
detail.handleQty = calc.add(detail.handleQty, pack.handleQty); detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
} }
} }
}else{
detail.handleQty = new Decimal(0).toNumber();
} }
if(detail.handleQty){ if(detail.handleQty){
item.handleQty = calc.add(item.handleQty, detail.handleQty); item.handleQty = calc.add(item.handleQty, detail.handleQty);

39
src/common/directory.js

@ -211,7 +211,15 @@ export function getListItemTypeDesc(list) {
desc = desc.slice(0, -1); desc = desc.slice(0, -1);
return desc; return desc;
} }
//获取物品状态(多个)
export function getListItemStatusDesc(list) {
let desc = '';
list.forEach(res => {
desc += getItemStateInfo(res).label + ","
})
desc = desc.slice(0, -1);
return desc;
}
//获取物品类型 //获取物品类型
export function getItemTypeInfo(value) { export function getItemTypeInfo(value) {
var resultInfo = ""; var resultInfo = "";
@ -304,6 +312,19 @@ export function getLocationAreaTypeName(value) {
return location == '' ? value : location.label; return location == '' ? value : location.label;
} }
//获取物品类型名称
export function getItemTypeName(value) {
let location = getItemTypeInfo(value);
return location == '' ? value : location.label;
}
//获取物品状态名称
export function getItemStatusName(value) {
let location = getItemStateInfo(value);
return location == '' ? value : location.label;
}
//获取库位类型名称 //获取库位类型名称
export function getLocationTypeName(value) { export function getLocationTypeName(value) {
@ -646,3 +667,19 @@ export function getPriorityName(value) {
} }
return resultInfo return resultInfo
} }
//获取优先级
export function getDeliverMethod(value) {
var resultInfo = "";
if (priorityList.length == 0) {
priorityList = getDirectoryInfo("deliver_method")
}
if (priorityList.length > 0) {
for (let item of priorityList) {
if (item.value == value) {
resultInfo = item.label
break;
}
}
}
return resultInfo
}

31
src/common/label.js

@ -14,7 +14,7 @@ import {
getManagementPrecisions getManagementPrecisions
} from '@/common/balance.js'; } from '@/common/balance.js';
export function getLabelInfo(scanMsg,headerType, callBack,locationCode) { export function getLabelInfo(scanMsg,headerType, callBack,locationCode,isHavePackNumber) {
if (scanMsg.length == 0) { if (scanMsg.length == 0) {
return null return null
} }
@ -42,17 +42,17 @@ export function getLabelInfo(scanMsg,headerType, callBack,locationCode) {
let type = header.substring(header.length - 1, header.length); let type = header.substring(header.length - 1, header.length);
if (type == 'Q') //qrcode if (type == 'Q') //qrcode
{ {
getQRCodeInfo(header, version, scanMsg, callBack,locationCode); getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber);
} }
// else if (type == 'B') //barcode // else if (type == 'B') //barcode
// { // {
// getBarCodeInfo(header, version, items[2], callBack); // getBarCodeInfo(header, version, items[2], callBack);
// } // }
else { //直接输入文本 else { //直接输入文本
getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode); getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber);
} }
}else { }else {
getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode); getBarCodeInfo('text', 'V1.0', scanMsg, callBack,locationCode,isHavePackNumber);
// let labelResult = { // let labelResult = {
// label: { // label: {
// labelType: "", // labelType: "",
@ -67,7 +67,7 @@ export function getLabelInfo(scanMsg,headerType, callBack,locationCode) {
} }
} }
export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) { export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode,isHavePackNumber) {
//获取包装信息 //获取包装信息
let labelItem = labelDic.find(r => r.header == header && r.version == version); let labelItem = labelDic.find(r => r.header == header && r.version == version);
if (labelItem == undefined) { if (labelItem == undefined) {
@ -92,7 +92,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) {
}; };
labelDic.push(newItem); labelDic.push(newItem);
getLabelItems(newItem, scanMsg, callBack,locationCode); getLabelItems(newItem, scanMsg, callBack,locationCode,isHavePackNumber);
} }
}).catch(err => { }).catch(err => {
labelResult.success = false; labelResult.success = false;
@ -100,7 +100,7 @@ export function getQRCodeInfo(header, version, scanMsg, callBack,locationCode) {
callBack(err); callBack(err);
}) })
} else { } else {
getLabelItems(labelItem, scanMsg, callBack,locationCode); getLabelItems(labelItem, scanMsg, callBack,locationCode,isHavePackNumber);
} }
} }
@ -117,7 +117,9 @@ export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) {
const managementList = res.list; const managementList = res.list;
managementType = managementList&&managementList[0]&&managementList[0].ManagementPrecision ? managementList[0].ManagementPrecision :'BY_PACKAGING' managementType = managementList&&managementList[0]&&managementList[0].ManagementPrecision ? managementList[0].ManagementPrecision :'BY_PACKAGING'
if(managementType == 'BY_BATCH' || managementType == 'BY_QUANTITY'){ if(managementType == 'BY_BATCH' || managementType == 'BY_QUANTITY'){
packingNumber = '' if(!isHavePackNumber){
packingNumber = ''
}
} }
} }
}) })
@ -131,6 +133,7 @@ export async function getLabelItems(labelItem, scanMsg, callBack,locationCode) {
labelResult.success = false; labelResult.success = false;
labelResult.message = '包装号[' + packingNumber + ']没有包装信息'; labelResult.message = '包装号[' + packingNumber + ']没有包装信息';
} }
labelResult.managementType = managementType
callBack(labelResult); callBack(labelResult);
}).catch(err => { }).catch(err => {
labelResult.success = false; labelResult.success = false;
@ -175,8 +178,15 @@ export function analysisQRCodeLabel(labelItem, scanMsg) {
let scanItems = scanMsg.split(separators); let scanItems = scanMsg.split(separators);
if (scanItems.length > 0) { if (scanItems.length > 0) {
scanItems.forEach((item, index) => { scanItems.forEach((item, index) => {
let type = item.substring(0, 1); let type = ''
let value = item.substring(1, item.length); let value = ''
if(item.includes('PU')||item.includes('PQ')){
type = item.substring(0, 2);
value = item.substring(2, item.length);
}else{
type = item.substring(0, 1);
value = item.substring(1, item.length);
}
if (type == 'H') { if (type == 'H') {
labelResult.label.header = item; labelResult.label.header = item;
} else if (type == 'V') { } else if (type == 'V') {
@ -197,7 +207,6 @@ export function analysisQRCodeLabel(labelItem, scanMsg) {
} }
} }
// console.log('标签', labelResult.label)
return labelResult; return labelResult;
} }

6
src/common/record.js

@ -131,7 +131,8 @@ export function getBusinessType(typeCode, callback) {
businessType: '', businessType: '',
fromLocationAreaTypeList:'', fromLocationAreaTypeList:'',
toLocationAreaTypeList:'', toLocationAreaTypeList:'',
itemCodeTypeList:"", itemTypeList: "",
itemStatusList:"",
useOnTheWay:"FALSE", useOnTheWay:"FALSE",
fromInventoryStatuses: '', fromInventoryStatuses: '',
toInventoryStatuses: '', toInventoryStatuses: '',
@ -142,7 +143,8 @@ export function getBusinessType(typeCode, callback) {
result.businessType = res.data.list[0]; result.businessType = res.data.list[0];
result.fromLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].outAreaTypes) ; result.fromLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].outAreaTypes) ;
result.toLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].inAreaTypes) ; result.toLocationAreaTypeList = getDirectoryItemArray(res.data.list[0].inAreaTypes) ;
result.itemCodeTypeList = getDirectoryItemArray(res.data.list[0].itemTypes) result.itemTypeList = getDirectoryItemArray(res.data.list[0].itemTypes)
result.itemStatusList =getDirectoryItemArray(res.data.list[0].itemStatuses)
result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses; result.fromInventoryStatuses = res.data.list[0].outInventoryStatuses;
result.toInventoryStatuses = res.data.list[0].inInventoryStatuses; result.toInventoryStatuses = res.data.list[0].inInventoryStatuses;
result.useOnTheWay =res.data.list[0].useOnTheWay result.useOnTheWay =res.data.list[0].useOnTheWay

4
src/common/utils/storage.js

@ -10,11 +10,11 @@ const setStorage = (key,value)=>{
// 清除全部本地存储 // 清除全部本地存储
const clearStorage = ()=>{ const clearStorage = ()=>{
const overPackageRecordPointParams = '' let overPackageRecordPointParams = ''
if( uni.getStorageSync('overPackageRecordPointParams')){ if( uni.getStorageSync('overPackageRecordPointParams')){
overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams') overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams')
} }
const overPackageJobDetailPointParams = '' let overPackageJobDetailPointParams = ''
if( uni.getStorageSync('overPackageJobDetailPointParams')){ if( uni.getStorageSync('overPackageJobDetailPointParams')){
overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams') overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams')
} }

228
src/manifest.json

@ -1,115 +1,115 @@
{ {
"name": "富维汽车镜", "name" : "富维汽车镜",
"package":"uni.UNI43932FE", "package" : "uni.UNI43932FE",
"appid": "__UNI__DA78BC9", "appid" : "__UNI__DA78BC9",
"description": "", "description" : "",
"versionName" : "1.0.44", "versionName" : "1.0.44",
"versionCode" : 44, "versionCode" : 44,
"transformPx": false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus": { "app-plus" : {
"usingComponents": true, "usingComponents" : true,
"nvueStyleCompiler": "uni-app", "nvueStyleCompiler" : "uni-app",
"compilerVersion": 3, "compilerVersion" : 3,
"splashscreen": { "splashscreen" : {
"alwaysShowBeforeRender": true, "alwaysShowBeforeRender" : true,
"waiting": true, "waiting" : true,
"autoclose": true, "autoclose" : true,
"delay": 0 "delay" : 0
}, },
/* */ /* */
"modules": {}, "modules" : {},
/* */ /* */
"distribute": { "distribute" : {
/* android */ /* android */
"android": { "android" : {
"permissions": [ "permissions" : [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>", "<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ]
}, },
/* ios */ /* ios */
"ios": { "ios" : {
"dSYMs": false "dSYMs" : false
}, },
/* SDK */ /* SDK */
"sdkConfigs": { "sdkConfigs" : {
"ad": {} "ad" : {}
}, },
"nativePlugins": { "nativePlugins" : {
"TestModule": { "TestModule" : {
"__plugin_info__": { "__plugin_info__" : {
"name": "TestModule", "name" : "TestModule",
"description": "打印", "description" : "打印",
"platforms": "Android", "platforms" : "Android",
"url": "", "url" : "",
"android_package_name": "", "android_package_name" : "",
"ios_bundle_id": "", "ios_bundle_id" : "",
"isCloud": false, "isCloud" : false,
"bought": -1, "bought" : -1,
"pid": "", "pid" : "",
"parameters": {} "parameters" : {}
} }
} }
} }
}, },
"nativePlugins": { "nativePlugins" : {
"TestModule": { "TestModule" : {
"__plugin_info__": { "__plugin_info__" : {
"name": "TestModule", "name" : "TestModule",
"description": "打印", "description" : "打印",
"platforms": "Android", "platforms" : "Android",
"url": "", "url" : "",
"android_package_name": "", "android_package_name" : "",
"ios_bundle_id": "", "ios_bundle_id" : "",
"isCloud": false, "isCloud" : false,
"bought": -1, "bought" : -1,
"pid": "", "pid" : "",
"parameters": {} "parameters" : {}
} }
} }
} }
}, },
/* */ /* */
"quickapp": {}, "quickapp" : {},
/* */ /* */
"mp-weixin": { "mp-weixin" : {
"appid": "wx6176535b0b0153f0", "appid" : "wx6176535b0b0153f0",
"setting": { "setting" : {
"urlCheck": false "urlCheck" : false
}, },
"usingComponents": true "usingComponents" : true
}, },
"mp-alipay": { "mp-alipay" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-baidu": { "mp-baidu" : {
"usingComponents": true "usingComponents" : true
}, },
"mp-toutiao": { "mp-toutiao" : {
"usingComponents": true "usingComponents" : true
}, },
"uniStatistics": { "uniStatistics" : {
"enable": false "enable" : false
}, },
"vueVersion": "3", "vueVersion" : "3",
"h5": { "h5" : {
"template": "index.html", "template" : "index.html",
"devServer": { "devServer" : {
"port": 9020 "port" : 9020
} }
} }
} }

9
src/mycomponents/balance/balance.vue

@ -2,9 +2,8 @@
<view :class="dataContent.scaned ? 'scan_view' : ''"> <view :class="dataContent.scaned ? 'scan_view' : ''">
<view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx"> <view class="uni-flex uni-row space-between" style="align-items: center; padding: 20rpx">
<view> <view>
<pack v-if="isShowParentPack && dataContent.parentNumber" title="父包装" <pack v-if="isShowParentPack && dataContent.parentNumber" title="父包装" :packingCode="dataContent.parentNumber"></pack>
:packingCode="dataContent.parentNumber"></pack> <pack v-if="isShowPack && dataContent.packingNumber" :isShowPackingNumberProps="isShowPackingNumberProps" :packingCode="dataContent.packingNumber"></pack>
<pack v-if="isShowPack && dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location> <location title="来源库位" v-if="isShowFromLocation" :locationCode="dataContent.locationCode"></location>
<to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> </to-location> <to-location title="目标库位" v-if="isShowToLocation" :locationCode="dataContent.toLocationCode"> </to-location>
@ -72,6 +71,10 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: true default: true
}, },
isShowPackingNumberProps: {
type: Boolean,
default: false
}
}) })
const copy = () => { const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 // HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100

137
src/mycomponents/detail/comRecommendDetailCard.vue

@ -16,24 +16,21 @@
<view class="" style="font-size: 32rpx; color: black; font-weight: bold; text-align: center;"> <view class="" style="font-size: 32rpx; color: black; font-weight: bold; text-align: center;">
</view> </view>
<recommend :detail="item" :isShowStatus="isShowStatus" <recommend :detail="item" :isShowStatus="isShowStatus" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation" style="flex:1" :isShowBatch='item.batch ? true:false' :isShowPack='isShowPack'>
:isShowToLocation="false" style="flex: 1">
</recommend>
</view> </view>
<view v-else class="uni-flex" style="flex-direction: row; align-items: center;background-color: antiquewhite; margin-top: 5rpx;"> <view v-else class="uni-flex" style="flex-direction: row; align-items: center;background-color: antiquewhite; margin-top: 5rpx;">
<view class="" style="font-size: 32rpx; color: red; font-weight: bold; text-align: center;"> <view class="" style="font-size: 32rpx; color: red; font-weight: bold; text-align: center;">
</view> </view>
<recommend :detail="item" :isShowStatus="isShowStatus" <recommend :detail="item" :isShowStatus="isShowStatus" :isShowFromLocation="isShowFromLocation" :isShowToLocation="isShowToLocation" style="flex:1" :isShowBatch='item.batch? true:false' :isShowPack='isShowPack'></recommend>
:isShowToLocation="false" style="flex: 1">
</recommend>
</view> </view>
</u-swipe-action> </u-swipe-action>
</view> </view>
</u-collapse-item> </u-collapse-item>
</u-collapse> </u-collapse>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" :queryBalance="queryBalance" @confirm="confirm"></balance-qty-edit> <<recommend-qty-edit ref="recommendQtyEditRef" :dataContent="editItem" :handleQty="editItem.qty" @confirm="confirm" :settingParam='settingParam'
:isShowStatus="isShowStatus"></recommend-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location> :locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<comMessage ref="message"></comMessage> <comMessage ref="message"></comMessage>
@ -41,16 +38,16 @@
</template> </template>
<script setup> <script setup>
import {ref, watch, onMounted, nextTick} from 'vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import { import {
getDetailOption, getDetailOption,
getPurchaseReceiptOption getPurchaseReceiptOption
} from '@/common/array.js'; } from '@/common/array.js'
import {ref, watch, onMounted, nextTick} from 'vue';
const props = defineProps({ const props = defineProps({
dataContent: { dataContent: {
@ -85,96 +82,102 @@ const props = defineProps({
type: Boolean, type: Boolean,
default: true default: true
} }
}); })
const emit = defineEmits(['openDetail', 'remove', 'updateData']); const emit = defineEmits(['openDetail', 'remove', 'updateData'])
const collapse1 = ref(null); const collapse1 = ref(null)
const qtyEdit = ref(null); const qtyEdit = ref(null)
const message = ref(null); const message = ref(null)
const scanLocationCode = ref(null); const scanLocationCode = ref(null)
const option = ref([]); const option = ref([])
const showItem = ref({}); const showItem = ref({})
const locatonItem = ref({}); const locatonItem = ref({})
const editItem = ref({}); const editItem = ref({})
const detailOptions = ref([]); const detailOptions = ref([])
const scanOptions = ref([]); const scanOptions = ref([])
const recommendQtyEditRef = ref()
watch(() => props.dataContent, (newDataContent, oldDataContent) => { watch(() => props.dataContent, (newDataContent, oldDataContent) => {
if (newDataContent?.subList.length > 0) { if (newDataContent?.subList.length > 0) {
nextTick(() => { nextTick(() => {
setTimeout(() => { setTimeout(() => {
if (collapse1.value) { if (collapse1.value) {
collapse1.value.init(); collapse1.value.init()
} }
}, 500); }, 500)
}); })
} }
}, { immediate: true, deep: true }); }, { immediate: true, deep: true })
onMounted(() => { onMounted(() => {
if (detailOptions.value.length === 0) {
detailOptions.value = getDetailOption();
}
if (scanOptions.value.length === 0) { if (scanOptions.value.length === 0) {
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, false); scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, false)
} }
// showLocation(); // showLocation();
}); if(import.meta.env.VITE_MANAGE_MODEL=='BY_PACKAGING'){
if (detailOptions.value.length == 0) {
detailOptions.value = getDetailOption()
}
}else {
scanOptions.value.splice(0,1)
}
})
const swipeClick = (e, item) => { const swipeClick = (e, item) => {
switch (e.content.text) { switch (e.content.text) {
case "详情": case '详情':
detail(item); detail(item)
break; break
case "编辑": case '编辑':
edit(item); edit(item)
break; break
case "库位": case '库位':
showLocation(item); showLocation(item)
break; break
case "移除": case '移除':
remove(item); remove(item)
break; break
} }
}; }
const edit = (item) => { const edit = (item) => {
editItem.value = item; editItem.value = item
qtyEdit.value.openEditPopup(item.balance, item.handleQty); qtyEdit.value.openEditPopup(item.balance, item.handleQty)
}; recommendQtyEditRef.value.openTaskEditPopup(item.qty,item.handleQty,item.labelQty)
}
const detail = (item) => { const detail = (item) => {
emit('openDetail', item); emit('openDetail', item)
// showItem.value = item; // showItem.value = item;
// jobDetailPopup.value.openPopup(item); // jobDetailPopup.value.openPopup(item);
}; }
const remove = (item) => { const remove = (item) => {
message.value.showQuestionMessage("确定移除扫描信息?", (res) => { message.value.showQuestionMessage('确定移除扫描信息?', (res) => {
if (res) { if (res) {
item.scaned = false; item.scaned = false
item.balance = {}; item.balance = {}
item.handleQty = null; item.handleQty = null
emit('remove', item); emit('remove', item)
} }
}); })
}; }
const confirm = (qty) => { const confirm = (qty) => {
editItem.value.handleQty = qty; editItem.value.handleQty = qty
emit('updateData'); emit('updateData')
}; }
const showLocation = (item) => { const showLocation = (item) => {
locatonItem.value = item; locatonItem.value = item
scanLocationCode.value.openScanPopup(); scanLocationCode.value.openScanPopup()
}; }
const getLocation = (location, code) => { const getLocation = (location, code) => {
locatonItem.value.toLocationCode = code; locatonItem.value.toLocationCode = code
emit('updateData'); emit('updateData')
}; }
</script> </script>

20
src/mycomponents/package/packageCard.vue

@ -6,7 +6,7 @@
<view style="word-break: break-all"> <view style="word-break: break-all">
<!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber"> <!-- <container v-if="isShowContainer&&dataContent.containerNumber!=null" :container="dataContent.containerNumber">
</container> --> </container> -->
<pack :packingCode="dataContent.packingNumber"> </pack> <pack :packingCode="dataContent.packingNumber" :isShowPackingNumberProps="isShowPackingNumberProps"></pack>
<batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch> <batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location> <location v-if="isShowFromLocation" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location>
<!-- <to-location></to-location> --> <!-- <to-location></to-location> -->
@ -15,17 +15,18 @@
<view class="uni-flex uni-row" style="word-break: break-all; align-items: center"> <view class="uni-flex uni-row" style="word-break: break-all; align-items: center">
<!-- ||dataContent.handleQty==0 可能会有扫描到0的情况--> <!-- ||dataContent.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="dataContent.handleQty == null || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty> <recommend-qty v-if="dataContent.handleQty == null || dataContent.handleQty == undefined" :dataContent="dataContent" :isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="isShowStatus"> </compare-qty> <compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(dataContent.handleQty)" :isShowStdPack="false" :isShowStatus="isShowStatus" :isShowRecommendQty="isShowRecommendQty"></compare-qty>
<view v-if="isDevlement()"> <!-- <view v-if="isDevlement()">
<image style="width: 26rpx; height: 26rpx; margin-top: 44rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" /> <image style="width: 26rpx; height: 26rpx; margin-top: 44rpx" src="/static/icons/icon_copy.svg" alt="" @click="copy" />
</view> </view> -->
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { watch } from 'vue'
import container from '@/mycomponents/container/container.vue' import container from '@/mycomponents/container/container.vue'
import pack from '@/mycomponents/balance/pack.vue' import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
@ -34,7 +35,7 @@ import batch from '@/mycomponents/balance/batch.vue'
import recommendQty from '@/mycomponents/qty/recommendQty.vue' import recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue' import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js' import config from '@/static/config.js'
import {watch} from 'vue'
const props = defineProps({ const props = defineProps({
dataContent: { dataContent: {
type: Object, type: Object,
@ -68,6 +69,15 @@ const props = defineProps({
locationTitle: { locationTitle: {
type: String, type: String,
default: '库位' default: '库位'
},
//
isShowPackingNumberProps: {
type: Boolean,
default: false
},
isShowRecommendQty: {
type: Boolean,
default: true
} }
}) })
watch( watch(

48
src/mycomponents/package/packageList.vue

@ -2,22 +2,19 @@
<view class=""> <view class="">
<view class="" v-for="(item, index) in dataContent" :key="item.id"> <view class="" v-for="(item, index) in dataContent" :key="item.id">
<u-collapse ref="collapse2"> <u-collapse ref="collapse2">
<u-collapse-item :disabled="false" @change="collapseChange"> <u-collapse-item :disabled="false" @change="collapseChange" :open="true">
<template v-slot:title> <template v-slot:title>
<u-swipe-action :options="item.scaned && isEdit ? editAndRemoveOptions : item.scaned ? removeOptions : options" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, cur, 'parent')"> <u-swipe-action :options="item.scaned && isEdit ? editAndRemoveOptions : item.scaned ? removeOptions : options" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, item, 'parent', index)">
<package-card :dataContent="item" :isShowLocation="false" <package-card :dataContent="item" :isShowLocation="false" :isShowFromLocation="isShowFromLocation" :isShowStatus="isShowStatus"> </package-card>
:isShowFromLocation="isShowFromLocation"
:isShowStatus="isShowStatus">
</package-card>
</u-swipe-action> </u-swipe-action>
</template> </template>
<u-swipe-action :show="item.show" :index="index" v-for="(cur, key) in item.packList" :key="index" :options="cur.scaned && isEdit ? editAndRemoveOptions : cur.scaned ? removeOptions : options" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, cur, 'child')"> <u-swipe-action :show="item.show" :index="index" v-for="(pack, key) in item.packList" :key="key" :options="cur.scaned && isEdit ? editAndRemoveOptions : cur.scaned ? removeOptions : options" bg-color="rgba(255,255,255,0)" @click="(...event) => swipeClick(event, cur, 'child', key, item)">
<package-card :dataContent="cur" :isShowLocation="false" :isShowFromLocation="false" :isShowToLocation="false" :isShowBatch="false"></package-card> <package-card :dataContent="pack" :isShowLocation="false" :isShowFromLocation="false" :isShowPackingNumberProps="isShowPackingNumberProps" :isShowToLocation="false" :isShowStatus="isShowPackListStatus" :isShowRecommendQty="false" :isShowBatch="false"></package-card>
</u-swipe-action> </u-swipe-action>
</u-collapse-item> </u-collapse-item>
</u-collapse> </u-collapse>
</view> </view>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm"> </recommend-qty-edit> <recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm" :isNumPackTips="isNumPackTips"></recommend-qty-edit>
<com-message ref="comMessageRef" /> <com-message ref="comMessageRef" />
</view> </view>
</template> </template>
@ -36,6 +33,7 @@ const removeOptions = ref([])
const editAndRemoveOptions = ref([]) const editAndRemoveOptions = ref([])
const comMessageRef = ref() const comMessageRef = ref()
const collapse2 = ref() const collapse2 = ref()
const receiptEdit = ref()
onMounted(() => { onMounted(() => {
removeOptions.value = getRemoveOption() removeOptions.value = getRemoveOption()
editAndRemoveOptions.value = getEditRemoveOption() editAndRemoveOptions.value = getEditRemoveOption()
@ -84,6 +82,15 @@ const props = defineProps({
isEdit: { isEdit: {
type: Boolean, type: Boolean,
default: false default: false
},
//
isShowPackingNumberProps: {
type: Boolean,
default: false
},
isNumPackTips: {
type: Boolean,
default: false
} }
}) })
const dataContent = ref(props.dataContent) const dataContent = ref(props.dataContent)
@ -93,27 +100,27 @@ dataContent.value.forEach((item) => {
}) })
}) })
console.log(dataContent.value) console.log(dataContent.value)
const swipeClick = (params, cur, type) => { const swipeClick = (params, item, type, index, ele) => {
let text = '' let text = ''
if (cur.scaned && props.isEdit) { if (item.scaned && props.isEdit) {
text = editAndRemoveOptions.value[params[1]].text text = editAndRemoveOptions.value[params[1]].text
// (cur.scaned&&isEdit)?editAndRemoveOptions : cur.scaned? removeOptions:options // (cur.scaned&&isEdit)?editAndRemoveOptions : cur.scaned? removeOptions:options
} else if (cur.scaned) { } else if (item.scaned) {
text = removeOptions.value[params[1]].text text = removeOptions.value[params[1]].text
} else { } else {
text = options.value[params[1]].text text = options.value[params[1]].text
} }
if (text == '编辑') { if (text == '编辑') {
edit(cur) edit(item)
} else if (text == '移除') { } else if (text == '移除') {
if (type == 'parent') { if (type == 'parent') {
removeParent(item) removeParent(item, type)
} else { } else {
remove(item) remove(item, type, index, ele)
} }
} }
} }
const removeParent = (item) => { const removeParent = (item, type) => {
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => { comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => {
if (res) { if (res) {
item.scaned = false item.scaned = false
@ -123,22 +130,23 @@ const removeParent = (item) => {
subItem.handleQty = null subItem.handleQty = null
}) })
emit('updateData') emit('updateData', type, item)
} }
}) })
} }
const remove = (item) => { const remove = (item, type, index, ele) => {
comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => { comMessageRef.value.showQuestionMessage('确定移除扫描信息?', (res) => {
if (res) { if (res) {
item.scaned = false item.scaned = false
item.handleQty = null item.handleQty = null
emit('updateData') collapseChange()
emit('updateData', type, item, index, ele)
} }
}) })
} }
const edit = (item) => { const edit = (item) => {
editItem.value = item editItem.value = item
receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty) receiptEdit.value.openTaskEditPopup(item.qty, item.handleQty, item.labelQty, item.packQty)
} }
const collapseChange = () => { const collapseChange = () => {
resizeCollapse() resizeCollapse()

4
src/plugins/storage.js

@ -9,11 +9,11 @@ export default {
}, },
// 清除全部本地存储 // 清除全部本地存储
clearStorage (){ clearStorage (){
const overPackageRecordPointParams = '' let overPackageRecordPointParams = ''
if( uni.getStorageSync('overPackageRecordPointParams')){ if( uni.getStorageSync('overPackageRecordPointParams')){
overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams') overPackageRecordPointParams = uni.getStorageSync('overPackageRecordPointParams')
} }
const overPackageJobDetailPointParams = '' let overPackageJobDetailPointParams = ''
if( uni.getStorageSync('overPackageJobDetailPointParams')){ if( uni.getStorageSync('overPackageJobDetailPointParams')){
overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams') overPackageJobDetailPointParams = uni.getStorageSync('overPackageJobDetailPointParams')
} }

BIN
test.keystore

Binary file not shown.
Loading…
Cancel
Save