Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
梁建民
/
wmsMin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a21d94e6
authored
Aug 13, 2024
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add
parent
720c28f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
45 deletions
pages/tally/abnormalManageList.vue
pages/tally/addAbnormal.vue
pages/tally/index.vue
pages/tally/abnormalManageList.vue
View file @
a21d94e6
...
...
@@ -51,38 +51,60 @@
</view>
</view>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;"
@
click=
"open()"
>
<text
class=
"label"
>
异常编码:
</text>
<text
class=
"label"
@
click=
"open()"
>
异常编码:
</text>
<text
class=
"text"
>
{{
item
.
abnormal_number
}}
</text>
</view>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;"
>
<te
xt
class=
"label"
>
订单型号:
</text
>
<text
class=
"text"
>
{{
item
.
order_model
}}
</text>
</view
>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;"
>
<te
xt
class=
"label"
>
实物型号:
</text
>
<view
class=
"text"
>
<
rich-text
:nodes=
"highlightDifferences(item.order_model, item.actual_model)"
></rich-
text>
</
view
>
</view
>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;"
>
<text
class=
"label"
>
订单品牌:
</text>
<
text
class=
"text"
>
{{
item
.
order_brand
}}
</text
>
</view
>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;"
>
<text
class=
"label"
>
订单数量:
</text>
<
text
class=
"text"
>
{{
item
.
order_qty
}}
</text
>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;
background-color: #f1f4f6;padding: 10rpx 0;
"
>
<te
mplate
v-if=
"item.abnormal_type == 1"
>
<text
class=
"label"
>
订单品牌:
</text>
<text
class=
"text"
>
{{
item
.
order_brand
}}
</text
>
</
template
>
<
te
mplate
v-else-if=
"item.abnormal_type == 2"
>
<text
class=
"label"
>
订单型号:
</text
>
<
text
class=
"text"
>
{{
item
.
order_model
}}
</
text>
</
template
>
<
template
v-else-if=
"item.abnormal_type == 3"
>
<text
class=
"label"
>
订单产地:
</text
>
<text
class=
"text"
>
{{
item
.
order_origin
}}
</text>
<
/
template
>
<
template
v-else-if=
"item.abnormal_type == 4"
>
<text
class=
"label"
>
订单数量:
</text
>
<text
class=
"text"
>
{{
item
.
order_qty
}}
</text>
<
/
template
>
</view>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;"
>
<text
class=
"label"
>
订单产地:
</text>
<text
class=
"text"
>
{{
item
.
order_origin
}}
</text>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;background-color: #f1f4f6;padding: 10rpx 0;"
>
<
template
v-if=
"item.abnormal_type == 1"
>
<text
class=
"label"
>
实物品牌:
</text>
<view
class=
"text"
>
<rich-text
:nodes=
"highlightDifferences(item.order_brand, item.actual_brand)"
></rich-text>
</view>
</
template
>
<
template
v-else-if=
"item.abnormal_type == 2"
>
<text
class=
"label"
>
实物型号:
</text>
<view
class=
"text"
>
<rich-text
:nodes=
"highlightDifferences(item.order_model, item.actual_model)"
></rich-text>
</view>
</
template
>
<
template
v-else-if=
"item.abnormal_type == 3"
>
<text
class=
"label"
>
实物产地:
</text>
<view
class=
"text"
>
<rich-text
:nodes=
"highlightDifferences(item.order_origin, item.actual_origin)"
></rich-text>
</view>
</
template
>
<
template
v-else-if=
"item.abnormal_type == 4"
>
<text
class=
"label"
>
实物数量:
</text>
<view
class=
"text"
>
<rich-text
:nodes=
"highlightDifferences(item.order_qty, item.actual_qty)"
></rich-text>
</view>
</
template
>
</view>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;"
>
<text
class=
"label"
>
异常说明:
</text>
<text
class=
"text"
>
{{
item
.
abnormal_explain
}}
</text>
<text
class=
"text"
style=
"max-width: 500rpx;"
@
click=
"show(item.abnormal_explain)"
>
{{item.abnormal_explain}}
</text>
</view>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;"
>
<text
class=
"label"
>
业务回复:
</text>
<text
class=
"text"
style=
"color: red;"
>
{{
item
.
handle_explain
}}
</text>
<text
class=
"text"
style=
"color: red;"
@
click=
"show(item.handle_explain)"
>
{{item.handle_explain}}
</text>
</view>
<view
class=
"input-box row verCenter"
style=
"flex: 0 0 100%;"
>
<text
class=
"label"
>
创建时间:
</text>
...
...
@@ -93,7 +115,7 @@
<text
class=
"text"
>
{{item.salesman_handle_time}}
</text>
</view>
<view
class=
"input-box row"
style=
"flex: 0 0 100%;"
>
<text
class=
"label"
>
理货照
片:
</text>
<text
class=
"label"
>
异常图
片:
</text>
<view
class=
"pick_img_list row"
>
<
template
v-if=
"item.abnormal_pic_urls.length > 0"
>
<view
class=
"img_list"
v-for=
"(v, i) in item.abnormal_pic_urls"
:key=
"i"
>
...
...
@@ -284,30 +306,32 @@
* @returns {string} 处理后的第二个字符串,带有<em>标签
*/
highlightDifferences
(
str1
,
str2
)
{
// 去除前后空格
str1
=
str1
.
trim
();
str2
=
str2
.
trim
();
if
(
str1
&&
str2
)
{
// 去除前后空格
str1
=
str1
.
toString
().
trim
();
str2
=
str2
.
toString
().
trim
();
// 初始化结果字符串
let
result
=
''
;
const
maxLength
=
Math
.
max
(
str1
.
length
,
str2
.
length
);
// 初始化结果字符串
let
result
=
''
;
const
maxLength
=
Math
.
max
(
str1
.
length
,
str2
.
length
);
// 逐字符比较
for
(
let
i
=
0
;
i
<
maxLength
;
i
++
)
{
const
char1
=
str1
[
i
]
||
''
;
// 如果str1比str2短,取空字符
const
char2
=
str2
[
i
]
||
''
;
// 如果str2比str1短,取空字符
// 逐字符比较
for
(
let
i
=
0
;
i
<
maxLength
;
i
++
)
{
const
char1
=
str1
[
i
]
||
''
;
// 如果str1比str2短,取空字符
const
char2
=
str2
[
i
]
||
''
;
// 如果str2比str1短,取空字符
// 比较字符
if
(
char1
!==
char2
)
{
// 如果字符不同,在第二个字符串中用
<
em
>
包裹
result
+=
`<span style="color: red">
${
char2
}
</span>`
;
}
else
{
// 如果字符相同,直接添加到结果中
result
+=
char2
;
// 比较字符
if
(
char1
!==
char2
)
{
// 如果字符不同,在第二个字符串中用
<
em
>
包裹
result
+=
`<span style="color: red">
${
char2
}
</span>`
;
}
else
{
// 如果字符相同,直接添加到结果中
result
+=
char2
;
}
}
}
return
result
;
return
result
;
}
},
/**
* 预览图片
...
...
@@ -496,6 +520,23 @@
})
},
/**
* 展示文本详情
*/
show
(
val
)
{
uni
.
showModal
({
content
:
val
,
showCancel
:
false
,
confirmText
:
'关闭'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'用户点击确定'
);
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
},
/**
* 异常作废
*/
cancelAbnormal
(
abnormal_id
)
{
...
...
pages/tally/addAbnormal.vue
View file @
a21d94e6
...
...
@@ -132,6 +132,7 @@
is_business_processing
:
[
'否'
,
'是'
],
is_business_processing_index
:
-
1
,
abnormal_pic_url
:
[],
order_id
:
''
,
form
:
{
order_goods_id
:
''
,
entrust_no
:
''
,
...
...
@@ -147,7 +148,7 @@
};
},
onLoad
(
options
)
{
this
.
form
.
order_goods
_id
=
options
.
order_id
;
this
.
order
_id
=
options
.
order_id
;
this
.
form
.
entrust_no
=
options
.
erp_order_sn
;
this
.
salesman
=
options
.
salesman
;
this
.
orderDetailByIdIndex
=
options
.
orderDetailByIdIndex
;
...
...
@@ -184,9 +185,10 @@
this
.
form
.
abnormal_explain
=
val
;
},
getData
()
{
this
.
request
(
API
.
getOrderDetailById
,
'GET'
,
{
order_id
:
this
.
form
.
order_goods
_id
},
true
).
then
(
res
=>
{
this
.
request
(
API
.
getOrderDetailById
,
'GET'
,
{
order_id
:
this
.
order
_id
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
orderDetailByIdList
=
res
.
data
[
this
.
orderDetailByIdIndex
];
this
.
form
.
order_goods_id
=
this
.
orderDetailByIdList
.
order_goods_id
;
}
else
{
uni
.
showToast
({
title
:
res
.
err_msg
,
...
...
pages/tally/index.vue
View file @
a21d94e6
...
...
@@ -391,6 +391,8 @@
this
.
getStayHandleCount
();
if
(
this
.
box_sn
&&
this
.
erp_order_sn
&&
this
.
noexebshowFalg
)
{
this
.
tallyData
=
[];
this
.
form
=
[];
this
.
getTallyData
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment