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
96ac235a
authored
Dec 14, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
a362a992
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
125 additions
and
34 deletions
pages/tallyGoods/addException.vue
pages/tallyGoods/exceptionSelect.vue
util/api.js
pages/tallyGoods/addException.vue
View file @
96ac235a
...
...
@@ -17,27 +17,26 @@
<navigator
class=
"box row bothSide verCenter"
:url=
"'/pages/tallyGoods/exceptionSelect?erp_order_sn='+formParams.erp_order_sn"
hover-class=
"none"
>
<text
class=
"label"
>
异常类型(必填)
</text>
<view
class=
"input-wrap-width row bothSide verCenter"
>
<text
class=
"text"
>
请选择
</text>
<text
class=
"text"
>
{{
exceptionType
?
exceptionType
:
'请选择'
}}
</text>
<text
class=
"iconfont icon-sanjiaoxing2"
></text>
</view>
</navigator>
<
navigator
class=
"box row bothSide verCenter"
:url=
"'/pages/tallyGoods/exceptionSelect?erp_order_sn='+formParams.erp_order_sn"
hover-class=
"none
"
>
<
view
class=
"box row bothSide verCenter
"
>
<text
class=
"label"
>
异常型号
</text>
<view
class=
"input-wrap-width row bothSide verCenter"
>
<text
class=
"text"
>
请选择
</text>
<text
class=
"iconfont icon-sanjiaoxing2"
></text>
<view
class=
"input-wrap-width row verCenter"
style=
"text-align: right;"
>
<input
type=
"text"
class=
"uni-input-box"
placeholder=
"不可编辑"
placeholder-style=
"color:#919399"
style=
"color: #6e767a;"
disabled=
""
v-model=
"formParams.goods_type"
/>
</view>
</
navigator
>
</
view
>
<view
class=
"box row bothSide verCenter"
url=
"/pages/tallyGoods/exceptionSelect"
hover-class=
"none"
>
<text
class=
"label"
>
下单数据
</text>
<view
class=
"input-wrap-width row verCenter"
style=
"text-align: right;"
>
<input
type=
"text"
class=
"uni-input-box"
placeholder=
"不可编辑"
placeholder-style=
"color:#919399"
disabled=
"
"
/>
<input
type=
"text"
class=
"uni-input-box"
placeholder=
"不可编辑"
placeholder-style=
"color:#919399"
style=
"color: #6e767a;"
disabled=
""
v-model=
"formParams.order_data
"
/>
</view>
</view>
<view
class=
"box row bothSide verCenter"
url=
"/pages/tallyGoods/exceptionSelect"
hover-class=
"none"
>
<text
class=
"label"
>
仓库实到数据
</text>
<view
class=
"input-wrap-width row verCenter"
style=
"text-align: right;"
>
<input
type=
"text"
class=
"uni-input-box"
placeholder=
"请输入"
placeholder-style=
"color:#919399"
/>
<input
type=
"text"
class=
"uni-input-box"
placeholder=
"请输入"
placeholder-style=
"color:#919399"
v-model=
"formParams.val"
/>
</view>
</view>
<view
class=
"upload-box"
>
...
...
@@ -74,26 +73,48 @@
noexebshowFalg
:
true
,
//控制是否会触发生命周期
maxNum
:
5
,
//最大上传图片数量
image_list
:
[],
//图片列表
order_data
:
''
,
//下单数据
exceptionType
:
''
,
//异常类型
formParams
:
{
erp_order_sn
:
''
,
//入仓号
pur_pic
:
''
//采购单上传
ask_customer_exception_id
:
''
,
//问客异常ID
order_goods_id
:
''
,
//订单商品ID
val
:
''
,
//仓库实到数据
goods_type
:
''
,
//异常型号
order_data
:
''
,
//下单数据
upload_img
:
''
,
//上传图片逗号分割
}
};
},
watch
:
{
image_list
(
arr
)
{
if
(
arr
.
length
>
0
)
{
this
.
form
.
pur_pic
=
arr
.
join
(
','
);
this
.
form
Params
.
upload_img
=
arr
.
join
(
','
);
}
else
{
this
.
formParams
.
pur_pic
=
''
;
this
.
formParams
.
upload_img
=
''
;
}
}
},
onLoad
()
{
uni
.
removeStorageSync
(
'
paramsOrigin'
);
uni
.
removeStorageSync
(
'
updateExceptionData'
);
//先删除存储的选择异常类型
},
onShow
()
{
//更新选择的异常类型和异常型号
uni
.
$on
(
'updateExceptionData'
,
data
=>
{
if
(
data
)
{
console
.
log
(
'携带过来的数据:'
+
JSON
.
stringify
(
data
));
this
.
exceptionType
=
data
.
allExceptionV2
[
data
.
allExceptionV2Index
].
name
;
//异常类型
this
.
formParams
.
ask_customer_exception_id
=
data
.
allExceptionV2
[
data
.
allExceptionV2Index
].
value
;
//问客异常ID
this
.
formParams
.
order_goods_id
=
data
.
exceptionData
.
order_goods_id
;
//订单商品ID
this
.
formParams
.
goods_type
=
data
.
exceptionData
.
goods_type
;
//异常型号
this
.
formParams
.
order_data
=
data
.
exceptionData
.
order_data
;
//下单数据
this
.
formParams
.
val
=
data
.
exceptionData
.
order_data
;
//默认下单数据和仓库实到数据是一致
uni
.
removeStorageSync
(
'updateExceptionData'
);
uni
.
setStorageSync
(
'updateExceptionData'
,
data
);
//存储的选择异常类型
}
});
},
methods
:
{
/**
...
...
@@ -248,8 +269,35 @@
* 提交
*/
submit
()
{
this
.
request
(
API
.
submitTallyGoods
,
'POST'
,
this
.
formParams
,
true
).
then
(
res
=>
{
if
(
!
this
.
formParams
.
erp_order_sn
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'请先填写入仓号'
,
showCancel
:
false
});
return
false
;
}
if
(
!
this
.
formParams
.
goods_type
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'请选择异常类型'
,
showCancel
:
false
});
return
false
;
}
if
(
this
.
image_list
.
length
==
0
)
{
uni
.
showModal
({
title
:
'提示'
,
content
:
'异常图片至少上传一张'
,
showCancel
:
false
});
return
false
;
}
this
.
request
(
API
.
addAskCustomerV2
,
'POST'
,
this
.
formParams
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
}
else
{
uni
.
showModal
({
title
:
'提示'
,
content
:
res
.
err_msg
,
...
...
@@ -262,17 +310,6 @@
}
}
});
}
else
{
uni
.
showModal
({
title
:
'提示'
,
content
:
res
.
err_msg
,
showCancel
:
false
,
success
:
res
=>
{
if
(
res
.
confirm
)
{}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
}
});
}
...
...
pages/tallyGoods/exceptionSelect.vue
View file @
96ac235a
...
...
@@ -2,7 +2,7 @@
<view
class=
"page-exception-select"
>
<view
class=
"title row bothSide verCenter"
>
<text
class=
"t1"
>
入仓号
</text>
<text
class=
"t2"
>
{{
erp_order_sn
}}
</text>
<text
class=
"t2"
>
{{
formParams
.
erp_order_sn
}}
</text>
</view>
<view
class=
"select-type"
>
<view
class=
"box"
>
...
...
@@ -40,17 +40,27 @@
export
default
{
data
()
{
return
{
erp_order_sn
:
''
,
//入仓号,携带过来的
index
:
1
,
allExceptionV2
:
[],
//异常类型集合
allExceptionV2Index
:
-
1
,
erpOrderSnOrderGoodsSn
:
''
,
//异常型号集合
erpOrderSnOrderGoodsSnIndex
:
-
1
,
arr
:
[
'型号异常'
,
'品牌异常'
]
formParams
:
{
erp_order_sn
:
''
,
//入仓号,携带过来的
ask_customer_exception_id
:
''
,
//异常里面的ID
order_goods_id
:
''
//订单商品ID
},
exceptionData
:
{}
//获取异常对应的数据
};
},
onLoad
(
options
)
{
this
.
erp_order_sn
=
options
.
erp_order_sn
||
''
;
this
.
formParams
.
erp_order_sn
=
options
.
erp_order_sn
||
''
;
// 从本地缓存中获取数据
const
dataFromSourcePage
=
uni
.
getStorageSync
(
'updateExceptionData'
);
// 使用Object.assign()将dataFromSourcePage的属性合并到data中
Object
.
assign
(
this
.
$data
,
dataFromSourcePage
);
if
(
!
options
.
erp_order_sn
)
{
uni
.
showToast
({
title
:
'请填写入仓单号'
,
...
...
@@ -71,8 +81,10 @@
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
target
.
value
);
if
(
type
==
1
)
{
this
.
allExceptionV2Index
=
e
.
target
.
value
;
this
.
formParams
.
ask_customer_exception_id
=
this
.
allExceptionV2
[
e
.
target
.
value
].
value
;
}
else
if
(
type
==
2
)
{
this
.
erpOrderSnOrderGoodsSnIndex
=
e
.
target
.
value
;
this
.
formParams
.
order_goods_id
=
this
.
erpOrderSnOrderGoodsSn
[
e
.
target
.
value
].
value
;
}
},
/**
...
...
@@ -98,7 +110,7 @@
* 获取入仓号对应的型号列表
*/
getErpOrderSnOrderGoodsSn
()
{
this
.
request
(
API
.
getErpOrderSnOrderGoodsSn
,
'GET'
,
{
erp_order_sn
:
this
.
erp_order_sn
},
true
).
then
(
res
=>
{
this
.
request
(
API
.
getErpOrderSnOrderGoodsSn
,
'GET'
,
{
erp_order_sn
:
this
.
formParams
.
erp_order_sn
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
// 将数组中的每个对象转换为指定格式
this
.
erpOrderSnOrderGoodsSn
=
res
.
data
.
map
(
item
=>
({
...
...
@@ -114,10 +126,36 @@
});
},
submit
()
{
uni
.
$emit
(
'updateOriginData'
,
this
.
$data
);
uni
.
navigateBack
({
delta
:
1
if
(
!
this
.
formParams
.
ask_customer_exception_id
)
{
uni
.
showToast
({
title
:
'请选择异常类型'
,
icon
:
'none'
});
return
false
;
}
if
(
!
this
.
formParams
.
order_goods_id
)
{
uni
.
showToast
({
title
:
'请选择异常型号'
,
icon
:
'none'
});
return
false
;
}
this
.
request
(
API
.
getExceptionDataV2
,
'GET'
,
this
.
formParams
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
this
.
exceptionData
=
res
.
data
;
uni
.
$emit
(
'updateExceptionData'
,
this
.
$data
);
uni
.
navigateBack
({
delta
:
1
});
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
}
}
};
...
...
util/api.js
View file @
96ac235a
...
...
@@ -224,7 +224,23 @@ const API = {
/**
* 获取所有异常
*/
getAllExceptionV2
:
API_BASE
+
'/supplywechatwms/getAllExceptionV2'
getAllExceptionV2
:
API_BASE
+
'/supplywechatwms/getAllExceptionV2'
,
/**
* 获取异常对应的数据
*/
getExceptionDataV2
:
API_BASE
+
'/supplywechatwms/getExceptionDataV2'
,
/**
* 新增异常问客
*/
addAskCustomerV2
:
API_BASE
+
'/supplywechatwms/addAskCustomerV2'
,
/**
* 问客详情
*/
getAskCustomerDetailV2
:
API_BASE
+
'/supplywechatwms/getAskCustomerDetailV2'
,
/**
* 核对并执行
*/
executeJob
:
API_BASE
+
'/supplywechatwms/executeJob'
}
...
...
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