Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
saas-manage
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chehuidong
saas-manage
Commits
14163a6f
Commit
14163a6f
authored
Aug 14, 2024
by
HuAnYing
Browse files
Options
Browse Files
Download
Plain Diff
8/14
parents
13f46f5f
c772a0cb
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1020 additions
and
656 deletions
+1020
-656
src/common/api/order.js
+14
-0
src/components/base/icon.vue
+49
-0
src/views/home/navMenu.vue
+1
-1
src/views/system/app.vue
+592
-255
src/views/system/category-style.vue
+149
-225
src/views/system/sku-manage.vue
+116
-161
src/views/system/sku-sort.vue
+19
-0
src/views/taskManage/index.vue
+80
-12
vue.config.js
+0
-2
No files found.
src/common/api/order.js
View file @
14163a6f
...
@@ -65,6 +65,20 @@ export function PendingWorkOrder(data) {
...
@@ -65,6 +65,20 @@ export function PendingWorkOrder(data) {
data
,
data
,
)
)
}
}
export
function
ShelveWorkOrder
(
data
)
{
return
axios
.
post
(
'platform/platformWorkOrder/shelveForPending'
,
data
,
)
}
export
function
TurnBackToPending
(
data
)
{
return
axios
.
post
(
'platform/platformWorkOrder/turnBackToPending'
,
data
,
)
}
export
function
replyTocustomer
(
id
,
msg
)
{
export
function
replyTocustomer
(
id
,
msg
)
{
return
axios
.
post
(
'platform/platformWorkOrderChat/add'
,
{
return
axios
.
post
(
'platform/platformWorkOrderChat/add'
,
{
msg
:
msg
,
msg
:
msg
,
...
...
src/components/base/icon.vue
0 → 100644
View file @
14163a6f
<
template
>
<i
v-if=
"unicodeIcon"
class=
"erpIconfont erp unicode-icon"
v-html=
"unicodeIcon"
></i>
<svg
v-else
class=
"svg-icon erp"
aria-hidden=
"true"
>
<slot
name=
"title"
></slot>
<use
:xlink:href=
"svgIcon"
></use>
</svg>
</
template
>
<
script
>
export
default
{
name
:
'Icon'
,
props
:
{
name
:
{
type
:
String
,
required
:
true
,
},
},
computed
:
{
unicodeIcon
()
{
if
(
this
.
name
.
match
(
/^x
[
a-f0-9
]{4}
$/
))
{
return
`&#
${
this
.
name
}
;`
}
return
undefined
},
svgIcon
()
{
if
(
this
.
unicodeIcon
)
return
undefined
return
`#erp-
${
this
.
name
}
`
},
},
}
</
script
>
<
style
>
.unicode-icon
{
width
:
1em
;
height
:
1em
;
color
:
inherit
;
}
.svg-icon
{
width
:
1em
;
height
:
1em
;
vertical-align
:
-0.15em
;
fill
:
currentColor
;
overflow
:
hidden
;
}
</
style
>
\ No newline at end of file
src/views/home/navMenu.vue
View file @
14163a6f
...
@@ -297,7 +297,7 @@ export default {
...
@@ -297,7 +297,7 @@ export default {
children
:
[]
children
:
[]
},
},
]
]
}
}
,
],
],
dialogVisible
:
false
,
dialogVisible
:
false
,
oldPwd
:
''
,
oldPwd
:
''
,
...
...
src/views/system/app.vue
View file @
14163a6f
<
template
>
<
template
>
<div
class=
"announce-manage card"
>
<layout
class=
"row"
:leftStyle=
"
{ width: '330px' }">
<el-form
<template
#
page_left
>
ref=
"form"
<el-tree
:data=
"folders"
ref=
"tree"
:props=
"
{ children: 'children', label: 'categoryName' }" highlight-current
:model=
"searchForm"
:node-key="'id'" default-expand-all :expand-on-click-node="false" @node-click="handleNodeClick">
size=
"mini"
<div
class=
"customize-tree-node"
slot-scope=
"
{ node, data }">
v-enter-submit=
"search"
<div
@
click
.
stop=
"toggleNodeExpanded(node)"
class=
"custom-tree-node-arrow"
@
submit
.
native
.
prevent
:style=
"
{ transform: node.expanded ? 'rotate(90deg)' : '' }"
:inline=
"true"
v-if="data.children
&&
data.children.length > 0">
>
<icon
:name=
"node.expanded ? 'xe61e' : 'xe659'"
></icon>
<el-form-item
label=
"应用名称"
>
</div>
<el-input
<div
class=
"customize-tree-node__label"
>
style=
"width: 120px"
<icon
name=
"wenjianjia"
></icon>
clearable
<span>
{{
data
.
categoryName
}}
</span>
v-model=
"searchForm.employeeName"
</div>
placeholder=
"应用名称"
<div
class=
"customize-tree-node__operate"
>
></el-input>
<i
title=
"添加分类"
class=
"el-icon-circle-plus"
style=
"color: rgb(140 195 75); margin-right: 5px"
</el-form-item>
@
click=
"addFolder(data)"
></i>
<el-form-item
label=
"应用分类"
>
<i
title=
"修改分类"
class=
"el-icon-edit-outline"
style=
"color: #ff9800; margin-right: 5px"
<el-select
@
click=
"editFolder(data)"
></i>
v-model=
"searchForm.creator"
<i
title=
"删除分类"
class=
"el-icon-remove-outline"
style=
"color: red"
@
click=
"removeFolder(data)"
></i>
placeholder=
"请选择"
</div>
clearable
</div>
filterable
</el-tree>
>
</
template
>
<el-option
<
template
#
page_right
>
v-for=
"user in userList"
<el-form
ref=
"form"
:model=
"searchForm"
size=
"mini"
v-enter-submit=
"search"
@
submit
.
native
.
prevent
:inline=
"true"
>
:key=
"user.id"
<el-form-item
label=
"应用名称"
>
:label=
"user.realName"
<el-input
style=
"width: 120px"
clearable
v-model=
"searchForm.name"
placeholder=
"应用名称"
></el-input>
:value=
"user.id"
</el-form-item>
></el-option>
<el-form-item
label=
"应用类型"
>
</el-select>
<el-select
v-model=
"searchForm.type"
placeholder=
"请选择"
clearable
filterable
>
</el-form-item>
<el-option
v-for=
"item in applicationTypeData"
:key=
"item.id"
:label=
"item.value"
<el-form-item
label=
"创建时间"
>
:value=
"item.id"
></el-option>
<el-date-picker
</el-select>
style=
"width: 164px"
</el-form-item>
v-model=
"searchForm.time"
<el-form-item
label
>
align=
"right"
<el-button
type=
"primary"
native-type=
"submit"
@
click=
"search()"
>
type=
"date"
查询
placeholder=
"选择日期"
</el-button>
value-format=
"yyyy-MM-dd"
</el-form-item>
></el-date-picker>
<el-form-item
label
>
<!--
<el-input
v-model=
"searchForm.time"
></el-input>
-->
<el-button
type=
"success"
@
click=
"editDialog()"
>
新增
</el-form-item>
</el-button>
<el-form-item
label
>
</el-form-item>
<el-button
<el-form-item
label
>
type=
"primary"
<el-button
type=
"warning"
@
click=
"updateDialog()"
>
修改
native-type=
"submit"
</el-button>
@
click=
"search()"
</el-form-item>
>
<el-form-item
label
>
查询
<el-button
type=
"danger"
@
click=
"editDialog()"
>
删除
</el-button>
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label
>
</el-form>
<el-button
type=
"success"
@
click=
"editDialog()"
<div
class=
"table_wrap"
style=
"padding: 0"
>
>
新增
<table-view
:sourceData=
"sourceData"
:serialNumber=
"false"
:tableColumns=
"tableColumns"
></table-view>
</el-button
</div>
>
<pagination
:setValue=
"setpaginationOptions"
:options=
"paginationOptions"
/>
</el-form-item>
</
template
>
<el-form-item
label
>
<!-- <el-dialog :title="isEdit ? '编辑' : '新增'" :close-on-click-modal="false" :visible.sync="editShowing" width="80%">
<el-button
type=
"danger"
@
click=
"editDialog()"
>
删除
</el-button
>
</el-form-item>
</el-form>
<div
class=
"table_wrap"
style=
"padding: 0"
>
<table-view
:sourceData=
"sourceData"
:serialNumber=
"false"
:tableColumns=
"tableColumns"
></table-view>
</div>
<pagination
:setValue=
"setpaginationOptions"
:options=
"paginationOptions"
/>
<el-dialog
:title=
"isEdit ? '编辑' : '新增'"
:close-on-click-modal=
"false"
:visible
.
sync=
"dialogVisible"
width=
"80%"
>
<div class="app-form">
<div class="app-form">
<div class="img">
<div class="img">
<img
<img
...
@@ -88,111 +65,44 @@
...
@@ -88,111 +65,44 @@
alt="">
alt="">
</div>
</div>
<div class="form">
<div class="form">
<el-form
<el-form :model="editForm" :inline="true" label-width="80px" :rules="addrules" size="mini" ref="editForm">
:model=
"editForm"
:inline=
"true"
label-width=
"80px"
:rules=
"addrules"
size=
"mini"
ref=
"editForm"
>
<el-row :gutter="10">
<el-row :gutter="10">
<el-col :span="12">
<el-col :span="12">
<el-form-item
<el-form-item label="应用名称" size="small" prop="title">
label=
"应用名称"
<el-input style="width: 100%" v-model="editForm.title"></el-input>
size=
"small"
prop=
"title"
>
<el-input
style=
"width: 100%"
v-model=
"editForm.title"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col :span="12">
<el-col :span="12">
<el-form-item
<el-form-item label="应用分类" size="small" prop="title">
label=
"应用分类"
<el-select style="width: 100%;" v-model="searchForm.creator" placeholder="请选择" clearable filterable>
size=
"small"
<el-option v-for="user in userList" :key="user.id" :label="user.realName"
prop=
"title"
:value="user.id"></el-option>
>
<el-select
style=
"width: 100%;"
v-model=
"searchForm.creator"
placeholder=
"请选择"
clearable
filterable
>
<el-option
v-for=
"user in userList"
:key=
"user.id"
:label=
"user.realName"
:value=
"user.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col :span="24">
<el-col :span="24">
<el-form-item
<el-form-item label="应用简述" size="small" prop="title">
label=
"应用简述"
<el-input style="width: 100%" type="textarea" :rows="4" v-model="editForm.title"></el-input>
size=
"small"
prop=
"title"
>
<el-input
style=
"width: 100%"
type=
"textarea"
:rows=
"4"
v-model=
"editForm.title"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col :span="24">
<el-col :span="24">
<el-form-item
<el-form-item label="应用详情" size="small" prop="title">
label=
"应用详情"
<v-editor filename="files" style="width: 100%" v-model="editForm.content" ref="wangeditor"
size=
"small"
height="300px" />
prop=
"title"
>
<v-editor
filename=
"files"
style=
"width: 100%"
v-model=
"editForm.content"
ref=
"wangeditor"
height=
"300px"
/>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
</el-row>
</el-row>
<el-row :gutter="10" style="width: 100%;">
<el-row :gutter="10" style="width: 100%;">
<el-col :span="11">
<el-col :span="11">
<el-form-item
<el-form-item label="应用价格" size="small" prop="title">
label=
"应用价格"
<el-input style="width: 100%" v-model="editForm.title"></el-input>
size=
"small"
prop=
"title"
>
<el-input
style=
"width: 100%"
v-model=
"editForm.title"
></el-input>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col :span="11">
<el-col :span="11">
<el-form-item
<el-form-item label="应用周期" size="small" prop="title">
label=
"应用周期"
<el-select style="width: 100%" v-model="searchForm.creator" placeholder="请选择" clearable filterable>
size=
"small"
<el-option v-for="user in userList" :key="user.id" :label="user.realName"
prop=
"title"
:value="user.id"></el-option>
>
<el-select
style=
"width: 100%"
v-model=
"searchForm.creator"
placeholder=
"请选择"
clearable
filterable
>
<el-option
v-for=
"user in userList"
:key=
"user.id"
:label=
"user.realName"
:value=
"user.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -206,81 +116,182 @@
...
@@ -206,81 +116,182 @@
</div>
</div>
<div style="display: flex;justify-content: flex-end" slot="footer">
<div style="display: flex;justify-content: flex-end" slot="footer">
<el-button
<el-button size="mini" style="width: 80px;" @click="editShowing = false">取 消
size=
"mini"
</el-button>
style=
"width: 80px;"
<el-button size="mini" style="margin-left: 20px;width: 80px;" type="primary" @click="submit">确 定
@
click=
"dialogVisible = false"
</el-button>
>
取 消
</el-button
>
<el-button
size=
"mini"
style=
"margin-left: 20px;width: 80px;"
type=
"primary"
@
click=
"submit"
>
确 定
</el-button
>
</div>
</div>
</el-dialog> -->
<!-- 添加、修改应用 -->
<el-dialog
:title=
"isEdit ? '编辑' : '新增'"
:visible
.
sync=
"editShowing"
width=
"1000px"
:close-on-click-modal=
"false"
>
<div
class=
"edit-form"
>
<el-form
ref=
"editForm"
:model=
"editForm"
label-width=
"auto"
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"应用分类"
prop=
"folderId"
required
>
<el-cascader
style=
"width: 100%"
v-model=
"editForm.folderId"
size=
"mini"
:options=
"folders"
clearable
:props=
"{
label: 'categoryName',
value: 'id',
emitPath: false,
checkStrictly: true
}"
:show-all-levels=
"false"
></el-cascader>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"应用类型"
prop=
"designTeamId"
:rules=
"[{ message: '请选择应用类型', required: true }]"
>
<el-select
style=
"width: 100%"
v-model=
"editForm.designTeamId"
size=
"mini"
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"item in applicationTypeData"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"应用周期"
prop=
"architectId"
:rules=
"[{ required: true, message: '请选择应用周期' }]"
>
<el-select
v-model=
"editForm.architectId"
size=
"mini"
filterable
clearable
style=
"width: 100%"
>
<el-option
v-for=
"item in applicationTypeData"
:key=
"item.id"
:label=
"item.value"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"应用名称"
prop=
"name"
>
<el-input
v-model=
"editForm.name"
placeholder=
"请输入应用名称"
maxlength=
"120"
size=
"mini"
clearable
show-word-limit
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"应用价格"
prop=
"name"
>
<el-input
v-model=
"editForm.name"
placeholder=
"请输入应用价格"
maxlength=
"120"
size=
"mini"
clearable
show-word-limit
/>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"应用图标"
>
<div
class=
"my-flex-1"
>
<upload-images
sortField=
"sort"
businessType=
"design"
uploadApiUrl=
"upload/ossUpload"
:type=
"limitFileType"
:isFloat=
"false"
:width=
"300"
:hasWidth=
"true"
:hasOss=
"true"
:length=
"editFlag ? 1 : 50"
v-model=
"editForm.mainImage"
@
selectImg=
"selectImg"
>
<
template
#
other=
"{ index }"
>
<div
class=
"other-msg"
style=
"display: flex"
>
<span
class=
"other-label"
style=
"margin-right: 4px"
>
图标文件
</span>
<upload-file
v-model=
"productionFile[index]"
url=
"upload/podProductionFileUpload"
getFilePath=
"filePath"
:max=
"1"
text=
"上传图标文件"
/>
</div>
</
template
>
</upload-images>
</div>
</el-form-item>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-form-item
label=
"应用简述"
size=
"small"
prop=
"title"
>
<el-input
style=
"width: 100%"
type=
"textarea"
:rows=
"4"
v-model=
"editForm.title"
></el-input>
</el-form-item>
</el-col>
<el-col
:span=
"24"
>
<el-form-item
label=
"应用详情"
size=
"small"
prop=
"title"
>
<v-editor
filename=
"files"
style=
"width: 100%"
v-model=
"editForm.content"
ref=
"wangeditor"
height=
"300px"
/>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<span
slot=
"footer"
>
<el-button
@
click=
"editShowing = false"
>
取消
</el-button>
<el-button
@
click=
"save"
type=
"primary"
>
确认
</el-button>
</span>
</el-dialog>
</el-dialog>
<el-dialog
<el-dialog
:visible
.
sync=
"releaseVisible"
:close-on-click-modal=
"false"
title=
"发布"
width=
"600px"
>
:visible
.
sync=
"releaseVisible"
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
>
全选
:close-on-click-modal=
"false"
</el-checkbox>
title=
"发布"
width=
"600px"
>
<el-checkbox
:indeterminate=
"isIndeterminate"
v-model=
"checkAll"
@
change=
"handleCheckAllChange"
>
全选
</el-checkbox
>
<div
style=
"margin: 15px 0"
></div>
<div
style=
"margin: 15px 0"
></div>
<el-checkbox-group
<el-checkbox-group
v-model=
"checkedCompany"
@
change=
"handleCheckedCompanyChange"
>
v-model=
"checkedCompany"
<el-checkbox
style=
"width: 100px"
v-for=
"c in releaseList"
:label=
"c.id"
:key=
"c.id"
>
{{ c.apiName }}
@
change=
"handleCheckedCompanyChange"
</el-checkbox>
>
<el-checkbox
style=
"width: 100px"
v-for=
"c in releaseList"
:label=
"c.id"
:key=
"c.id"
>
{{
c
.
apiName
}}
</el-checkbox
>
</el-checkbox-group>
</el-checkbox-group>
<span
slot=
"footer"
>
<span
slot=
"footer"
>
<el-button
<el-button
size=
"mini"
@
click=
"releaseVisible = false"
>
取消
</el-button>
size=
"mini"
<el-button
size=
"mini"
@
click=
"confirmRelease"
type=
"primary"
>
确认
</el-button>
@
click=
"releaseVisible = false"
</span>
>
取消
</el-button
</el-dialog>
>
<!-- 添加、修改分类 -->
<el-button
<el-dialog
:title=
"editFolderId ? '编辑分类' : '添加分类'"
:visible
.
sync=
"folderVisible"
:close-on-click-modal=
"false"
size=
"mini"
width=
"600px"
>
@
click=
"confirmRelease"
<el-form
ref=
"folderForm"
:model=
"folderForm"
label-position=
"top"
label-width=
"80px"
>
type=
"primary"
<el-form-item
label=
"名称"
prop=
"folderName"
:rules=
"[{ required: true, message: '请输入分类名称' }]"
>
>
确认
</el-button
<el-input
v-model=
"folderForm.folderName"
clearable
placeholder=
"分类名称"
></el-input>
>
</el-form-item>
</el-form>
<span
slot=
"footer"
>
<el-button
@
click=
"folderVisible = false"
>
取消
</el-button>
<el-button
@
click=
"submitFolder"
type=
"primary"
>
确认
</el-button>
</span>
</span>
</el-dialog>
</el-dialog>
</layout>
</div>
</template>
</template>
<
script
>
<
script
>
import
Editor
from
'@/components/wangeditor/index.vue'
import
Editor
from
'@/components/wangeditor/index.vue'
import
tableView
from
'@/common/components/base/tableView.vue'
import
tableView
from
'@/common/components/base/tableView.vue'
import
{
get
,
post
}
from
'@/common/api/axios'
import
{
get
,
post
}
from
'@/common/api/axios'
import
{
getSystemUserList
}
from
'@/common/api/system'
import
{
getSystemUserList
}
from
'@/common/api/system'
import
Icon
from
'@/components/base/icon.vue'
import
layout
from
'@/components/global/layout.vue'
export
default
{
export
default
{
name
:
'system_announce_manage'
,
name
:
'system_announce_manage'
,
components
:
{
components
:
{
'v-editor'
:
Editor
,
'v-editor'
:
Editor
,
tableView
tableView
,
Icon
,
layout
},
},
data
()
{
data
()
{
return
{
return
{
editForm
:
{
name
:
''
,
labelNames
:
[],
architectId
:
''
,
originFile
:
''
,
// 源文件
productionFile
:
''
,
// 生产文件
mainImage
:
undefined
,
// 设计图,
designTeamId
:
''
,
demandCustomize
:
0
,
redraw
:
0
,
folderId
:
''
},
limitFileType
:
[
'jpg'
,
'png'
],
editFlag
:
false
,
productionFile
:
[],
defaultProps
:
{
children
:
'children'
,
label
:
'name'
},
folders
:
[],
folderIds
:
''
,
parentFolderId
:
''
,
folderVisible
:
false
,
currentFolder
:
undefined
,
editFolderId
:
undefined
,
folderForm
:
{
folderName
:
''
},
applicationTypeData
:
[{
id
:
1
,
value
:
'免费'
},
{
id
:
2
,
value
:
'收费'
}],
checkAll
:
false
,
checkAll
:
false
,
isIndeterminate
:
false
,
isIndeterminate
:
false
,
checkedCompany
:
[],
checkedCompany
:
[],
...
@@ -289,7 +300,7 @@ export default {
...
@@ -289,7 +300,7 @@ export default {
currentPage
:
1
,
currentPage
:
1
,
total
:
1
,
total
:
1
,
paginationOptions
:
{
paginationOptions
:
{
pageSize
:
10
0
,
pageSize
:
10
,
currentPage
:
1
,
currentPage
:
1
,
total
:
0
total
:
0
},
},
...
@@ -305,10 +316,7 @@ export default {
...
@@ -305,10 +316,7 @@ export default {
sourceData
:
[],
sourceData
:
[],
searchForm
:
{},
searchForm
:
{},
isEdit
:
false
,
isEdit
:
false
,
dialogVisible
:
false
,
editShowing
:
false
,
editForm
:
{
title
:
''
},
defaultEditFrom
:
{
defaultEditFrom
:
{
title
:
''
,
title
:
''
,
enableFlag
:
false
,
enableFlag
:
false
,
...
@@ -320,60 +328,69 @@ export default {
...
@@ -320,60 +328,69 @@ export default {
}
}
},
},
mounted
()
{
mounted
()
{
this
.
getList
()
this
.
loadFoldersData
()
this
.
getSystemUserList
()
// this.getList()
// this.getSystemUserList()
},
},
computed
:
{
computed
:
{
tableColumns
()
{
tableColumns
()
{
return
[
return
[
{
{
label
:
'序号'
,
key
:
'index'
,
},
{
label
:
'应用名称'
,
label
:
'应用名称'
,
key
:
'
titl
e'
,
key
:
'
nam
e'
,
align
:
'left'
align
:
'left'
},
},
{
{
label
:
'应用分类'
,
label
:
'应用分类'
,
key
:
'c
reator
Name'
key
:
'c
ategory
Name'
},
},
{
{
label
:
'应用简述'
,
label
:
'应用简述'
,
key
:
'
creatorName1
'
key
:
'
description
'
},
},
// {
// label: '应用价格',
// key: 'creatorName2'
// },
{
{
label
:
'应用服务期'
,
label
:
'应用服务期'
,
key
:
'creatorName2'
key
:
'creatorName2'
},
},
{
{
label
:
'创建
时间
'
,
label
:
'创建
日期
'
,
key
:
'creat
ion
Time'
key
:
'creat
e
Time'
},
},
{
{
label
:
'操作'
,
label
:
'操作'
,
width
:
150
,
width
:
150
,
render
:
(
item
)
=>
(
render
:
(
item
)
=>
(
<
div
>
<
div
>
<
span
<
span
class
=
"icon-view icon-edit-view"
class
=
"icon-view icon-edit-view"
title
=
"编辑"
title
=
"编辑"
onClick
=
{()
=>
this
.
editDialog
(
item
)}
onClick
=
{()
=>
this
.
editDialog
(
item
)}
>
>
<
i
class
=
"el-icon-edit"
><
/i
>
<
i
class
=
"el-icon-edit"
><
/i
>
<
/span
>
<
/span
>
<
span
<
span
class
=
"icon-view icon-del-view"
class
=
"icon-view icon-del-view"
title
=
"删除"
title
=
"删除"
onClick
=
{()
=>
this
.
deleteAnnounces
(
item
)}
onClick
=
{()
=>
this
.
deleteAnnounces
(
item
)}
>
>
<
i
class
=
"el-icon-delete"
><
/i
>
<
i
class
=
"el-icon-delete"
><
/i
>
<
/span
>
<
/span
>
<
span
<
span
class
=
"icon-view"
class
=
"icon-view"
style
=
"background:yellowgreen"
style
=
"background:yellowgreen"
title
=
"字段配置"
title
=
"字段配置"
onClick
=
{()
=>
this
.
fieldSet
(
item
)}
onClick
=
{()
=>
this
.
fieldSet
(
item
)}
>
>
<
i
class
=
"el-icon-c-scale-to-original"
><
/i
>
<
i
class
=
"el-icon-c-scale-to-original"
><
/i
>
<
/span
>
<
/span
>
<
/div
>
<
/div
>
)
)
}
}
...
@@ -381,6 +398,143 @@ export default {
...
@@ -381,6 +398,143 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
async
save
()
{
try
{
await
this
.
$refs
.
editForm
.
validate
()
}
catch
{
return
}
if
(
!
this
.
editForm
.
mainImage
||
this
.
editForm
.
mainImage
.
length
===
0
)
{
this
.
$message
.
warning
(
'请选择设计图'
)
return
}
if
(
this
.
productionFile
.
some
((
item
)
=>
!
item
))
{
return
this
.
$message
.
warning
(
'请上传生产文件'
)
}
if
(
this
.
productionFile
.
length
>
0
)
{
this
.
editForm
.
productionFile
=
this
.
productionFile
.
join
(
','
)
}
try
{
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
editForm
))
data
.
labelNames
=
data
.
labelNames
?.
join
()
// data.mainImage = data.mainImage[0].imagePath
data
.
mainImage
=
this
.
handleImage
(
data
.
mainImage
)
if
(
!
this
.
editId
)
{
data
.
folderId
=
this
.
folderId
await
post
(
'podDesignCenter/addPodDesigns'
,
data
)
}
else
{
data
.
folderId
=
this
.
editForm
.
folderId
await
post
(
'podDesignCenter/update'
,
data
)
}
this
.
getList
()
}
catch
(
e
)
{
throw
new
Error
(
e
)
}
finally
{
this
.
editShowing
=
false
}
},
selectImg
(
file
)
{
const
imagePath
=
file
.
map
((
ee
)
=>
ee
.
imagePath
)
this
.
productionFile
=
imagePath
},
// 获取左侧树数据
async
loadFoldersData
()
{
try
{
const
res
=
await
get
(
'businessAppCategory/getCategoryList'
)
if
(
res
.
code
!==
200
)
return
this
.
folders
=
this
.
recursiveFolder
(
res
.
data
)
this
.
$nextTick
(()
=>
{
this
.
$refs
.
tree
.
setCurrentKey
(
this
.
folderId
||
res
.
data
[
0
].
id
)
})
}
catch
(
e
)
{
console
.
error
(
e
)
}
},
recursiveFolder
(
folder
)
{
for
(
const
item
of
folder
)
{
if
(
item
.
children
&&
item
.
children
.
length
>
0
)
{
this
.
recursiveFolder
(
item
.
children
)
}
if
(
item
.
children
&&
item
.
children
.
length
===
0
)
{
item
.
children
=
undefined
this
.
$set
(
item
,
'leaf'
,
true
)
continue
}
}
return
folder
},
// 添加、修改、删除分类
async
addFolder
(
data
)
{
this
.
folderVisible
=
true
this
.
currentFolder
=
data
this
.
parentFolderId
=
data
.
pid
this
.
editFolderId
=
undefined
this
.
$nextTick
(()
=>
{
this
.
$refs
.
folderForm
&&
this
.
$refs
.
folderForm
.
resetFields
()
})
},
editFolder
(
data
)
{
this
.
parentFolderId
=
data
.
pid
this
.
editFolderId
=
data
.
id
this
.
folderForm
=
{
folderName
:
data
.
categoryName
}
this
.
folderVisible
=
true
},
async
removeFolder
(
data
)
{
try
{
await
this
.
$confirm
(
'确定删除该分类吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
}
catch
{
return
}
try
{
const
res
=
await
get
(
'businessAppCategory/deleteCategoryById'
,
{
id
:
data
.
id
}
)
if
(
res
.
code
!==
200
)
return
this
.
$message
.
success
(
res
.
message
)
this
.
loadFoldersData
()
}
catch
(
e
)
{
console
.
error
(
e
)
}
},
// 分类提交
async
submitFolder
()
{
try
{
await
this
.
$refs
.
folderForm
.
validate
()
}
catch
{
return
}
const
params
=
{
pid
:
this
.
currentFolder
.
id
===
1
?
0
:
this
.
folderId
,
// 顶级分类pid传0,其他传自己的id
categoryName
:
this
.
folderForm
.
folderName
,
// 分类名称
id
:
this
.
editFolderId
?
this
.
folderId
:
undefined
// 编辑有id,添加没有id
}
console
.
log
(
params
,
'4545'
)
try
{
const
res
=
await
post
(
'businessAppCategory/addOrUpdateCategory'
,
params
)
if
(
res
.
code
!==
200
)
return
this
.
loadFoldersData
()
this
.
folderVisible
=
false
}
catch
(
e
)
{
console
.
error
(
e
)
}
},
// 左侧树每个节点点击
handleNodeClick
(
data
)
{
this
.
currentFolder
=
data
this
.
parentFolderId
=
data
.
pid
this
.
folderId
=
data
.
id
this
.
getList
()
},
fieldSet
(
item
)
{
fieldSet
(
item
)
{
this
.
$router
.
push
(
'/dynamicForm'
)
this
.
$router
.
push
(
'/dynamicForm'
)
},
},
...
@@ -422,14 +576,16 @@ export default {
...
@@ -422,14 +576,16 @@ export default {
currentPage
currentPage
}
=
}
=
this
.
paginationOptions
this
.
paginationOptions
const
res
=
await
post
(
'sys/announcement/list'
,
{
const
res
=
await
post
(
'businessAppInfo/getAppInfoList'
,
{
categoryId
:
this
.
folderId
,
pageSize
,
pageSize
,
currentPage
,
currentPage
,
...
this
.
searchForm
isCollectFee
:
this
.
searchForm
.
type
!==
1
,
name
:
this
.
searchForm
.
name
,
})
})
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
this
.
sourceData
=
res
.
data
.
records
this
.
sourceData
=
res
.
data
.
records
||
[]
this
.
paginationOptions
.
total
=
res
.
data
.
total
this
.
paginationOptions
.
total
=
res
.
data
.
total
||
0
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
}
}
...
@@ -462,7 +618,7 @@ export default {
...
@@ -462,7 +618,7 @@ export default {
})
})
this
.
isEdit
=
false
this
.
isEdit
=
false
}
}
this
.
dialogVisible
=
true
this
.
editShowing
=
true
},
},
async
submit
()
{
async
submit
()
{
try
{
try
{
...
@@ -478,7 +634,7 @@ export default {
...
@@ -478,7 +634,7 @@ export default {
const
res
=
await
post
(
url
,
{
...
this
.
editForm
})
const
res
=
await
post
(
url
,
{
...
this
.
editForm
})
if
(
res
.
code
!==
200
)
return
if
(
res
.
code
!==
200
)
return
this
.
$message
.
success
(
res
.
message
)
this
.
$message
.
success
(
res
.
message
)
this
.
dialogVisible
=
false
this
.
editShowing
=
false
this
.
getList
()
this
.
getList
()
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
error
(
e
)
console
.
error
(
e
)
...
@@ -541,13 +697,189 @@ export default {
...
@@ -541,13 +697,189 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
.announce-manage
{
<
style
scoped
>
.customize-tree-node__label
{
margin-left
:
4px
;
flex
:
1
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.customize-tree-node
{
font-size
:
14px
;
flex
:
1
;
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
font-size
:
14px
;
padding-right
:
8px
;
}
.pod-search
{
padding
:
0px
10px
;
}
.pod-header
{
display
:
flex
;
}
.item
:not
(
:last-child
)
{
margin-right
:
10px
;
}
.table_wrapper
{
flex
:
1
;
padding
:
0
10px
;
display
:
grid
;
grid-template-columns
:
repeat
(
6
,
1
fr
);
gap
:
10px
;
}
@media
screen
and
(
max-width
:
1920px
)
{
.table_wrapper
{
grid-template-columns
:
repeat
(
6
,
1
fr
);
}
}
@media
screen
and
(
max-width
:
1400px
)
{
.table_wrapper
{
grid-template-columns
:
repeat
(
4
,
1
fr
);
}
}
.upload-demo
::v-deep
.el-upload--text
{
width
:
100%
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-align
:
left
;
}
.sales
{
width
:
40px
;
height
:
26px
;
display
:
inline-block
;
position
:
relative
;
border
:
1px
solid
#ddd
;
overflow
:
hidden
;
vertical-align
:
middle
;
white-space
:
nowrap
;
border-radius
:
4px
;
cursor
:
pointer
;
padding
:
3px
3px
;
box-sizing
:
border-box
;
display
:
inline-flex
;
align-items
:
center
;
justify-content
:
center
;
}
.isActive
{
border
:
1px
solid
#4168ff
;
}
.edit-form
::v-deep
.img_item
{
width
:
27%
;
height
:
200px
;
background
:
#eeeeee
;
}
.edit-form
::v-deep
.img_item
.img
{
width
:
100%
;
height
:
100%
;
height
:
100%
;
}
.edit-form
::v-deep
.img_wrap
{
width
:
27%
;
height
:
200px
;
}
.edit-form
::v-deep
.img_wrap
i
{
font-size
:
60px
;
color
:
#047dff
;
}
.custom-tree-node-arrow
{
transform
:
unset
!important
;
}
.row
::v-deep
.el-tree-node.is-current
>
.el-tree-node__content
.customize-tree-node__operate
{
display
:
block
;
}
.row
::v-deep
.el-tree-node__expand-icon
{
visibility
:
hidden
;
}
.file
{
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
padding
:
10px
20px
0
;
align-items
:
center
;
overflow
:
hidden
;
justify-content
:
center
;
cursor
:
pointer
;
}
</
style
>
<
style
>
.folder_select
.el-dialog__body
{
height
:
400px
;
}
.customsize-label
.el-select-dropdown__list
{
display
:
flex
;
overflow
:
hidden
auto
;
width
:
500px
;
flex-wrap
:
wrap
;
}
.customsize-label.el-select-dropdown.is-multiple
.el-select-dropdown__item.selected
::after
{
content
:
''
;
display
:
none
;
}
.customsize-label
.el-select-dropdown__item.selected
.el-tag
{
background-color
:
#ecf5ff
;
display
:
inline-block
;
font-size
:
12px
;
color
:
#409eff
;
border-radius
:
4px
;
box-sizing
:
border-box
;
white-space
:
nowrap
;
}
.customsize-label
.el-select-dropdown__item
{
padding
:
0px
10px
;
white-space
:
nowrap
;
flex-shrink
:
0
;
}
.variant_list
>>>
.el-dialog__body
{
border-top
:
1px
solid
#ebeef5
;
}
.variant_list
>>>
.el-dialog__headerbtn
{
top
:
11px
;
}
.variant_wrap
{
height
:
700px
;
overflow
:
auto
;
}
.variant_wrap
::after
{
display
:
block
;
content
:
''
;
clear
:
both
;
}
.empty
{
height
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
color
:
#777
;
}
}
.app-form
{
.app-form
{
...
@@ -596,4 +928,8 @@ export default {
...
@@ -596,4 +928,8 @@ export default {
.el-row
{
.el-row
{
align-items
:
center
;
align-items
:
center
;
}
}
</
style
>
.customize-tree-node__operate
{
display
:
none
;
}
</
style
>
\ No newline at end of file
src/views/system/category-style.vue
View file @
14163a6f
...
@@ -7,34 +7,29 @@
...
@@ -7,34 +7,29 @@
<span
<span
class=
"my-flex-1"
class=
"my-flex-1"
:class=
"
{ active: is_tab == '1' }"
:class=
"
{ active: is_tab == '1' }"
@click="handleClick('1')"
@click="handleClick('1')">
>
类别
类别
</span>
</span>
<span
<span
class=
"my-flex-1"
class=
"my-flex-1"
:class=
"
{ active: is_tab == '2' }"
:class=
"
{ active: is_tab == '2' }"
@click="handleClick('2')"
@click="handleClick('2')">
>
风格
风格
</span>
</span>
</li>
</li>
</ul>
</ul>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-bottom: 0px"
>
<el-form-item
style=
"margin-bottom: 0px"
>
<el-button
type=
"success"
@
click=
"addDialog(1)"
<el-button
type=
"success"
@
click=
"addDialog(1)"
>
新增
</el-button>
>
新增
</el-button
>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-bottom: 0px"
>
<el-form-item
style=
"margin-bottom: 0px"
>
<el-button
type=
"danger"
@
click=
"deleteSection()"
<el-button
type=
"danger"
@
click=
"deleteSection()"
>
删除
</el-button>
>
删除
</el-button
>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-bottom: 0px"
>
<el-form-item
style=
"margin-bottom: 0px"
>
<el-button
type=
"warning"
@
click=
"getList(1)"
<el-button
type=
"warning"
@
click=
"getList(1)"
>
刷新
</el-button>
>
刷新
</el-button
</el-form-item>
>
<el-form-item
style=
"margin-bottom: 0px"
>
<el-button
type=
"primary"
@
click=
"importExcel"
>
导入
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"my-table-cont my-flex-1"
>
<div
class=
"my-table-cont my-flex-1"
>
...
@@ -44,8 +39,7 @@
...
@@ -44,8 +39,7 @@
:treeConfig=
"
{ children: 'children' }"
:treeConfig=
"
{ children: 'children' }"
:selection="true"
:selection="true"
@selectionChange="(v) => (selections = v)"
@selectionChange="(v) => (selections = v)"
:tableColumns="tableColumns"
:tableColumns="tableColumns">
</table-view>
>
</table-view>
</div>
</div>
<div
class=
"pagination"
v-if=
"is_tab == 2"
>
<div
class=
"pagination"
v-if=
"is_tab == 2"
>
<el-pagination
<el-pagination
...
@@ -55,8 +49,7 @@
...
@@ -55,8 +49,7 @@
:page-size=
"paginationOptions.pageSize"
:page-size=
"paginationOptions.pageSize"
:current-page=
"paginationOptions.currentPage"
:current-page=
"paginationOptions.currentPage"
@
size-change=
"sizeChange"
@
size-change=
"sizeChange"
@
current-change=
"onCurrentChange"
@
current-change=
"onCurrentChange"
/>
/>
</div>
</div>
<!-- 弹出层 -->
<!-- 弹出层 -->
...
@@ -64,8 +57,7 @@
...
@@ -64,8 +57,7 @@
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
:title=
"is_title == 1 ? '新增' : '编辑'"
:title=
"is_title == 1 ? '新增' : '编辑'"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
width=
"640px"
width=
"640px"
>
>
<el-form
<el-form
label-position=
"right"
label-position=
"right"
label-width=
"100px"
label-width=
"100px"
...
@@ -73,13 +65,8 @@
...
@@ -73,13 +65,8 @@
:inline=
"true"
:inline=
"true"
:model=
"addcurrencyform"
:model=
"addcurrencyform"
:rules=
"addrules"
:rules=
"addrules"
ref=
"addcurrencyform"
ref=
"addcurrencyform"
>
>
<el-form-item
label=
"上级分类"
v-if=
"is_tab == '1'"
prop=
"pid"
>
<el-form-item
label=
"上级分类"
v-if=
"is_tab == '1'"
prop=
"pid"
>
<!--
<el-select
v-model=
"addcurrencyform.pid"
placeholder=
"请选择上级分类"
>
<!--
<el-select
v-model=
"addcurrencyform.pid"
placeholder=
"请选择上级分类"
>
<el-option
v-for=
"item in all_list"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in all_list"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
-->
</el-select>
-->
...
@@ -89,85 +76,68 @@
...
@@ -89,85 +76,68 @@
v-model=
"addcurrencyform.pid"
v-model=
"addcurrencyform.pid"
:options=
"all_list"
:options=
"all_list"
:props=
"pidoptions"
:props=
"pidoptions"
:show-all-levels=
"false"
:show-all-levels=
"false"
></el-cascader>
></el-cascader>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"类别中文名"
label=
"类别中文名"
prop=
"name"
prop=
"name"
v-if=
"is_tab == '1'"
v-if=
"is_tab == '1'"
required
required
>
>
<el-input
<el-input
v-model=
"addcurrencyform.name"
v-model=
"addcurrencyform.name"
placeholder=
"请输入类别中文名称"
placeholder=
"请输入类别中文名称"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"类别英文名"
label=
"类别英文名"
prop=
"enname"
prop=
"enname"
v-if=
"is_tab == '1'"
v-if=
"is_tab == '1'"
required
required
>
>
<el-input
<el-input
v-model=
"addcurrencyform.enname"
v-model=
"addcurrencyform.enname"
placeholder=
"请输入类别英文名称"
placeholder=
"请输入类别英文名称"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"风格名称"
label=
"风格名称"
prop=
"name"
prop=
"name"
v-if=
"is_tab == '2'"
v-if=
"is_tab == '2'"
required
required
>
>
<el-input
<el-input
v-model=
"addcurrencyform.name"
v-model=
"addcurrencyform.name"
placeholder=
"请输入类别名称"
placeholder=
"请输入类别名称"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"风格编码"
label=
"风格编码"
prop=
"code"
prop=
"code"
v-if=
"is_tab == '2'"
v-if=
"is_tab == '2'"
required
required
>
>
<el-input
<el-input
v-model=
"addcurrencyform.code"
v-model=
"addcurrencyform.code"
placeholder=
"请输入类别名称"
placeholder=
"请输入类别名称"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"排序"
prop=
"remark"
>
<el-form-item
label=
"排序"
prop=
"remark"
>
<el-input
<el-input
style=
"width: 164px"
style=
"width: 164px"
v-model=
"addcurrencyform.sort"
v-model=
"addcurrencyform.sort"
placeholder=
"排序"
placeholder=
"排序"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注信息"
prop=
"remark"
>
<el-form-item
label=
"备注信息"
prop=
"remark"
>
<el-input
<el-input
style=
"width: 438px"
style=
"width: 438px"
v-model=
"addcurrencyform.remark"
v-model=
"addcurrencyform.remark"
placeholder=
"请输入备注信息"
placeholder=
"请输入备注信息"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"相关风格"
prop=
"styleIds"
v-if=
"is_tab == '1'"
>
label=
"相关风格"
prop=
"styleIds"
v-if=
"is_tab == '1'"
>
<el-select
<el-select
v-model=
"addcurrencyform.styleIds"
v-model=
"addcurrencyform.styleIds"
multiple
multiple
placeholder=
"请选择相关风格"
placeholder=
"请选择相关风格"
style=
"width: 438px"
style=
"width: 438px"
filterable
filterable
>
>
<el-option
<el-option
v-for=
"(item, index) in all_list2"
v-for=
"(item, index) in all_list2"
:key=
"index"
:key=
"index"
:label=
"item.name"
:label=
"item.name"
:value=
"item.id"
:value=
"item.id"
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
...
@@ -175,48 +145,38 @@
...
@@ -175,48 +145,38 @@
prop=
"skuPropertyIds"
prop=
"skuPropertyIds"
required
required
v-if=
"
v-if=
"
is_tab == '1' &&
is_tab == '1' && (addcurrencyform.pid === 0 || !addcurrencyform.pid)
(addcurrencyform.pid === 0 ||
"
>
!addcurrencyform.pid)
"
>
<el-select
<el-select
v-model=
"addcurrencyform.skuPropertyIds"
v-model=
"addcurrencyform.skuPropertyIds"
multiple
multiple
filterable
filterable
placeholder=
"请选择相关属性"
placeholder=
"请选择相关属性"
style=
"width: 438px"
style=
"width: 438px"
>
>
<el-option
<el-option
v-for=
"item in skuCategory"
v-for=
"item in skuCategory"
:key=
"item.id"
:key=
"item.id"
:value=
"item.id"
:value=
"item.id"
:label=
"item.cnname + '(' + item.enname + ')'"
:label=
"item.cnname + '(' + item.enname + ')'"
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"一般属性"
label=
"一般属性"
prop=
"generalPropertyIds"
prop=
"generalPropertyIds"
v-if=
"
v-if=
"
is_tab == '1' &&
is_tab == '1' && (addcurrencyform.pid === 0 || !addcurrencyform.pid)
(addcurrencyform.pid === 0 ||
"
>
!addcurrencyform.pid)
"
>
<el-select
<el-select
v-model=
"addcurrencyform.generalPropertyIds"
v-model=
"addcurrencyform.generalPropertyIds"
multiple
multiple
filterable
filterable
placeholder=
"请选择相关属性"
placeholder=
"请选择相关属性"
style=
"width: 438px"
style=
"width: 438px"
>
>
<el-option
<el-option
v-for=
"item in generalCategory"
v-for=
"item in generalCategory"
:key=
"item.id"
:key=
"item.id"
:value=
"item.id"
:value=
"item.id"
:label=
"item.cnname + '(' + item.enname + ')'"
:label=
"item.cnname + '(' + item.enname + ')'"
></el-option>
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -224,16 +184,14 @@
...
@@ -224,16 +184,14 @@
<el-button
<el-button
@
click=
"dialogVisible = false"
@
click=
"dialogVisible = false"
size=
"mini"
size=
"mini"
style=
"width: 130px"
style=
"width: 130px"
>
>
取消
取消
</el-button>
</el-button>
<el-button
<el-button
type=
"primary"
type=
"primary"
@
click=
"addCurrency()"
@
click=
"addCurrency()"
size=
"mini"
size=
"mini"
style=
"width: 130px"
style=
"width: 130px"
>
>
确认
确认
</el-button>
</el-button>
</span>
</span>
...
@@ -243,43 +201,26 @@
...
@@ -243,43 +201,26 @@
:title=
"`设置默认供应商($
{currentCateName})`"
:title=
"`设置默认供应商($
{currentCateName})`"
:visible.sync="setDefVisivle"
:visible.sync="setDefVisivle"
width="790px"
width="790px"
:close-on-click-modal="false"
:close-on-click-modal="false">
>
<el-input
<el-input
v-model=
"supplierName"
v-model=
"supplierName"
placeholder=
""
placeholder=
""
style=
"width: 200px; margin-bottom: 10px"
style=
"width: 200px; margin-bottom: 10px"
clearable
clearable
></el-input>
></el-input>
<div
style=
"min-height: 100px; max-height: 500px"
>
<div
style=
"min-height: 100px; max-height: 500px"
>
<el-radio-group
<el-radio-group
v-model=
"supplierId"
style=
"width: 100%"
>
v-model=
"supplierId"
style=
"width: 100%"
>
<div
<div
style=
"
style=
"display: inline-block; width: 33.33%; margin-bottom: 10px"
display: inline-block;
width: 33.33%;
margin-bottom: 10px;
"
v-for=
"(item, index) in supplierlist"
v-for=
"(item, index) in supplierlist"
:key=
"index"
:key=
"index"
>
>
<el-radio
:label=
"item.id"
>
{{
item
.
name
}}
</el-radio>
<el-radio
:label=
"item.id"
>
{{
item
.
name
}}
</el-radio>
</div>
</div>
</el-radio-group>
</el-radio-group>
</div>
</div>
<span
slot=
"footer"
>
<span
slot=
"footer"
>
<el-button
@
click=
"setDefVisivle = false"
<el-button
@
click=
"setDefVisivle = false"
>
取消
</el-button>
>
取消
</el-button
<el-button
type=
"primary"
@
click=
"submitDefaultSupplier"
>
>
<el-button
type=
"primary"
@
click=
"submitDefaultSupplier"
>
保存
保存
</el-button>
</el-button>
</span>
</span>
...
@@ -289,10 +230,11 @@
...
@@ -289,10 +230,11 @@
<
script
>
<
script
>
import
axios
from
'../../common/api/axios'
import
axios
from
'../../common/api/axios'
import
TableView
from
'@/common/components/base/tableView.vue'
import
TableView
from
'@/common/components/base/tableView.vue'
export
default
{
export
default
{
name
:
'supply_category'
,
name
:
'supply_category'
,
components
:
{
components
:
{
TableView
,
TableView
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -313,7 +255,7 @@ export default {
...
@@ -313,7 +255,7 @@ export default {
styleIds
:
[],
styleIds
:
[],
styleNames
:
''
,
styleNames
:
''
,
pid
:
0
,
pid
:
0
,
propertyIds
:
[]
,
propertyIds
:
[]
},
},
addcurrencyform2
:
null
,
addcurrencyform2
:
null
,
formId
:
null
,
formId
:
null
,
...
@@ -325,12 +267,12 @@ export default {
...
@@ -325,12 +267,12 @@ export default {
label
:
'name'
,
label
:
'name'
,
value
:
'id'
,
value
:
'id'
,
checkStrictly
:
true
,
checkStrictly
:
true
,
emitPath
:
false
,
emitPath
:
false
},
},
paginationOptions
:
{
paginationOptions
:
{
pageSize
:
100
,
pageSize
:
100
,
currentPage
:
1
,
currentPage
:
1
,
total
:
0
,
total
:
0
},
},
category
:
[],
category
:
[],
supplierList
:
[],
supplierList
:
[],
...
@@ -340,22 +282,18 @@ export default {
...
@@ -340,22 +282,18 @@ export default {
supplierName
:
''
,
supplierName
:
''
,
selections
:
[],
selections
:
[],
skuCategory
:
[],
skuCategory
:
[],
generalCategory
:
[]
,
generalCategory
:
[]
}
}
},
},
created
()
{
created
()
{
// this.alllist("baseStyleInfo/all_list", "all_list2");
// this.alllist("baseStyleInfo/all_list", "all_list2");
this
.
getList
(
1
)
this
.
getList
(
1
)
this
.
addcurrencyform2
=
JSON
.
parse
(
this
.
addcurrencyform2
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
addcurrencyform
))
JSON
.
stringify
(
this
.
addcurrencyform
),
)
},
},
computed
:
{
computed
:
{
supplierlist
()
{
supplierlist
()
{
return
this
.
supplierList
.
filter
(
return
this
.
supplierList
.
filter
(
(
item
)
=>
(
item
)
=>
item
.
name
&&
item
.
name
.
indexOf
(
this
.
supplierName
)
!==
-
1
item
.
name
&&
item
.
name
.
indexOf
(
this
.
supplierName
)
!==
-
1
,
)
)
},
},
tableColumns
()
{
tableColumns
()
{
...
@@ -384,49 +322,48 @@ export default {
...
@@ -384,49 +322,48 @@ export default {
?
'#4168FF'
?
'#4168FF'
:
item
.
deep
===
2
:
item
.
deep
===
2
?
'#67c23a'
?
'#67c23a'
:
''
,
:
''
}}
}}
><
/span
>
><
/span
>
<
span
>
{
item
.
name
}
<
/span
>
<
span
>
{
item
.
name
}
<
/span
>
<
/div
>
<
/div
>
)
,
)
},
},
{
{
label
:
'类别英文名'
,
label
:
'类别英文名'
,
key
:
'enname'
,
key
:
'enname'
,
align
:
'left'
,
align
:
'left'
,
width
:
130
,
width
:
130
},
},
{
{
label
:
'相关风格'
,
label
:
'相关风格'
,
key
:
'styleNames'
,
key
:
'styleNames'
,
align
:
'left'
,
align
:
'left'
,
width
:
200
,
width
:
200
},
},
{
{
label
:
'SKU属性'
,
label
:
'SKU属性'
,
key
:
'skuPropertyNames'
,
key
:
'skuPropertyNames'
,
align
:
'left'
,
align
:
'left'
,
width
:
200
,
width
:
200
},
},
{
{
label
:
'一般属性'
,
label
:
'一般属性'
,
key
:
'propertyNames'
,
key
:
'propertyNames'
,
align
:
'left'
,
align
:
'left'
}
,
}
]
]
}
else
{
}
else
{
arr
=
[
arr
=
[
{
{
label
:
'风格名称'
,
label
:
'风格名称'
,
key
:
'name'
,
key
:
'name'
,
align
:
'left'
,
align
:
'left'
},
},
{
{
label
:
'风格编码'
,
label
:
'风格编码'
,
key
:
'code'
,
key
:
'code'
,
align
:
'left'
,
align
:
'left'
}
,
}
]
]
}
}
return
[
return
[
...
@@ -435,12 +372,12 @@ export default {
...
@@ -435,12 +372,12 @@ export default {
label
:
'排序'
,
label
:
'排序'
,
key
:
'sort'
,
key
:
'sort'
,
align
:
'right'
,
align
:
'right'
,
width
:
100
,
width
:
100
},
},
{
{
label
:
'备注信息'
,
label
:
'备注信息'
,
key
:
'remark'
,
key
:
'remark'
,
align
:
'center'
,
align
:
'center'
},
},
{
{
label
:
'相关操作'
,
label
:
'相关操作'
,
...
@@ -450,29 +387,21 @@ export default {
...
@@ -450,29 +387,21 @@ export default {
width
:
100
,
width
:
100
,
render
:
(
item
)
=>
(
render
:
(
item
)
=>
(
<
div
>
<
div
>
<
span
<
span
class
=
"icon-view icon-edit-view"
title
=
"编辑"
>
class
=
"icon-view icon-edit-view"
title
=
"编辑"
>
<
i
<
i
class
=
"el-icon-edit"
class
=
"el-icon-edit"
onClick
=
{()
=>
this
.
addDialog
(
2
,
item
)}
onClick
=
{()
=>
this
.
addDialog
(
2
,
item
)}
><
/i
>
><
/i
>
<
/span
>
<
/span
>
<
span
<
span
class
=
"icon-view icon-del-view"
title
=
"删除"
>
class
=
"icon-view icon-del-view"
title
=
"删除"
>
<
i
<
i
class
=
"el-icon-delete-solid"
class
=
"el-icon-delete-solid"
onClick
=
{()
=>
this
.
deleteSection
(
item
)}
onClick
=
{()
=>
this
.
deleteSection
(
item
)}
><
/i
>
><
/i
>
<
/span
>
<
/span
>
<
/div
>
<
/div
>
)
,
)
}
,
}
]
]
}
,
}
},
},
// watch: {
// watch: {
// select_tab(val) {
// select_tab(val) {
...
@@ -486,10 +415,31 @@ export default {
...
@@ -486,10 +415,31 @@ export default {
text_join
(
value
)
{
text_join
(
value
)
{
if
(
!
value
)
return
''
if
(
!
value
)
return
''
return
value
.
join
(
','
)
return
value
.
join
(
','
)
}
,
}
},
},
methods
:
{
methods
:
{
importExcel
()
{
const
input
=
document
.
createElement
(
'input'
)
input
.
style
.
display
=
'none'
input
.
type
=
'file'
input
.
click
()
input
.
onchange
=
async
()
=>
{
const
form
=
new
FormData
()
form
.
append
(
'importExcel'
,
input
.
files
.
length
>
0
?
input
.
files
[
0
]
:
[])
const
res
=
await
axios
.
post
(
this
.
is_tab
===
'1'
?
'baseCategoryInfo/importBaseCategoryInfo'
:
'baseStyleInfo/importBaseStyleInfo'
,
form
)
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'导入成功'
)
this
.
getList
()
}
}
},
onCurrentChange
(
currentPage
)
{
onCurrentChange
(
currentPage
)
{
this
.
paginationOptions
.
currentPage
=
currentPage
this
.
paginationOptions
.
currentPage
=
currentPage
this
.
getList
()
this
.
getList
()
...
@@ -502,7 +452,7 @@ export default {
...
@@ -502,7 +452,7 @@ export default {
axios
axios
.
post
(
'baseCategoryInfo/setDefaultSupplier'
,
{
.
post
(
'baseCategoryInfo/setDefaultSupplier'
,
{
id
:
this
.
currentCateId
,
id
:
this
.
currentCateId
,
defaultSupplierId
:
this
.
supplierId
,
defaultSupplierId
:
this
.
supplierId
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
this
.
$message
.
success
(
res
.
message
)
this
.
$message
.
success
(
res
.
message
)
...
@@ -517,14 +467,12 @@ export default {
...
@@ -517,14 +467,12 @@ export default {
this
.
supplierId
=
''
this
.
supplierId
=
''
axios
axios
.
get
(
'supplySupplier/getSupplyByCategory'
,
{
.
get
(
'supplySupplier/getSupplyByCategory'
,
{
params
:
{
categoryId
:
item
.
id
}
,
params
:
{
categoryId
:
item
.
id
}
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
const
supplierList
=
res
.
data
||
[]
const
supplierList
=
res
.
data
||
[]
if
(
supplierList
.
length
===
0
)
{
if
(
supplierList
.
length
===
0
)
{
return
this
.
$message
.
warning
(
return
this
.
$message
.
warning
(
'该分类下暂无供应商'
)
'该分类下暂无供应商'
,
)
}
else
{
}
else
{
this
.
setDefVisivle
=
true
this
.
setDefVisivle
=
true
this
.
supplierList
=
supplierList
this
.
supplierList
=
supplierList
...
@@ -535,15 +483,9 @@ export default {
...
@@ -535,15 +483,9 @@ export default {
if
(
this
.
all_list2
.
length
>
0
)
return
if
(
this
.
all_list2
.
length
>
0
)
return
this
.
alllist
(
'baseStyleInfo/all_list'
,
'all_list2'
)
this
.
alllist
(
'baseStyleInfo/all_list'
,
'all_list2'
)
if
(
this
.
skuCategory
.
length
>
0
)
return
if
(
this
.
skuCategory
.
length
>
0
)
return
this
.
alllist
(
this
.
alllist
(
'baseProperty/all_list_sku'
,
'skuCategory'
)
'baseProperty/all_list_sku'
,
'skuCategory'
,
)
if
(
this
.
generalCategory
.
length
>
0
)
return
if
(
this
.
generalCategory
.
length
>
0
)
return
this
.
alllist
(
this
.
alllist
(
'baseProperty/all_list_general'
,
'generalCategory'
)
'baseProperty/all_list_general'
,
'generalCategory'
,
)
},
},
search
()
{
search
()
{
this
.
currentPage
=
1
this
.
currentPage
=
1
...
@@ -561,10 +503,7 @@ export default {
...
@@ -561,10 +503,7 @@ export default {
addDialog
(
i
,
v
=
null
)
{
addDialog
(
i
,
v
=
null
)
{
this
.
getStyle
()
this
.
getStyle
()
if
(
this
.
is_tab
===
'1'
)
{
if
(
this
.
is_tab
===
'1'
)
{
this
.
alllist
(
this
.
alllist
(
'baseCategoryInfo/tree_list'
,
'all_list'
)
'baseCategoryInfo/tree_list'
,
'all_list'
,
)
}
}
if
(
i
===
2
)
{
if
(
i
===
2
)
{
if
(
v
)
this
.
formId
=
v
.
id
if
(
v
)
this
.
formId
=
v
.
id
...
@@ -575,7 +514,7 @@ export default {
...
@@ -575,7 +514,7 @@ export default {
}
else
{
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
addcurrencyform
=
JSON
.
parse
(
this
.
addcurrencyform
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
addcurrencyform2
)
,
JSON
.
stringify
(
this
.
addcurrencyform2
)
)
)
})
})
this
.
is_title
=
i
this
.
is_title
=
i
...
@@ -604,15 +543,14 @@ export default {
...
@@ -604,15 +543,14 @@ export default {
},
},
getList
()
{
getList
()
{
if
(
this
.
is_tab
===
'2'
)
{
if
(
this
.
is_tab
===
'2'
)
{
const
{
pageSize
,
currentPage
}
=
const
{
pageSize
,
currentPage
}
=
this
.
paginationOptions
this
.
paginationOptions
axios
axios
.
get
(
'baseStyleInfo/list_page'
,
{
.
get
(
'baseStyleInfo/list_page'
,
{
params
:
{
params
:
{
pageSize
:
pageSize
,
pageSize
:
pageSize
,
currentPage
:
currentPage
,
currentPage
:
currentPage
},
},
baseURL
:
'/api/manage/rest'
,
baseURL
:
'/api/manage/rest'
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
...
@@ -622,76 +560,66 @@ export default {
...
@@ -622,76 +560,66 @@ export default {
this
.
paginationOptions
.
total
=
res
.
data
.
total
this
.
paginationOptions
.
total
=
res
.
data
.
total
}
else
{
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
})
})
}
}
})
})
}
else
{
}
else
{
this
.
alllist
(
this
.
alllist
(
'baseCategoryInfo/tree_list'
,
'sourceData'
)
'baseCategoryInfo/tree_list'
,
'sourceData'
,
)
}
}
},
},
selectSection
()
{
selectSection
()
{
const
text
=
const
text
=
this
.
is_tab
===
'1'
?
'baseCategoryInfo'
:
'baseStyleInfo'
this
.
is_tab
===
'1'
?
'baseCategoryInfo'
:
'baseStyleInfo'
const
url
=
`
${
text
}
/get?id=
${
this
.
formId
}
`
const
url
=
`
${
text
}
/get?id=
${
this
.
formId
}
`
axios
.
get
(
url
,
{
axios
baseURL
:
'/api/manage/rest'
,
.
get
(
url
,
{
}).
then
((
res
)
=>
{
baseURL
:
'/api/manage/rest'
if
(
res
.
code
===
200
)
{
})
const
data
=
res
.
data
.
then
((
res
)
=>
{
this
.
addcurrencyform
=
Object
.
assign
({},
data
)
if
(
res
.
code
===
200
)
{
this
.
is_title
=
2
const
data
=
res
.
data
this
.
dialogVisible
=
true
this
.
addcurrencyform
=
Object
.
assign
({},
data
)
}
else
{
this
.
is_title
=
2
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
this
.
dialogVisible
=
true
dangerouslyUseHTMLString
:
true
,
}
else
{
})
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
}
dangerouslyUseHTMLString
:
true
})
})
}
})
},
},
upSection
()
{
upSection
()
{
const
text
=
const
text
=
this
.
is_tab
===
'1'
?
'baseCategoryInfo'
:
'baseStyleInfo'
this
.
is_tab
===
'1'
?
'baseCategoryInfo'
:
'baseStyleInfo'
const
url
=
`
${
text
}
/update`
const
url
=
`
${
text
}
/update`
axios
.
post
(
url
,
this
.
addcurrencyform
).
then
((
res
)
=>
{
axios
.
post
(
url
,
this
.
addcurrencyform
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
this
.
$message
({
this
.
$message
({
message
:
'修改成功'
,
message
:
'修改成功'
,
type
:
'success'
,
type
:
'success'
})
})
this
.
getList
(
this
.
currentPage
)
this
.
getList
(
this
.
currentPage
)
}
else
{
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
})
})
}
}
})
})
},
},
addSection
()
{
addSection
()
{
const
text
=
const
text
=
this
.
is_tab
===
'1'
?
'baseCategoryInfo'
:
'baseStyleInfo'
this
.
is_tab
===
'1'
?
'baseCategoryInfo'
:
'baseStyleInfo'
const
url
=
`
${
text
}
/add`
const
url
=
`
${
text
}
/add`
axios
.
post
(
url
,
this
.
addcurrencyform
).
then
((
res
)
=>
{
axios
.
post
(
url
,
this
.
addcurrencyform
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
dialogVisible
=
false
this
.
dialogVisible
=
false
this
.
$message
({
this
.
$message
({
message
:
'添加成功'
,
message
:
'添加成功'
,
type
:
'success'
,
type
:
'success'
})
})
this
.
getList
(
this
.
currentPage
)
this
.
getList
(
this
.
currentPage
)
}
else
{
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
})
})
}
}
})
})
...
@@ -712,19 +640,17 @@ export default {
...
@@ -712,19 +640,17 @@ export default {
this
.
$confirm
(
'确定删除选中的信息?'
,
'提示'
,
{
this
.
$confirm
(
'确定删除选中的信息?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
})
})
.
then
(()
=>
{
.
then
(()
=>
{
const
text
=
const
text
=
this
.
is_tab
===
'1'
this
.
is_tab
===
'1'
?
'baseCategoryInfo'
:
'baseStyleInfo'
?
'baseCategoryInfo'
:
'baseStyleInfo'
const
url
=
`
${
text
}
/delete?ids=
${
ids
}
`
const
url
=
`
${
text
}
/delete?ids=
${
ids
}
`
axios
.
get
(
url
).
then
((
res
)
=>
{
axios
.
get
(
url
).
then
((
res
)
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'删除成功!'
,
message
:
'删除成功!'
})
})
this
.
getList
(
this
.
currentPage
)
this
.
getList
(
this
.
currentPage
)
}
}
...
@@ -733,24 +659,22 @@ export default {
...
@@ -733,24 +659,22 @@ export default {
.
catch
(()
=>
{})
.
catch
(()
=>
{})
},
},
alllist
(
url
,
arr
)
{
alllist
(
url
,
arr
)
{
axios
axios
.
get
(
url
,
{
baseURL
:
'/api/manage/rest'
}).
then
((
res
)
=>
{
.
get
(
url
,
{
baseURL
:
'/api/manage/rest'
})
if
(
res
.
code
===
200
)
{
.
then
((
res
)
=>
{
this
[
arr
]
=
res
.
data
if
(
res
.
code
===
200
)
{
this
.
$nextTick
(()
=>
{
this
[
arr
]
=
res
.
data
if
(
this
.
$refs
.
addcurrencyform
)
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
addcurrencyform
.
clearValidate
()
if
(
this
.
$refs
.
addcurrencyform
)
{
}
this
.
$refs
.
addcurrencyform
.
clearValidate
()
})
}
}
else
{
})
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
}
else
{
dangerouslyUseHTMLString
:
true
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
})
dangerouslyUseHTMLString
:
true
,
}
})
})
}
}
})
}
},
},
}
}
</
script
>
</
script
>
<
style
>
<
style
>
...
...
src/views/system/sku-manage.vue
View file @
14163a6f
...
@@ -24,37 +24,27 @@
...
@@ -24,37 +24,27 @@
size=
"mini"
size=
"mini"
@
submit
.
native
.
prevent
@
submit
.
native
.
prevent
v-enter-submit=
"search"
v-enter-submit=
"search"
class=
"search_form"
class=
"search_form"
>
>
<template>
<template>
<el-form-item
label=
"名称"
>
<el-form-item
label=
"名称"
>
<el-input
<el-input
v-model=
"searchForm.name"
v-model=
"searchForm.name"
placeholder=
"中文或英文"
placeholder=
"中文或英文"
clearable
clearable
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"编码"
>
<el-form-item
label=
"编码"
>
<el-input
<el-input
v-model=
"searchForm.code"
v-model=
"searchForm.code"
placeholder=
"中文或英文"
placeholder=
"中文或英文"
clearable
clearable
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"类别"
prop=
"employeeName"
>
<el-form-item
label=
"类别"
prop=
"employeeName"
>
<el-select
<el-select
v-model=
"searchForm.cateCode"
v-model=
"searchForm.cateCode"
clearable
clearable
placeholder=
"请选择"
placeholder=
"请选择"
>
>
<el-option
label=
"颜色"
value=
"Color"
></el-option>
<el-option
<el-option
label=
"尺寸"
value=
"Size"
></el-option>
label=
"颜色"
value=
"Color"
></el-option>
<el-option
label=
"尺寸"
value=
"Size"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
...
@@ -74,21 +64,19 @@
...
@@ -74,21 +64,19 @@
type=
"primary"
type=
"primary"
@
click=
"search()"
@
click=
"search()"
icon=
"el-icon-search"
icon=
"el-icon-search"
native-type=
"submit"
native-type=
"submit"
>
>
查询
查询
</el-button>
</el-button>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<el-form-item>
<el-form-item>
<el-button
type=
"success"
@
click=
"addDialog(1)"
<el-button
type=
"success"
@
click=
"addDialog(1)"
>
新增
</el-button>
>
新增
</el-button
>
</el-form-item>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"danger"
@
click=
"deleteSection()"
<el-button
type=
"danger"
@
click=
"deleteSection()"
>
删除
</el-button>
>
删除
</el-button
</el-form-item>
>
<el-form-item
style=
"margin-bottom: 0px"
>
<el-button
type=
"primary"
@
click=
"importExcel"
>
导入
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<div
class=
"table-wrap"
v-loading=
"loading"
>
<div
class=
"table-wrap"
v-loading=
"loading"
>
...
@@ -98,14 +86,12 @@
...
@@ -98,14 +86,12 @@
:selection=
"true"
:selection=
"true"
:tableColumns=
"tableColumns"
:tableColumns=
"tableColumns"
@
selectionChange=
"selectionChange"
@
selectionChange=
"selectionChange"
@
currentChange=
"currentTabFn"
@
currentChange=
"currentTabFn"
></my-table>
></my-table>
</div>
</div>
<div
class=
"pagination"
>
<div
class=
"pagination"
>
<pagination
<pagination
:setValue=
"setpaginationOptions"
:setValue=
"setpaginationOptions"
:options=
"paginationOptions"
:options=
"paginationOptions"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -114,8 +100,7 @@
...
@@ -114,8 +100,7 @@
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
:title=
"is_title == 1 ? '新增' : '编辑'"
:title=
"is_title == 1 ? '新增' : '编辑'"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
width=
"700px"
width=
"700px"
>
>
<el-form
<el-form
label-position=
"right"
label-position=
"right"
label-width=
"100px"
label-width=
"100px"
...
@@ -123,58 +108,42 @@
...
@@ -123,58 +108,42 @@
:inline=
"true"
:inline=
"true"
:model=
"addcurrencyform"
:model=
"addcurrencyform"
:rules=
"addrules"
:rules=
"addrules"
ref=
"addcurrencyform"
ref=
"addcurrencyform"
>
>
<el-form-item
label=
"中文名"
prop=
"cnname"
required
>
<el-form-item
label=
"中文名"
prop=
"cnname"
required
>
<el-input
<el-input
style=
"width: 164px"
style=
"width: 164px"
v-model=
"addcurrencyform.cnname"
v-model=
"addcurrencyform.cnname"
placeholder=
"请输入中文名"
placeholder=
"请输入中文名"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"英文名"
prop=
"enname"
required
>
<el-form-item
label=
"英文名"
prop=
"enname"
required
>
<el-input
<el-input
style=
"width: 164px"
style=
"width: 164px"
v-model=
"addcurrencyform.enname"
v-model=
"addcurrencyform.enname"
placeholder=
"请输入英文名"
placeholder=
"请输入英文名"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"编码"
prop=
"code"
required
>
<el-form-item
label=
"编码"
prop=
"code"
required
>
<el-input
<el-input
style=
"width: 164px"
style=
"width: 164px"
v-model=
"addcurrencyform.code"
v-model=
"addcurrencyform.code"
maxlength=
"7"
maxlength=
"7"
placeholder=
"请输入编码"
placeholder=
"请输入编码"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
<el-form-item
label=
"类别"
prop=
"cateCode"
required
>
label=
"类别"
prop=
"cateCode"
required
>
<el-select
<el-select
v-model=
"addcurrencyform.cateCode"
v-model=
"addcurrencyform.cateCode"
style=
"width: 164px"
style=
"width: 164px"
clearable
clearable
placeholder=
"请选择"
placeholder=
"请选择"
>
>
<el-option
label=
"颜色"
value=
"Color"
></el-option>
<el-option
<el-option
label=
"尺寸"
value=
"Size"
></el-option>
label=
"颜色"
value=
"Color"
></el-option>
<el-option
label=
"尺寸"
value=
"Size"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"排序序号"
prop=
"sort"
>
<el-form-item
label=
"排序序号"
prop=
"sort"
>
<el-input
<el-input
style=
"width: 164px"
style=
"width: 164px"
v-model
.
number=
"addcurrencyform.sort"
v-model
.
number=
"addcurrencyform.sort"
placeholder=
"请输入数字"
placeholder=
"请输入数字"
></el-input>
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否带电池"
>
<el-form-item
label=
"是否带电池"
>
<el-select
<el-select
...
@@ -182,13 +151,9 @@
...
@@ -182,13 +151,9 @@
v-model=
"addcurrencyform.battery"
v-model=
"addcurrencyform.battery"
clearable
clearable
value-key=
""
value-key=
""
placeholder=
"请选择"
placeholder=
"请选择"
>
>
<el-option
label=
"是"
:value=
"true"
></el-option>
<el-option
label=
"是"
:value=
"true"
></el-option>
<el-option
<el-option
label=
"否"
:value=
"false"
></el-option>
label=
"否"
:value=
"false"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否液体"
>
<el-form-item
label=
"是否液体"
>
...
@@ -197,13 +162,9 @@
...
@@ -197,13 +162,9 @@
v-model=
"addcurrencyform.liquid"
v-model=
"addcurrencyform.liquid"
clearable
clearable
value-key=
""
value-key=
""
placeholder=
"请选择"
placeholder=
"请选择"
>
>
<el-option
label=
"是"
:value=
"true"
></el-option>
<el-option
label=
"是"
:value=
"true"
></el-option>
<el-option
<el-option
label=
"否"
:value=
"false"
></el-option>
label=
"否"
:value=
"false"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否刀具"
>
<el-form-item
label=
"是否刀具"
>
...
@@ -212,44 +173,36 @@
...
@@ -212,44 +173,36 @@
v-model=
"addcurrencyform.knife"
v-model=
"addcurrencyform.knife"
clearable
clearable
value-key=
""
value-key=
""
placeholder=
"请选择"
placeholder=
"请选择"
>
>
<el-option
label=
"是"
:value=
"true"
></el-option>
<el-option
label=
"是"
:value=
"true"
></el-option>
<el-option
<el-option
label=
"否"
:value=
"false"
></el-option>
label=
"否"
:value=
"false"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"文字色"
>
<el-form-item
label=
"文字色"
>
<el-color-picker
<el-color-picker
style=
"width: 164px"
style=
"width: 164px"
v-model=
"addcurrencyform.fontColor"
v-model=
"addcurrencyform.fontColor"
size=
"small"
size=
"small"
></el-color-picker>
></el-color-picker>
</el-form-item>
</el-form-item>
<el-form-item
label=
"背景色"
prop=
"remark"
>
<el-form-item
label=
"背景色"
prop=
"remark"
>
<el-color-picker
<el-color-picker
style=
"width: 164px"
style=
"width: 164px"
v-model=
"addcurrencyform.bgColor"
v-model=
"addcurrencyform.bgColor"
size=
"small"
size=
"small"
></el-color-picker>
></el-color-picker>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
@
click=
"dialogVisible = false"
@
click=
"dialogVisible = false"
size=
"mini"
size=
"mini"
style=
"width: 100px"
style=
"width: 100px"
>
>
取消
取消
</el-button>
</el-button>
<el-button
<el-button
type=
"primary"
type=
"primary"
@
click=
"addCurrency()"
@
click=
"addCurrency()"
size=
"mini"
size=
"mini"
style=
"width: 100px"
style=
"width: 100px"
>
>
确认
确认
</el-button>
</el-button>
</span>
</span>
...
@@ -262,7 +215,7 @@ import MyTable from '@/common/components/base/tableView.vue'
...
@@ -262,7 +215,7 @@ import MyTable from '@/common/components/base/tableView.vue'
export
default
{
export
default
{
name
:
'system_sku-manage'
,
name
:
'system_sku-manage'
,
components
:
{
components
:
{
MyTable
,
MyTable
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -275,7 +228,7 @@ export default {
...
@@ -275,7 +228,7 @@ export default {
searchForm
:
{
searchForm
:
{
cateId
:
''
,
cateId
:
''
,
code
:
''
,
code
:
''
,
name
:
''
,
name
:
''
},
},
addcurrencyform
:
{
addcurrencyform
:
{
sort
:
''
,
sort
:
''
,
...
@@ -284,7 +237,7 @@ export default {
...
@@ -284,7 +237,7 @@ export default {
cnname
:
''
,
cnname
:
''
,
enname
:
''
,
enname
:
''
,
fontColor
:
''
,
fontColor
:
''
,
bgColor
:
''
,
bgColor
:
''
},
},
all_list
:
[],
all_list
:
[],
addcurrencyform2
:
null
,
addcurrencyform2
:
null
,
...
@@ -293,11 +246,11 @@ export default {
...
@@ -293,11 +246,11 @@ export default {
paginationOptions
:
{
paginationOptions
:
{
pageSize
:
100
,
pageSize
:
100
,
currentPage
:
1
,
currentPage
:
1
,
total
:
0
,
total
:
0
},
},
defaultProps
:
{
defaultProps
:
{
label
:
'name'
,
label
:
'name'
}
,
}
}
}
},
},
computed
:
{
computed
:
{
...
@@ -308,7 +261,7 @@ export default {
...
@@ -308,7 +261,7 @@ export default {
{
label
:
'编码'
,
key
:
'code'
},
{
label
:
'编码'
,
key
:
'code'
},
{
{
label
:
'类别'
,
label
:
'类别'
,
key
:
'cateName'
,
key
:
'cateName'
},
},
{
label
:
'排列序号'
,
key
:
'sort'
,
width
:
80
},
{
label
:
'排列序号'
,
key
:
'sort'
,
width
:
80
},
...
@@ -322,10 +275,9 @@ export default {
...
@@ -322,10 +275,9 @@ export default {
width
:
'20px'
,
width
:
'20px'
,
height
:
'20px'
,
height
:
'20px'
,
display
:
'inline-block'
,
display
:
'inline-block'
,
backgroundColor
:
item
.
fontColor
,
backgroundColor
:
item
.
fontColor
}}
}}
><
/span
>
><
/span
>
)
),
},
},
{
{
label
:
'背景色'
,
label
:
'背景色'
,
...
@@ -337,39 +289,30 @@ export default {
...
@@ -337,39 +289,30 @@ export default {
width
:
'20px'
,
width
:
'20px'
,
height
:
'20px'
,
height
:
'20px'
,
display
:
'inline-block'
,
display
:
'inline-block'
,
backgroundColor
:
item
.
bgColor
,
backgroundColor
:
item
.
bgColor
}}
}}
><
/span
>
><
/span
>
)
),
},
},
{
{
label
:
'相关操作'
,
label
:
'相关操作'
,
width
:
80
,
width
:
80
,
render
:
(
item
)
=>
(
render
:
(
item
)
=>
(
<
div
>
<
div
>
<
span
<
span
class
=
"icon-view icon-edit-view"
title
=
"编辑"
>
class
=
"icon-view icon-edit-view"
title
=
"编辑"
>
<
i
<
i
class
=
"el-icon-edit"
class
=
"el-icon-edit"
onClick
=
{()
=>
this
.
addDialog
(
2
,
item
)}
onClick
=
{()
=>
this
.
addDialog
(
2
,
item
)}
><
/i
>
><
/i
>
<
/span
>
<
/span
>
<
span
<
span
class
=
"icon-view icon-del-view"
title
=
"删除"
>
class
=
"icon-view icon-del-view"
title
=
"删除"
>
<
i
<
i
class
=
"el-icon-delete-solid"
class
=
"el-icon-delete-solid"
onClick
=
{()
=>
this
.
deleteSection
(
item
)}
onClick
=
{()
=>
this
.
deleteSection
(
item
)}
><
/i
>
><
/i
>
<
/span
>
<
/span
>
<
/div
>
<
/div
>
)
,
)
}
,
}
]
]
}
,
}
// categoryList() {
// categoryList() {
// const list = [
// const list = [
// {
// {
...
@@ -395,9 +338,7 @@ export default {
...
@@ -395,9 +338,7 @@ export default {
created
()
{
created
()
{
this
.
alllist
(
'baseProperty/all_list'
)
this
.
alllist
(
'baseProperty/all_list'
)
this
.
getList
(
1
)
this
.
getList
(
1
)
this
.
addcurrencyform2
=
JSON
.
parse
(
this
.
addcurrencyform2
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
addcurrencyform
))
JSON
.
stringify
(
this
.
addcurrencyform
),
)
},
},
methods
:
{
methods
:
{
...
@@ -432,7 +373,7 @@ export default {
...
@@ -432,7 +373,7 @@ export default {
}
else
{
}
else
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
addcurrencyform
=
JSON
.
parse
(
this
.
addcurrencyform
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
addcurrencyform2
)
,
JSON
.
stringify
(
this
.
addcurrencyform2
)
)
)
})
})
}
}
...
@@ -450,6 +391,25 @@ export default {
...
@@ -450,6 +391,25 @@ export default {
this
.
upSection
()
this
.
upSection
()
}
}
},
},
importExcel
()
{
const
input
=
document
.
createElement
(
'input'
)
input
.
style
.
display
=
'none'
input
.
type
=
'file'
input
.
click
()
input
.
onchange
=
async
()
=>
{
const
form
=
new
FormData
()
form
.
append
(
'importExcel'
,
input
.
files
.
length
>
0
?
input
.
files
[
0
]
:
[])
const
res
=
await
axios
.
post
(
'base/propertyValue/importBasePropertyValue'
,
form
)
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'导入成功'
)
this
.
getList
()
}
}
},
setpaginationOptions
(
opt
)
{
setpaginationOptions
(
opt
)
{
for
(
const
key
in
opt
)
{
for
(
const
key
in
opt
)
{
this
.
paginationOptions
[
key
]
=
opt
[
key
]
this
.
paginationOptions
[
key
]
=
opt
[
key
]
...
@@ -458,8 +418,7 @@ export default {
...
@@ -458,8 +418,7 @@ export default {
},
},
// 查询
// 查询
getList
()
{
getList
()
{
const
{
pageSize
,
currentPage
}
=
const
{
pageSize
,
currentPage
}
=
this
.
paginationOptions
this
.
paginationOptions
this
.
loading
=
true
this
.
loading
=
true
axios
axios
.
get
(
'base/propertyValue/list_page'
,
{
.
get
(
'base/propertyValue/list_page'
,
{
...
@@ -467,9 +426,9 @@ export default {
...
@@ -467,9 +426,9 @@ export default {
pageSize
,
pageSize
,
currentPage
,
currentPage
,
skuProperty
:
this
.
skuProperty
,
skuProperty
:
this
.
skuProperty
,
...
this
.
searchForm
,
...
this
.
searchForm
},
},
baseURL
:
'/api/manage/rest'
,
baseURL
:
'/api/manage/rest'
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
// eslint-disable-next-line eqeqeq
// eslint-disable-next-line eqeqeq
...
@@ -478,7 +437,7 @@ export default {
...
@@ -478,7 +437,7 @@ export default {
this
.
paginationOptions
.
total
=
res
.
data
.
total
this
.
paginationOptions
.
total
=
res
.
data
.
total
}
else
{
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
})
})
}
}
})
})
...
@@ -504,7 +463,7 @@ export default {
...
@@ -504,7 +463,7 @@ export default {
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
}
else
{
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
})
})
}
}
})
})
...
@@ -514,23 +473,21 @@ export default {
...
@@ -514,23 +473,21 @@ export default {
const
url
=
'base/propertyValue/update'
const
url
=
'base/propertyValue/update'
this
.
$refs
.
addcurrencyform
.
validate
((
valid
)
=>
{
this
.
$refs
.
addcurrencyform
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
axios
axios
.
post
(
url
,
this
.
addcurrencyform
).
then
((
res
)
=>
{
.
post
(
url
,
this
.
addcurrencyform
)
// eslint-disable-next-line eqeqeq
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
// eslint-disable-next-line eqeqeq
this
.
dialogVisible
=
false
if
(
res
.
code
==
200
)
{
this
.
$message
({
this
.
dialogVisible
=
false
message
:
'修改成功'
,
this
.
$message
({
type
:
'success'
message
:
'修改成功'
,
})
type
:
'success'
,
this
.
getList
(
this
.
currentPage
)
})
}
else
{
this
.
getList
(
this
.
currentPage
)
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
}
else
{
dangerouslyUseHTMLString
:
true
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
})
dangerouslyUseHTMLString
:
true
,
}
})
})
}
})
}
}
})
})
},
},
...
@@ -539,23 +496,21 @@ export default {
...
@@ -539,23 +496,21 @@ export default {
const
url
=
'base/propertyValue/add'
const
url
=
'base/propertyValue/add'
this
.
$refs
.
addcurrencyform
.
validate
((
valid
)
=>
{
this
.
$refs
.
addcurrencyform
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
axios
axios
.
post
(
url
,
this
.
addcurrencyform
).
then
((
res
)
=>
{
.
post
(
url
,
this
.
addcurrencyform
)
// eslint-disable-next-line eqeqeq
.
then
((
res
)
=>
{
if
(
res
.
code
==
200
)
{
// eslint-disable-next-line eqeqeq
this
.
dialogVisible
=
false
if
(
res
.
code
==
200
)
{
this
.
$message
({
this
.
dialogVisible
=
false
message
:
'添加成功'
,
this
.
$message
({
type
:
'success'
message
:
'添加成功'
,
})
type
:
'success'
,
this
.
getList
(
this
.
currentPage
)
})
}
else
{
this
.
getList
(
this
.
currentPage
)
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
}
else
{
dangerouslyUseHTMLString
:
true
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
})
dangerouslyUseHTMLString
:
true
,
}
})
})
}
})
}
}
})
})
},
},
...
@@ -577,7 +532,7 @@ export default {
...
@@ -577,7 +532,7 @@ export default {
this
.
$confirm
(
'确定删除选中的信息?'
,
'提示'
,
{
this
.
$confirm
(
'确定删除选中的信息?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
type
:
'warning'
})
})
.
then
(()
=>
{
.
then
(()
=>
{
const
url
=
`base/propertyValue/delete?ids=
${
ids
}
`
const
url
=
`base/propertyValue/delete?ids=
${
ids
}
`
...
@@ -586,7 +541,7 @@ export default {
...
@@ -586,7 +541,7 @@ export default {
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
message
:
'删除成功!'
,
message
:
'删除成功!'
})
})
this
.
getList
(
this
.
currentPage
)
this
.
getList
(
this
.
currentPage
)
}
}
...
@@ -598,7 +553,7 @@ export default {
...
@@ -598,7 +553,7 @@ export default {
alllist
(
url
)
{
alllist
(
url
)
{
axios
axios
.
get
(
url
,
{
.
get
(
url
,
{
baseURL
:
'/api/manage/rest'
,
baseURL
:
'/api/manage/rest'
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
// eslint-disable-next-line eqeqeq
// eslint-disable-next-line eqeqeq
...
@@ -606,12 +561,12 @@ export default {
...
@@ -606,12 +561,12 @@ export default {
this
.
all_list
=
res
.
data
this
.
all_list
=
res
.
data
}
else
{
}
else
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
this
.
$alert
(
res
.
message
,
'错误提示'
,
{
dangerouslyUseHTMLString
:
true
,
dangerouslyUseHTMLString
:
true
})
})
}
}
})
})
}
,
}
}
,
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
src/views/system/sku-sort.vue
View file @
14163a6f
...
@@ -38,6 +38,9 @@
...
@@ -38,6 +38,9 @@
<el-form-item>
<el-form-item>
<el-button
type=
"danger"
@
click=
"deleteSection()"
>
删除
</el-button>
<el-button
type=
"danger"
@
click=
"deleteSection()"
>
删除
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
style=
"margin-bottom: 0px"
>
<el-button
type=
"primary"
@
click=
"importExcel"
>
导入
</el-button>
</el-form-item>
</el-form>
</el-form>
<div
class=
"table_wrap"
>
<div
class=
"table_wrap"
>
<my-table
<my-table
...
@@ -368,6 +371,22 @@ export default {
...
@@ -368,6 +371,22 @@ export default {
}
,
}
,
methods
:
{
methods
:
{
importExcel
()
{
const
input
=
document
.
createElement
(
'input'
)
input
.
style
.
display
=
'none'
input
.
type
=
'file'
input
.
click
()
input
.
onchange
=
async
()
=>
{
const
form
=
new
FormData
()
form
.
append
(
'importExcel'
,
input
.
files
.
length
>
0
?
input
.
files
[
0
]
:
[])
const
res
=
await
axios
.
post
(
'baseProperty/importBaseProperty'
,
form
)
console
.
log
(
res
)
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
'导入成功'
)
this
.
getList
()
}
}
}
,
async
changeDisableStatus
(
v
,
item
)
{
async
changeDisableStatus
(
v
,
item
)
{
try
{
try
{
await
this
.
$confirm
(
await
this
.
$confirm
(
...
...
src/views/taskManage/index.vue
View file @
14163a6f
...
@@ -465,6 +465,20 @@
...
@@ -465,6 +465,20 @@
@
click=
"closeForPendingDialog"
@
click=
"closeForPendingDialog"
>
不受理
>
不受理
</el-button>
</el-button>
<el-button
size=
"mini"
type=
"danger"
v-if=
"statusCode === 'PRE_HANDLING'"
@
click=
"shelveForPendingDialog"
>
转至待定
</el-button>
<el-button
size=
"mini"
type=
"danger"
v-if=
"statusCode === 'PENDING'"
@
click=
"turnBackToPending"
>
转至待受理
</el-button>
</div>
</div>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -743,7 +757,7 @@
...
@@ -743,7 +757,7 @@
</el-dialog>
</el-dialog>
<!-- 不受理 -->
<!-- 不受理 -->
<el-dialog
<el-dialog
title=
"不受理
"
:title=
"pendingTitle
"
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
:visible
.
sync=
"pendingVisible"
:visible
.
sync=
"pendingVisible"
width=
"800px"
width=
"800px"
...
@@ -810,6 +824,8 @@ import {
...
@@ -810,6 +824,8 @@ import {
replyTocustomer
,
replyTocustomer
,
acceptanWorkOrder
,
acceptanWorkOrder
,
PendingWorkOrder
,
PendingWorkOrder
,
ShelveWorkOrder
,
TurnBackToPending
,
getOrderType
,
getOrderType
,
resume
,
resume
,
pause
,
pause
,
...
@@ -1004,6 +1020,8 @@ export default {
...
@@ -1004,6 +1020,8 @@ export default {
imgPreviewUrl
:
''
,
imgPreviewUrl
:
''
,
subscript
:
0
,
subscript
:
0
,
imgList
:
[],
imgList
:
[],
pendingTitle
:
''
,
pendingBtn
:
0
}
}
},
},
mounted
()
{
mounted
()
{
...
@@ -1612,26 +1630,76 @@ export default {
...
@@ -1612,26 +1630,76 @@ export default {
this
.
currentItem
=
item
this
.
currentItem
=
item
},
},
closeForPendingDialog
()
{
closeForPendingDialog
()
{
this
.
pendingTitle
=
'不受理'
this
.
pendingBtn
=
7
this
.
pendingVisible
=
true
this
.
pendingVisible
=
true
if
(
this
.
$refs
.
pendingForm
)
{
if
(
this
.
$refs
.
pendingForm
)
{
this
.
$refs
.
pendingForm
.
resetFields
()
this
.
$refs
.
pendingForm
.
resetFields
()
}
}
},
},
shelveForPendingDialog
()
{
this
.
pendingTitle
=
'转至待定'
this
.
pendingBtn
=
9
this
.
pendingVisible
=
true
if
(
this
.
$refs
.
pendingForm
)
{
this
.
$refs
.
pendingForm
.
resetFields
()
}
},
turnBackToPending
()
{
this
.
pendingBtn
=
1
TurnBackToPending
({
id
:
this
.
detail
.
id
,
...
this
.
pendingForm
,
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
pendingVisible
=
false
this
.
detailVisible
=
false
this
.
getOrderTree
()
this
.
getlist
()
}
})
},
submitPending
()
{
submitPending
()
{
this
.
$refs
.
pendingForm
.
validate
(
v
=>
{
this
.
$refs
.
pendingForm
.
validate
(
v
=>
{
if
(
v
)
{
if
(
v
)
{
try
{
try
{
PendingWorkOrder
({
if
(
this
.
pendingBtn
===
9
)
{
id
:
this
.
detail
.
id
,
ShelveWorkOrder
({
...
this
.
pendingForm
,
id
:
this
.
detail
.
id
,
}).
then
(
res
=>
{
...
this
.
pendingForm
,
if
(
res
.
code
===
200
)
{
}).
then
(
res
=>
{
this
.
pendingVisible
=
false
if
(
res
.
code
===
200
)
{
this
.
detailVisible
=
false
this
.
pendingVisible
=
false
this
.
getOrderTree
()
this
.
detailVisible
=
false
this
.
getlist
()
this
.
getOrderTree
()
}
this
.
getlist
()
})
}
})
}
else
if
(
this
.
pendingBtn
===
1
)
{
TurnBackToPending
({
id
:
this
.
detail
.
id
,
...
this
.
pendingForm
,
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
pendingVisible
=
false
this
.
detailVisible
=
false
this
.
getOrderTree
()
this
.
getlist
()
}
})
}
else
{
PendingWorkOrder
({
id
:
this
.
detail
.
id
,
...
this
.
pendingForm
,
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
this
.
pendingVisible
=
false
this
.
detailVisible
=
false
this
.
getOrderTree
()
this
.
getlist
()
}
})
}
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
})
})
...
...
vue.config.js
View file @
14163a6f
...
@@ -9,9 +9,7 @@ module.exports = defineConfig({
...
@@ -9,9 +9,7 @@ module.exports = defineConfig({
target
:
'http://10.168.31.142:8070'
,
target
:
'http://10.168.31.142:8070'
,
changeOrigin
:
true
changeOrigin
:
true
// 路径重写规则,这里将 /api 开头的请求路径替换为空字符串,即去掉 /api 前缀
// 路径重写规则,这里将 /api 开头的请求路径替换为空字符串,即去掉 /api 前缀
}
}
}
}
}
}
})
})
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