Browse Source

common下文件修改 hybrid\html修改 8/8-10/25

hella_vue3
王志国 4 weeks ago
parent
commit
dbac1e67da
  1. 12
      src/common/array.js
  2. 17
      src/common/balance.js
  3. 7
      src/common/config.js
  4. 28
      src/common/detail.js
  5. 18
      src/common/directory.js
  6. 44
      src/common/noclick.js
  7. 18
      src/common/record.js
  8. 32
      src/common/style/new_style.css
  9. 29
      src/hybrid/html/point.html
  10. 114
      src/hybrid/html/pointPutawayJob.html

12
src/common/array.js

@ -110,6 +110,18 @@ export function getPurchaseReceiptOption(allowModifyQty, allowModifyLocation) {
return option; return option;
} }
export function getRecordOption(allowModifyQty, allowModifyLocation) {
var option = []
option.push(...getDetailOption())
if (allowModifyQty) {
option.push(...getEditOption())
}
if (allowModifyLocation) {
option.push(...getLocationOption())
}
option.push(...getRemoveOption())
return option;
}
//详情 //详情
export function getDetailOption() { export function getDetailOption() {
let option_detail = [{ let option_detail = [{

17
src/common/balance.js

@ -337,7 +337,7 @@ export function byBatch(label, locationCode, fromInventoryStatuses, callback) {
filters.push({ filters.push({
column: "packingNumber", column: "packingNumber",
action: "==", action: "==",
value: null value: ''
}) })
filters.push({ filters.push({
column: "locationCode", column: "locationCode",
@ -352,11 +352,6 @@ export function byBatch(label, locationCode, fromInventoryStatuses, callback) {
action: "in", action: "in",
value: status value: status
}) })
filters.push({
column: "inventoryStatus",
action: "in",
value: status
})
} }
var params = { var params = {
@ -430,11 +425,6 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback)
action: "in", action: "in",
value: status value: status
}) })
filters.push({
column: "inventoryStatus",
action: "in",
value: status
})
} }
var params = { var params = {
@ -491,11 +481,6 @@ export function byUniqueId(label, locationCode, fromInventoryStatuses, callback)
value: status value: status
}) })
filters.push({
column: "inventoryStatus",
action: "in",
value: status
})
} }
var params = { var params = {

7
src/common/config.js

@ -1,2 +1,9 @@
export const overPagePrint="overPage_print" export const overPagePrint="overPage_print"
export const overPageTemplate="overPage_Template" export const overPageTemplate="overPage_Template"
//3分钟刷新
export const planRefreshTime=3*60*1000
export const issueJobFilter="issue_job_filter"
export const repleinshJobFilter="repleinsh_job_filter"
export const overPackageJobFilter="over_package_job_filter"
export const productionReceiptJobFilter="production_receipt_job_filter"

28
src/common/detail.js

@ -49,7 +49,7 @@ 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.itemCode == detail.itemCode && r.batch == detail.batch)
if (item == undefined) { if (item == undefined) {
item = createItemInfo(detail); item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); // let newDetail = createDetailInfo(detail); //
@ -115,26 +115,46 @@ export function calcHandleQty(detailSource) {
} }
} }
} }
//计算推荐和扫描的不是用一个的数量
export function calcHandleNewQty(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 ) {
if (!detail.isRecommend && detail.scaned) {
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
// if (!detail.isRecommend ) {
// item.qty = calc.add(item.qty, detail.qty);
// }
}
}
}
}
export function calcTreeHandleQty(detailSource) { export function calcTreeHandleQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber(); item.handleQty = new Decimal(0).toNumber();
for (let detail of item.subList) { for (let detail of item.subList) {
if (detail != undefined && detail.scaned) { if (detail) {
if (detail.packList.length > 0) { if (detail.packList && detail.packList.length > 0) {
detail.handleQty = new Decimal(0).toNumber(); detail.handleQty = new Decimal(0).toNumber();
for (let pack of detail.packList) { for (let pack of detail.packList) {
if (pack != undefined && pack.scaned) { if (pack && pack.scaned) {
detail.handleQty = calc.add(detail.handleQty, pack.handleQty); detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
} }
} }
} }
if(detail.handleQty){
item.handleQty = calc.add(item.handleQty, detail.handleQty); item.handleQty = calc.add(item.handleQty, detail.handleQty);
} }
} }
} }
} }
}

18
src/common/directory.js

@ -1,4 +1,5 @@
let jobStatusList = []; let jobStatusList = [];
let receiveStatusList = [];
let itemStatusList = []; let itemStatusList = [];
let itemTypeList =[]; let itemTypeList =[];
let locationTypeList = []; let locationTypeList = [];
@ -42,6 +43,7 @@ export function getBusinessTypeDesc(type) {
//获取字典信息 //获取字典信息
export function clearCacheData() { export function clearCacheData() {
jobStatusList = []; jobStatusList = [];
receiveStatusList=[];
itemStatusList = []; itemStatusList = [];
itemTypeList =[]; itemTypeList =[];
locationTypeList = []; locationTypeList = [];
@ -139,6 +141,22 @@ export function getJobStateInfo(value) {
return resultInfo return resultInfo
} }
export function getReceiveStateInfo(value) {
var resultInfo = "";
if (receiveStatusList.length == 0) {
receiveStatusList = getDirectoryInfo("receive_status")
}
if (receiveStatusList.length > 0) {
for (let item of receiveStatusList) {
if (item.value == value) {
resultInfo = item
break;
}
}
}
return resultInfo
}
//获取任务状态样式 //获取任务状态样式
export function getJobStateStyle(value) { export function getJobStateStyle(value) {
let item = getJobStateInfo(value); let item = getJobStateInfo(value);

44
src/common/noclick.js

@ -0,0 +1,44 @@
// 防止处理多次点击
function noMultipleClicks(methods, info) {
// methods是需要点击后需要执行的函数, info是点击需要传的参数
let that = this;
if (that.noClick) {
// 第一次点击
that.noClick= false;
if(info && info !== '') {
// info是执行函数需要传的参数
methods(info);
} else {
methods();
}
let timer = setTimeout(()=> {
that.noClick= true;
clearTimeout(timer)
}, 2000)
} else {
// 这里是重复点击的判断
}
}
// 节流函数
const throttle = (fn, t,_this) => {
console.log('throttle')
return ()=> {
if (!_this.timer) {
_this.timer = setTimeout(()=>{
console.log('fn')
//·清空定时器
_this.timer = null
}, t)
fn()
}
}
}
//导出
export default {
noMultipleClicks,//禁止多次点击
throttle
}

18
src/common/record.js

@ -22,7 +22,7 @@ export function createItemInfo(balance, pack) {
uom: pack.uom, uom: pack.uom,
subList: [] subList: []
} }
item.containerNumber = pack.parentNumber != null ? pack.parentNumber : pack.number; item.containerNumber = pack.parentNumber ? pack.parentNumber : pack.number;
return item; return item;
} }
@ -33,7 +33,7 @@ export function createDetailInfo(balance, pack) {
let detail = deepCopyData(balance); let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber() detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber(); detail.qty = new Decimal(detail.qty).toNumber();
detail.packQty = new Decimal(pack.packQty).toNumber() detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
detail.packUnit = pack.packUnit detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber() ; detail.handleQty = new Decimal(detail.qty).toNumber() ;
detail.package = pack; detail.package = pack;
@ -43,6 +43,20 @@ export function createDetailInfo(balance, pack) {
return detail; return detail;
} }
export function createDetailByPackInfo(pack) {
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
// data.inventoryStatus = data.inventoryStatus;
let detail = deepCopyData(pack); detail.scaned = true;
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber();
detail.package = pack;
return detail;
}
//计算实际数量 //计算实际数量
export function calcHandleQty(detailSource) { export function calcHandleQty(detailSource) {
for (let item of detailSource) { for (let item of detailSource) {

32
src/common/style/new_style.css

@ -2120,11 +2120,15 @@ button::after {
} }
.card_business { .card_business {
color: #F1A532; font-size: 26rpx; font-style: italic; color: #F1A532;
font-size: 26rpx;
font-style: italic;
} }
.card_business_content { .card_business_content {
font-size: 32rpx; color:#2E3A63; margin-left:20rpx font-size: 32rpx;
color:#2E3A63;
margin-left:20rpx
} }
.card_location { .card_location {
@ -2300,6 +2304,30 @@ button::after {
border-radius: 10rpx; border-radius: 10rpx;
} }
.receive_state_no_ok {
font-size: 28rpx;
background: rgba(236, 156, 0, 0.2);
color: #EC9C00;
padding: 10rpx 20rpx 10rpx 20rpx;
border-radius: 10rpx;
}
.receive_state_ok {
font-size: 28rpx;
background: rgba(95, 203, 148, 0.2);
color: #22AF68;
padding: 10rpx 20rpx 10rpx 20rpx;
border-radius: 10rpx;
}
.receive_state_reject {
font-size: 28rpx;
background: rgba(95, 203, 148, 0.2);
color: #22AF68;
padding: 10rpx 20rpx 10rpx 20rpx;
border-radius: 10rpx;
}
.pop_detail { .pop_detail {
background-color: #fff; background-color: #fff;
width: 100%; width: 100%;

29
src/hybrid/html/point.html

@ -11,6 +11,7 @@
}); });
</script> </script>
<style> <style>
.box { .box {
@ -29,29 +30,41 @@
.left-item { .left-item {
display: flex; display: flex;
} }
.bold-font { .bold-font {
font-weight: bold; font-weight: bold;
font-size: 28rpx;
} }
.font-30 {
font-size: 30px;
}
.font-20 {
font-size: 20px;
}
.bold-label {
font-weight: bold;
font-size: 15px;
}
.label { .label {
border-bottom: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1;
width: 60px; width: 60px;
padding: 0px 5px; padding: 0px 5px;
height: 58px; height: 49px;
line-height: 58px; line-height: 49px;
} }
.value { .value {
border-bottom: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1;
padding: 0px 5px; padding: 0px 5px;
height: 58px; height: 49px;
flex: 1; flex: 1;
width: 0px; width: 0px;
display: flex; display: flex;
align-items: center; align-items: center;
word-break: break-all; word-break: break-all;
justify-content: center;
} }
.right { .right {
@ -59,18 +72,16 @@
} }
.image { .image {
width: calc(100% - 1px); width: calc(100% - 1px);
height: 176px; height: 149px;
border-bottom: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1;
border-top: 1px solid #b1b1b1; border-top: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1;
} }
.image img { .image img {
width: 172px; width: 147px;
height: 172px; height: 147px;
border: 1px solid #b1b1b1; border: 1px solid #b1b1b1;
/* width: calc(100% - 4px); /* width: calc(100% - 4px);
height: calc(100% - 4px); */ height: calc(100% - 4px); */

114
src/hybrid/html/pointPutawayJob.html

@ -1,4 +1,3 @@
<!-- 采购收货指引单 -->
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
@ -12,116 +11,53 @@
}); });
</script> </script>
<style> <style>
.box { .box {
font-size: 14px; font-size: 13px;
border: 1px solid #dedede; /* padding: 10px; */
/* border: 1px solid #dedede; */
} }
.left { .left {
border-top: 1px solid #b1b1b1;
border-left: 1px solid #b1b1b1;
flex: 1; flex: 1;
}
.left-item {
display: flex;
}
.label {
border-bottom: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
width: 60px;
padding: 0px 5px;
height: 67px;
line-height: 67px;
} }
.left-item {
.value {
border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
padding: 0px 5px;
height: 67px;
flex: 1;
width: 0px;
display: flex; display: flex;
align-items: center;
word-wrap: break-word;
}
.right {
width: 200px;
}
.image {
width: 100%;
height: 202px;
border-bottom: 1px solid #b1b1b1;
border-top: 1px solid #b1b1b1; border-top: 1px solid #b1b1b1;
border-left: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1; border-right: 1px solid #b1b1b1;
} }
.image img { .left-item div{
width: calc(100% - 4px); padding: 10px 10px;
height: calc(100% - 4px); font-size: 16px;
margin: 2px;
}
.mb-kw {
border-bottom: 1px solid #dedede;
padding: 10px;
font-size: 15px;
}
.mb-kw div {
font-weight: bold;
font-size: 23px;
text-align: center;
}
.mb-bo {
display: flex;
}
.mb-bo .mb-left {
flex: 1
} }
.left-item .label{
.mb-bo .mb-left .mb-text { width: 100px;
padding: 10px; padding: 10px 10px;
border-right: 1px solid #b1b1b1;
} }
.mb-bo .mb-left .mb-text:nth-child(1) { .relative {
border-bottom: 1px solid #dedede; margin-bottom: 10px;
position: relative;
} }
.mb-bo .mb-left .mb-text div { .q {
font-weight: bold; position: absolute;
font-size: 16px; font-size: 15rem;
color: rgba(0, 0, 0, 0.1);
width: calc(100% - 100px);
right: 0px;
top: 0px;
text-align: center; text-align: center;
} height: 100%;
.mb-bo .mb-right {
padding: 10px;
width: 230px;
border-left: 1px solid #dedede;
display: flex; display: flex;
align-items: center; align-items: center;
} justify-content: center;
.mb-bo .mb-right .mb-text {
width: 100%;
}
.mb-bo .mb-right .mb-text div {
font-weight: bold;
font-size: 20px;
text-align: center;
width: 100%;
} }
</style> </style>
</head> </head>

Loading…
Cancel
Save