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. 30
      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. 151
      src/hybrid/html/point.html
  10. 192
      src/hybrid/html/pointPutawayJob.html
  11. 114
      src/hybrid/html/purchaseReceiptJob.html

12
src/common/array.js

@ -110,6 +110,18 @@ export function getPurchaseReceiptOption(allowModifyQty, allowModifyLocation) {
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() {
let option_detail = [{

17
src/common/balance.js

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

7
src/common/config.js

@ -1,2 +1,9 @@
export const overPagePrint="overPage_print"
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"

30
src/common/detail.js

@ -49,7 +49,7 @@ export function getDataSource(subList) {
let items = [];
subList.forEach(detail => {
var item = items.find(r =>
r.itemCode == detail.itemCode)
r.itemCode == detail.itemCode && r.batch == detail.batch)
if (item == undefined) {
item = createItemInfo(detail);
let newDetail = createDetailInfo(detail); //
@ -115,22 +115,42 @@ 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) {
for (let item of detailSource) {
item.handleQty = new Decimal(0).toNumber();
for (let detail of item.subList) {
if (detail != undefined && detail.scaned) {
if (detail.packList.length > 0) {
if (detail) {
if (detail.packList && detail.packList.length > 0) {
detail.handleQty = new Decimal(0).toNumber();
for (let pack of detail.packList) {
if (pack != undefined && pack.scaned) {
if (pack && pack.scaned) {
detail.handleQty = calc.add(detail.handleQty, pack.handleQty);
}
}
}
item.handleQty = calc.add(item.handleQty, detail.handleQty);
if(detail.handleQty){
item.handleQty = calc.add(item.handleQty, detail.handleQty);
}
}
}
}

18
src/common/directory.js

@ -1,4 +1,5 @@
let jobStatusList = [];
let receiveStatusList = [];
let itemStatusList = [];
let itemTypeList =[];
let locationTypeList = [];
@ -42,6 +43,7 @@ export function getBusinessTypeDesc(type) {
//获取字典信息
export function clearCacheData() {
jobStatusList = [];
receiveStatusList=[];
itemStatusList = [];
itemTypeList =[];
locationTypeList = [];
@ -139,6 +141,22 @@ export function getJobStateInfo(value) {
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) {
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,
subList: []
}
item.containerNumber = pack.parentNumber != null ? pack.parentNumber : pack.number;
item.containerNumber = pack.parentNumber ? pack.parentNumber : pack.number;
return item;
}
@ -33,7 +33,7 @@ export function createDetailInfo(balance, pack) {
let detail = deepCopyData(balance);
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
detail.packQty = new Decimal(pack.packQty).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;
@ -43,6 +43,20 @@ export function createDetailInfo(balance, pack) {
return detail;
}
export function createDetailByPackInfo(pack) {
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;
// data.inventoryStatus = data.inventoryStatus;
let detail = deepCopyData(pack); detail.scaned = true;
detail.balanceQty = new Decimal(detail.qty).toNumber()
detail.qty = new Decimal(detail.qty).toNumber();
detail.packQty = pack.packQty ? new Decimal(pack.packQty).toNumber() : 0
detail.packUnit = pack.packUnit
detail.handleQty = new Decimal(detail.qty).toNumber();
detail.package = pack;
return detail;
}
//计算实际数量
export function calcHandleQty(detailSource) {
for (let item of detailSource) {

32
src/common/style/new_style.css

@ -2120,11 +2120,15 @@ button::after {
}
.card_business {
color: #F1A532; font-size: 26rpx; font-style: italic;
color: #F1A532;
font-size: 26rpx;
font-style: italic;
}
.card_business_content {
font-size: 32rpx; color:#2E3A63; margin-left:20rpx
font-size: 32rpx;
color:#2E3A63;
margin-left:20rpx
}
.card_location {
@ -2300,6 +2304,30 @@ button::after {
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 {
background-color: #fff;
width: 100%;

151
src/hybrid/html/point.html

@ -1,84 +1,95 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<script src="../../api/img-to-base64.js"></script>
<script type="text/javascript">
document.addEventListener('plusready', function() {
//console.log("所有plus api都应该在此事件发生后调用,否则会出现plus is undefined。")
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<script src="../../api/img-to-base64.js"></script>
<script type="text/javascript">
document.addEventListener('plusready', function() {
//console.log("所有plus api都应该在此事件发生后调用,否则会出现plus is undefined。")
});
</script>
<style>
.box {
font-size: 14px;
display: flex;
margin-top: 60px;
});
}
</script>
<style>
.box {
font-size: 14px;
display: flex;
margin-top: 60px;
.left {
border-top: 1px solid #b1b1b1;
border-left: 1px solid #b1b1b1;
flex: 1;
}
}
.left-item {
display: flex;
}
.bold-font{
font-weight: bold;
font-size: 28rpx;
}
.label {
border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
width: 60px;
padding: 0px 5px;
height: 58px;
line-height: 58px;
}
.left {
border-top: 1px solid #b1b1b1;
border-left: 1px solid #b1b1b1;
flex: 1;
}
.value {
border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
padding: 0px 5px;
height: 58px;
flex: 1;
width: 0px;
display: flex;
align-items: center;
word-break: break-all;
}
.left-item {
display: flex;
}
.right {
width: 300px;
}
.bold-font {
font-weight: bold;
}
.font-30 {
font-size: 30px;
}
.font-20 {
font-size: 20px;
}
.bold-label {
font-weight: bold;
font-size: 15px;
}
.image {
.label {
border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
width: 60px;
padding: 0px 5px;
height: 49px;
line-height: 49px;
}
width: calc(100% - 1px);
height: 176px;
border-bottom: 1px solid #b1b1b1;
border-top: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
}
.value {
border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
padding: 0px 5px;
height: 49px;
flex: 1;
width: 0px;
display: flex;
align-items: center;
word-break: break-all;
justify-content: center;
}
.right {
width: 300px;
}
.image img {
width: 172px;
height: 172px;
border: 1px solid #b1b1b1;
/* width: calc(100% - 4px);
height: calc(100% - 4px); */
margin: 1px;
}
</style>
</head>
<body>
mainBody
</body>
.image {
width: calc(100% - 1px);
height: 149px;
border-bottom: 1px solid #b1b1b1;
border-top: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
}
.image img {
width: 147px;
height: 147px;
border: 1px solid #b1b1b1;
/* width: calc(100% - 4px);
height: calc(100% - 4px); */
margin: 1px;
}
</style>
</head>
<body>
mainBody
</body>
</html>

192
src/hybrid/html/pointPutawayJob.html

@ -1,131 +1,67 @@
<!-- 采购收货指引单 -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<script src="../../api/img-to-base64.js"></script>
<script type="text/javascript">
document.addEventListener('plusready', function() {
//console.log("所有plus api都应该在此事件发生后调用,否则会出现plus is undefined。")
});
</script>
<style>
.box {
font-size: 14px;
border: 1px solid #dedede;
}
.left {
border-top: 1px solid #b1b1b1;
border-left: 1px solid #b1b1b1;
flex: 1;
}
.left-item {
display: flex;
}
.label {
border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
width: 60px;
padding: 0px 5px;
height: 67px;
line-height: 67px;
}
.value {
border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
padding: 0px 5px;
height: 67px;
flex: 1;
width: 0px;
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-right: 1px solid #b1b1b1;
}
.image img {
width: calc(100% - 4px);
height: calc(100% - 4px);
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
}
.mb-bo .mb-left .mb-text {
padding: 10px;
}
.mb-bo .mb-left .mb-text:nth-child(1) {
border-bottom: 1px solid #dedede;
}
.mb-bo .mb-left .mb-text div {
font-weight: bold;
font-size: 16px;
text-align: center;
}
.mb-bo .mb-right {
padding: 10px;
width: 230px;
border-left: 1px solid #dedede;
display: flex;
align-items: 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>
</head>
<body>
mainBody
</body>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<script src="../../api/img-to-base64.js"></script>
<script type="text/javascript">
document.addEventListener('plusready', function() {
//console.log("所有plus api都应该在此事件发生后调用,否则会出现plus is undefined。")
});
</script>
<style>
.box {
font-size: 13px;
/* padding: 10px; */
/* border: 1px solid #dedede; */
}
.left {
flex: 1;
border-bottom: 1px solid #b1b1b1;
}
.left-item {
display: flex;
border-top: 1px solid #b1b1b1;
border-left: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
}
.left-item div{
padding: 10px 10px;
font-size: 16px;
}
.left-item .label{
width: 100px;
padding: 10px 10px;
border-right: 1px solid #b1b1b1;
}
.relative {
margin-bottom: 10px;
position: relative;
}
.q {
position: absolute;
font-size: 15rem;
color: rgba(0, 0, 0, 0.1);
width: calc(100% - 100px);
right: 0px;
top: 0px;
text-align: center;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
mainBody
</body>
</html>

114
src/hybrid/html/purchaseReceiptJob.html

@ -1,67 +1,67 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<script src="../../api/img-to-base64.js"></script>
<script type="text/javascript">
document.addEventListener('plusready', function() {
//console.log("所有plus api都应该在此事件发生后调用,否则会出现plus is undefined。")
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title></title>
<script src="../../api/img-to-base64.js"></script>
<script type="text/javascript">
document.addEventListener('plusready', function() {
//console.log("所有plus api都应该在此事件发生后调用,否则会出现plus is undefined。")
});
</script>
<style>
.box {
font-size: 13px;
/* padding: 10px; */
/* border: 1px solid #dedede; */
}
});
</script>
<style>
.box {
font-size: 13px;
/* padding: 10px; */
/* border: 1px solid #dedede; */
}
.left {
flex: 1;
border-bottom: 1px solid #b1b1b1;
}
.left-item {
display: flex;
border-top: 1px solid #b1b1b1;
border-left: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
}
.left {
flex: 1;
border-bottom: 1px solid #b1b1b1;
}
.left-item {
display: flex;
border-top: 1px solid #b1b1b1;
border-left: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
}
.left-item div{
padding: 10px 10px;
font-size: 16px;
}
.left-item .label{
width: 100px;
padding: 10px 10px;
border-right: 1px solid #b1b1b1;
}
.left-item div{
padding: 10px 10px;
font-size: 16px;
}
.left-item .label{
width: 100px;
padding: 10px 10px;
border-right: 1px solid #b1b1b1;
}
.relative {
margin-bottom: 10px;
position: relative;
}
.relative {
margin-bottom: 10px;
position: relative;
}
.q {
position: absolute;
font-size: 15rem;
color: rgba(0, 0, 0, 0.1);
width: calc(100% - 100px);
right: 0px;
top: 0px;
text-align: center;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
mainBody
</body>
.q {
position: absolute;
font-size: 15rem;
color: rgba(0, 0, 0, 0.1);
width: calc(100% - 100px);
right: 0px;
top: 0px;
text-align: center;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
mainBody
</body>
</html>
Loading…
Cancel
Save