Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-app-operator-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-app-operator-master
Commits
621e803c
Commit
621e803c
authored
Sep 10, 2022
by
dragondean@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善国际化
parent
35f4d3da
Changes
16
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
256 additions
and
239 deletions
+256
-239
index.vue
src/components/AreaSelector/index.vue
+3
-3
index.vue
src/components/CustomerContactSelector/index.vue
+4
-4
index.vue
src/components/CustomerContactsSelector/index.vue
+3
-3
index.vue
src/components/CustomerSelector/index.vue
+1
-1
index.vue
src/components/CustomersSelector/index.vue
+4
-4
index.vue
src/components/DictSelector/index.vue
+4
-3
index.vue
src/components/NeedKnow/index.vue
+1
-1
index.vue
src/components/ProductSelector/index.vue
+1
-1
index.vue
src/components/ProductsSelector/index.vue
+6
-6
index.vue
src/components/RoutersSelector/index.vue
+26
-17
index.vue
src/components/TableForm/index.vue
+3
-3
index.js
src/i18n/index.js
+3
-0
en_US.json
src/i18n/languages/en_US.json
+2
-1
edit.vue
src/views/ecw/order/edit.vue
+136
-136
edit.vue
src/views/ecw/productAttr/edit.vue
+15
-15
index.vue
src/views/ecw/productAttr/index.vue
+44
-41
No files found.
src/components/AreaSelector/index.vue
View file @
621e803c
<
template
>
<div>
<el-select
v-model=
"formData.country"
:disabled=
"readonly"
>
<el-option
v-for=
"(item) in treeList"
:value=
"item.id"
:label=
"
item.titleZh
"
:key=
"item.id"
/>
<el-option
v-for=
"(item) in treeList"
:value=
"item.id"
:label=
"
$l(item, 'title')
"
:key=
"item.id"
/>
</el-select>
<el-select
v-model=
"formData.province"
class=
"ml-10"
:disabled=
"readonly"
>
<el-option
v-for=
"(item) in provinceList"
:value=
"item.id"
:label=
"
item.titleZh
"
:key=
"item.id"
/>
<el-option
v-for=
"(item) in provinceList"
:value=
"item.id"
:label=
"
$l(item, 'title')
"
:key=
"item.id"
/>
</el-select>
<el-select
v-model=
"formData.city"
class=
"ml-10"
:disabled=
"readonly"
>
<el-option
v-for=
"(item) in cityList"
:value=
"item.id"
:label=
"
item.titleZh
"
:key=
"item.id"
/>
<el-option
v-for=
"(item) in cityList"
:value=
"item.id"
:label=
"
$l(item, 'title')
"
:key=
"item.id"
/>
</el-select>
</div>
</
template
>
...
...
src/components/CustomerContactSelector/index.vue
View file @
621e803c
...
...
@@ -6,7 +6,7 @@
clearable
remote
reserve-keyword
placeholder=
"请输入关键词
"
:placeholder=
"$t('请输入关键词')
"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
<el-option
...
...
@@ -16,7 +16,7 @@
:value="index">
</el-option>
</el-select>
<el-button
v-if=
"quickable"
type=
"text"
@
click=
"showQuickCreate=true"
class=
"ml-10"
>
快速新建
</el-button>
<el-button
v-if=
"quickable"
type=
"text"
@
click=
"showQuickCreate=true"
class=
"ml-10"
>
{{
$t
(
'
快速新建
'
)
}}
</el-button>
<!--
<quick-create
v-if=
"showQuickCreate"
@
success=
"onQuickCreateSuccess"
@
close=
"showQuickCreate=false"
:default=
"
{type}">
</quick-create>
-->
</div>
...
...
@@ -128,7 +128,7 @@ export default {
if
(
index
<
0
){
getCustomerContactsSelect
({
ids
:
this
.
value
}).
then
(
res
=>
{
if
(
!
res
.
data
||
!
res
.
data
.
length
){
return
this
.
$message
.
error
(
'
联系人信息获取失败
'
)
return
this
.
$message
.
error
(
this
.
$t
(
'
联系人信息获取失败
'
)
)
}
this
.
list
.
unshift
(
res
.
data
[
0
])
this
.
index
=
0
...
...
@@ -149,7 +149,7 @@ export default {
this
.
showQuickCreate
=
false
getCustomerContactsListByCustomer
({
customerId
:
id
}).
then
(
res
=>
{
if
(
!
res
.
data
||
!
res
.
data
.
length
){
return
this
.
$message
.
error
(
'
联系人信息获取失败
'
)
return
this
.
$message
.
error
(
this
.
$t
(
'
联系人信息获取失败
'
)
)
}
let
data
=
res
.
data
[
0
]
data
.
contactsName
=
data
.
name
// 字段名跟getCustomerContactsSelect对齐
...
...
src/components/CustomerContactsSelector/index.vue
View file @
621e803c
...
...
@@ -3,9 +3,9 @@
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
<el-input
v-model=
"queryParams.searchKey"
placeholder=
"用户名/手机/邮箱
"
style=
"width:200px"
/>
<el-input
v-model=
"queryParams.searchKey"
:placeholder=
"$t('用户名/手机/邮箱')
"
style=
"width:200px"
/>
<!--
<dict-selector
:type=
"DICT_TYPE.USER_TYPE"
v-model=
"queryParams.customerType"
style=
"width:100px"
/>
-->
<el-button
type=
"primary"
@
click=
"reLoad"
>
搜索
</el-button>
<el-button
type=
"primary"
@
click=
"reLoad"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
</div>
<div
class=
"list"
>
<template
v-for=
"item in list"
>
...
...
@@ -20,7 +20,7 @@
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
已选客户
{{$t('已选客户')}}
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in choosedList"
:key=
"item.customerContactsId"
>
...
...
src/components/CustomerSelector/index.vue
View file @
621e803c
...
...
@@ -5,7 +5,7 @@
clearable
remote
reserve-keyword
placeholder=
"请输入关键词
"
:placeholder=
"$t('请输入关键词')
"
:remote-method=
"remoteMethod"
:loading=
"loading"
>
<el-option
...
...
src/components/CustomersSelector/index.vue
View file @
621e803c
...
...
@@ -3,9 +3,9 @@
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
<el-input
v-model=
"queryParams.searchKey"
placeholder=
"用户名/手机/邮箱
"
style=
"width:200px"
/>
<el-input
v-model=
"queryParams.searchKey"
:placeholder=
"$t('用户名/手机/邮箱')
"
style=
"width:200px"
/>
<dict-selector
:type=
"DICT_TYPE.USER_TYPE"
v-model=
"queryParams.customerType"
style=
"width:100px"
/>
<el-button
type=
"primary"
@
click=
"reLoad"
>
搜索
</el-button>
<el-button
type=
"primary"
@
click=
"reLoad"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
...
...
@@ -18,7 +18,7 @@
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
已选客户
{{
$t
(
'
已选客户
'
)
}}
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in choosedList"
:key=
"item.id"
>
...
...
@@ -94,7 +94,7 @@ export default {
},
loadNextPage
(){
if
(
this
.
page
>=
this
.
pages
){
return
this
.
$message
.
error
(
'
已加载全部
'
)
return
this
.
$message
.
info
(
this
.
$t
(
'
已加载全部
'
)
)
}
this
.
queryParams
.
page
++
this
.
getList
()
...
...
src/components/DictSelector/index.vue
View file @
621e803c
...
...
@@ -2,13 +2,13 @@
<div
class=
"dict-selector"
>
<el-select
v-if=
"formType == 'select'"
v-model=
"valueSync"
:placeholder=
"placeholder"
clearable
:multiple=
"multiple"
:disabled=
"disabled"
@
change=
"val => $emit('change', val)"
>
<el-option
v-for=
"dict in formattedList"
:key=
"dict.value"
:label=
"
dict.label
"
:value=
"dict.value"
/>
:key=
"dict.value"
:label=
"
$l(dict, 'label')
"
:value=
"dict.value"
/>
</el-select>
<el-radio-group
v-if=
"formType == 'radio'"
v-model=
"valueSync"
:disabled=
"disabled"
>
<el-radio
v-for=
"dict in formattedList"
:label=
"dict.value"
:checked=
"valueSync === dict.value"
:key=
"dict.value"
>
{{
dict
.
label
}}
</el-radio>
<el-radio
v-for=
"dict in formattedList"
:label=
"dict.value"
:checked=
"valueSync === dict.value"
:key=
"dict.value"
>
{{
$l
(
dict
,
'
label
'
)
}}
</el-radio>
</el-radio-group>
<el-checkbox-group
v-if=
"formType == 'checkbox'"
v-model=
"valueSync"
:disabled=
"disabled"
>
<el-checkbox
v-for=
"dict in formattedList"
:label=
"dict.value"
:key=
"dict.value"
>
{{
dict
.
label
}}
</el-checkbox>
<el-checkbox
v-for=
"dict in formattedList"
:label=
"dict.value"
:key=
"dict.value"
>
{{
$l
(
dict
,
'
label
'
)
}}
</el-checkbox>
</el-checkbox-group>
</div>
</
template
>
...
...
@@ -68,6 +68,7 @@ export default {
this
.
dictList
.
forEach
(
item
=>
{
arr
.
push
({
label
:
item
.
label
,
labelEn
:
item
.
labelEn
,
value
:
this
.
format
(
item
.
value
),
cssClass
:
item
.
cssClass
,
colorType
:
item
.
colorType
...
...
src/components/NeedKnow/index.vue
View file @
621e803c
<
template
>
<div
class=
"need-know"
:id=
"'need-know_' + keyname"
v-if=
"detail"
>
<!--
<h2>
{{
detail
.
titleZh
}}
</h2>
-->
<div
class=
"body"
ref=
"body"
v-html=
"
detail.contentZh
"
></div>
<div
class=
"body"
ref=
"body"
v-html=
"
$l(detail, 'content')
"
></div>
</div>
</
template
>
<
script
>
...
...
src/components/ProductSelector/index.vue
View file @
621e803c
...
...
@@ -5,7 +5,7 @@
clearable
remote
reserve-keyword
placeholder=
"请输入商品关键词
"
:placeholder=
"$t('请输入商品关键词')
"
:disabled=
"disabled"
:remote-method=
"remoteMethod"
@
focus=
"remoteMethod()"
...
...
src/components/ProductsSelector/index.vue
View file @
621e803c
...
...
@@ -3,14 +3,14 @@
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
<el-select
v-model=
"queryParams.typeId"
placeholder=
"选择类型
"
style=
"width:120px"
clearable
>
<el-select
v-model=
"queryParams.typeId"
:placeholder=
"$t('选择类型')
"
style=
"width:120px"
clearable
>
<el-option
v-for=
"item in typeList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
<el-select
v-model=
"queryParams.attrId"
placeholder=
"选择属性
"
style=
"width:120px"
clearable
>
<el-select
v-model=
"queryParams.attrId"
:placeholder=
"$t('选择属性')
"
style=
"width:120px"
clearable
>
<el-option
v-for=
"item in attrList"
:key=
"item.id"
:label=
"item.attrName"
:value=
"item.id"
/>
</el-select>
<el-input
v-model=
"queryParams.titleZh"
placeholder=
"产品关键字
"
style=
"width:120px"
clearable
/>
<el-button
type=
"primary"
@
click=
"reLoad"
>
搜索
</el-button>
<el-input
v-model=
"queryParams.titleZh"
:placeholder=
"$t('产品关键字')
"
style=
"width:120px"
clearable
/>
<el-button
type=
"primary"
@
click=
"reLoad"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"item in list"
:key=
"item.id"
>
...
...
@@ -23,7 +23,7 @@
<el-col
:span=
"10"
>
<el-card>
<div
slot=
"header"
class=
"header"
>
已选产品
{{
$t
(
'
已选产品
'
)
}}
</div>
<div
class=
"list"
>
<div
class=
"item"
v-for=
"(choosed) in choosedList"
:key=
"choosed.id"
:data-data=
"JSON.stringify(choosed)"
>
...
...
@@ -99,7 +99,7 @@ export default {
},
loadNextPage
()
{
if
(
this
.
page
>=
this
.
pages
)
{
return
this
.
$message
.
error
(
'
已加载全部
'
)
return
this
.
$message
.
error
(
this
.
$t
(
'
已加载全部
'
)
)
}
this
.
queryParams
.
page
++
this
.
getList
()
...
...
src/components/RoutersSelector/index.vue
View file @
621e803c
<
template
>
<div>
<div
class=
"filters mb-10"
>
运输方式
<dict-selector
:type=
'DICT_TYPE.ECW_TRANSPORT_TYPE'
v-model=
"transportType"
placeholder=
"请选择运输方式
"
style=
"width:150px"
/>
{{
$t
(
'
运输方式
'
)
}}
<dict-selector
:type=
'DICT_TYPE.ECW_TRANSPORT_TYPE'
v-model=
"transportType"
:placeholder=
"$t('请选择运输方式')
"
style=
"width:150px"
/>
始发地
:
<el-select
placeholder=
"请选择始发地
"
v-model=
"exportCity"
clearable
>
{{
$t
(
'
始发地
'
)
}}
:
<el-select
:placeholder=
"$t('请选择始发地')
"
v-model=
"exportCity"
clearable
>
<el-option
v-for=
"item in exportCityList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
目的地
:
<el-select
placeholder=
"请选择目的地
"
v-model=
"importCity"
clearable
>
{{
$t
(
'
目的地
'
)
}}
:
<el-select
:placeholder=
"$t('请选择目的地')
"
v-model=
"importCity"
clearable
>
<el-option
v-for=
"item in importCityList"
:key=
"item.id"
:label=
"item.titleZh"
:value=
"item.id"
/>
</el-select>
出货渠道
:
<el-select
placeholder=
"请选择目渠道
"
v-model=
"channelId"
clearable
>
{{
$t
(
'
出货渠道
'
)
}}
:
<el-select
:placeholder=
"$t('请选择目渠道')
"
v-model=
"channelId"
clearable
>
<el-option
v-for=
"item in channelList"
:key=
"item.channelId"
:label=
"item.nameZh"
:value=
"item.channelId"
/>
</el-select>
</div>
<div
class=
"mb-10"
>
<el-radio-group
v-model=
"checkAll"
>
<el-radio
:label=
"true"
>
全选
</el-radio>
<el-radio
:label=
"false"
>
全不选
</el-radio>
<el-radio
:label=
"true"
>
{{
$t
(
'
全选
'
)
}}
</el-radio>
<el-radio
:label=
"false"
>
{{
$t
(
'
全不选
'
)
}}
</el-radio>
</el-radio-group>
</div>
<el-row
class=
""
:gutter=
"10"
>
...
...
@@ -30,19 +30,27 @@
<el-col
:span=
"12"
:key=
"item.value"
>
<el-card
class=
"mb-10"
>
<div
slot=
"header"
>
{{
item
.
label
}}
<el-link
type=
"primary"
@
click.native=
"toggleHide(item.value)"
style=
"float:right"
>
{{
item
.
_hide
?
'
展开
'
:
'
折叠
'
}}
</el-link>
{{
$l
(
item
,
'
label
'
)
}}
<el-link
type=
"primary"
@
click.native=
"toggleHide(item.value)"
style=
"float:right"
>
{{
item
.
_hide
?
$t
(
'
展开
'
)
:
$t
(
'
折叠
'
)
}}
</el-link>
</div>
<!--table需要给一个key,否则全选的时候不会自动更新渲染-->
<el-table
v-if=
"!hideMap[item.value]"
:data=
"item.routerList"
:span-method=
"SpanMethod"
border
:key=
"selectedRoutes.length + item.value"
>
<el-table-column
label=
"始发地"
prop=
"startTitleZh"
/>
<el-table-column
label=
"目的地"
prop=
"destTitleZh"
/>
<el-table-column
label=
"渠道"
prop=
"startTitleZh"
>
<el-table-column
:label=
"$t('始发地')"
prop=
"startTitleZh"
>
<template
slot-scope=
"
{row}">
{{
row
.
channel
.
nameZh
}}
{{
$l
(
row
,
'
startTitle
'
)
}}
</
template
>
</el-table-column>
<el-table-column
label=
"操作"
prop=
""
>
<el-table-column
:label=
"$t('目的地')"
prop=
"destTitleZh"
>
<
template
slot-scope=
"{row}"
>
{{
$l
(
row
,
'
destTitle
'
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('渠道')"
prop=
"startTitleZh"
>
<
template
slot-scope=
"{row}"
>
{{
$l
(
row
.
channel
,
'
name
'
)
}}
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('操作')"
prop=
""
>
<
template
slot-scope=
"{row}"
>
<el-checkbox
:checked=
"getSelectedIndex(row) > -1"
@
change=
"toggleChecker(row, $event)"
></el-checkbox>
</
template
>
...
...
@@ -130,6 +138,7 @@ export default {
let
child
=
{
label
:
item
.
label
,
labelEn
:
item
.
labelEn
,
value
:
item
.
value
,
_hide
:
false
,
// 是否折叠
routerList
:
routerList
...
...
src/components/TableForm/index.vue
View file @
621e803c
...
...
@@ -5,7 +5,7 @@
<el-button
size=
"mini"
type=
"primary"
icon=
"el-icon-plus"
@
click=
"listData.push(
{})">
</el-button>
</div>
<el-table
:data=
"listData"
border
>
<el-table-column
label=
"序号
"
width=
"90px"
>
<el-table-column
:label=
"$t('序号')
"
width=
"90px"
>
<template
slot-scope=
"scope"
>
{{
scope
.
$index
+
1
}}
</
template
>
...
...
@@ -22,7 +22,7 @@
<el-input v-model="row.job" />
</template>
</el-table-column> -->
<el-table-column
label=
"操作
"
>
<el-table-column
:label=
"$t('操作')
"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
@
click=
"del(scope.$index)"
></el-button>
</
template
>
...
...
@@ -66,7 +66,7 @@ export default {
},
methods
:{
del
(
index
){
this
.
$confirm
(
'
确定删除此行?
'
)
this
.
$confirm
(
this
.
$t
(
'
确定删除此行?
'
)
)
.
then
(
res
=>
{
this
.
listData
.
splice
(
index
,
1
)
})
...
...
src/i18n/index.js
View file @
621e803c
...
...
@@ -15,6 +15,9 @@ console.log({i18n})
Vue
.
prototype
.
$l
=
(
object
,
field
)
=>
{
let
prefix
=
i18n
.
locale
.
split
(
'
_
'
)[
0
]
let
append
=
prefix
.
charAt
(
0
).
toUpperCase
()
+
prefix
.
toLowerCase
().
substr
(
1
)
// 如果object是null则返回字段名
if
(
!
object
)
return
field
+
append
return
object
[
field
+
append
]
||
object
[
field
]
}
/* Vue.filter('$t', Vue.$i18n)
...
...
src/i18n/languages/en_US.json
View file @
621e803c
...
...
@@ -5,5 +5,6 @@
"编号"
:
"No"
,
"新增"
:
"Create"
,
"搜索"
:
"Search"
,
"重置"
:
"Reset"
"重置"
:
"Reset"
,
"新建订单"
:
"New Order"
}
\ No newline at end of file
src/views/ecw/order/edit.vue
View file @
621e803c
This diff is collapsed.
Click to expand it.
src/views/ecw/productAttr/edit.vue
View file @
621e803c
...
...
@@ -2,44 +2,44 @@
<div
class=
"app-container"
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"适用商品
"
prop=
"idList"
>
<el-form-item
:label=
"$t('适用商品')
"
prop=
"idList"
>
<products-selector
:defaultIds=
"form.idList"
v-model=
"form.idList"
/>
</el-form-item>
<el-form-item
label=
"货柜位置
"
prop=
"containerLocation"
>
<el-form-item
:label=
"$t('货柜位置')
"
prop=
"containerLocation"
>
<dict-selector
:type=
"DICT_TYPE.ECW_CONTAINER_LOCATION"
v-model=
"form.containerLocation"
/>
</el-form-item>
<el-form-item
label=
"出运要求
"
prop=
"requirements"
>
<el-checkbox
true-label=
"1"
v-model=
"form.requirements"
>
证书要求(支持多证书)
</el-checkbox>
<el-form-item
:label=
"$t('出运要求')
"
prop=
"requirements"
>
<el-checkbox
true-label=
"1"
v-model=
"form.requirements"
>
{{
$t
(
'
证书要求(支持多证书)
'
)
}}
</el-checkbox>
</el-form-item>
<el-form-item
label=
"订单方数上限
"
prop=
"square"
>
<el-form-item
:label=
"$t('订单方数上限')
"
prop=
"square"
>
<el-input
v-model=
"form.square"
placeholder=
""
class=
"w-200"
></el-input>
</el-form-item>
<el-form-item
label=
"包装要求
"
prop=
"packaging"
>
<el-form-item
:label=
"$t('包装要求')
"
prop=
"packaging"
>
<dict-selector
:type=
"DICT_TYPE.ECW_PACKAGING_TYPE"
v-model=
"form.packaging"
/>
</el-form-item>
<el-form-item
label=
"是否预约入仓
"
prop=
"needBook"
>
<el-form-item
:label=
"$t('是否预约入仓')
"
prop=
"needBook"
>
<dict-selector
formatter=
"bool"
form-type=
"radio"
:type=
"DICT_TYPE.ECW_YESNO"
v-model=
"form.needBook"
:formater=
"Boolean"
/>
</el-form-item>
<el-form-item
label=
"每日入仓上限
"
prop=
"dayLimit"
v-if=
"form.needBook"
>
<el-form-item
:label=
"$t('每日入仓上限')
"
prop=
"dayLimit"
v-if=
"form.needBook"
>
<el-input
placeholder=
""
v-model=
"form.dayLimit"
class=
"w-200"
>
<template
slot=
"suffix"
>
立方米
</
template
>
<template
slot=
"suffix"
>
{{
$t
(
'
立方米
'
)
}}
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"商品特性
"
prop=
"attrId"
>
<el-form-item
:label=
"$t('商品特性')
"
prop=
"attrId"
>
<!-- <dict-selector form-type="checkbox" :type="DICT_TYPE.ECW_ORDER_ATTR" v-model="form.attrId" multiple /> -->
<el-checkbox-group
v-model=
"attrIds"
>
<el-checkbox
v-for=
"item in attrList"
:label=
"item.id"
:key=
"item.id"
>
{{item.attrName}}
</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item
label=
"商品材质
"
prop=
"materialType"
>
<el-form-item
:label=
"$t('商品材质')
"
prop=
"materialType"
>
<dict-selector
form-type=
"checkbox"
:type=
"DICT_TYPE.ECW_PRODUCT_MATERIAL"
v-model=
"form.materialType"
multiple
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"$router.back()"
>
返 回
</el-button>
<el-button
type=
"default"
@
click=
"reset"
>
重 置
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"$router.back()"
>
{{$t('返回')}}
</el-button>
<el-button
type=
"default"
@
click=
"reset"
>
{{$t('重置')}}
</el-button>
</el-form-item>
</el-form>
</div>
...
...
@@ -128,7 +128,7 @@ export default {
}
let
data
=
Object
.
assign
({},
this
.
form
)
batchUpdateProduct
(
data
).
then
((
response
)
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
)
);
this
.
$router
.
back
();
});
});
...
...
src/views/ecw/productAttr/index.vue
View file @
621e803c
...
...
@@ -3,13 +3,13 @@
<!-- 搜索工作栏 -->
<el-form
:model=
"queryParams"
ref=
"queryForm"
size=
"small"
:inline=
"true"
v-show=
"showSearch"
label-width=
"68px"
>
<el-form-item
label=
"关键字
"
prop=
"attrName"
>
<el-input
v-model=
"queryParams.attrName"
placeholder=
"请输入关键字
"
clearable
@
keyup.enter.native=
"handleQuery"
/>
<el-form-item
:label=
"$t('关键字')
"
prop=
"attrName"
>
<el-input
v-model=
"queryParams.attrName"
:placeholder=
"$t('请输入关键字')
"
clearable
@
keyup.enter.native=
"handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
搜索
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
重置
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleQuery"
>
{{
$t
(
'
搜索
'
)
}}
</el-button>
<el-button
icon=
"el-icon-refresh"
@
click=
"resetQuery"
>
{{
$t
(
'
重置
'
)
}}
</el-button>
</el-form-item>
</el-form>
...
...
@@ -17,7 +17,7 @@
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"primary"
plain
icon=
"el-icon-plus"
size=
"mini"
@
click=
"handleAdd"
v-hasPermi=
"['ecw:product-attr:create']"
>
新增
</el-button>
v-hasPermi=
"['ecw:product-attr:create']"
>
{{
$t
(
'
新增
'
)
}}
</el-button>
</el-col>
<right-toolbar
:showSearch.sync=
"showSearch"
@
queryTable=
"getList"
></right-toolbar>
...
...
@@ -25,23 +25,23 @@
<!-- 列表 -->
<el-table
v-loading=
"loading"
:data=
"list"
>
<el-table-column
label=
"编号
"
align=
"center"
prop=
"id"
/>
<el-table-column
label=
"排序
"
align=
"center"
prop=
"sort"
/>
<el-table-column
label=
"属性名称
"
align=
"center"
prop=
"attrName"
/>
<el-table-column
label=
"属性代码
"
align=
"center"
prop=
"attrCode"
/>
<el-table-column
label=
"备注
"
align=
"center"
prop=
"remark"
/>
<el-table-column
prop=
"status"
label=
"状态
"
width=
"100"
>
<el-table-column
:label=
"$t('编号')
"
align=
"center"
prop=
"id"
/>
<el-table-column
:label=
"$t('排序')
"
align=
"center"
prop=
"sort"
/>
<el-table-column
:label=
"$t('属性名称')
"
align=
"center"
prop=
"attrName"
/>
<el-table-column
:label=
"$t('属性代码')
"
align=
"center"
prop=
"attrCode"
/>
<el-table-column
:label=
"$t('备注')
"
align=
"center"
prop=
"remark"
/>
<el-table-column
prop=
"status"
:label=
"$t('状态')
"
width=
"100"
>
<template
slot-scope=
"scope"
>
<el-switch
v-model=
"scope.row.status"
:active-value=
"CommonStatusEnum.ENABLE"
:inactive-value=
"CommonStatusEnum.DISABLE"
@
change=
"handleStatusChange(scope.row)"
/>
</
template
>
</el-table-column>
<el-table-column
label=
"操作
"
align=
"center"
class-name=
"small-padding fixed-width"
>
<el-table-column
:label=
"$t('操作')
"
align=
"center"
class-name=
"small-padding fixed-width"
>
<
template
slot-scope=
"scope"
>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-edit"
@
click=
"handleUpdate(scope.row)"
v-hasPermi=
"['ecw:product-attr:update']"
>
修改
</el-button>
v-hasPermi=
"['ecw:product-attr:update']"
>
{{
$t
(
'
修改
'
)
}}
</el-button>
<el-button
size=
"mini"
type=
"text"
icon=
"el-icon-delete"
@
click=
"handleDelete(scope.row)"
v-hasPermi=
"['ecw:product-attr:delete']"
>
删除
</el-button>
v-hasPermi=
"['ecw:product-attr:delete']"
>
{{
$t
(
'
删除
'
)
}}
</el-button>
</
template
>
</el-table-column>
</el-table>
...
...
@@ -51,28 +51,31 @@
<!-- 对话框(添加 / 修改) -->
<el-dialog
:title=
"title"
:visible.sync=
"open"
width=
"500px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
8
0px"
>
<el-form-item
label=
"排序
"
prop=
"sort"
>
<el-input
v-model=
"form.sort"
placeholder=
"请输入排序
"
/>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"
10
0px"
>
<el-form-item
:label=
"$t('排序')
"
prop=
"sort"
>
<el-input
v-model=
"form.sort"
:placeholder=
"$t('请输入排序')
"
/>
</el-form-item>
<el-form-item
label=
"属性名称
"
prop=
"attrName"
>
<el-input
v-model=
"form.attrName"
placeholder=
"请输入属性名称
"
/>
<el-form-item
:label=
"$t('属性名称')
"
prop=
"attrName"
>
<el-input
v-model=
"form.attrName"
:placeholder=
"$t('请输入属性名称')
"
/>
</el-form-item>
<el-form-item
label=
"属性代码"
prop=
"attrCod
e"
>
<el-input
v-model=
"form.attr
Code"
placeholder=
"请输入属性代码
"
/>
<el-form-item
:label=
"$t('属性英文名')"
prop=
"attrNam
e"
>
<el-input
v-model=
"form.attr
NameEn"
:placeholder=
"$t('请输入属性英文名')
"
/>
</el-form-item>
<el-form-item
label=
"备注"
prop=
"remark
"
>
<el-input
v-model=
"form.
remark"
placeholder=
"请输入备注
"
/>
<el-form-item
:label=
"$t('属性代码')"
prop=
"attrCode
"
>
<el-input
v-model=
"form.
attrCode"
:placeholder=
"$t('请输入属性代码')
"
/>
</el-form-item>
<el-form-item
label=
"状态"
prop=
"status"
>
<el-select
v-model=
"form.status"
placeholder=
"请选择状态"
>
<el-option
v-for=
"dict in statusDictDatas"
:key=
"parseInt(dict.value)"
:label=
"dict.label"
:value=
"parseInt(dict.value)"
/>
<el-form-item
:label=
"$t('备注')"
prop=
"remark"
>
<el-input
v-model=
"form.remark"
:placeholder=
"$t('请输入备注')"
/>
</el-form-item>
<el-form-item
:label=
"$t('状态')"
prop=
"status"
>
<el-select
v-model=
"form.status"
:placeholder=
"$t('请选择状态')"
>
<el-option
v-for=
"dict in statusDictDatas"
:key=
"parseInt(dict.value)"
:label=
"$l(dict, 'label')"
:value=
"parseInt(dict.value)"
/>
</el-select>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
>
{{$t('确定')}}
</el-button>
<el-button
@
click=
"cancel"
>
{{$t('取消')}}
</el-button>
</div>
</el-dialog>
</div>
...
...
@@ -119,9 +122,9 @@ export default {
form
:
{},
// 表单校验
rules
:
{
attrName
:
[{
required
:
true
,
message
:
"
属性名称不能为空
"
,
trigger
:
"
blur
"
}],
attrCode
:
[{
required
:
true
,
message
:
"
属性代码不能为空
"
,
trigger
:
"
blur
"
}],
sort
:
[{
required
:
true
,
message
:
"
排序不能为空
"
,
trigger
:
"
blur
"
}],
attrName
:
[{
required
:
true
,
message
:
this
.
$t
(
"
属性名称不能为空
"
)
,
trigger
:
"
blur
"
}],
attrCode
:
[{
required
:
true
,
message
:
this
.
$t
(
"
属性代码不能为空
"
)
,
trigger
:
"
blur
"
}],
sort
:
[{
required
:
true
,
message
:
this
.
$t
(
"
排序不能为空
"
)
,
trigger
:
"
blur
"
}],
},
// 枚举
CommonStatusEnum
:
CommonStatusEnum
,
...
...
@@ -178,7 +181,7 @@ export default {
handleAdd
()
{
this
.
reset
();
this
.
open
=
true
;
this
.
title
=
"
添加产品属性
"
;
this
.
title
=
this
.
$t
(
"
添加产品属性
"
)
;
},
/** 修改按钮操作 */
handleUpdate
(
row
)
{
...
...
@@ -187,7 +190,7 @@ export default {
getProductAttr
(
id
).
then
(
response
=>
{
this
.
form
=
response
.
data
;
this
.
open
=
true
;
this
.
title
=
"
修改产品属性
"
;
this
.
title
=
this
.
$t
(
"
修改产品属性
"
)
;
});
},
/** 提交按钮 */
...
...
@@ -199,7 +202,7 @@ export default {
// 修改的提交
if
(
this
.
form
.
id
!=
null
)
{
updateProductAttr
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
修改成功
"
);
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
修改成功
"
)
);
this
.
open
=
false
;
this
.
getList
();
});
...
...
@@ -207,7 +210,7 @@ export default {
}
// 添加的提交
createProductAttr
(
this
.
form
).
then
(
response
=>
{
this
.
$modal
.
msgSuccess
(
"
新增成功
"
);
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
新增成功
"
)
);
this
.
open
=
false
;
this
.
getList
();
});
...
...
@@ -215,12 +218,12 @@ export default {
},
handleStatusChange
(
row
)
{
let
text
=
row
.
status
===
CommonStatusEnum
.
ENABLE
?
"
启用
"
:
"
停用
"
;
this
.
$modal
.
confirm
(
'
确认要
'
+
text
+
'
编号为
'
+
row
.
id
+
'
的数据吗?
'
).
then
(
function
()
{
let
text
=
row
.
status
===
CommonStatusEnum
.
ENABLE
?
this
.
$t
(
"
确定要启用此数据么?
"
)
:
this
.
$t
(
"
确定要停用此数据么?
"
)
;
this
.
$modal
.
confirm
(
text
).
then
(
function
()
{
return
updateProductAttr
(
row
);
}).
then
(()
=>
{
this
.
$modal
.
msgSuccess
(
text
+
"
成功
"
);
this
.
$modal
.
msgSuccess
(
"
操作
成功
"
);
}).
catch
(
function
()
{
row
.
status
=
row
.
status
===
CommonStatusEnum
.
ENABLE
?
CommonStatusEnum
.
DISABLE
:
CommonStatusEnum
.
ENABLE
;
...
...
@@ -230,11 +233,11 @@ export default {
/** 删除按钮操作 */
handleDelete
(
row
)
{
const
id
=
row
.
id
;
this
.
$modal
.
confirm
(
'
是否确认删除产品属性编号为"
'
+
id
+
'
"的数据项?
'
).
then
(
function
()
{
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认删除产品属性编号为{id}的数据项?
'
,
{
id
})
).
then
(
function
()
{
return
deleteProductAttr
(
id
);
}).
then
(()
=>
{
this
.
getList
();
this
.
$modal
.
msgSuccess
(
"
删除成功
"
);
this
.
$modal
.
msgSuccess
(
this
.
$t
(
"
删除成功
"
)
);
}).
catch
(()
=>
{});
},
/** 导出按钮操作 */
...
...
@@ -245,7 +248,7 @@ export default {
params
.
pageSize
=
undefined
;
this
.
addBeginAndEndTime
(
params
,
this
.
dateRangeCreateTime
,
'
createTime
'
);
// 执行导出
this
.
$modal
.
confirm
(
'
是否确认导出所有产品属性数据项?
'
).
then
(()
=>
{
this
.
$modal
.
confirm
(
this
.
$t
(
'
是否确认导出所有产品属性数据项?
'
)
).
then
(()
=>
{
this
.
exportLoading
=
true
;
return
exportProductAttrExcel
(
params
);
}).
then
(
response
=>
{
...
...
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