Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-mapping
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 03a7cb50
authored
Jan 11, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
baa0d26c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
353 additions
and
24 deletions
src/views/mapping/addMapping.vue
src/views/mapping/components/selectStore.vue
src/views/mapping/index.vue
src/views/mapping/addMapping.vue
View file @
03a7cb5
...
@@ -2,22 +2,26 @@
...
@@ -2,22 +2,26 @@
* @Author: yangming yangming@didihu.com.cn
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-01-04 14:00:10
* @Date: 2023-01-04 14:00:10
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-01-1
0 13:37:49
* @LastEditTime: 2023-01-1
1 13:57:22
* @FilePath: \scrm-micro-mapping\src\views\mapping\addMapping.vue
* @FilePath: \scrm-micro-mapping\src\views\mapping\addMapping.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
-->
<
template
>
<
template
>
<div
class=
"mapping-main"
>
<div
class=
"mapping-main"
>
<div
class=
"mapping-container"
v-loading=
"loading"
>
<div
class=
"mapping-container"
v-loading=
"loading"
>
<div
class=
"box-title"
>
新增
标签映射
</div>
<div
class=
"box-title"
>
{{
editStatus
?
'编辑'
:
'新增'
}}
标签映射
</div>
<div
class=
"box-form gl-form-page"
>
<div
class=
"box-form gl-form-page"
>
<el-form
ref=
"ruleForm"
:model=
"addForm"
:rules=
"rules"
label-width=
"154px"
>
<el-form
ref=
"ruleForm"
:model=
"addForm"
:rules=
"rules"
label-width=
"154px"
>
<div
class=
"el-form-item el-form-item--small is-required"
>
<div
class=
"el-form-item el-form-item--small is-required"
>
<label
class=
"el-form-item__label"
style=
"width: 154px;"
>
选择门店:
</label>
<label
class=
"el-form-item__label"
style=
"width: 154px;"
>
选择门店:
</label>
<div
class=
"el-form-item__content"
style=
"margin-left: 154px;"
>
<div
class=
"el-form-item__content"
style=
"margin-left: 154px;"
>
<el-select
v-model=
"merchantId"
placeholder=
"请选择"
filterable
@
change=
"queryGroupListByMerchantId"
size=
"small"
:disabled=
"editStatus"
>
<
!--
<
el-select
v-model=
"merchantId"
placeholder=
"请选择"
filterable
@
change=
"queryGroupListByMerchantId"
size=
"small"
:disabled=
"editStatus"
>
<el-option
v-for=
"item in selectMerchant"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
></el-option>
<el-option
v-for=
"item in selectMerchant"
:key=
"item.merchantNo"
:label=
"item.merchantName"
:value=
"item.merchantNo"
></el-option>
</el-select>
</el-select>
-->
<el-button
type=
"default"
class=
"el-icon-plus"
v-if=
"!editStatus"
@
click=
"handleRelateStoreClose"
>
选择商户
</el-button>
<div
class=
"merchantNameLabel"
v-if=
"merchantName"
>
<p>
已选门店:
{{
merchantName
}}
,商户号:
{{
merchantId
}}
</p>
</div>
</div>
</div>
</div>
</div>
<el-form-item
label=
"所属工厂:"
size=
"small"
v-if=
"topMerchantName"
>
<el-form-item
label=
"所属工厂:"
size=
"small"
v-if=
"topMerchantName"
>
...
@@ -63,6 +67,7 @@
...
@@ -63,6 +67,7 @@
<el-button
@
click=
"handleCancel"
size=
"medium"
>
取消
</el-button>
<el-button
@
click=
"handleCancel"
size=
"medium"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
size=
"medium"
:loading=
"loading"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"handleConfirm"
size=
"medium"
:loading=
"loading"
>
提交
</el-button>
</GLFooter>
</GLFooter>
<select-store
v-if=
"relateStoreVisible"
ref=
"relateStore"
:dialogVisible=
"relateStoreVisible"
:storeSelected=
"selectedList"
:merchantInfo=
"merchantId"
@
handleRelateStoreConfirm=
"handleRelateStoreConfirm"
@
handleRelateStoreClose=
"handleRelateStoreClose"
></select-store>
</div>
</div>
</
template
>
</
template
>
...
@@ -89,10 +94,15 @@ const tagJson = {
...
@@ -89,10 +94,15 @@ const tagJson = {
sysLabelName
:
''
,
sysLabelName
:
''
,
envLabelName
:
''
envLabelName
:
''
}
}
import
selectStore
from
'./components/selectStore'
export
default
{
export
default
{
name
:
'addMapping'
,
name
:
'addMapping'
,
components
:
{
selectStore
},
data
()
{
data
()
{
return
{
return
{
relateStoreVisible
:
false
,
editStatus
:
false
,
editStatus
:
false
,
loading
:
false
,
loading
:
false
,
addForm
:
{},
addForm
:
{},
...
@@ -102,15 +112,32 @@ export default {
...
@@ -102,15 +112,32 @@ export default {
groupList_l
:
[],
groupList_l
:
[],
groupList_r
:
[],
groupList_r
:
[],
merchantId
:
''
,
merchantId
:
''
,
merchantName
:
''
,
tagList
:
[]
tagList
:
[]
}
}
},
},
watch
:
{
watch
:
{
merchantId
()
{
merchantId
()
{
this
.
queryGroupListByMerchantId
()
this
.
findTopMerchantInfo
()
this
.
findTopMerchantInfo
()
}
}
},
},
methods
:
{
methods
:
{
// 选择门店
handleRelateStoreClose
()
{
// console.log('handleRelateStoreClose')
// this.selectedList = this.$common.utils.deepClone(this.editForm.supplyMerchantList)
this
.
relateStoreVisible
=
!
this
.
relateStoreVisible
},
handleRelateStoreConfirm
(
selectedData
)
{
console
.
log
(
selectedData
)
// this.$refs.editFormRef.$refs[this.editChildRef].clearValidate('merchantId')
// this.editForm.supplyMerchantList = selectedData
this
.
merchantId
=
selectedData
.
merchantId
this
.
merchantName
=
selectedData
.
merchantName
// this.selectedList = selectedData
this
.
handleRelateStoreClose
()
},
addTag
()
{
addTag
()
{
this
.
groupList
.
push
({
...
tagJson
})
this
.
groupList
.
push
({
...
tagJson
})
},
},
...
@@ -174,12 +201,12 @@ export default {
...
@@ -174,12 +201,12 @@ export default {
// })
// })
},
},
//改变系统标签
//改变系统标签
changeGroup_l
(
group
)
{
changeGroup_l
(
group
,
status
)
{
this
.
queryLabelListByGroupName
(
group
,
1
)
this
.
queryLabelListByGroupName
(
group
,
1
,
status
)
},
},
//改变系统标签
//改变系统标签
changeGroup_r
(
group
)
{
changeGroup_r
(
group
,
status
)
{
this
.
queryLabelListByGroupName
(
group
,
2
)
this
.
queryLabelListByGroupName
(
group
,
2
,
status
)
},
},
//改变系统标签
//改变系统标签
changeTag_l
(
group
)
{
changeTag_l
(
group
)
{
...
@@ -219,20 +246,25 @@ export default {
...
@@ -219,20 +246,25 @@ export default {
console
.
log
(
this
.
groupList_r
)
console
.
log
(
this
.
groupList_r
)
})
})
},
},
queryLabelListByGroupName
(
item
,
type
)
{
queryLabelListByGroupName
(
item
,
type
,
status
)
{
let
groupType
=
tagType
.
find
(
i
=>
i
.
type
==
type
).
name
,
let
groupType
=
tagType
.
find
(
i
=>
i
.
type
==
type
).
name
,
groupName
groupName
if
(
type
==
1
)
{
if
(
type
==
1
)
{
groupName
=
item
.
groupValue_l
groupName
=
item
.
groupValue_l
item
.
sysLabelName
=
''
if
(
!
status
)
{
item
.
tagList_l
=
[]
item
.
sysLabelName
=
''
item
.
sysGroupId
=
''
item
.
tagList_l
=
[]
item
.
sysGroupId
=
''
}
}
else
{
}
else
{
groupName
=
item
.
groupValue_r
groupName
=
item
.
groupValue_r
item
.
tagList_r
=
[]
if
(
!
status
)
{
item
.
envLabelName
=
''
item
.
tagList_r
=
[]
item
.
envGroupId
=
''
item
.
envLabelName
=
''
item
.
envGroupId
=
''
}
}
}
const
params
=
{
const
params
=
{
req
:
{
req
:
{
merchantId
:
this
.
merchantId
,
merchantId
:
this
.
merchantId
,
...
@@ -256,14 +288,11 @@ export default {
...
@@ -256,14 +288,11 @@ export default {
})
})
},
},
async
findMerchantListByPage
()
{
async
findMerchantListByPage
()
{
this
.
loading
=
true
const
{
merchantId
,
merchantName
}
=
this
.
$route
.
query
const
selectMerchant
=
await
this
.
$apis
.
mapping
.
findMerchantListByPage
({
merchantAccountLevel
:
[
4
],
channelType
:
1
,
pageNum
:
1
,
pageSize
:
10000
})
this
.
loading
=
false
this
.
selectMerchant
=
selectMerchant
.
data
const
{
merchantId
}
=
this
.
$route
.
query
if
(
merchantId
)
{
if
(
merchantId
)
{
this
.
editStatus
=
true
this
.
editStatus
=
true
this
.
merchantId
=
+
merchantId
this
.
merchantId
=
+
merchantId
this
.
merchantName
=
merchantName
this
.
queryGroupListByMerchantId
()
this
.
queryGroupListByMerchantId
()
this
.
$apis
.
mapping
.
queryLabelRelation
({
req
:
{
merchantId
}
}).
then
(
res
=>
{
this
.
$apis
.
mapping
.
queryLabelRelation
({
req
:
{
merchantId
}
}).
then
(
res
=>
{
if
(
res
.
relationUnitList
&&
res
.
relationUnitList
.
length
)
{
if
(
res
.
relationUnitList
&&
res
.
relationUnitList
.
length
)
{
...
@@ -282,8 +311,8 @@ export default {
...
@@ -282,8 +311,8 @@ export default {
}
}
})
})
this
.
groupList
.
forEach
(
item
=>
{
this
.
groupList
.
forEach
(
item
=>
{
this
.
changeGroup_l
(
item
)
this
.
changeGroup_l
(
item
,
1
)
this
.
changeGroup_r
(
item
)
this
.
changeGroup_r
(
item
,
1
)
})
})
}
else
{
}
else
{
this
.
groupList
=
[{
...
tagJson
}]
this
.
groupList
=
[{
...
tagJson
}]
...
@@ -295,7 +324,6 @@ export default {
...
@@ -295,7 +324,6 @@ export default {
mounted
()
{
mounted
()
{
// this.queryGroupListByMerchantId()
// this.queryGroupListByMerchantId()
this
.
findMerchantListByPage
()
this
.
findMerchantListByPage
()
}
}
}
}
...
@@ -305,6 +333,30 @@ export default {
...
@@ -305,6 +333,30 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
min-height
:
calc
(
100vh
-
136px
);
min-height
:
calc
(
100vh
-
136px
);
margin-bottom
:
16px
;
margin-bottom
:
16px
;
.merchantNameLabel
{
width
:
510px
;
color
:
#1d1d1d
;
//
margin-left
:
50px
;
padding
:
16px
;
margin-top
:
8px
;
border
:
1px
solid
#e6e6e6
;
border-radius
:
8
rpx
;
background
:
#f9f9f9
;
.merchantName
{
box-sizing
:
border-box
;
width
:
284px
;
height
:
32px
;
background
:
#ffffff
;
border
:
1px
solid
#e6e6e6
;
border-radius
:
4px
;
font-family
:
PingFangSC-Regular
;
font-weight
:
400
;
font-size
:
14px
;
color
:
#999999
;
line-height
:
32px
;
padding
:
0
8px
;
}
}
.box-title
{
.box-title
{
height
:
56px
;
height
:
56px
;
line-height
:
56px
;
line-height
:
56px
;
...
...
src/views/mapping/components/selectStore.vue
0 → 100644
View file @
03a7cb5
<
template
>
<div
class=
"select-store"
>
<!-- width="600px" -->
<GLDialog
bigTitle=
"选择门店"
mode=
"big"
:visible
.
sync=
"dialogVisible"
:before-close=
"handleClose"
:close-on-click-modal=
"false"
@
onOk=
"handleConfirm"
@
onCancel=
"handleClose"
>
<glsx-combi-form
ref=
"showSearch"
labelWidth=
"105px"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
<span
slot=
"footer"
>
<el-button
:size=
"size"
type=
"primary"
@
click=
"resetTable"
>
查询
</el-button>
</span>
</glsx-combi-form>
<!-- : :hasPage="false"
:getListApi="getListApi"
:tableData="storeList" -->
<GLTable
ref=
"storeRef"
:noDataImg=
"url"
:tableTotal=
"total"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:pageConf=
"pageConf"
@
refreshTable=
"getList"
:tableData=
"storeList"
:hasNum=
"false"
:setTableFinishFun=
"setTableFinishFun"
>
<div
slot=
"radioHtml"
class=
"store-table"
slot-scope=
"scope"
>
<el-radio
v-model=
"merchantId"
:label=
"scope.scope.merchantNo"
@
click
.
native=
"handleClick(scope.scope)"
></el-radio>
</div>
</GLTable>
<!--
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"handleClose"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"primary"
@
click=
"handleConfirm"
>
确 定
</el-button>
</span>
-->
</GLDialog>
</div>
</
template
>
<
script
>
import
url
from
'@/assets/empty.png'
export
default
{
name
:
'selectStore'
,
data
()
{
return
{
url
:
url
,
searchForm
:
{
merchantId
:
''
,
merchantName
:
''
},
// getListApi: this.$apis.common.getMerchantList,
total
:
0
,
storeList
:
[],
heightBox
:
200
,
merchantId
:
''
,
merchantName
:
''
,
// 搜索
searchFormData
:
[
{
label
:
'商户名称'
,
name
:
'merchantName'
,
type
:
'input'
,
placeholder
:
'请输入商户名称'
,
width
:
'300px'
,
labelWidth
:
'10px'
},
{
label
:
'商户ID'
,
name
:
'merchantId'
,
type
:
'input'
,
inputType
:
'number'
,
placeholder
:
'请输入商户ID'
,
width
:
'300px'
,
labelWidth
:
'10px'
}
],
pageConfig
:
{
pageSize
:
10
,
pageNum
:
1
},
tableParams
:
{
listName
:
'list'
,
// tableOption: true,
// 行数据的key
// mutiSelectUniqueKey: 'staffId',
// checkSelectKey: 'staffId',
// checkSelectVal: [],
// 多选ref的名称
// mutiSelectName: 'list',
tableColumns
:
[
{
label
:
''
,
prop
:
''
,
width
:
80
,
addHtml
:
'radioHtml'
},
{
label
:
'序号'
,
prop
:
'idx'
,
width
:
80
},
{
label
:
'商户名称'
,
prop
:
'merchantName'
,
formatter
:
cellValue
=>
{
return
cellValue
.
merchantName
||
'-'
}
},
{
label
:
'商户id'
,
prop
:
'merchantNo'
,
formatter
:
cellValue
=>
{
return
cellValue
.
merchantNo
||
'-'
}
}
]
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
baseData
:
{}
}
},
props
:
{
dialogVisible
:
{
type
:
Boolean
,
default
:
false
},
storeSearchForm
:
{
type
:
Object
},
merchantInfo
:
{
required
:
true
}
// merchantId: {
// type: String,
//
// }
// orderCode: {
// type: String,
// required: true
// }
},
mounted
()
{
// this.userInfo = this.$globalState.session
let
clientHeight
=
document
.
documentElement
.
clientHeight
this
.
heightBox
=
clientHeight
-
0.15
*
clientHeight
-
425
this
.
merchantId
=
this
.
merchantInfo
this
.
getList
()
},
methods
:
{
getList
(
pageCon
)
{
console
.
log
(
pageCon
,
'pageCon'
)
pageCon
&&
(
this
.
pageConfig
=
pageCon
)
var
params
=
{
merchantId
:
this
.
merchantId
,
...
this
.
searchForm
,
...
this
.
pageConfig
,
merchantAccountLevel
:
[
4
],
channelType
:
1
// merchantId: '44209390',
}
console
.
log
(
params
)
this
.
$apis
.
mapping
.
findMerchantListByPage
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
this
.
storeList
=
res
.
data
this
.
total
=
res
.
count
// // this.storeList = res.staffUnitList
// // var page = this.$refs.staffRef.page
// // // 添加序号
// pageConfig
let
nowIndex
=
this
.
pageConfig
.
pageSize
*
(
this
.
pageConfig
.
pageNum
-
1
)
console
.
log
(
nowIndex
)
this
.
storeList
.
forEach
((
item
,
index
)
=>
{
item
.
idx
=
index
+
1
+
nowIndex
})
console
.
log
(
this
.
storeList
)
// this.$refs.staffRef.tableHeightValues = '460px'
// })
})
},
resetTable
()
{
this
.
$refs
.
storeRef
.
page
.
pageNum
=
1
this
.
getList
()
},
setTableFinishFun
()
{
// console.log(this.$refs.staffRef.data)
// this.storeList = this.$refs.staffRef.data
//接收到的数据为空
this
.
$refs
.
staffRef
.
tableHeightValues
=
'460px'
},
handleClick
(
val
)
{
console
.
log
(
val
)
// let { merchantId, merchantName } =val
this
.
merchantId
=
val
.
merchantNo
this
.
merchantName
=
val
.
merchantName
// let temp = JSON.parse(JSON.stringify(val))
// delete temp.idx
// this.staffUuid = val.uuid
// this.store = val
},
handleClose
()
{
this
.
$emit
(
'handleRelateStoreClose'
)
},
handleConfirm
()
{
// if (!this.staffUuid)
// return this.$message({
// message: '请先选择员工',
// type: 'error'
// })
// let parmas = {
// subOrderCode: this.orderCode,
// staffUuid: this.staffUuid
// }
// this.$apis.orderManage.signerOrder(parmas).then(res => {
// console.log(res)
// })
// this.staffUuid
this
.
$emit
(
'handleRelateStoreConfirm'
,
{
merchantId
:
this
.
merchantId
,
merchantName
:
this
.
merchantName
})
}
}
}
</
script
>
<
style
lang=
"scss"
>
.select-store
{
.storeDailog
{
width
:
500px
;
}
.title
{
margin-bottom
:
12px
;
}
.customer-tag-box
{
display
:
flex
;
margin
:
20px
16px
;
.tag-label
{
display
:
inline-block
;
height
:
30px
;
line-height
:
30px
;
}
.input-tag-wrapper
{
max-height
:
75px
;
overflow
:
auto
;
position
:
relative
;
font-size
:
14px
;
background-color
:
#fff
;
background-image
:
none
;
border-radius
:
4px
;
border
:
1px
solid
#dcdfe6
;
box-sizing
:
border-box
;
color
:
#666
;
display
:
inline-block
;
outline
:
none
;
padding
:
5px
;
flex-wrap
:
wrap
;
transition
:
border-color
0.2s
cubic-bezier
(
0.645
,
0.045
,
0.355
,
1
);
width
:
648px
;
display
:
flex
;
align-items
:
center
;
cursor
:
pointer
;
i
{
color
:
#75acff
;
margin-right
:
3px
;
font-size
:
14px
;
}
}
}
//
.customer-list
{
//
width
:
calc
(
100%
-
280px
);
//
margin-right
:
10px
;
//
}
.p-16
{
padding
:
16px
;
}
.store-table
.el-radio__label
{
display
:
none
;
}
}
</
style
>
src/views/mapping/index.vue
View file @
03a7cb5
...
@@ -150,7 +150,7 @@ export default {
...
@@ -150,7 +150,7 @@ export default {
methods
:
{
methods
:
{
handleAdd
(
row
)
{
handleAdd
(
row
)
{
let
query
=
''
let
query
=
''
if
(
row
)
query
=
`?merchantId=
${
row
.
merchantId
}
`
if
(
row
)
query
=
`?merchantId=
${
row
.
merchantId
}
&merchantName=
${
row
.
merchantName
}
&$title=编辑标签映射
`
this
.
$router
.
push
(
`/mapping/addMapping
${
query
}
`
)
this
.
$router
.
push
(
`/mapping/addMapping
${
query
}
`
)
},
},
//删除
//删除
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment