Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
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
99241393
authored
Sep 26, 2022
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
订单追踪/已采购订单:生成发货单无事件触发
parent
7ffb2665
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
147 additions
and
138 deletions
src/views/OrderTrack/goods.vue
src/views/OrderTrack/goods.vue
View file @
99241393
...
...
@@ -3,12 +3,10 @@
<div
class=
"goods-con"
>
<el-form
:inline=
"true"
:model=
"formInline"
label-width=
"80px"
ref=
"formInline"
>
<el-form-item
label=
"型号"
prop=
"goods_name"
>
<el-autocomplete
v-model=
"formInline.goods_name"
:trigger-on-focus=
"false"
@
keyup
.
enter
.
native=
"onSubmit"
:fetch-suggestions=
"querySearchAsync"
placeholder=
"请输入型号"
clearable
></el-autocomplete>
<el-autocomplete
v-model=
"formInline.goods_name"
:trigger-on-focus=
"false"
@
keyup
.
enter
.
native=
"onSubmit"
:fetch-suggestions=
"querySearchAsync"
placeholder=
"请输入型号"
clearable
></el-autocomplete>
</el-form-item>
<el-form-item
label=
"品牌"
prop=
"brand_name"
>
<el-autocomplete
v-model=
"formInline.brand_name"
:trigger-on-focus=
"false"
@
keyup
.
enter
.
native=
"onSubmit"
:fetch-suggestions=
"querySearchAsyncBrand"
placeholder=
"请输入品牌"
clearable
></el-autocomplete>
<el-autocomplete
v-model=
"formInline.brand_name"
:trigger-on-focus=
"false"
@
keyup
.
enter
.
native=
"onSubmit"
:fetch-suggestions=
"querySearchAsyncBrand"
placeholder=
"请输入品牌"
clearable
></el-autocomplete>
</el-form-item>
<el-form-item
label=
"订单状态"
prop=
"status"
>
<el-select
v-model=
"formInline.status"
placeholder=
"请选择"
>
...
...
@@ -55,9 +53,9 @@
<div
class=
"data-box th-all"
v-if=
"tableData"
>
<el-table
:data=
"tableData"
border
max-height=
"600"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
fixed
type=
"selection"
width=
"37"
></el-table-column>
<el-table-column
label=
"订货公司"
min-width=
"150"
>
<template
slot-scope=
"scope"
>
<a
:href=
"'/#/orderTrackGoodsDetail?purchase_id='+scope.row.purchase_id"
class=
"f-blue"
>
{{
scope
.
row
.
company_name
}}
</a>
<el-table-column
label=
"订货公司"
min-width=
"150"
>
<template
slot-scope=
"scope"
>
<a
:href=
"'/#/orderTrackGoodsDetail?purchase_id='+scope.row.purchase_id"
class=
"f-blue"
>
{{
scope
.
row
.
company_name
}}
</a>
</
template
>
</el-table-column>
<el-table-column
prop=
"status_val"
label=
"订单状态"
min-width=
"80"
></el-table-column>
...
...
@@ -70,152 +68,162 @@
<el-table-column
prop=
"source_type"
label=
"订单来源"
width=
"100"
></el-table-column>
<el-table-column
prop=
"create_time"
label=
"创建时间"
min-width=
"150"
></el-table-column>
</el-table>
<el-pagination
layout=
"total, sizes, prev, pager, next, jumper"
:page-sizes=
"[10, 20, 50, 100, 200]"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page"
>
</el-pagination>
<el-pagination
layout=
"total, sizes, prev, pager, next, jumper"
:page-sizes=
"[10, 20, 50, 100, 200]"
:total=
"total"
@
size-change=
"handleSizeChange"
@
current-change=
"handleCurrentChange"
:current-page=
"page"
>
</el-pagination>
</div>
</div>
<Menu
/>
<Menu/>
</section>
</template>
<
script
>
import
Vue
from
'vue'
;
import
Menu
from
"@/components/menu.vue"
;
import
{
Form
,
FormItem
,
Select
,
Option
,
Input
,
Button
,
Table
,
TableColumn
,
Message
,
Dialog
,
Pagination
,
Autocomplete
,
Cascader
,
DatePicker
}
from
'element-ui'
import
Vue
from
'vue'
;
import
Menu
from
"@/components/menu.vue"
;
import
{
Autocomplete
,
Button
,
Cascader
,
DatePicker
,
Dialog
,
Form
,
FormItem
,
Input
,
Message
,
Option
,
Pagination
,
Select
,
Table
,
TableColumn
}
from
'element-ui'
Vue
.
prototype
.
$message
=
Message
;
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Pagination
);
Vue
.
use
(
TableColumn
).
use
(
Table
).
use
(
Cascader
).
use
(
Autocomplete
).
use
(
DatePicker
);
export
default
{
name
:
"orderTrackGoods"
,
data
()
{
return
{
total
:
0
,
limit
:
10
,
page
:
1
,
formInline
:
{
goods_name
:
''
,
brand_name
:
''
,
shipping_status
:
''
,
status
:
''
,
pay_status
:
''
,
quote_sn
:
''
,
source_type
:
''
,
},
tableData
:
""
,
multipleSelection
:[]
};
},
created
()
{
this
.
getData
();
},
computed
:
{},
methods
:
{
getData
()
{
this
.
$http
(
'post'
,
"/api/purchase/getPurchaseList"
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
brand_name
:
this
.
formInline
.
brand_name
,
goods_name
:
this
.
formInline
.
goods_name
,
shipping_status
:
this
.
formInline
.
shipping_status
,
status
:
this
.
formInline
.
status
,
pay_status
:
this
.
formInline
.
pay_status
,
quote_sn
:
this
.
formInline
.
quote_sn
,
source_type
:
this
.
formInline
.
source_type
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
total
=
Number
(
res
.
data
.
total
)
||
0
;
}
else
{
this
.
$message
({
message
:
res
.
msg
,
type
:
"error"
});
}
})
},
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getData
();
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
handleSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
getData
();
},
submit
()
{
this
.
page
=
1
;
this
.
getData
();
Vue
.
prototype
.
$message
=
Message
;
Vue
.
use
(
Button
).
use
(
Form
).
use
(
Select
).
use
(
Option
).
use
(
Input
).
use
(
FormItem
).
use
(
Dialog
).
use
(
Pagination
);
Vue
.
use
(
TableColumn
).
use
(
Table
).
use
(
Cascader
).
use
(
Autocomplete
).
use
(
DatePicker
);
export
default
{
name
:
"orderTrackGoods"
,
data
()
{
return
{
total
:
0
,
limit
:
10
,
page
:
1
,
formInline
:
{
goods_name
:
''
,
brand_name
:
''
,
shipping_status
:
''
,
status
:
''
,
pay_status
:
''
,
quote_sn
:
''
,
source_type
:
''
,
},
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
},
//生成发货单
addSend
()
{
if
(
this
.
multipleSelection
.
length
!=
1
)
{
tableData
:
""
,
multipleSelection
:
[]
};
},
created
()
{
this
.
getData
();
},
computed
:
{},
methods
:
{
getData
()
{
this
.
$http
(
'post'
,
"/api/purchase/getPurchaseList"
,
{
page
:
this
.
page
,
limit
:
this
.
limit
,
brand_name
:
this
.
formInline
.
brand_name
,
goods_name
:
this
.
formInline
.
goods_name
,
shipping_status
:
this
.
formInline
.
shipping_status
,
status
:
this
.
formInline
.
status
,
pay_status
:
this
.
formInline
.
pay_status
,
quote_sn
:
this
.
formInline
.
quote_sn
,
source_type
:
this
.
formInline
.
source_type
,
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
this
.
tableData
=
res
.
data
.
list
||
[];
this
.
total
=
Number
(
res
.
data
.
total
)
||
0
;
}
else
{
this
.
$message
({
message
:
"请选择一条数据进行操作"
,
type
:
'warning'
message
:
res
.
msg
,
type
:
"error"
});
return
}
this
.
$router
.
push
({
path
:
"/OrderTrackPurAdd"
,
query
:
{
purchase_id
:
this
.
multipleSelection
[
0
].
purchase_id
}
})
},
//型号
querySearchAsync
(
queryString
,
cb
)
{
this
.
$http
(
'get'
,
"/api/search/getspu"
,
{
spu_name
:
queryString
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
data
.
list
.
length
>
0
)
{
var
arrlist_
=
res
.
data
.
list
||
[];
var
arr_
=
[]
for
(
var
i
=
0
;
i
<
arrlist_
.
length
;
i
++
)
{
arr_
.
push
({
value
:
arrlist_
[
i
][
'spu_name'
]
})
}
cb
(
arr_
);
}
else
{
cb
([]);
})
},
handleCurrentChange
(
val
)
{
this
.
page
=
val
;
this
.
getData
();
},
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
;
},
handleSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
getData
();
},
submit
()
{
this
.
page
=
1
;
this
.
getData
();
},
resetForm
(
formName
)
{
this
.
$refs
[
formName
].
resetFields
();
},
//生成发货单
addSend
()
{
if
(
this
.
multipleSelection
.
length
!=
1
)
{
this
.
$message
({
message
:
"请选择一条数据进行操作"
,
type
:
'warning'
});
return
false
;
}
if
(
this
.
multipleSelection
[
0
].
shipping_status_val
!=
'待发货'
)
{
this
.
$message
({
message
:
"请选择待发货数据进行操作"
,
type
:
'warning'
});
return
false
;
}
this
.
$router
.
push
({
path
:
"/OrderTrackPurAdd"
,
query
:
{
purchase_id
:
this
.
multipleSelection
[
0
].
purchase_id
}
})
},
//型号
querySearchAsync
(
queryString
,
cb
)
{
this
.
$http
(
'get'
,
"/api/search/getspu"
,
{
spu_name
:
queryString
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
data
.
list
.
length
>
0
)
{
var
arrlist_
=
res
.
data
.
list
||
[];
var
arr_
=
[]
for
(
var
i
=
0
;
i
<
arrlist_
.
length
;
i
++
)
{
arr_
.
push
({
value
:
arrlist_
[
i
][
'spu_name'
]
})
}
cb
(
arr_
);
}
else
{
cb
([]);
}
})
},
//品牌
querySearchAsyncBrand
(
queryString
,
cb
)
{
this
.
$http
(
'get'
,
"/api/brand/get_stand_brand"
,
{
brand
:
queryString
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
data
.
list
.
length
>
0
)
{
var
arrlist_
=
res
.
data
.
list
||
[];
var
arr_
=
[]
for
(
var
i
=
0
;
i
<
arrlist_
.
length
;
i
++
)
{
arr_
.
push
({
value
:
arrlist_
[
i
]
})
}
cb
(
arr_
);
}
else
{
cb
([]);
}
})
},
//品牌
querySearchAsyncBrand
(
queryString
,
cb
)
{
this
.
$http
(
'get'
,
"/api/brand/get_stand_brand"
,
{
brand
:
queryString
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
data
.
list
.
length
>
0
)
{
var
arrlist_
=
res
.
data
.
list
||
[];
var
arr_
=
[]
for
(
var
i
=
0
;
i
<
arrlist_
.
length
;
i
++
)
{
arr_
.
push
({
value
:
arrlist_
[
i
]
})
}
cb
(
arr_
);
}
else
{
cb
([]);
}
}
)
}
,
}
}
)
},
components
:
{
Menu
}
};
},
components
:
{
Menu
}
};
</
script
>
<
style
scoped
>
@import
"../../assets/css/goods/goods.min.css"
;
@import
"../../assets/css/goods/goods.min.css"
;
</
style
>
\ No newline at end of file
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