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
a362a992
authored
Dec 13, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
0ed3f166
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
118 additions
and
38 deletions
assets/css/tallyGoods/addException.scss
pages/tallyGoods/addException.vue
pages/tallyGoods/exceptionSelect.vue
util/api.js
assets/css/tallyGoods/addException.scss
View file @
a362a992
...
@@ -82,6 +82,10 @@
...
@@ -82,6 +82,10 @@
font-size
:
21rpx
;
font-size
:
21rpx
;
color
:
#9ca8ad
;
color
:
#9ca8ad
;
}
}
.uni-input-box
{
font-size
:
24rpx
;
color
:
#1e2021
;
}
}
}
.tab
{
.tab
{
.tab-panel
{
.tab-panel
{
...
...
pages/tallyGoods/addException.vue
View file @
a362a992
...
@@ -10,38 +10,36 @@
...
@@ -10,38 +10,36 @@
<view
class=
"input-wrap row verCenter bothSide"
>
<view
class=
"input-wrap row verCenter bothSide"
>
<view
class=
"row verCenter"
>
<view
class=
"row verCenter"
>
<text
class=
"arrow"
></text>
<text
class=
"arrow"
></text>
<input
type=
"text"
@
input=
"
onInput()"
v-model=
"form
.erp_order_sn"
class=
"uni-input"
placeholder=
"请输入"
placeholder-style=
"color:#404547;font-weight:bold;"
/>
<input
type=
"text"
@
input=
"
handleInput($event)"
v-model=
"formParams
.erp_order_sn"
class=
"uni-input"
placeholder=
"请输入"
placeholder-style=
"color:#404547;font-weight:bold;"
/>
</view>
</view>
</view>
</view>
</view>
</view>
<navigator
class=
"box row bothSide verCenter"
url=
"/pages/tallyGoods/exceptionSelect
"
hover-class=
"none"
>
<navigator
class=
"box row bothSide verCenter"
:url=
"'/pages/tallyGoods/exceptionSelect?erp_order_sn='+formParams.erp_order_sn
"
hover-class=
"none"
>
<text
class=
"label"
>
异常类型(必填)
</text>
<text
class=
"label"
>
异常类型(必填)
</text>
<view
class=
"input-wrap-width row bothSide verCenter"
>
<view
class=
"input-wrap-width row bothSide verCenter"
>
<text
class=
"text"
>
请选择
</text>
<text
class=
"text"
>
请选择
</text>
<text
class=
"iconfont icon-sanjiaoxing2"
></text>
<text
class=
"iconfont icon-sanjiaoxing2"
></text>
</view>
</view>
</navigator>
</navigator>
<navigator
class=
"box row bothSide verCenter"
url=
"/pages/tallyGoods/exceptionSelect
"
hover-class=
"none"
>
<navigator
class=
"box row bothSide verCenter"
:url=
"'/pages/tallyGoods/exceptionSelect?erp_order_sn='+formParams.erp_order_sn
"
hover-class=
"none"
>
<text
class=
"label"
>
异常型号
</text>
<text
class=
"label"
>
异常型号
</text>
<view
class=
"input-wrap-width row bothSide verCenter"
>
<view
class=
"input-wrap-width row bothSide verCenter"
>
<text
class=
"text"
>
请选择
</text>
<text
class=
"text"
>
请选择
</text>
<text
class=
"iconfont icon-sanjiaoxing2"
></text>
<text
class=
"iconfont icon-sanjiaoxing2"
></text>
</view>
</view>
</navigator>
</navigator>
<
navigator
class=
"box row bothSide verCenter"
url=
"/pages/tallyGoods/exceptionSelect"
hover-class=
"none"
>
<
view
class=
"box row bothSide verCenter"
url=
"/pages/tallyGoods/exceptionSelect"
hover-class=
"none"
>
<text
class=
"label"
>
下单数据
</text>
<text
class=
"label"
>
下单数据
</text>
<view
class=
"input-wrap-width row bothSide verCenter"
>
<view
class=
"input-wrap-width row verCenter"
style=
"text-align: right;"
>
<text
class=
"text"
>
请选择
</text>
<input
type=
"text"
class=
"uni-input-box"
placeholder=
"不可编辑"
placeholder-style=
"color:#919399"
disabled=
""
/>
<text
class=
"iconfont icon-sanjiaoxing2"
></text>
</view>
</view>
</
navigator
>
</
view
>
<
navigator
class=
"box row bothSide verCenter"
url=
"/pages/tallyGoods/exceptionSelect"
hover-class=
"none"
>
<
view
class=
"box row bothSide verCenter"
url=
"/pages/tallyGoods/exceptionSelect"
hover-class=
"none"
>
<text
class=
"label"
>
仓库实到数据
</text>
<text
class=
"label"
>
仓库实到数据
</text>
<view
class=
"input-wrap-width row bothSide verCenter"
>
<view
class=
"input-wrap-width row verCenter"
style=
"text-align: right;"
>
<text
class=
"text"
>
请选择
</text>
<input
type=
"text"
class=
"uni-input-box"
placeholder=
"请输入"
placeholder-style=
"color:#919399"
/>
<text
class=
"iconfont icon-sanjiaoxing2"
></text>
</view>
</view>
</
navigator
>
</
view
>
<view
class=
"upload-box"
>
<view
class=
"upload-box"
>
<view
class=
"title row bothSide verCenter"
>
<view
class=
"title row bothSide verCenter"
>
<view
class=
"tt-l row verCenter"
>
<view
class=
"tt-l row verCenter"
>
...
@@ -68,7 +66,7 @@
...
@@ -68,7 +66,7 @@
<
script
>
<
script
>
import
{
API
}
from
'@/util/api.js'
;
import
{
API
}
from
'@/util/api.js'
;
import
{
titleCase
}
from
'@/util/util.js
'
;
import
debounce
from
'lodash/debounce
'
;
export
default
{
export
default
{
data
()
{
data
()
{
...
@@ -76,7 +74,7 @@
...
@@ -76,7 +74,7 @@
noexebshowFalg
:
true
,
//控制是否会触发生命周期
noexebshowFalg
:
true
,
//控制是否会触发生命周期
maxNum
:
5
,
//最大上传图片数量
maxNum
:
5
,
//最大上传图片数量
image_list
:
[],
//图片列表
image_list
:
[],
//图片列表
form
:
{
form
Params
:
{
erp_order_sn
:
''
,
//入仓号
erp_order_sn
:
''
,
//入仓号
pur_pic
:
''
//采购单上传
pur_pic
:
''
//采购单上传
}
}
...
@@ -87,7 +85,7 @@
...
@@ -87,7 +85,7 @@
if
(
arr
.
length
>
0
)
{
if
(
arr
.
length
>
0
)
{
this
.
form
.
pur_pic
=
arr
.
join
(
','
);
this
.
form
.
pur_pic
=
arr
.
join
(
','
);
}
else
{
}
else
{
this
.
form
.
pur_pic
=
''
;
this
.
form
Params
.
pur_pic
=
''
;
}
}
}
}
},
},
...
@@ -99,6 +97,15 @@
...
@@ -99,6 +97,15 @@
},
},
methods
:
{
methods
:
{
/**
/**
* 单号搜索
* @param {Object} event
*/
handleInput
:
debounce
(
function
(
event
)
{
this
.
resetChange
();
var
val
=
event
.
target
.
value
;
this
.
formParams
.
erp_order_sn
=
val
;
},
800
),
/**
* 扫描二维码
* 扫描二维码
*/
*/
scanChange
()
{
scanChange
()
{
...
@@ -106,7 +113,7 @@
...
@@ -106,7 +113,7 @@
success
:
res
=>
{
success
:
res
=>
{
console
.
log
(
res
);
console
.
log
(
res
);
if
(
res
.
errMsg
==
'scanCode:ok'
)
{
if
(
res
.
errMsg
==
'scanCode:ok'
)
{
this
.
form
.
erp_order_sn
=
res
.
result
;
this
.
form
Params
.
erp_order_sn
=
res
.
result
;
}
}
},
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
...
@@ -216,11 +223,32 @@
...
@@ -216,11 +223,32 @@
});
});
},
},
/**
/**
* 重置
*/
resetChange
()
{
},
/**
* 获取入仓号对应的型号列表
*/
getErpOrderSnOrderGoodsSn
()
{
this
.
request
(
API
.
getErpOrderSnOrderGoodsSn
,
'GET'
,
{
erp_order_sn
:
this
.
formParams
.
erp_order_sn
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
},
/**
* @param {Object}
* @param {Object}
* 提交
* 提交
*/
*/
submit
()
{
submit
()
{
this
.
request
(
API
.
submitTallyGoods
,
'POST'
,
this
.
form
,
true
).
then
(
res
=>
{
this
.
request
(
API
.
submitTallyGoods
,
'POST'
,
this
.
form
Params
,
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
uni
.
showModal
({
uni
.
showModal
({
title
:
'提示'
,
title
:
'提示'
,
...
...
pages/tallyGoods/exceptionSelect.vue
View file @
a362a992
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
<text
class=
"t2"
>
请选择异常类型
</text>
<text
class=
"t2"
>
请选择异常类型
</text>
</view>
</view>
<view
class=
"pick-list row bothSide verCenter"
>
<view
class=
"pick-list row bothSide verCenter"
>
<picker
@
change=
"bindPickerChange($event, 1)"
:value=
"
index"
:range=
"arr"
style=
"width: 80%;"
>
<picker
@
change=
"bindPickerChange($event, 1)"
:value=
"
allExceptionV2Index"
:range=
"allExceptionV2"
range-key=
'name'
style=
"width: 80%;"
>
<view
class=
"uni-text"
>
{{
a
rr
[
index
]
||
'请选择异常类型'
}}
</view>
<view
class=
"uni-text"
>
{{
a
llExceptionV2
[
allExceptionV2Index
].
name
||
'请选择异常类型'
}}
</view>
</picker>
</picker>
<text
class=
"iconfont icon-sanjiaoxing1"
></text>
<text
class=
"iconfont icon-sanjiaoxing1"
></text>
</view>
</view>
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
<text
class=
"t2"
>
请选择异常型号
</text>
<text
class=
"t2"
>
请选择异常型号
</text>
</view>
</view>
<view
class=
"pick-list row bothSide verCenter"
>
<view
class=
"pick-list row bothSide verCenter"
>
<picker
@
change=
"bindPickerChange($event,
1)"
:value=
"index"
:range=
"arr"
style=
"width: 80%;"
>
<picker
@
change=
"bindPickerChange($event,
2)"
:value=
"erpOrderSnOrderGoodsSnIndex"
:range=
"erpOrderSnOrderGoodsSn"
range-key=
'name'
style=
"width: 80%;"
>
<view
class=
"uni-text"
>
{{
arr
[
index
]
||
'请选择异常型号'
}}
</view>
<view
class=
"uni-text"
>
{{
erpOrderSnOrderGoodsSn
[
erpOrderSnOrderGoodsSnIndex
].
name
||
'请选择异常型号'
}}
</view>
</picker>
</picker>
<text
class=
"iconfont icon-sanjiaoxing1"
></text>
<text
class=
"iconfont icon-sanjiaoxing1"
></text>
</view>
</view>
...
@@ -36,40 +36,80 @@
...
@@ -36,40 +36,80 @@
<
script
>
<
script
>
import
{
API
}
from
'@/util/api.js'
;
import
{
API
}
from
'@/util/api.js'
;
import
{
createArray
}
from
'@/util/util.js'
;
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
erp_order_sn
:
'
B1206'
,
erp_order_sn
:
'
'
,
//入仓号,携带过来的
index
:
1
,
index
:
1
,
allExceptionV2
:
[],
//异常类型集合
allExceptionV2Index
:
-
1
,
erpOrderSnOrderGoodsSn
:
''
,
//异常型号集合
erpOrderSnOrderGoodsSnIndex
:
-
1
,
arr
:
[
'型号异常'
,
'品牌异常'
]
arr
:
[
'型号异常'
,
'品牌异常'
]
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
erp_order_sn
=
options
.
erp_order_sn
||
''
;
this
.
erp_order_sn
=
options
.
erp_order_sn
||
''
;
// 从本地缓存中获取数据
if
(
!
options
.
erp_order_sn
)
{
const
dataFromSourcePage
=
uni
.
getStorageSync
(
'paramsOrigin'
);
uni
.
showToast
({
title
:
'请填写入仓单号'
,
// 使用Object.assign()将dataFromSourcePage的属性合并到data中
icon
:
'none'
Object
.
assign
(
this
.
$data
,
dataFromSourcePage
);
});
},
setTimeout
(()
=>
{
onShow
()
{
uni
.
navigateBack
({
this
.
getData
();
delta
:
1
});
},
2000
)
}
else
{
this
.
getAllExceptionV2
();
this
.
getErpOrderSnOrderGoodsSn
();
}
},
},
methods
:
{
methods
:
{
bindPickerChange
:
function
(
e
,
type
)
{
bindPickerChange
:
function
(
e
,
type
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
target
.
value
);
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
target
.
value
);
if
(
type
==
1
)
{
if
(
type
==
1
)
{
this
.
index
=
e
.
target
.
value
;
this
.
allExceptionV2Index
=
e
.
target
.
value
;
}
else
if
(
type
==
2
)
{
this
.
erpOrderSnOrderGoodsSnIndex
=
e
.
target
.
value
;
}
}
},
},
getData
()
{
/**
this
.
request
(
API
.
getTallyGoods
,
'GET'
,
{
erp_order_sn
:
this
.
erp_order_sn
},
true
).
then
(
res
=>
{
* 获取所有异常
*/
getAllExceptionV2
()
{
this
.
request
(
API
.
getAllExceptionV2
,
'GET'
,
{},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
if
(
res
.
err_code
===
0
)
{
// 将对象转换为期望的数组格式
this
.
allExceptionV2
=
Object
.
entries
(
res
.
data
).
map
(([
key
,
value
])
=>
({
value
:
key
,
name
:
value
}));
}
else
{
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
});
},
/**
* 获取入仓号对应的型号列表
*/
getErpOrderSnOrderGoodsSn
()
{
this
.
request
(
API
.
getErpOrderSnOrderGoodsSn
,
'GET'
,
{
erp_order_sn
:
this
.
erp_order_sn
},
true
).
then
(
res
=>
{
if
(
res
.
err_code
===
0
)
{
// 将数组中的每个对象转换为指定格式
this
.
erpOrderSnOrderGoodsSn
=
res
.
data
.
map
(
item
=>
({
name
:
item
.
goods_type
,
value
:
item
.
order_goods_id
}));
}
else
{
uni
.
showToast
({
title
:
res
.
msg
,
icon
:
'none'
});
}
}
});
});
},
},
...
...
util/api.js
View file @
a362a992
...
@@ -216,7 +216,15 @@ const API = {
...
@@ -216,7 +216,15 @@ const API = {
/**
/**
* 问客列表
* 问客列表
*/
*/
askCustomerProblemListV2
:
API_BASE
+
'/supplywechatwms/askCustomerProblemListV2'
askCustomerProblemListV2
:
API_BASE
+
'/supplywechatwms/askCustomerProblemListV2'
,
/**
* 获取入仓号对应的型号列表
*/
getErpOrderSnOrderGoodsSn
:
API_BASE
+
'/supplywechatwms/getErpOrderSnOrderGoodsSn'
,
/**
* 获取所有异常
*/
getAllExceptionV2
:
API_BASE
+
'/supplywechatwms/getAllExceptionV2'
}
}
...
...
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