Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
胡宝山
template_vue
Commits
3dc5df49
Commit
3dc5df49
authored
Aug 08, 2024
by
hubaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
材料
parent
1d220fc8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
268 additions
and
52 deletions
+268
-52
wcpOrder.js
src/api/wcpOrder.js
+22
-1
wcpOrderList.js
src/api/wcpOrderList.js
+68
-0
wcporder.vue
src/views/template/wcporder.vue
+178
-51
No files found.
src/api/wcpOrder.js
View file @
3dc5df49
...
@@ -19,6 +19,13 @@ export function listWcpOrder(query) {
...
@@ -19,6 +19,13 @@ export function listWcpOrder(query) {
params
:
query
params
:
query
})
})
}
}
export
function
listWcpOrderPd
(
businessId
)
{
return
request
({
url
:
'/wcporderlistpd/detail/'
+
businessId
,
method
:
'get'
})
}
export
function
getWcpOrderId
(
query
)
{
export
function
getWcpOrderId
(
query
)
{
return
request
({
return
request
({
url
:
'/wcporderlist/detailId/'
,
url
:
'/wcporderlist/detailId/'
,
...
@@ -26,6 +33,7 @@ export function getWcpOrderId(query) {
...
@@ -26,6 +33,7 @@ export function getWcpOrderId(query) {
params
:
query
params
:
query
})
})
}
}
// 2. 查询order详细信息
// 2. 查询order详细信息
export
function
getWcpOrder
(
businessId
)
{
export
function
getWcpOrder
(
businessId
)
{
return
request
({
return
request
({
...
@@ -44,6 +52,14 @@ export function addWcpOrder(data) {
...
@@ -44,6 +52,14 @@ export function addWcpOrder(data) {
})
})
}
}
export
function
wcpOrderPd
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/wcporderlistpd/batchAdd'
,
method
:
'post'
,
data
})
}
// 4. 修改order
// 4. 修改order
export
function
updateWcpOrder
(
data
)
{
export
function
updateWcpOrder
(
data
)
{
const
businessId
=
data
.
businessId
const
businessId
=
data
.
businessId
...
@@ -62,7 +78,12 @@ export function delWcpOrder(businessId) {
...
@@ -62,7 +78,12 @@ export function delWcpOrder(businessId) {
method
:
'delete'
method
:
'delete'
})
})
}
}
export
function
wcpOrderEndPd
(
businessId
)
{
return
request
({
url
:
'/wcporderlistpd/delete/'
+
businessId
,
method
:
'delete'
})
}
// 6. 导出order
// 6. 导出order
export
function
exportWcpOrder
(
query
)
{
export
function
exportWcpOrder
(
query
)
{
return
request
({
return
request
({
...
...
src/api/wcpOrderList.js
0 → 100644
View file @
3dc5df49
import
request
from
'@/utils/request'
import
Qs
from
'qs'
/**
* 1. 列表查询
* 2. 查询详细信息
* 3. 新增
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
*/
// 1. 查询order列表
export
function
listWcpOrderList
(
query
)
{
return
request
({
url
:
'/wcporderlist/list'
,
method
:
'get'
,
params
:
query
})
}
// 2. 查询order详细信息
export
function
getWcpOrderList
(
businessId
)
{
return
request
({
url
:
'/wcporderlist/detail/'
+
businessId
,
method
:
'get'
})
}
// 3. 新增order
export
function
addWcpOrderList
(
data
)
{
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/wcporderlist/add'
,
method
:
'post'
,
data
:
data
})
}
// 4. 修改order
export
function
updateWcpOrderList
(
data
)
{
const
businessId
=
data
.
businessId
data
=
Qs
.
stringify
(
data
)
return
request
({
url
:
'/wcporderlist/update/'
+
businessId
,
method
:
'put'
,
data
})
}
// 5. 逻辑删除order
export
function
delWcpOrderList
(
businessId
)
{
return
request
({
url
:
'/wcporderlist/deleteLogical/'
+
businessId
,
method
:
'delete'
})
}
// 6. 导出order
export
function
exportWcpOrderList
(
query
)
{
return
request
({
url
:
'/wcporderlist/export'
,
method
:
'get'
,
params
:
query
,
responseType
:
'blob'
})
}
src/views/template/wcporder.vue
View file @
3dc5df49
...
@@ -95,24 +95,24 @@
...
@@ -95,24 +95,24 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"200px"
>
<el-table-column
label=
"操作"
class-name=
"small-padding fixed-width"
width=
"200px"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<!--
<el-button-->
<!-- :class="commonField.updateClass"-->
<!-- :type="commonField.typeParent"-->
<!-- :size="commonField.size"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- >修改
</el-button>
-->
<el-button
:class=
"commonField.delClass"
:type=
"commonField.typeParent"
:size=
"commonField.size"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
<el-button
<el-button
type=
"text"
type=
"text"
size=
"mini"
size=
"mini"
@
click=
"handleDetail(scope.row)"
@
click=
"handleDetail(scope.row)"
>
详情
>
详情
</el-button>
</el-button>
<el-button
:class=
"commonField.updateClass"
:type=
"commonField.typeParent"
:size=
"commonField.size"
@
click=
"handlePd(scope.row)"
>
盘点
</el-button>
<el-button
:class=
"commonField.delClass"
:type=
"commonField.typeParent"
:size=
"commonField.size"
@
click=
"handleDelete(scope.row)"
>
删除
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -125,42 +125,31 @@
...
@@ -125,42 +125,31 @@
@
pagination=
"getList"
@
pagination=
"getList"
/>
/>
<!-- 添加或修改order配置对话框 -->
<!-- 盘点配置对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"500px"
append-to-body
>
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"80%"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
size=
"small"
label-width=
"90px"
>
<div
style=
"float: right"
>
<el-form-item
label=
"order sn"
prop=
"orderSn"
>
<el-button
<el-input
v-model
.
trim=
"form.orderSn"
show-word-limit
:maxlength=
"255"
placeholder=
"请输入order sn"
/>
style=
"padding: 8px 7px;"
</el-form-item>
:type=
"commonField.typePrimary"
<el-form-item
label=
"类型1,2,3"
prop=
"type"
>
:size=
"commonField.smallSize"
<el-input
v-model
.
trim=
"form.type"
show-word-limit
:maxlength=
"1"
placeholder=
"请输入类型1,2,3"
/>
:icon=
"addIcon"
</el-form-item>
@
click=
"handleStart"
<el-form-item
label=
"状态"
>
>
开始盘点
<el-radio-group
v-model=
"form.flag"
>
</el-button>
<el-radio
label=
"1"
>
启用
</el-radio>
<el-button
<el-radio
label=
"0"
>
停用
</el-radio>
style=
"padding: 8px 7px;"
</el-radio-group>
icon=
"el-icon-minus"
</el-form-item>
type=
"danger"
<el-form-item
label=
"备注"
prop=
"remarks"
>
:size=
"commonField.smallSize"
<el-input
v-model
.
trim=
"form.remarks"
maxlength=
"200"
show-word-limit
type=
"textarea"
placeholder=
"请输入内容"
/>
@
click=
"handleEnd"
</el-form-item>
>
结束盘点
</el-form>
</el-button>
<div
slot=
"footer"
class=
"dialog-footer"
>
<br>
<el-button
class=
"cancelBtn"
@
click=
"cancel"
>
取 消
</el-button>
<br>
<el-button
class=
"submitBtn"
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
</div>
</div>
</el-dialog>
<el-table
v-loading=
"loading"
border
:data=
"PdList"
>
<!--详情-->
<el-dialog
class=
"aboutSingleDetails"
:title=
"title"
:visible
.
sync=
"openDetails"
width=
"80%"
append-to-body
:close-on-click-modal=
"false"
>
<el-table
v-loading=
"loading"
border
:data=
"queryParamsNew.TempList"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
align=
"center"
/>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
align=
"center"
/>
<el-table-column
label=
"orderId"
prop=
"orderId"
:show-overflow-tooltip=
"true"
>
<el-table-column
v-if=
"false"
label=
"orderId"
prop=
"orderId"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
orderId
||
'-'
}}
{{
scope
.
row
.
orderId
||
'-'
}}
</
template
>
</
template
>
...
@@ -195,6 +184,90 @@
...
@@ -195,6 +184,90 @@
{{
scope
.
row
.
dest
||
'-'
}}
{{
scope
.
row
.
dest
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"quantity"
prop=
"quantity"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
quantity
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"amount"
prop=
"amount"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
amount
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"newWeight"
prop=
"newWeight"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
newWeight
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"crossWeight"
prop=
"crossWeight"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
crossWeight
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"m3"
prop=
"m3"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
m3
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"payTerms"
prop=
"payTerms"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
payTerms
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"shipment"
prop=
"shipment"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
.
shipment
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"subCode"
prop=
"subCode"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
subCode
||
'-'
}}
</
template
>
</el-table-column>
</el-table>
</el-dialog>
<!--详情-->
<el-dialog
class=
"aboutSingleDetails"
:title=
"title"
:visible
.
sync=
"openDetails"
width=
"80%"
append-to-body
:close-on-click-modal=
"false"
>
<el-table
v-loading=
"loading"
border
:data=
"queryParamsNew.TempList"
>
<el-table-column
type=
"index"
label=
"序号"
width=
"55"
align=
"center"
fixed
/>
<el-table-column
v-if=
"false"
label=
"orderId"
prop=
"orderId"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
orderId
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"custCode"
prop=
"custCode"
:show-overflow-tooltip=
"true"
fixed
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
custCode
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"cusrAbbr"
prop=
"cusrAbbr"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
cusrAbbr
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"dueDate"
prop=
"dueDate"
width=
"100"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
dueDate
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"packingList"
prop=
"packingList"
width=
"100"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
packingList
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"currency"
prop=
"currency"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
currency
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"dest"
prop=
"dest"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
dest
||
'-'
}}
</
template
>
</el-table-column>
<el-table-column
label=
"qty"
prop=
"qty"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"qty"
prop=
"qty"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
qty
||
'-'
}}
{{
scope
.
row
.
qty
||
'-'
}}
...
@@ -210,12 +283,12 @@
...
@@ -210,12 +283,12 @@
{{
scope
.
row
.
amount
||
'-'
}}
{{
scope
.
row
.
amount
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"newWeight"
prop=
"newWeight"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"newWeight"
prop=
"newWeight"
width=
"100"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
newWeight
||
'-'
}}
{{
scope
.
row
.
newWeight
||
'-'
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"crossWeight"
prop=
"crossWeight"
:show-overflow-tooltip=
"true"
>
<el-table-column
label=
"crossWeight"
prop=
"crossWeight"
width=
"100"
:show-overflow-tooltip=
"true"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
crossWeight
||
'-'
}}
{{
scope
.
row
.
crossWeight
||
'-'
}}
</
template
>
</
template
>
...
@@ -278,7 +351,7 @@
...
@@ -278,7 +351,7 @@
<em>
点击上传
</em>
<em>
点击上传
</em>
</div>
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
/>
<div
slot=
"tip"
class=
"el-upload__tip"
/>
<div
slot=
"tip"
class=
"el-upload__tip"
style=
"color:red"
>
提示:仅允许导入“xls
”或“xls
x”格式文件!
</div>
<div
slot=
"tip"
class=
"el-upload__tip"
style=
"color:red"
>
提示:仅允许导入“xlsx”格式文件!
</div>
</el-upload>
</el-upload>
</div>
</div>
</div>
</div>
...
@@ -299,7 +372,7 @@ import {
...
@@ -299,7 +372,7 @@ import {
delWcpOrder
,
delWcpOrder
,
addWcpOrder
,
addWcpOrder
,
updateWcpOrder
,
updateWcpOrder
,
exportWcpOrder
,
importExcel
,
getWcpOrderId
exportWcpOrder
,
importExcel
,
getWcpOrderId
,
wcpOrderPd
,
wcpOrderEndPd
,
listWcpOrderPd
}
from
'@/api/wcpOrder'
}
from
'@/api/wcpOrder'
import
commonField
from
'@/utils/commonField'
import
commonField
from
'@/utils/commonField'
import
{
getToken
}
from
'@/utils/auth'
import
{
getToken
}
from
'@/utils/auth'
...
@@ -308,6 +381,8 @@ export default {
...
@@ -308,6 +381,8 @@ export default {
name
:
'WcpOrder'
,
name
:
'WcpOrder'
,
data
()
{
data
()
{
return
{
return
{
addIcon
:
'el-icon-plus'
,
PdList
:
[],
openDetails
:
false
,
openDetails
:
false
,
TempList
:
[],
TempList
:
[],
singleDetails
:
{},
singleDetails
:
{},
...
@@ -371,6 +446,7 @@ export default {
...
@@ -371,6 +446,7 @@ export default {
rows
:
10
,
rows
:
10
,
TempList
:
[]
TempList
:
[]
},
},
businessId
:
''
,
id
:
''
,
id
:
''
,
// 表单参数
// 表单参数
form
:
{},
form
:
{},
...
@@ -395,7 +471,7 @@ export default {
...
@@ -395,7 +471,7 @@ export default {
},
},
created
()
{
created
()
{
this
.
getList
()
// 列表查询
this
.
getList
()
// 列表查询
this
.
handleDetail
()
//
this.handleDetail()
},
},
methods
:
{
methods
:
{
/** 查询order列表 */
/** 查询order列表 */
...
@@ -641,6 +717,57 @@ export default {
...
@@ -641,6 +717,57 @@ export default {
// rows: 10,
// rows: 10,
// TempList: []
// TempList: []
// }
// }
// this.openDetails = !this.openDetails
// this.queryParamsNew = {
// page: 1,
// rows: 10,
// TempList: []
// }
},
/** 盘点按钮操作 */
handlePd
(
row
)
{
const
id
=
row
.
businessId
this
.
reset
()
this
.
title
=
'盘点'
this
.
open
=
!
this
.
open
listWcpOrderPd
(
id
).
then
(
response
=>
{
this
.
PdList
=
response
.
data
})
console
.
log
(
row
.
businessId
)
this
.
businessId
=
row
.
businessId
},
handleStart
()
{
const
data
=
{
businessId
:
this
.
businessId
}
console
.
log
(
this
.
businessId
)
this
.
$confirm
(
'确认要开始盘点吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
wcpOrderPd
(
data
).
then
(
response
=>
{
this
.
PdList
=
response
.
data
this
.
$message
({
message
:
'开始盘点...'
,
type
:
'success'
})
})
}).
catch
(()
=>
{
this
.
message
({
message
:
'取消开始盘点'
,
type
:
'info'
})
})
},
handleEnd
()
{
const
id
=
this
.
businessId
this
.
$confirm
(
'确认要重新盘点吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
response
=>
{
wcpOrderEndPd
(
id
).
then
(
response
=>
{
this
.
$message
({
message
:
'盘点结束'
,
type
:
'success'
})
}).
catch
(
error
=>
{
console
.
error
(
'Error:'
,
error
)
})
})
}
}
}
}
}
}
...
...
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