Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
A
admin-base
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
new-sing
admin-base
Commits
097ea963
Commit
097ea963
authored
Sep 12, 2019
by
赵茹林
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of git.singsingenglish.com:new-sing/admin into dev
parents
b95e6545
7edf6ee5
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
2433 additions
and
1167 deletions
+2433
-1167
dialog.vue
src/components/contract/dialog.vue
+151
-0
editorDetail.vue
src/components/contract/editorDetail.vue
+220
-0
index.vue
src/components/contract/index.vue
+144
-0
dialog.vue
src/components/gitConfig/dialog.vue
+145
-0
index.vue
src/components/gitConfig/index.vue
+162
-0
index.vue
src/components/gitDeliverRecord/index.vue
+147
-0
dialog.vue
src/components/shop/dialog.vue
+572
-541
giftDeliverDialog.vue
src/components/teacherDetail/giftDeliverDialog.vue
+110
-0
index.vue
src/components/teacherDetail/index.vue
+696
-621
api.js
src/service/api.js
+55
-4
menuList.js
src/util/menuList.js
+31
-1
No files found.
src/components/contract/dialog.vue
0 → 100644
View file @
097ea963
<
template
>
<el-dialog
:title=
"dialogObj.title"
:visible
.
sync=
"dialogObj.show"
center
width=
"800px"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
>
<el-form-item
label=
"合同协议名称"
prop=
"contract_name"
label-width=
"120px"
>
<el-input
v-model=
"form.contract_name"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"类型"
prop=
"contract_type"
label-width=
"120px"
>
<el-select
v-model=
"form.contract_type"
placeholder=
"请选择"
clearable
>
<el-option
label=
"用户协议"
value=
"0"
></el-option>
<el-option
label=
"正式课合同"
value=
"1"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"关联商品"
label-width=
"120px"
>
<el-select
multiple
v-model=
"form.goods_ids"
placeholder=
"请选择"
clearable
:popper-class=
"'refresh-select-multi width-480'"
style=
"width: 480px"
>
<el-option
v-for=
"data in goodslist"
:key=
"data.id"
:label=
"`【$
{data.id}】${data.name}`"
:value="data.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"合同/协议文本"
prop=
""
label-width=
"120px"
required
>
<!--
<el-input
type=
"textarea"
:rows=
"10"
v-model=
"form.contract_text"
></el-input>
-->
<editor-detail
:lookData=
"form.contract_text"
/>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogObj.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sub"
>
保 存
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
contractGoodslistApi
,
contractAddApi
,
contractEditApi
}
from
"../../service/api"
;
import
editorDetail
from
"./editorDetail"
;
export
default
{
name
:
"dialogObj"
,
props
:
[
'dialogObj'
],
components
:
{
editorDetail
},
data
()
{
return
{
form
:
{
contract_name
:
''
,
contract_type
:
''
,
goods_ids
:
[],
contract_text
:
{
detail
:
""
}
},
goodslist
:
[],
rules
:
{
contract_name
:
[
{
required
:
true
,
message
:
'请输入赠品名称'
},
{
max
:
20
,
message
:
'合同协议名称不能超过20汉字'
}
],
contract_type
:
[
{
required
:
true
,
message
:
'请选择类型'
,
trigger
:
'change'
}
]
}
}
},
methods
:
{
sub
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
!
this
.
form
.
contract_text
.
detail
)
{
this
.
$message
({
message
:
'合同/协议文本不能为空'
,
type
:
'error'
});
return
;
}
let
json
=
{
contract_name
:
this
.
form
.
contract_name
,
contract_type
:
this
.
form
.
contract_type
,
goods_ids
:
this
.
form
.
goods_ids
.
join
(
','
),
contract_text
:
this
.
form
.
contract_text
.
detail
};
switch
(
this
.
dialogObj
.
type
)
{
case
0
:
contractAddApi
(
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'新增成功!'
});
this
.
$emit
(
"reflash"
);
this
.
dialogObj
.
show
=
false
;
});
break
;
case
1
:
contractEditApi
(
this
.
dialogObj
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
this
.
$emit
(
"reflash"
);
this
.
dialogObj
.
show
=
false
;
});
break
;
}
}
else
{
return
false
;
}
});
}
},
created
()
{
contractGoodslistApi
().
then
(
res
=>
{
this
.
goodslist
=
res
.
goods_list
;
});
},
watch
:
{
'dialogObj.show'
()
{
this
.
$nextTick
(()
=>
{
this
.
form
.
goods_ids
=
[];
this
.
form
.
contract_text
.
detail
=
''
;
this
.
$refs
[
'form'
].
resetFields
();
if
(
this
.
dialogObj
.
type
==
1
)
{
let
goods_ids_arr
=
[];
if
(
this
.
dialogObj
.
goods_ids
)
{
this
.
dialogObj
.
goods_ids
.
split
(
','
).
map
(
i
=>
{
goods_ids_arr
.
push
(
Number
(
i
));
});
}
this
.
form
.
name
=
this
.
dialogObj
.
name
;
this
.
form
.
contract_name
=
this
.
dialogObj
.
contract_name
;
this
.
form
.
contract_type
=
this
.
dialogObj
.
contract_type
.
toString
();
this
.
form
.
goods_ids
=
goods_ids_arr
;
this
.
form
.
contract_text
.
detail
=
this
.
dialogObj
.
contract_text
;
}
});
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/contract/editorDetail.vue
0 → 100644
View file @
097ea963
<
template
>
<div
class=
'tinymce'
>
<editor
id=
'tinymce'
v-model=
'lookData.detail'
:init=
'init'
></editor>
<div>
<div
class=
"imgInter"
@
click=
"showDialog()"
>
插入图片
</div>
</div>
<el-dialog
title=
"插入图片"
:visible
.
sync=
"dialogVisible"
:modal-append-to-body=
"false"
:close-on-click-modal=
"false"
center
:append-to-body=
"true"
width=
"550px"
>
<el-form
label-width=
"80px"
>
<el-form-item
label=
"图片"
>
<el-upload
action=
"/api/public/upload"
:http-request=
"uploadFile"
:on-remove=
"removeFile"
:before-upload=
"beforeAvatarUploadImg"
drag
:on-exceed=
"handleExceed"
multiple
:limit=
"1"
:file-list=
"form.imgList"
>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
<em>
点击上传
</em></div>
<div
class=
"el-upload__tip"
slot=
"tip"
>
只能上传png或jpg文件
</div>
</el-upload>
</el-form-item>
<el-form-item
label=
"铺满"
>
<el-switch
v-model=
"form.big"
>
</el-switch>
</el-form-item>
<el-form-item
label=
"居中"
>
<el-switch
v-model=
"form.center"
>
</el-switch>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"imgInter"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
tinymce
from
'tinymce/tinymce'
import
'tinymce/themes/modern/theme'
import
Editor
from
'@tinymce/tinymce-vue'
import
'tinymce/plugins/link'
import
'tinymce/plugins/code'
import
'tinymce/plugins/table'
import
'tinymce/plugins/lists'
import
'tinymce/plugins/contextmenu'
import
'tinymce/plugins/wordcount'
import
'tinymce/plugins/textcolor'
import
'tinymce/plugins/colorpicker'
import
'tinymce/plugins/preview'
import
'tinymce/plugins/fullpage'
import
'tinymce/plugins/textpattern'
import
'tinymce/plugins/colorpicker'
import
'tinymce/plugins/media'
import
{
uploadFileApi
}
from
"../../service/api"
;
export
default
{
name
:
'tinymce'
,
props
:[
'lookData'
],
data
()
{
return
{
radio
:[],
imageType
:
false
,
form
:{
imgList
:[],
big
:
false
,
weight
:
''
,
center
:
true
},
show
:
''
,
dialogVisible
:
false
,
init
:
{
toolbar
:
'bold italic underline strikethrough | fontselect | fontsizeselect | forecolor backcolor | alignleft aligncenter alignright alignjustify | bullist numlist | outdent indent blockquote | undo redo | link unlink image code | '
,
language_url
:
'/static/tinymce/zh_CN.js'
,
language
:
'zh_CN'
,
skin_url
:
'/static/tinymce/skins/lightgray'
,
height
:
500
,
plugins
:
'preview textpattern colorpicker lists code colorpicker fullpage textcolor wordcount contextmenu media'
,
branding
:
false
,
}
}
},
activated
(){
this
.
show
=
true
},
deactivated
(){
},
mounted
()
{
},
methods
:{
beforeAvatarUploadImg
(
file
){
const
isJPG
=
(
file
.
type
===
'image/jpeg'
||
file
.
type
===
'image/png'
);
if
(
!
isJPG
)
{
this
.
$message
.
error
(
'上传头像图片只能是 JPG 或 PNG 格式!'
);
}
return
isJPG
;
},
imgInter
(){
if
(
this
.
form
.
imgList
.
length
<
1
){
this
.
$message
({
type
:
'error'
,
message
:
'请选择图片'
});
return
false
}
let
ImageStyle
=
''
;
if
(
this
.
form
.
big
){
ImageStyle
+=
'width:100%;'
}
else
{
ImageStyle
+=
'width:70%'
}
if
(
this
.
form
.
center
){
ImageStyle
=
'display:block;margin:auto'
}
let
str
=
`<img src="
${
this
.
form
.
imgList
[
0
].
url
}
" style="
${
ImageStyle
}
"/>`
;
tinymce
.
activeEditor
.
insertContent
(
str
);
this
.
dialogVisible
=
false
},
uploadFile
(
a
){
uploadFileApi
({
file
:
a
.
file
,
type
:
'local'
}).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'上传成功!'
});
this
.
form
.
imgList
=
[{
name
:
res
.
name
,
url
:
process
.
env
.
IMAGE_URL_HEAD
+
res
.
url
}];
})
},
showDialog
(){
this
.
dialogVisible
=
true
;
this
.
form
=
{
imgList
:[],
big
:
false
,
weight
:
''
,
center
:
true
}
},
insertContent
(
content
)
{
if
(
!
content
)
{
//如果插入的内容为空则返回
return
;
}
let
sel
=
null
;
if
(
document
.
selection
)
{
//IE9以下
sel
=
document
.
selection
;
sel
.
createRange
().
pasteHTML
(
content
);
}
else
{
sel
=
document
.
getElementById
(
'tinymce_ifr'
).
contentWindow
.
getSelection
();
if
(
sel
.
rangeCount
>
0
)
{
let
range
=
sel
.
getRangeAt
(
0
);
//获取选择范围
range
.
deleteContents
();
//删除选中的内容
let
el
=
document
.
createElement
(
"div"
);
//创建一个空的div外壳
el
.
innerHTML
=
content
;
//设置div内容为我们想要插入的内容。
let
frag
=
document
.
createDocumentFragment
();
//创建一个空白的文档片段,便于之后插入dom树
let
node
=
el
.
firstChild
;
let
lastNode
=
frag
.
appendChild
(
node
);
range
.
insertNode
(
frag
);
//设置选择范围的内容为插入的内容
let
contentRange
=
range
.
cloneRange
();
//克隆选区
contentRange
.
setStartAfter
(
lastNode
);
//设置光标位置为插入内容的末尾
contentRange
.
collapse
(
true
);
//移动光标位置到末尾
sel
.
removeAllRanges
();
//移出所有选区
sel
.
addRange
(
contentRange
);
//添加修改后的选区
}
}
},
removeFile
(){},
handleExceed
(){}
},
created
:
function
(){
tinymce
.
init
({})
},
components
:
{
Editor
}
}
</
script
>
<
style
scoped
lang=
"less"
>
@import "../../util/public";
.tinymce{
position: relative;
.clear-both;
.imgInter{
position: absolute;
display: inline-block;
text-shadow: 0 1px 1px rgba(255,255,255,0.75);
top: 3px;
left: 330px;
box-shadow: none;
filter: none;
padding: 4px 6px;
border: 1px solid transparent;
line-height: 1.4;
margin: 0 5px;
&:hover{
border-color: #e2e4e7;
cursor: pointer;
}
}
}
</
style
>
src/components/contract/index.vue
0 → 100644
View file @
097ea963
<
template
>
<div
class=
"container"
>
<div
class=
"search-form"
>
<el-button
type=
"success"
size=
"small"
plain
icon=
"el-icon-plus"
@
click=
"add"
>
新增
</el-button>
</div>
<div
class=
"table-form"
>
<el-table
:data=
"dataList"
size=
"mini"
style=
"width: 100%"
>
<el-table-column
prop=
"contract_number"
label=
"合同协议编号"
></el-table-column>
<el-table-column
prop=
"contract_name"
label=
"合同协议名称"
></el-table-column>
<el-table-column
prop=
"contract_type"
label=
"类型"
>
<template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.contract_type == 0"
>
用户协议
</div>
<div
v-if=
"scope.row.contract_type == 1"
>
正式课合同
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"goods_name"
label=
"关联商品"
></el-table-column>
<el-table-column
prop=
"created_at"
label=
"创建时间"
></el-table-column>
<el-table-column
prop=
"updated_at"
label=
"最后编辑时间"
></el-table-column>
<el-table-column
prop=
"operator"
label=
"最后编辑人"
></el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.status == 0"
>
启用
</div>
<div
v-if=
"scope.row.status == 1"
>
停用
</div>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"edit(scope.row)"
>
编辑
</el-button>
<el-button
v-if=
"scope.row.status == 0"
type=
"warning"
size=
"mini"
plain
@
click=
"switchStatus(scope.row)"
>
停用
</el-button>
<el-button
v-if=
"scope.row.status == 1"
type=
"success"
size=
"mini"
plain
@
click=
"switchStatus(scope.row)"
>
启用
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
<dialog-com
:dialogObj=
"dialogObj"
@
reflash=
"getDataList"
/>
</div>
</template>
<
script
>
import
{
contractListApi
,
contractSwitchstatusApi
}
from
"../../service/api"
;
import
dialogCom
from
'./dialog'
;
export
default
{
name
:
"index"
,
data
()
{
return
{
dataList
:
[],
dialogObj
:
{
type
:
0
,
show
:
false
,
id
:
''
,
title
:
''
}
}
},
components
:
{
dialogCom
},
methods
:
{
getDataList
()
{
contractListApi
().
then
(
res
=>
{
this
.
dataList
=
res
;
});
},
add
()
{
this
.
dialogObj
=
{
type
:
0
,
show
:
true
,
id
:
''
,
title
:
'新增合同协议'
}
},
edit
(
data
)
{
this
.
dialogObj
=
{
type
:
1
,
show
:
true
,
id
:
data
.
id
,
title
:
'编辑合同协议'
,
contract_name
:
data
.
contract_name
,
contract_type
:
data
.
contract_type
,
goods_ids
:
data
.
goods_ids
,
contract_text
:
data
.
contract_text
}
},
switchStatus
(
data
)
{
let
json
=
{
status
:
data
.
status
};
if
(
data
.
status
==
0
)
{
json
.
status
=
1
;
}
if
(
data
.
status
==
1
)
{
json
.
status
=
0
;
}
contractSwitchstatusApi
(
data
.
id
,
json
).
then
(
res
=>
{
if
(
json
.
status
==
0
)
{
this
.
$confirm
(
'此操作将启用合同?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'启用成功'
});
this
.
getDataList
();
}).
catch
(()
=>
{});
}
if
(
json
.
status
==
1
)
{
this
.
$confirm
(
'此操作将停用合同?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'停用成功'
});
this
.
getDataList
();
}).
catch
(()
=>
{});
}
});
},
},
created
()
{
this
.
getDataList
();
}
}
</
script
>
<
style
scoped
>
.container
{
padding
:
20px
;
}
.search-form
{
margin-bottom
:
20px
;
}
</
style
>
src/components/gitConfig/dialog.vue
0 → 100644
View file @
097ea963
<
template
>
<el-dialog
:title=
"dialogObj.title"
:visible
.
sync=
"dialogObj.show"
center
width=
"500px"
>
<el-form
:model=
"form"
:rules=
"rules"
ref=
"form"
>
<el-form-item
label=
"赠品名称"
prop=
"name"
>
<el-input
v-model=
"form.name"
></el-input>
</el-form-item>
<el-form-item
label=
"成本价格"
prop=
"cost_price"
>
<el-input
v-model
.
number=
"form.cost_price"
></el-input>
</el-form-item>
<el-form-item
label=
"赠品总数"
prop=
"gift_num"
>
<el-input
v-model
.
number=
"form.gift_num"
@
change=
"giftNumChange"
></el-input>
</el-form-item>
<el-form-item
label=
"库存数量"
prop=
"stock_num"
>
<div>
{{
form
.
stock_num
}}
</div>
</el-form-item>
<el-form-item
label=
"赠品类型"
prop=
"type"
>
<el-select
v-model=
"form.type"
placeholder=
"请选择"
clearable
>
<el-option
label=
"渠道赠品(市场渠道或投放需求关联的赠品)"
value=
"1"
></el-option>
<el-option
label=
"活动赠品(全勤打卡或其他运营活动关联的赠品)"
value=
"2"
></el-option>
<el-option
label=
"关联赠品(销售为了关单而赠送的赠品)"
value=
"3"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogObj.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sub"
>
保 存
</el-button>
</span>
</el-dialog>
</
template
>
<
script
>
import
{
giftConfigAddApi
,
giftConfigEditApi
}
from
"../../service/api"
;
export
default
{
name
:
"dialogObj"
,
props
:
[
'dialogObj'
],
data
()
{
const
validGiftNum
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
/^
[\d\/]
+$/
.
test
(
value
))
{
callback
(
new
Error
(
'只能填阿拉伯数字'
));
}
else
{
callback
();
}
};
return
{
form
:
{
name
:
''
,
cost_price
:
''
,
gift_num
:
'/'
,
stock_num
:
0
,
type
:
''
},
rules
:
{
name
:
[
{
required
:
true
,
message
:
'请输入赠品名称'
},
{
max
:
20
,
message
:
'赠品名称不能超过20汉字'
}
],
cost_price
:
[
{
required
:
true
,
message
:
'请输入成本价格'
},
{
type
:
'number'
,
message
:
'只能填阿拉伯数字'
}
],
gift_num
:
[
{
required
:
true
,
message
:
'请输入赠品总数'
},
{
validator
:
validGiftNum
}
],
type
:
[
{
required
:
true
,
message
:
'请选择赠品类型'
,
trigger
:
'change'
}
]
}
}
},
methods
:
{
giftNumChange
()
{
if
(
!
this
.
form
.
gift_num
)
{
this
.
form
.
gift_num
=
'/'
;
}
},
sub
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
json
=
{
name
:
this
.
form
.
name
,
cost_price
:
this
.
form
.
cost_price
,
type
:
this
.
form
.
type
};
if
(
this
.
form
.
gift_num
!=
'/'
)
{
json
.
gift_num
=
this
.
form
.
gift_num
;
}
switch
(
this
.
dialogObj
.
type
)
{
case
0
:
giftConfigAddApi
(
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'新增成功!'
});
this
.
$emit
(
"reflash"
);
this
.
dialogObj
.
show
=
false
;
});
break
;
case
1
:
giftConfigEditApi
(
this
.
dialogObj
.
id
,
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
this
.
$emit
(
"reflash"
);
this
.
dialogObj
.
show
=
false
;
});
break
;
}
}
else
{
return
false
;
}
});
}
},
watch
:
{
'dialogObj.show'
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'form'
].
resetFields
();
if
(
this
.
dialogObj
.
type
==
1
)
{
this
.
form
.
name
=
this
.
dialogObj
.
name
;
this
.
form
.
cost_price
=
this
.
dialogObj
.
cost_price
;
this
.
form
.
gift_num
=
this
.
dialogObj
.
gift_num
;
this
.
form
.
stock_num
=
this
.
dialogObj
.
stock_num
;
this
.
form
.
type
=
this
.
dialogObj
.
gift_type
.
toString
();
}
});
}
}
}
</
script
>
<
style
scoped
>
</
style
>
src/components/gitConfig/index.vue
0 → 100644
View file @
097ea963
<
template
>
<div
class=
"container"
>
<div
class=
"search-form"
>
<el-form
:inline=
"true"
:model=
"searchFrom"
size=
"small"
>
<el-form-item
label=
"赠品名称"
label-width=
"100px"
>
<el-input
v-model=
"searchFrom.name"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"类型"
label-width=
"100px"
>
<el-select
v-model=
"searchFrom.type"
placeholder=
"请选择"
clearable
>
<el-option
label=
"渠道赠品"
value=
"1"
></el-option>
<el-option
label=
"活动赠品"
value=
"2"
></el-option>
<el-option
label=
"关联赠品"
value=
"3"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getDataList"
>
搜索
</el-button>
</el-form-item>
<el-form-item>
<el-button
type=
"success"
plain
icon=
"el-icon-plus"
@
click=
"add"
>
新增
</el-button>
</el-form-item>
</el-form>
</div>
<div
class=
"table-form"
>
<el-table
:data=
"dataList"
size=
"mini"
style=
"width: 100%"
>
<el-table-column
prop=
"id"
label=
"ID"
></el-table-column>
<el-table-column
prop=
"name"
label=
"赠品名称"
></el-table-column>
<el-table-column
prop=
"gift_type"
label=
"赠品类型"
>
<template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.gift_type == 1"
>
渠道赠品
</div>
<div
v-if=
"scope.row.gift_type == 2"
>
活动赠品
</div>
<div
v-if=
"scope.row.gift_type == 3"
>
关联赠品
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"cost_price"
label=
"成本价"
></el-table-column>
<el-table-column
prop=
"gift_num"
label=
"赠品总数"
></el-table-column>
<el-table-column
prop=
"stock_num"
label=
"库存数量"
></el-table-column>
<el-table-column
prop=
"get_num"
label=
"领取数量"
></el-table-column>
<el-table-column
prop=
"status"
label=
"状态"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.status == 1"
>
上架
</div>
<div
v-if=
"scope.row.status == 2"
>
下架
</div>
</
template
>
</el-table-column>
<el-table-column
width=
"150"
label=
"操作"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"primary"
size=
"mini"
plain
@
click=
"edit(scope.row)"
>
编辑
</el-button>
<el-button
type=
"warning"
size=
"mini"
plain
@
click=
"onDown(scope.row)"
>
下架
</el-button>
</
template
>
</el-table-column>
</el-table>
</div>
<div
class=
"pagination"
>
<page
:nowPage=
"nowPage"
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</div>
<dialog-com
:dialogObj=
"dialogObj"
@
reflash=
"getDataList"
/>
</div>
</template>
<
script
>
import
page
from
"../framework/page"
;
import
{
relationGiftApi
,
giftSoldoutApi
}
from
"../../service/api"
;
import
dialogCom
from
'./dialog'
;
export
default
{
name
:
"index"
,
components
:
{
page
,
dialogCom
},
data
()
{
return
{
searchFrom
:
{
name
:
''
,
type
:
''
},
dataList
:
[],
nowPage
:
1
,
total
:
0
,
limit
:
10
,
dialogObj
:
{
type
:
0
,
show
:
false
,
id
:
''
,
title
:
''
}
}
},
methods
:
{
getDataList
()
{
let
json
=
{
name
:
this
.
searchFrom
.
name
,
type
:
this
.
searchFrom
.
type
,
limit
:
this
.
limit
,
page
:
this
.
nowPage
};
relationGiftApi
(
json
).
then
(
res
=>
{
this
.
dataList
=
res
.
list
;
this
.
total
=
res
.
total
;
});
},
add
()
{
this
.
dialogObj
=
{
type
:
0
,
show
:
true
,
id
:
''
,
title
:
'新增赠品'
}
},
edit
(
data
)
{
this
.
dialogObj
=
{
type
:
1
,
show
:
true
,
id
:
data
.
id
,
title
:
'编辑赠品'
,
name
:
data
.
name
,
cost_price
:
data
.
cost_price
,
gift_num
:
data
.
gift_num
,
stock_num
:
data
.
stock_num
,
gift_type
:
data
.
gift_type
};
},
onDown
(
data
)
{
this
.
$confirm
(
'此操作将下架该商品?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
giftSoldoutApi
(
data
.
id
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'操作成功!'
});
this
.
getDataList
();
});
}).
catch
(()
=>
{
});
},
changeShow
(
data
)
{
this
.
dialogObj
.
show
=
data
;
},
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
getDataList
();
},
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
getDataList
();
}
},
created
()
{
this
.
getDataList
();
}
}
</
script
>
<
style
scoped
>
.container
{
padding
:
20px
;
}
</
style
>
src/components/gitDeliverRecord/index.vue
0 → 100644
View file @
097ea963
<
template
>
<div
class=
"container"
>
<div
class=
"search-form"
>
<el-form
:inline=
"true"
:model=
"searchFrom"
size=
"small"
>
<el-form-item
label=
"赠品名称"
label-width=
"100px"
>
<el-input
v-model=
"searchFrom.gift_name"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"类型"
label-width=
"100px"
>
<el-select
v-model=
"searchFrom.gift_type"
placeholder=
"请选择"
clearable
>
<el-option
label=
"渠道赠品"
value=
"1"
></el-option>
<el-option
label=
"活动赠品"
value=
"2"
></el-option>
<el-option
label=
"关联赠品"
value=
"3"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"期数名称"
label-width=
"100px"
>
<el-input
v-model=
"searchFrom.periods_title"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"班级名称"
label-width=
"100px"
>
<el-input
v-model=
"searchFrom.class_name"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"学员电话"
label-width=
"100px"
>
<el-input
v-model=
"searchFrom.mobile"
clearable
></el-input>
</el-form-item>
<el-form-item
label=
"领取时间"
label-width=
"100px"
>
<el-date-picker
v-model=
"searchFrom.receiveTime"
type=
"datetimerange"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getRecordList"
>
搜索
</el-button>
</el-form-item>
<el-form-item>
<el-button
type=
"success"
plain
@
click=
"exportTable"
>
导出
</el-button>
</el-form-item>
</el-form>
</div>
<div
class=
"table-form"
>
<el-table
:data=
"recordList"
size=
"mini"
style=
"width: 100%"
>
<el-table-column
prop=
"gift_name"
label=
"赠品名称"
></el-table-column>
<el-table-column
prop=
"gift_type"
label=
"赠品类型"
>
<template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.gift_type == 1"
>
渠道赠品
</div>
<div
v-if=
"scope.row.gift_type == 2"
>
活动赠品
</div>
<div
v-if=
"scope.row.gift_type == 3"
>
关联赠品
</div>
</
template
>
</el-table-column>
<el-table-column
prop=
"quantity"
label=
"数量"
></el-table-column>
<el-table-column
prop=
"cost"
label=
"成本"
></el-table-column>
<el-table-column
prop=
"periods_title"
label=
"期数名称"
></el-table-column>
<el-table-column
prop=
"class_name"
label=
"班级名称"
></el-table-column>
<el-table-column
prop=
"money"
label=
"实付金额"
></el-table-column>
<el-table-column
prop=
"teacher_name"
label=
"带班老师"
></el-table-column>
<el-table-column
prop=
"nickname"
label=
"学员名称"
></el-table-column>
<el-table-column
prop=
"mobile"
label=
"学员电话"
></el-table-column>
<el-table-column
prop=
"address"
label=
"学员地址"
></el-table-column>
<el-table-column
prop=
"created_at"
label=
"领取时间"
></el-table-column>
<el-table-column
prop=
"deliver_at"
label=
"物流导入时间"
></el-table-column>
<el-table-column
prop=
"express_no"
label=
"快递单号"
></el-table-column>
</el-table>
</div>
<div
class=
"pagination"
>
<page
:nowPage=
"nowPage"
:total=
"total"
:limit=
"limit"
@
pageChange=
"onPageChange"
@
sizeChange=
"onSizeChange"
/>
</div>
</div>
</template>
<
script
>
import
page
from
"../framework/page"
;
import
{
receiveRecordApi
,
exportExcelApi
}
from
"../../service/api"
;
export
default
{
name
:
"index"
,
components
:
{
page
},
data
()
{
return
{
searchFrom
:
{
gift_name
:
''
,
gift_type
:
''
,
periods_title
:
''
,
class_name
:
''
,
mobile
:
''
,
receiveTime
:
[]
},
recordList
:
[],
nowPage
:
1
,
total
:
0
,
limit
:
10
}
},
methods
:
{
getRecordList
()
{
let
json
=
{
gift_name
:
this
.
searchFrom
.
gift_name
,
gift_type
:
this
.
searchFrom
.
gift_type
,
periods_title
:
this
.
searchFrom
.
periods_title
,
class_name
:
this
.
searchFrom
.
class_name
,
mobile
:
this
.
searchFrom
.
mobile
,
start_at
:
this
.
searchFrom
.
receiveTime
[
0
],
over_at
:
this
.
searchFrom
.
receiveTime
[
1
],
limit
:
this
.
limit
,
page
:
this
.
nowPage
};
receiveRecordApi
(
json
).
then
(
res
=>
{
this
.
recordList
=
res
.
list
;
this
.
total
=
res
.
total
;
});
},
onPageChange
(
val
)
{
this
.
nowPage
=
val
;
this
.
getRecordList
();
},
onSizeChange
(
val
)
{
this
.
limit
=
val
;
this
.
nowPage
=
1
;
this
.
getRecordList
();
},
exportTable
()
{
let
json
=
{
gift_name
:
this
.
searchFrom
.
gift_name
,
gift_type
:
this
.
searchFrom
.
gift_type
,
periods_title
:
this
.
searchFrom
.
periods_title
,
class_name
:
this
.
searchFrom
.
class_name
,
mobile
:
this
.
searchFrom
.
mobile
,
start_at
:
this
.
searchFrom
.
receiveTime
[
0
],
over_at
:
this
.
searchFrom
.
receiveTime
[
1
]
};
exportExcelApi
(
"/api/admin/gift/receive/record/export"
,
json
);
},
},
created
()
{
this
.
getRecordList
();
}
}
</
script
>
<
style
scoped
>
.container
{
padding
:
20px
;
}
</
style
>
src/components/shop/dialog.vue
View file @
097ea963
...
@@ -143,6 +143,7 @@
...
@@ -143,6 +143,7 @@
<el-form-item
v-if=
"form.goods_type==4"
label=
"领取到期时间(小时)"
label-width=
"160px"
>
<el-form-item
v-if=
"form.goods_type==4"
label=
"领取到期时间(小时)"
label-width=
"160px"
>
<el-input-number
v-model=
"form.goods_desc.time_limit"
></el-input-number>
<el-input-number
v-model=
"form.goods_desc.time_limit"
></el-input-number>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"form.goods_type==1||form.goods_type==2"
label=
"是否赠送优惠券"
label-width=
"160px"
>
<el-form-item
v-if=
"form.goods_type==1||form.goods_type==2"
label=
"是否赠送优惠券"
label-width=
"160px"
>
<el-select
v-model=
"form.goods_desc.coupon_goods_id"
placeholder=
"请选择"
>
<el-select
v-model=
"form.goods_desc.coupon_goods_id"
placeholder=
"请选择"
>
<el-option
v-for=
"data in coupongoods"
<el-option
v-for=
"data in coupongoods"
...
@@ -152,7 +153,18 @@
...
@@ -152,7 +153,18 @@
</el-option>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"课程封面(670*472)"
v-if=
"form.goods_type !== 3 && form.goods_type !== 4 && form.goods_type !== 5"
required
>
<el-form-item
label=
"关联赠品"
v-if=
"dialogObj.type == 0 || dialogObj.type == 1"
>
<el-select
v-model=
"form.relation_gift"
multiple
placeholder=
"请选择"
clearable
>
<el-option
v-for=
"data in relation_gift"
:key=
"data.id"
:label=
"`【$
{data.id}】${data.name}`"
:value="data.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"课程封面(670*472)"
v-if=
"form.goods_type !== 3 && form.goods_type !== 4 && form.goods_type !== 5"
required
>
<el-upload
<el-upload
list-type=
"picture-card"
list-type=
"picture-card"
class=
"upload-demo"
class=
"upload-demo"
...
@@ -224,12 +236,16 @@
...
@@ -224,12 +236,16 @@
<el-row>
<el-row>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
:label=
"form.goods_type === 1 || form.goods_type === 3 || form.goods_type === 5 ? '原价(元)' :form.goods_type === 4 ? '抵扣价格(元)' : '单买价格(元)'"
required
>
<el-form-item
:label=
"form.goods_type === 1 || form.goods_type === 3 || form.goods_type === 5 ? '原价(元)' :form.goods_type === 4 ? '抵扣价格(元)' : '单买价格(元)'"
required
>
<el-input-number
v-model=
"form.original_price"
label=
"原价"
></el-input-number>
<el-input-number
v-model=
"form.original_price"
label=
"原价"
></el-input-number>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
:label=
"form.goods_type === 1 || form.goods_type === 3 || form.goods_type === 5 ? '现价(元)' :form.goods_type === 4 ? '购买价格(元)' : '拼团价格(元)'"
required
>
<el-form-item
:label=
"form.goods_type === 1 || form.goods_type === 3 || form.goods_type === 5 ? '现价(元)' :form.goods_type === 4 ? '购买价格(元)' : '拼团价格(元)'"
required
>
<el-input-number
v-model=
"form.current_price"
label=
"现价"
></el-input-number>
<el-input-number
v-model=
"form.current_price"
label=
"现价"
></el-input-number>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -311,7 +327,8 @@
...
@@ -311,7 +327,8 @@
editGoodsApi
,
editGoodsApi
,
getGoodsDetailApi
,
getGoodsDetailApi
,
uploadFileApi
,
uploadFileApi
,
getGoodsListApi
getGoodsListApi
,
relationGiftApi
}
from
"../../service/api"
;
}
from
"../../service/api"
;
import
{
TEACHERTYPE
,
GOODSTYPE
}
from
"../../util/wordbook"
;
import
{
TEACHERTYPE
,
GOODSTYPE
}
from
"../../util/wordbook"
;
import
editorDetail
from
"./editorDetail"
import
editorDetail
from
"./editorDetail"
...
@@ -374,7 +391,8 @@
...
@@ -374,7 +391,8 @@
after_goods_id
:
''
,
after_goods_id
:
''
,
before_goods_id
:
''
before_goods_id
:
''
},
},
is_into_periods
:
'0'
is_into_periods
:
'0'
,
relation_gift
:
[]
},
},
lessonList
:
[],
lessonList
:
[],
goOn_goods_Id
:
{
goOn_goods_Id
:
{
...
@@ -382,7 +400,8 @@
...
@@ -382,7 +400,8 @@
before_goods_id
:
''
before_goods_id
:
''
},
},
coupongoods
:
[],
coupongoods
:
[],
false
:
false
false
:
false
,
relation_gift
:
[]
}
}
},
},
methods
:
{
methods
:
{
...
@@ -422,7 +441,9 @@
...
@@ -422,7 +441,9 @@
}
}
},
},
sub
()
{
sub
()
{
console
.
log
(
this
.
form
)
if
(
this
.
form
.
relation_gift
)
{
this
.
form
.
relation_gift
=
this
.
form
.
relation_gift
.
join
(
','
);
}
if
(
!
this
.
form
.
share_desc
.
img
&&
this
.
form
.
goods_type
==
2
)
{
if
(
!
this
.
form
.
share_desc
.
img
&&
this
.
form
.
goods_type
==
2
)
{
this
.
$message
({
this
.
$message
({
type
:
'success'
,
type
:
'success'
,
...
@@ -431,7 +452,6 @@
...
@@ -431,7 +452,6 @@
return
return
}
}
let
_json
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
)
+
''
);
let
_json
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
form
)
+
''
);
console
.
log
(
this
.
form
)
// debugger
// debugger
if
(
_json
.
goods_type
===
3
||
_json
.
goods_type
===
4
||
_json
.
goods_type
===
5
)
{
if
(
_json
.
goods_type
===
3
||
_json
.
goods_type
===
4
||
_json
.
goods_type
===
5
)
{
_json
.
course_id
=
0
;
_json
.
course_id
=
0
;
...
@@ -446,7 +466,6 @@
...
@@ -446,7 +466,6 @@
}
else
{
}
else
{
_json
.
desc
.
use_goods_ids
=
this
.
goodsYou
.
toString
()
_json
.
desc
.
use_goods_ids
=
this
.
goodsYou
.
toString
()
}
}
_json
.
desc
.
after_goods_id
=
this
.
goOn_goods_Id
.
after_goods_id
;
_json
.
desc
.
after_goods_id
=
this
.
goOn_goods_Id
.
after_goods_id
;
_json
.
original_price
=
(
_json
.
original_price
*
100
).
toFixed
(
0
);
_json
.
original_price
=
(
_json
.
original_price
*
100
).
toFixed
(
0
);
_json
.
current_price
=
(
_json
.
current_price
*
100
).
toFixed
(
0
);
_json
.
current_price
=
(
_json
.
current_price
*
100
).
toFixed
(
0
);
...
@@ -668,10 +687,10 @@
...
@@ -668,10 +687,10 @@
before_goods_id
:
0
,
before_goods_id
:
0
,
after_goods_id
:
0
after_goods_id
:
0
},
},
is_into_periods
:
'0'
is_into_periods
:
'0'
,
relation_gift
:
[]
};
};
this
.
getLessonList
();
this
.
getLessonList
();
console
.
log
(
this
.
form
.
course_type
)
if
(
this
.
form
.
goods_type
==
1
||
this
.
form
.
goods_type
==
2
)
{
if
(
this
.
form
.
goods_type
==
1
||
this
.
form
.
goods_type
==
2
)
{
let
json
=
{
let
json
=
{
limit
:
200
,
limit
:
200
,
...
@@ -735,6 +754,12 @@
...
@@ -735,6 +754,12 @@
if
(
!
share_desc
.
refImg
)
{
if
(
!
share_desc
.
refImg
)
{
share_desc
.
refImg
=
[]
share_desc
.
refImg
=
[]
}
}
let
gift_ids_arr
=
[];
if
(
res
.
gift_ids
)
{
res
.
gift_ids
.
split
(
','
).
map
(
i
=>
{
gift_ids_arr
.
push
(
Number
(
i
));
});
}
this
.
form
=
{
this
.
form
=
{
name
:
res
.
name
,
name
:
res
.
name
,
goods_type
:
res
.
goods_type
,
goods_type
:
res
.
goods_type
,
...
@@ -751,8 +776,10 @@
...
@@ -751,8 +776,10 @@
desc
:
JSON
.
parse
(
res
.
desc
),
desc
:
JSON
.
parse
(
res
.
desc
),
invite_earnings
:
res
.
invite_earnings
/
100
,
invite_earnings
:
res
.
invite_earnings
/
100
,
is_auth_teacher
:
res
.
is_auth_teacher
,
is_auth_teacher
:
res
.
is_auth_teacher
,
is_into_periods
:
res
.
is_into_periods
is_into_periods
:
res
.
is_into_periods
,
relation_gift
:
gift_ids_arr
};
};
if
(
this
.
form
.
desc
.
before_goods_id
)
{
if
(
this
.
form
.
desc
.
before_goods_id
)
{
this
.
goOn_goods_Id
.
before_goods_id
=
this
.
form
.
desc
.
before_goods_id
;
this
.
goOn_goods_Id
.
before_goods_id
=
this
.
form
.
desc
.
before_goods_id
;
}
}
...
@@ -765,7 +792,6 @@
...
@@ -765,7 +792,6 @@
return
+
item
;
return
+
item
;
});
});
}
}
console
.
log
(
this
.
form
)
if
(
this
.
form
.
course_type
!=
1
&&
this
.
form
.
course_type
!=
2
)
{
if
(
this
.
form
.
course_type
!=
1
&&
this
.
form
.
course_type
!=
2
)
{
// debugger
// debugger
getGoodsListApi
({
limit
:
200
}).
then
(
res
=>
{
getGoodsListApi
({
limit
:
200
}).
then
(
res
=>
{
...
@@ -842,13 +868,17 @@
...
@@ -842,13 +868,17 @@
getLessonApi
({
type
:
this
.
form
.
course_type
}).
then
(
res
=>
{
getLessonApi
({
type
:
this
.
form
.
course_type
}).
then
(
res
=>
{
this
.
lessonList
=
res
.
list
this
.
lessonList
=
res
.
list
})
})
},
getRelationGift
()
{
relationGiftApi
().
then
(
res
=>
{
this
.
relation_gift
=
res
.
list
;
});
}
}
},
},
watch
:
{
watch
:
{
dialogObj
:
{
dialogObj
:
{
handler
:
function
()
{
handler
:
function
()
{
if
(
this
.
dialogObj
.
show
)
{
if
(
this
.
dialogObj
.
show
)
{
console
.
log
(
this
.
dialogObj
)
this
.
loading
=
true
;
this
.
loading
=
true
;
this
.
initDialog
()
this
.
initDialog
()
}
}
...
@@ -856,6 +886,7 @@
...
@@ -856,6 +886,7 @@
deep
:
true
deep
:
true
},
},
"dialogObj.show"
:
function
(
a
)
{
"dialogObj.show"
:
function
(
a
)
{
this
.
getRelationGift
();
},
},
show
(
value
)
{
show
(
value
)
{
this
.
$emit
(
"changeShow"
,
value
);
this
.
$emit
(
"changeShow"
,
value
);
...
...
src/components/teacherDetail/giftDeliverDialog.vue
0 → 100644
View file @
097ea963
<
template
>
<el-dialog
:title=
"dialogObj.title"
center
append-to-body
:visible
.
sync=
"dialogObj.show"
>
<div
v-if=
"dialogObj.gift_deliver"
class=
"dialog-content"
>
<div
class=
"dialog-text"
>
物流已发货,不能修改赠品信息!
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"dialogObj.show = false"
>
知道了
</el-button>
</span>
</div>
<div
v-else
class=
"dialog-content"
>
<div>
当前商品:
{{
dialogObj
.
goods_name
}}
</div>
<div>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
>
<el-form-item
label=
"选择赠品"
required
prop=
"selectedGiftList"
>
<el-select
multiple
v-model=
"form.selectedGiftList"
placeholder=
"全部"
>
<el-option
v-for=
"data in selectedGiftList"
:key=
"data.id"
:label=
"`【$
{data.id}】${data.name}`"
:value="data.id">
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogObj.show = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"sub"
:disabled=
"selectedGiftList.length == 0"
>
确 定
</el-button>
</span>
</div>
</el-dialog>
</
template
>
<
script
>
import
{
relationGiftApi
,
orderSetApi
}
from
"../../service/api"
;
export
default
{
name
:
"giftDeliverDialog"
,
props
:
[
'dialogObj'
],
data
()
{
return
{
form
:
{
selectedGiftList
:
[]
},
selectedGiftList
:
[],
rules
:
{
selectedGiftList
:
[
{
required
:
true
,
message
:
'请选择赠品'
,
trigger
:
'change'
}
]
}
}
},
methods
:
{
initDialog
()
{
relationGiftApi
({
goods_id
:
this
.
dialogObj
.
goods_id
}).
then
(
res
=>
{
this
.
selectedGiftList
=
res
.
list
;
});
},
sub
()
{
this
.
$refs
[
'form'
].
validate
((
valid
)
=>
{
if
(
valid
)
{
let
json
=
{
gift_ids
:
this
.
form
.
selectedGiftList
.
join
(
','
),
goods_id
:
this
.
dialogObj
.
goods_id
,
user_id
:
this
.
dialogObj
.
user_id
,
user_address_id
:
this
.
dialogObj
.
user_address_id
,
out_trade_no
:
this
.
dialogObj
.
out_trade_no
};
orderSetApi
(
json
).
then
(
res
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功!'
});
this
.
$emit
(
"reflash"
);
this
.
dialogObj
.
show
=
false
;
});
}
else
{
return
false
;
}
});
},
},
watch
:
{
'dialogObj.show'
(
val
)
{
if
(
val
)
{
this
.
initDialog
();
}
}
},
}
</
script
>
<
style
scoped
>
.dialog-content
{
text-align
:
center
;
}
.dialog-content
div
{
margin-bottom
:
20px
;
text-align
:
left
;
}
.dialog-content
.dialog-text
{
text-align
:
center
;
}
</
style
>
src/components/teacherDetail/index.vue
View file @
097ea963
...
@@ -4,7 +4,9 @@
...
@@ -4,7 +4,9 @@
<el-card
style=
"width: 450px;display: inline-block;margin-right: 10px"
>
<el-card
style=
"width: 450px;display: inline-block;margin-right: 10px"
>
<div
slot=
"header"
>
<div
slot=
"header"
>
<span><label>
{{
detail
.
type
|
teacherType
}}
:
</label>
{{
detail
.
name
}}
(T
{{
detail
.
squad
}}
)
</span>
<span><label>
{{
detail
.
type
|
teacherType
}}
:
</label>
{{
detail
.
name
}}
(T
{{
detail
.
squad
}}
)
</span>
<el-button
style=
"float: right;margin-top: -6px;"
size=
"small"
type=
"success"
v-if=
"!$store.state.readonly"
plain
@
click=
"onAddUser(true)"
>
老师绑定用户
</el-button>
<el-button
style=
"float: right;margin-top: -6px;"
size=
"small"
type=
"success"
v-if=
"!$store.state.readonly"
plain
@
click=
"onAddUser(true)"
>
老师绑定用户
</el-button>
</div>
</div>
<div
class=
"card-content"
>
<div
class=
"card-content"
>
<div
class=
"text item"
>
<div
class=
"text item"
>
...
@@ -34,7 +36,9 @@
...
@@ -34,7 +36,9 @@
<el-card
style=
"width: 450px;display: inline-block;margin-right: 10px"
v-if=
"detail.user_info"
>
<el-card
style=
"width: 450px;display: inline-block;margin-right: 10px"
v-if=
"detail.user_info"
>
<div
slot=
"header"
>
<div
slot=
"header"
>
<span>
绑定用户
</span>
<span>
绑定用户
</span>
<el-button
@
click=
"createInviteLink(detail.user_info)"
style=
"float: right;"
size=
"mini"
plain
type=
"primary"
>
复制专属链接
</el-button>
<el-button
@
click=
"createInviteLink(detail.user_info)"
style=
"float: right;"
size=
"mini"
plain
type=
"primary"
>
复制专属链接
</el-button>
</div>
</div>
<div
class=
"card-content"
>
<div
class=
"card-content"
>
<div
class=
"text item"
>
<div
class=
"text item"
>
...
@@ -55,7 +59,8 @@
...
@@ -55,7 +59,8 @@
<span>
当月销售转化率【
{{
nowDate
}}
】
</span>
<span>
当月销售转化率【
{{
nowDate
}}
】
</span>
</div>
</div>
<div
class=
"text item"
>
<div
class=
"text item"
>
<el-progress
type=
"circle"
style=
"float: left;margin-right: 10px"
:percentage=
"Number(task4Data.trans_rate.split('%')[0])"
></el-progress>
<el-progress
type=
"circle"
style=
"float: left;margin-right: 10px"
:percentage=
"Number(task4Data.trans_rate.split('%')[0])"
></el-progress>
</div>
</div>
<div
class=
"card-content"
>
<div
class=
"card-content"
>
<div
class=
"text item"
>
<div
class=
"text item"
>
...
@@ -187,6 +192,15 @@
...
@@ -187,6 +192,15 @@
<el-form-item
label=
"交易订单号"
>
<el-form-item
label=
"交易订单号"
>
<el-input
v-model=
"form.out_trade_no"
></el-input>
<el-input
v-model=
"form.out_trade_no"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"关联赠品"
>
<el-input
v-model=
"form.gift_name"
></el-input>
</el-form-item>
<el-form-item
label=
"订单状态"
>
<el-select
v-model=
"form.deliver_status"
placeholder=
"请选择"
clearable
>
<el-option
label=
"未发货"
value=
"0"
></el-option>
<el-option
label=
"已发货"
value=
"1"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-form-item>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
<el-button
type=
"primary"
plain
@
click=
"getOrderList"
>
搜索
</el-button>
</el-form-item>
</el-form-item>
...
@@ -208,7 +222,8 @@
...
@@ -208,7 +222,8 @@
<el-table-column
prop=
"goods_name"
label=
"商品名称"
></el-table-column>
<el-table-column
prop=
"goods_name"
label=
"商品名称"
></el-table-column>
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"推广人"
>
<el-table-column
width=
"250"
prop=
"invite_id"
className=
"f-c"
label=
"推广人"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<div
@
click=
"showSource(scope.row)"
v-if=
"scope.row.invite_earnings > 0 && scope.row.invite_id !== 0"
style=
"width:100%;display: flex;color: #409eff;cursor: pointer"
>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
<img
:src=
"scope.row.invite_avatar"
class=
"avatar"
/>
类型:
{{
scope
.
row
.
invite_type
}}
(
{{
scope
.
row
.
invite_name
}}
)
类型:
{{
scope
.
row
.
invite_type
}}
(
{{
scope
.
row
.
invite_name
}}
)
<br>
<br>
...
@@ -235,6 +250,20 @@
...
@@ -235,6 +250,20 @@
<div
v-if=
"scope.row.invite_id === 0"
>
无
</div>
<div
v-if=
"scope.row.invite_id === 0"
>
无
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"relation_gift"
label=
"关联赠品"
>
<
template
slot-scope=
"scope"
>
<span
v-for=
"(data, index) in scope.row.relation_gift"
>
{{
data
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"gift_deliver"
label=
"关联赠品物流"
>
<
template
slot-scope=
"scope"
>
<div
v-if=
"scope.row.gift_deliver"
>
<a
class=
"gift_deliver"
v-for=
"(data, index) in scope.row.gift_deliver"
:href=
"`https://m.baidu.com/from=1013755s/s?word=$
{data.express_no}
&
sa=tb
&
ts=2790568
&
t_kt=0
&
ie=utf-8
&
rsv_t=cbe2F%252FT5T3MIzkRl%252Fg8ZUw%252FEPHZmn2wHIrB8cLvgNlEKyyDqUNPrTyDEEDjkAb8
&
rsv_pq=11793168499026332712
&
ss=110000000001
&
tj=1
&
rqlang=zh
&
rsv_sug4=4111
&
inputT=3178
&
oq=快递单号查询`"
target="_blank">
{{
data
.
goods_title
}}
</a>
</div>
</
template
>
</el-table-column>
<el-table-column
label=
"优惠活动"
>
<el-table-column
label=
"优惠活动"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span
v-if=
"scope.row.order_coupon_id === 0"
>
无
</span>
<span
v-if=
"scope.row.order_coupon_id === 0"
>
无
</span>
...
@@ -245,7 +274,9 @@
...
@@ -245,7 +274,9 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"付款状态"
width=
"80"
>
<el-table-column
label=
"付款状态"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -266,18 +297,19 @@
...
@@ -266,18 +297,19 @@
<el-table-column
prop=
"pay_at"
label=
"购买时间"
sortable
></el-table-column>
<el-table-column
prop=
"pay_at"
label=
"购买时间"
sortable
></el-table-column>
<el-table-column
prop=
"created_at"
label=
"下单时间"
sortable
></el-table-column>
<el-table-column
prop=
"created_at"
label=
"下单时间"
sortable
></el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
></el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
></el-table-column>
<el-table-column
width=
"5
0"
label=
"操作"
v-if=
"!$store.state.readonly"
fixed=
"right"
>
<el-table-column
align=
"center"
width=
"10
0"
label=
"操作"
v-if=
"!$store.state.readonly"
fixed=
"right"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-
popover
placement=
"top"
width=
"200"
>
<el-
button
slot=
"reference"
size=
"mini"
type=
"text"
<div
style=
"text-align: center"
>
@
click=
"editComment(scope.row.id, scope.row.desc)"
>
编辑备注
<el-button
@
click=
"editComment(scope.row.id, scope.row.desc)"
type=
"info"
plain
size=
"mini"
>
编辑备注
</el-button>
</el-button>
</div>
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
@
click=
"editGiftDeliver(scope.row)"
<el-button
slot=
"reference"
size=
"mini"
type=
"text"
>
操作
</el-button>
style=
"margin: 0;"
>
关联赠品
</el-
popover
>
</el-
button
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<page
:total=
"orderListObj.total"
:limit=
"orderListObj.limit"
@
pageChange=
"onPageChange2"
@
sizeChange=
"onSizeChange2"
/>
<page
:total=
"orderListObj.total"
:limit=
"orderListObj.limit"
@
pageChange=
"onPageChange2"
@
sizeChange=
"onSizeChange2"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"外部订单列表"
name=
"yunji"
>
<el-tab-pane
label=
"外部订单列表"
name=
"yunji"
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"100px"
inline
>
<el-form
ref=
"form"
:model=
"form"
label-width=
"100px"
inline
>
...
@@ -346,7 +378,9 @@
...
@@ -346,7 +378,9 @@
</el-table-column>
</el-table-column>
<el-table-column
label=
"付款状态"
width=
"80"
>
<el-table-column
label=
"付款状态"
width=
"80"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<el-button
type=
"text"
v-if=
"scope.row.status === 5 || scope.row.status === 3"
@
click=
"showRef(scope.row)"
>
{{
scope
.
row
.
status
|
status
}}
</el-button>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
<div
v-if=
"scope.row.status !== 5 && scope.row.status !== 3"
>
{{
scope
.
row
.
status
|
status
}}
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -361,7 +395,8 @@
...
@@ -361,7 +395,8 @@
<br>
<br>
tel:
{{
scope
.
row
.
receiver_phone
}}
tel:
{{
scope
.
row
.
receiver_phone
}}
<br>
<br>
{{
scope
.
row
.
receiver_province
}}
{{
scope
.
row
.
receiver_city
}}
{{
scope
.
row
.
receiver_area
}}
{{
scope
.
row
.
receiver_address
}}
{{
scope
.
row
.
receiver_province
}}
{{
scope
.
row
.
receiver_city
}}
{{
scope
.
row
.
receiver_area
}}
{{
scope
.
row
.
receiver_address
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"active_at"
label=
"激活时间"
width=
"90"
>
<el-table-column
prop=
"active_at"
label=
"激活时间"
width=
"90"
>
...
@@ -371,10 +406,12 @@
...
@@ -371,10 +406,12 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"create_time"
label=
"下单时间"
width=
"90"
></el-table-column>
<el-table-column
prop=
"create_time"
label=
"下单时间"
width=
"90"
></el-table-column>
<el-table-column
prop=
"pay_time"
label=
"付款时间"
width=
"90"
></el-table-column>
<el-table-column
prop=
"pay_time"
label=
"付款时间"
width=
"90"
></el-table-column>
<el-table-column
prop=
"user_status"
:formatter=
"userStatusFormatter"
label=
"沟通状态"
width=
"90"
></el-table-column>
<el-table-column
prop=
"user_status"
:formatter=
"userStatusFormatter"
label=
"沟通状态"
width=
"90"
></el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
></el-table-column>
<el-table-column
prop=
"desc"
label=
"备注"
></el-table-column>
</el-table>
</el-table>
<page
:total=
"yunjiListObj.total"
:limit=
"yunjiListObj.limit"
@
pageChange=
"onPageChange3"
@
sizeChange=
"onSizeChange3"
/>
<page
:total=
"yunjiListObj.total"
:limit=
"yunjiListObj.limit"
@
pageChange=
"onPageChange3"
@
sizeChange=
"onSizeChange3"
/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"话术列表"
name=
"huashu"
>
<el-tab-pane
label=
"话术列表"
name=
"huashu"
>
<div
class=
"cssbox"
>
<div
class=
"cssbox"
>
...
@@ -402,10 +439,12 @@
...
@@ -402,10 +439,12 @@
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
<page
:total=
"contentTotal"
:limit=
"contentLimit"
@
pageChange=
"onPageChangeC"
@
sizeChange=
"onSizeChangeC"
/>
<page
:total=
"contentTotal"
:limit=
"contentLimit"
@
pageChange=
"onPageChangeC"
@
sizeChange=
"onSizeChangeC"
/>
</el-collapse-item>
</el-collapse-item>
</el-collapse>
</el-collapse>
<page
:total=
"modularTotal"
:limit=
"modularLimit"
@
pageChange=
"onPageChangeModular"
@
sizeChange=
"onSizeChangeModular"
/>
<page
:total=
"modularTotal"
:limit=
"modularLimit"
@
pageChange=
"onPageChangeModular"
@
sizeChange=
"onSizeChangeModular"
/>
<!-- 查看内容 -->
<!-- 查看内容 -->
<el-dialog
<el-dialog
title=
""
title=
""
...
@@ -443,6 +482,7 @@
...
@@ -443,6 +482,7 @@
<user-list
:userObj=
"userObj"
@
reflash=
"getTeacherDetail"
/>
<user-list
:userObj=
"userObj"
@
reflash=
"getTeacherDetail"
/>
<choose-good-dialog
:dialogObj=
"chooseGoodDialogObj"
@
changeShow=
"changeShow"
/>
<choose-good-dialog
:dialogObj=
"chooseGoodDialogObj"
@
changeShow=
"changeShow"
/>
<gift-deliver-dialog
:dialogObj=
"giftDeliverDialogObj"
@
reflash=
"getOrderList"
></gift-deliver-dialog>
<el-dialog
append-to-body
:visible
.
sync=
"addShow"
top=
"5vh"
>
<el-dialog
append-to-body
:visible
.
sync=
"addShow"
top=
"5vh"
>
<el-form
label-width=
"90px"
inline
>
<el-form
label-width=
"90px"
inline
>
...
@@ -471,7 +511,8 @@
...
@@ -471,7 +511,8 @@
</el-table-column>
</el-table-column>
<el-table-column
prop=
"mobile"
label=
"手机号"
></el-table-column>
<el-table-column
prop=
"mobile"
label=
"手机号"
></el-table-column>
</el-table>
</el-table>
<page
:total=
"userObj.total"
:limit=
"userObj.limit"
:small=
"true"
@
pageChange=
"onPageChange4"
@
sizeChange=
"onSizeChange4"
/>
<page
:total=
"userObj.total"
:limit=
"userObj.limit"
:small=
"true"
@
pageChange=
"onPageChange4"
@
sizeChange=
"onSizeChange4"
/>
<span
slot=
"footer"
class=
"dialog-footer"
>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"addShow = false"
>
取 消
</el-button>
<el-button
@
click=
"addShow = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"onAdd"
>
确 定
</el-button>
<el-button
type=
"primary"
@
click=
"onAdd"
>
确 定
</el-button>
...
@@ -508,12 +549,13 @@
...
@@ -508,12 +549,13 @@
import
AddressArray
from
'../framework/address-picker/addr'
import
AddressArray
from
'../framework/address-picker/addr'
import
task
from
'./task'
import
task
from
'./task'
import
page
from
'../framework/page'
import
page
from
'../framework/page'
// import customerDetail from './customer'
// import customerDetail from './customer'
import
sourceDialog
from
'./sourceDialog'
import
sourceDialog
from
'./sourceDialog'
import
couponDialog
from
'./couponDialog'
import
couponDialog
from
'./couponDialog'
import
refundDetail
from
'./refundDetail'
import
refundDetail
from
'./refundDetail'
import
UserList
from
'../class/userList'
import
UserList
from
'../class/userList'
import
chooseGoodDialog
from
'./chooseGoodDialog'
import
chooseGoodDialog
from
'./chooseGoodDialog'
import
giftDeliverDialog
from
'./giftDeliverDialog'
let
studentSource
=
{}
let
studentSource
=
{}
export
default
{
export
default
{
...
@@ -529,7 +571,7 @@
...
@@ -529,7 +571,7 @@
couponDialog
,
couponDialog
,
refundDetail
,
refundDetail
,
sourceDialog
,
sourceDialog
,
// customerDetail
giftDeliverDialog
},
},
data
()
{
data
()
{
let
nowDate
=
new
Date
();
let
nowDate
=
new
Date
();
...
@@ -572,6 +614,8 @@
...
@@ -572,6 +614,8 @@
out_trade_no
:
''
,
out_trade_no
:
''
,
receive_mobile
:
""
,
receive_mobile
:
""
,
mobile
:
""
,
mobile
:
""
,
gift_name
:
""
,
deliver_status
:
""
},
},
task4Data
:
null
,
task4Data
:
null
,
goodList
:
[],
goodList
:
[],
...
@@ -627,6 +671,17 @@
...
@@ -627,6 +671,17 @@
show
:
false
,
show
:
false
,
out_trade_no
:
''
out_trade_no
:
''
},
},
giftDeliverDialogObj
:
{
show
:
false
,
title
:
'配置赠品'
,
gift_deliver
:
null
,
goods_id
:
''
,
user_id
:
''
,
user_address_id
:
''
,
out_trade_no
:
''
,
gift_ids
:
''
,
goods_name
:
''
}
}
}
},
},
methods
:
{
methods
:
{
...
@@ -942,6 +997,12 @@
...
@@ -942,6 +997,12 @@
if
(
this
.
form
.
mobile
)
{
if
(
this
.
form
.
mobile
)
{
json
.
mobile
=
this
.
form
.
mobile
json
.
mobile
=
this
.
form
.
mobile
}
}
if
(
this
.
form
.
gift_name
)
{
json
.
gift_name
=
this
.
form
.
gift_name
}
if
(
this
.
form
.
deliver_status
)
{
json
.
deliver_status
=
this
.
form
.
deliver_status
}
// if(this.id){
// if(this.id){
// json.invite_id=this.id;
// json.invite_id=this.id;
// debugger
// debugger
...
@@ -992,6 +1053,15 @@
...
@@ -992,6 +1053,15 @@
});
});
})
})
},
},
editGiftDeliver
(
data
)
{
this
.
giftDeliverDialogObj
.
show
=
true
;
this
.
giftDeliverDialogObj
.
gift_deliver
=
data
.
gift_deliver
;
this
.
giftDeliverDialogObj
.
goods_id
=
data
.
goods_id
;
this
.
giftDeliverDialogObj
.
user_id
=
data
.
user_id
;
this
.
giftDeliverDialogObj
.
user_address_id
=
data
.
user_address_id
;
this
.
giftDeliverDialogObj
.
out_trade_no
=
data
.
out_trade_no
;
this
.
giftDeliverDialogObj
.
goods_name
=
data
.
goods_name
;
},
showRef
(
data
)
{
showRef
(
data
)
{
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
show
=
true
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
this
.
refundDetail
.
out_trade_no
=
data
.
out_trade_no
;
...
@@ -1210,6 +1280,11 @@
...
@@ -1210,6 +1280,11 @@
justify-content
:
flex-start
;
justify-content
:
flex-start
;
align-items
:
center
;
align-items
:
center
;
}
}
.gift_deliver
{
color
:
rgb
(
64
,
158
,
255
)
!important
;
text-decoration
:
none
!important
;
}
</
style
>
</
style
>
src/service/api.js
View file @
097ea963
...
@@ -99,7 +99,6 @@ export const getTeacherListApi = function (json) {
...
@@ -99,7 +99,6 @@ export const getTeacherListApi = function (json) {
//获取教师详情
//获取教师详情
const
getTeacherDetailUrl
=
`
${
_baseUrl
}
api/admin/teacher/info`
;
const
getTeacherDetailUrl
=
`
${
_baseUrl
}
api/admin/teacher/info`
;
export
const
getTeacherDetailApi
=
function
(
id
,
json
)
{
export
const
getTeacherDetailApi
=
function
(
id
,
json
)
{
console
.
log
(
id
)
return
Vue
.
prototype
.
$fetch
(
`
${
getTeacherDetailUrl
}
/
${
id
}
`
,
json
)
return
Vue
.
prototype
.
$fetch
(
`
${
getTeacherDetailUrl
}
/
${
id
}
`
,
json
)
};
};
//添加教师
//添加教师
...
@@ -237,7 +236,6 @@ const deleteGoodsUrl = `${_baseUrl}api/admin/goods`;
...
@@ -237,7 +236,6 @@ const deleteGoodsUrl = `${_baseUrl}api/admin/goods`;
export
const
deleteGoodsApi
=
function
(
id
)
{
export
const
deleteGoodsApi
=
function
(
id
)
{
return
Vue
.
prototype
.
$del
(
`
${
deleteGoodsUrl
}
/
${
id
}
`
)
return
Vue
.
prototype
.
$del
(
`
${
deleteGoodsUrl
}
/
${
id
}
`
)
};
};
// 商品上架
// 商品上架
const
upGoodsUrl
=
`
${
_baseUrl
}
api/admin/goods/putaway/`
;
const
upGoodsUrl
=
`
${
_baseUrl
}
api/admin/goods/putaway/`
;
export
const
upGoodsApi
=
function
(
id
)
{
export
const
upGoodsApi
=
function
(
id
)
{
...
@@ -1220,7 +1218,6 @@ export const deleteQuestionModularDetailApi = function (question_id) {
...
@@ -1220,7 +1218,6 @@ export const deleteQuestionModularDetailApi = function (question_id) {
export
const
sortQuestionModularDetailApi
=
function
(
json
)
{
export
const
sortQuestionModularDetailApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$put
(
`/api/admin/question/sort/`
,
json
)
return
Vue
.
prototype
.
$put
(
`/api/admin/question/sort/`
,
json
)
};
};
//用户收货地址
//用户收货地址
export
const
fetchAddressListApi
=
function
(
uid
)
{
export
const
fetchAddressListApi
=
function
(
uid
)
{
return
Vue
.
prototype
.
$fetch
(
`/api/admin/student/address/
${
uid
}
`
)
return
Vue
.
prototype
.
$fetch
(
`/api/admin/student/address/
${
uid
}
`
)
...
@@ -1502,4 +1499,58 @@ export const getHourTimeApi = function (json) {
...
@@ -1502,4 +1499,58 @@ export const getHourTimeApi = function (json) {
export
const
getGrowthRecordApi
=
function
(
json
)
{
export
const
getGrowthRecordApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/user/growth/list`
,
json
)
return
Vue
.
prototype
.
$fetch
(
`
${
_baseUrl
}
api/admin/user/growth/list`
,
json
)
};
};
//赠品配置列表
const
relationGiftUrl
=
`
${
_baseUrl
}
api/admin/gift/config/list`
;
export
const
relationGiftApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
relationGiftUrl
}
`
,
json
)
};
// 订单配置赠品
const
orderSetUrl
=
`
${
_baseUrl
}
api/admin/order/set/gift`
;
export
const
orderSetApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
`
${
orderSetUrl
}
`
,
json
)
};
// 赠品领取记录
const
receiveRecordUrl
=
`
${
_baseUrl
}
api/admin/gift/receive/record`
;
export
const
receiveRecordApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$fetch
(
`
${
receiveRecordUrl
}
`
,
json
)
};
// 添加赠品配置
const
giftConfigAddUrl
=
`
${
_baseUrl
}
api/admin/gift/config/add`
;
export
const
giftConfigAddApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
`
${
giftConfigAddUrl
}
`
,
json
)
};
// 编辑赠品配置
const
giftConfigEditUrl
=
`
${
_baseUrl
}
api/admin/gift/config`
;
export
const
giftConfigEditApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
giftConfigEditUrl
}
/
${
id
}
`
,
json
)
};
// 赠品下架
const
giftSoldoutUrl
=
`
${
_baseUrl
}
api/admin/gift/soldout`
;
export
const
giftSoldoutApi
=
function
(
id
)
{
return
Vue
.
prototype
.
$patch
(
`
${
giftSoldoutUrl
}
/
${
id
}
`
)
};
// 合同协议列表
const
contractListUrl
=
`
${
_baseUrl
}
api/admin/contract/list`
;
export
const
contractListApi
=
function
()
{
return
Vue
.
prototype
.
$fetch
(
`
${
contractListUrl
}
`
)
};
// 合同状态切换
const
contractSwitchstatusUrl
=
`
${
_baseUrl
}
api/admin/contract/switchstatus`
;
export
const
contractSwitchstatusApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$put
(
`
${
contractSwitchstatusUrl
}
/
${
id
}
`
,
json
)
};
// 合同协议绑定商品
const
contractGoodslistUrl
=
`
${
_baseUrl
}
api/admin/contract/goodslist`
;
export
const
contractGoodslistApi
=
function
()
{
return
Vue
.
prototype
.
$fetch
(
`
${
contractGoodslistUrl
}
`
)
};
// 合同协议创建
const
contractAddUrl
=
`
${
_baseUrl
}
api/admin/contract/add`
;
export
const
contractAddApi
=
function
(
json
)
{
return
Vue
.
prototype
.
$post
(
`
${
contractAddUrl
}
`
,
json
)
};
// 合同协议编辑
const
contractEditUrl
=
`
${
_baseUrl
}
api/admin/contract/edit`
;
export
const
contractEditApi
=
function
(
id
,
json
)
{
return
Vue
.
prototype
.
$patch
(
`
${
contractEditUrl
}
/
${
id
}
`
,
json
)
};
src/util/menuList.js
View file @
097ea963
...
@@ -536,6 +536,26 @@ export default [
...
@@ -536,6 +536,26 @@ export default [
name
:
'disposable'
,
name
:
'disposable'
,
component
:
e
=>
require
([
'@/components/disposable'
],
e
),
component
:
e
=>
require
([
'@/components/disposable'
],
e
),
}
}
},
{
value
:
'赠品配置'
,
routerName
:
'gitConfig'
,
path
:
'/gitConfig'
,
cover
:
'6-5'
,
router
:
{
path
:
'/gitConfig'
,
name
:
'gitConfig'
,
component
:
e
=>
require
([
'@/components/gitConfig'
],
e
),
}
},
{
value
:
'赠品领取记录'
,
routerName
:
'gitDeliverRecord'
,
path
:
'/gitDeliverRecord'
,
cover
:
'6-6'
,
router
:
{
path
:
'/gitDeliverRecord'
,
name
:
'gitDeliverRecord'
,
component
:
e
=>
require
([
'@/components/gitDeliverRecord'
],
e
),
}
}
}
]
]
},
{
},
{
...
@@ -720,7 +740,17 @@ export default [
...
@@ -720,7 +740,17 @@ export default [
name
:
'config'
,
name
:
'config'
,
component
:
e
=>
require
([
'@/components/config'
],
e
),
component
:
e
=>
require
([
'@/components/config'
],
e
),
}
}
},
},
{
value
:
'合同协议管理'
,
routerName
:
'contract'
,
path
:
'/contract'
,
cover
:
'10-6'
,
router
:
{
path
:
'/contract'
,
name
:
'contract'
,
component
:
e
=>
require
([
'@/components/contract'
],
e
),
}
}
]
]
},
{
},
{
name
:
''
,
name
:
''
,
...
...
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