切换导航条
此项目
正在载入...
登录
何书鹏
/
anttest
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
4783ae4c888ec532211c364e844d3730e449bf34
1 个父辈
1731c438
售后时间筛选
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
77 行增加
和
3 行删除
application/admin/controller/shopro/order/Aftersale.php
application/admin/view/shopro/order/aftersale/index.html
public/assets/js/backend/shopro/order/aftersale.js
application/admin/controller/shopro/order/Aftersale.php
查看文件 @
4783ae4
...
...
@@ -347,14 +347,15 @@ class Aftersale extends Backend
private
function
buildSearchOrder
()
{
$search
=
$this
->
request
->
get
(
"search"
,
''
);
// 关键字
$status
=
$this
->
request
->
get
(
"status"
,
'all'
);
$createtime
=
$this
->
request
->
get
(
"createtime/a"
);
$orders
=
$this
->
orderModel
->
withTrashed
();
$orders
=
$orders
->
whereExists
(
function
(
$query
)
use
(
$search
,
$status
)
{
$orders
=
$orders
->
whereExists
(
function
(
$query
)
use
(
$search
,
$status
,
$createtime
)
{
extract
(
$this
->
getModelTable
());
$aftersales
=
$query
->
table
(
$aftersaleName
)
->
where
(
$aftersaleName
.
'.order_id='
.
$orderName
.
'.id'
);
$aftersales
=
$this
->
aftersaleSearch
(
$aftersales
,
$search
,
$status
);
$aftersales
=
$this
->
aftersaleSearch
(
$aftersales
,
$search
,
$status
,
$createtime
);
return
$aftersales
;
});
...
...
@@ -363,7 +364,7 @@ class Aftersale extends Backend
}
private
function
aftersaleSearch
(
$aftersales
,
$search
,
$status
)
{
private
function
aftersaleSearch
(
$aftersales
,
$search
,
$status
,
$createtime
)
{
extract
(
$this
->
getModelTable
());
if
(
$search
)
{
...
...
@@ -396,6 +397,19 @@ class Aftersale extends Backend
}
}
// 申请时间
if
(
$createtime
)
{
$sym
=
'BETWEEN'
;
if
(
$createtime
[
0
]
===
''
)
{
$sym
=
'<='
;
$createtime
=
$createtime
[
1
];
}
elseif
(
$createtime
[
1
]
===
''
)
{
$sym
=
'>='
;
$createtime
=
$createtime
[
0
];
}
$aftersales
=
$aftersales
->
where
(
'createtime'
,
$sym
.
' TIME'
,
$createtime
);
}
// 经销商
$dealer
=
[];
$group_id_arr
=
array_column
(
$this
->
auth
->
getGroups
(),
'group_id'
);
...
...
application/admin/view/shopro/order/aftersale/index.html
查看文件 @
4783ae4
...
...
@@ -235,6 +235,30 @@
border-left
:
none
;
}
.order-time
{
margin-left
:
15px
;
padding
:
0
6px
;
line-height
:
32px
;
height
:
32px
;
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
0px
0px
4px
;
border-right
:
none
;
}
.el-date-editor
.el-range-separator
{
line-height
:
24px
;
width
:
10%
;
}
.common-btn
{
width
:
80px
;
line-height
:
28px
;
height
:
30px
;
border
:
1px
solid
#DCDFE6
;
border-radius
:
4px
;
color
:
#666
;
text-align
:
center
;
cursor
:
pointer
;
}
[
v-cloak
]
{
display
:
none
}
...
...
@@ -265,6 +289,14 @@
<el-radio-button
label=
"cancel"
>
已取消
</el-radio-button>
<el-radio-button
label=
"refuse"
>
已拒绝
</el-radio-button>
</el-radio-group>
<div
class=
"display-flex margin-right-20"
>
<div
class=
"color-666 order-time"
>
申请时间
</div>
<el-date-picker
v-model=
"createtime"
type=
"daterange"
value-format=
"yyyy-MM-dd HH:mm:ss"
format=
"yyyy-MM-dd HH:mm:ss"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
@
change=
"reqOrderList(0,10)"
>
</el-date-picker>
</div>
<!-- <div class="common-btn cursor-pointer" @click="goExport">导出</div>-->
</div>
<div
class=
"custom-table-container"
>
<el-table
:data=
"pageData"
style=
"width: 100%"
default-expand-all=
"true"
border
:span-method=
"arraySpanMethod"
>
...
...
public/assets/js/backend/shopro/order/aftersale.js
查看文件 @
4783ae4
...
...
@@ -17,8 +17,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
el
:
"#aftersaleIndex"
,
data
()
{
return
{
screenType
:
false
,
statusType
:
'all'
,
searchKey
:
''
,
createtime
:
[],
pageData
:
[],
//分页
...
...
@@ -30,9 +32,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
}
},
mounted
()
{
if
(
new
URLSearchParams
(
location
.
search
).
get
(
'datetimerange'
)){
this
.
createtime
=
new
URLSearchParams
(
location
.
search
).
get
(
'datetimerange'
).
split
(
' - '
)
}
this
.
getData
();
},
methods
:
{
//筛选
changeSwitch
()
{
this
.
screenType
=!
this
.
screenType
;
},
arraySpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
if
(
rowIndex
>=
0
)
{
if
(
columnIndex
===
0
)
{
...
...
@@ -55,6 +64,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
offset
:
that
.
offset
,
limit
:
that
.
limit
,
status
:
that
.
statusType
,
createtime
:
that
.
createtime
,
}
},
function
(
ret
,
res
)
{
that
.
pageData
=
res
.
data
.
rows
;
...
...
@@ -62,6 +72,24 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
return
false
;
})
},
//导出
goExport
()
{
var
that
=
this
;
// if(offset==0 && limit==10){
// that.offset=offset;
// that.limit=limit;
// }
window
.
location
.
href
=
"aftersale/export?offset="
+
that
.
offset
+
"&limit="
+
that
.
limit
+
"&search="
+
that
.
searchKey
+
"&status="
+
that
.
statusType
+
"&createtime="
+
that
.
createtime
;
},
//请求
reqOrderList
(
offset
,
limit
)
{
var
that
=
this
;
if
(
offset
==
0
&&
limit
==
10
){
that
.
offset
=
offset
;
that
.
limit
=
limit
;
}
that
.
getData
()
},
//分页(更换页面显示条数)
pageSizeChange
(
val
)
{
this
.
offset
=
0
...
...
请
注册
或
登录
后发表评论