commit
755f64a3f8
@ -0,0 +1,67 @@
|
||||
package au.com.royalpay.payment.manage.custom.beans;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author kira
|
||||
* @date 2018/7/27
|
||||
*/
|
||||
public class AddCustomVO {
|
||||
private String order_id;
|
||||
private String custom;
|
||||
private String mch_custom_no;
|
||||
private boolean has_sub;
|
||||
private String mch_custom_name;
|
||||
private List<JSONObject> subOrders;
|
||||
|
||||
public String getMch_custom_name() {
|
||||
return mch_custom_name;
|
||||
}
|
||||
|
||||
public void setMch_custom_name(String mch_custom_name) {
|
||||
this.mch_custom_name = mch_custom_name;
|
||||
}
|
||||
|
||||
public String getOrder_id() {
|
||||
return order_id;
|
||||
}
|
||||
|
||||
public void setOrder_id(String order_id) {
|
||||
this.order_id = order_id;
|
||||
}
|
||||
|
||||
public String getCustom() {
|
||||
return custom;
|
||||
}
|
||||
|
||||
public void setCustom(String custom) {
|
||||
this.custom = custom;
|
||||
}
|
||||
|
||||
public String getMch_custom_no() {
|
||||
return mch_custom_no;
|
||||
}
|
||||
|
||||
public void setMch_custom_no(String mch_custom_no) {
|
||||
this.mch_custom_no = mch_custom_no;
|
||||
}
|
||||
|
||||
public boolean isHas_sub() {
|
||||
return has_sub;
|
||||
}
|
||||
|
||||
public void setHas_sub(boolean has_sub) {
|
||||
this.has_sub = has_sub;
|
||||
}
|
||||
|
||||
public List<JSONObject> getSubOrders() {
|
||||
return subOrders;
|
||||
}
|
||||
|
||||
public void setSubOrders(List<JSONObject> subOrders) {
|
||||
this.subOrders = subOrders;
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package au.com.royalpay.payment.manage.custom.beans;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
/**
|
||||
* @author kira
|
||||
* @date 2018/7/27
|
||||
*/
|
||||
public class QueryCustomVo {
|
||||
|
||||
private String date;
|
||||
private String channel;
|
||||
private String report_status;
|
||||
private int page = 1;
|
||||
private int limit = 10;
|
||||
|
||||
public JSONObject toParam() {
|
||||
JSONObject result = new JSONObject();
|
||||
if (StringUtils.isNotEmpty(date)) {
|
||||
date = date.replace("Z", " UTC");
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
|
||||
try {
|
||||
result.put("date", format.parse(date));
|
||||
} catch (ParseException e) {
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotEmpty(channel)) {
|
||||
result.put("channel", channel);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(report_status)){
|
||||
result.put("report_status", report_status);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public int getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(int page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public int getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
public void setLimit(int limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
public String getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(String date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public String getChannel() {
|
||||
return channel;
|
||||
}
|
||||
|
||||
public void setChannel(String channel) {
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
public String getReport_status() {
|
||||
return report_status;
|
||||
}
|
||||
|
||||
public void setReport_status(String report_status) {
|
||||
this.report_status = report_status;
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package au.com.royalpay.payment.manage.custom.core;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author kira
|
||||
* @date 2018/7/27
|
||||
*/
|
||||
public interface CustomService {
|
||||
|
||||
JSONObject findOneWithDetail(String report_id);
|
||||
|
||||
void add(String orderId, String mchCustomId, String custom, String mchCustomName, List<JSONObject> subOrders);
|
||||
|
||||
boolean check(int client_id, String channel);
|
||||
|
||||
JSONObject query(JSONObject param, int page, int limit);
|
||||
|
||||
List<JSONObject> channelCustomConfigs(String channel);
|
||||
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
package au.com.royalpay.payment.manage.custom.core.impl;
|
||||
|
||||
import au.com.royalpay.payment.core.CustomSupport;
|
||||
import au.com.royalpay.payment.core.beans.CustomReport;
|
||||
import au.com.royalpay.payment.core.beans.OrderStatus;
|
||||
import au.com.royalpay.payment.manage.custom.core.CustomService;
|
||||
import au.com.royalpay.payment.manage.mappers.custom.CustomReportDetailsMapper;
|
||||
import au.com.royalpay.payment.manage.mappers.custom.CustomReportsMapper;
|
||||
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author kira
|
||||
* @date 2018/7/27
|
||||
*/
|
||||
@Service
|
||||
public class CustomServiceImpl implements CustomService {
|
||||
@Resource
|
||||
private CustomSupport customSupport;
|
||||
@Resource
|
||||
private CustomReportsMapper customReportsMapper;
|
||||
@Resource
|
||||
private CustomReportDetailsMapper customReportDetailsMapper;
|
||||
|
||||
@Override
|
||||
public JSONObject findOneWithDetail(String report_id) {
|
||||
JSONObject result = customReportsMapper.findOne(report_id);
|
||||
result.put("sub_orders", customReportDetailsMapper.findByReportId(report_id));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(String orderId, String mchCustomId, String custom,String mchCustomName, List<JSONObject> subOrders) {
|
||||
CustomReport customReport = new CustomReport(orderId, mchCustomId, mchCustomName,custom);
|
||||
if (!CollectionUtils.isEmpty(subOrders)) {
|
||||
subOrders.forEach(p -> {
|
||||
customReport.addSubOrder(p.getBigDecimal("order_fee"), p.getBigDecimal("order_fee").subtract(p.getBigDecimal("transport_fee")));
|
||||
});
|
||||
}
|
||||
JSONObject result = customSupport.saveCustom(customReport);
|
||||
customSupport.sendCustom(result.getString("report_id"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean check(int client_id, String channel) {
|
||||
List<String> supportChannel = customSupport.customSupportedChannels(client_id);
|
||||
boolean result = false;
|
||||
for (String p : supportChannel) {
|
||||
if (p.equals(channel)) {
|
||||
result = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject query(JSONObject param, int page, int limit) {
|
||||
param.put("orderStatus", OrderStatus.SUCCESS.getStatus());
|
||||
List<String> channels = customSupport.customSupportedChannels(param.getIntValue("client_id"));
|
||||
param.put("channels",channels);
|
||||
if(!StringUtils.isEmpty(param.getString("channel"))) {
|
||||
channels.clear();
|
||||
channels.add(param.getString("channel"));
|
||||
param.put("channels",channels);
|
||||
}
|
||||
return PageListUtils.buildPageListResult(customReportsMapper.queryWithTrans(param, new PageBounds(page, limit)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> channelCustomConfigs(String channel) {
|
||||
return customSupport.channelCustomConfigs(channel);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
/**
|
||||
* @author kira
|
||||
* @date 2018/7/27
|
||||
*/
|
||||
package au.com.royalpay.payment.manage.custom;
|
@ -0,0 +1,53 @@
|
||||
package au.com.royalpay.payment.manage.custom.web;
|
||||
|
||||
import au.com.royalpay.payment.manage.custom.beans.AddCustomVO;
|
||||
import au.com.royalpay.payment.manage.custom.beans.QueryCustomVo;
|
||||
import au.com.royalpay.payment.manage.custom.core.CustomService;
|
||||
import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
|
||||
import au.com.royalpay.payment.tools.CommonConsts;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@PartnerMapping(value = "/custom")
|
||||
public class CustomController {
|
||||
|
||||
@Resource
|
||||
private CustomService customService;
|
||||
|
||||
@RequestMapping(value = "/{report_id}",method = RequestMethod.GET)
|
||||
public JSONObject findOne(@PathVariable String report_id) {
|
||||
return customService.findOneWithDetail(report_id);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/query",method = RequestMethod.GET)
|
||||
public JSONObject queryWithTran(@ModelAttribute(CommonConsts.PARTNER_STATUS)JSONObject partner, QueryCustomVo queryCustomVo) {
|
||||
JSONObject param = queryCustomVo.toParam();
|
||||
param.put("client_id",partner.getIntValue("client_id"));
|
||||
return customService.query(param,queryCustomVo.getPage(),queryCustomVo.getLimit());
|
||||
}
|
||||
|
||||
@RequestMapping(value = "",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public void add(@RequestBody AddCustomVO addCustomVO) {
|
||||
customService.add(addCustomVO.getOrder_id(),addCustomVO.getMch_custom_no(),addCustomVO.getCustom(),addCustomVO.getMch_custom_name(),addCustomVO.getSubOrders());
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/channelCustom",method = RequestMethod.GET)
|
||||
public List<JSONObject> channelCustomConfigs(@RequestParam String channel) {
|
||||
return customService.channelCustomConfigs(channel);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package au.com.royalpay.payment.manage.mappers.custom;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
|
||||
|
||||
/**
|
||||
* Created by yishuqian on 9/1/16.
|
||||
*/
|
||||
@AutoMapper(tablename = "pmt_custom_report_details", pkName = "sub_order_no")
|
||||
public interface CustomReportDetailsMapper {
|
||||
@AutoSql(type = SqlType.SELECT)
|
||||
List<JSONObject> findByReportId(@Param("report_id") String report_id);
|
||||
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package au.com.royalpay.payment.manage.mappers.custom;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AutoMapper;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.AutoSql;
|
||||
import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
|
||||
|
||||
/**
|
||||
* Created by yishuqian on 9/1/16.
|
||||
*/
|
||||
@AutoMapper(tablename = "pmt_custom_reports", pkName = "report_id")
|
||||
public interface CustomReportsMapper {
|
||||
@AutoSql(type = SqlType.SELECT)
|
||||
JSONObject findOne(@Param("report_id") String report_id);
|
||||
|
||||
PageList<JSONObject> queryWithTrans(JSONObject param,PageBounds pagination);
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="au.com.royalpay.payment.manage.mappers.custom.CustomReportDetailsMapper">
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="au.com.royalpay.payment.manage.mappers.custom.CustomReportsMapper">
|
||||
|
||||
<select id="queryWithTrans" resultType="com.alibaba.fastjson.JSONObject">
|
||||
select
|
||||
o.order_id order_id, t.transaction_time transaction_time, t.transaction_amount transaction_amount,
|
||||
t.cny_amount cny_amount ,r.report_status report_status,r.report_id report_id,o.channel channel
|
||||
from
|
||||
pmt_orders o
|
||||
left join
|
||||
pmt_transactions t
|
||||
on o.order_id = t.order_id
|
||||
left join
|
||||
pmt_custom_reports r
|
||||
on r.order_id = o.order_id
|
||||
where
|
||||
o.channel in (
|
||||
<foreach collection="channels" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
|
||||
and o.client_id = #{client_id}
|
||||
and transaction_type = 'Credit'
|
||||
and
|
||||
o.status in (
|
||||
<foreach collection="orderStatus" item="item" separator=",">
|
||||
#{item}
|
||||
</foreach>
|
||||
)
|
||||
|
||||
<!--<if test="channel!=null">-->
|
||||
<!--and o.channel = #{channel}-->
|
||||
<!--</if>-->
|
||||
<if test="date!=null">
|
||||
and DATE(t.transaction_time) = #{date}
|
||||
</if>
|
||||
<if test="report_status!=null">
|
||||
and r.report_status = #{report_status}
|
||||
</if>
|
||||
order by transaction_time desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,159 @@
|
||||
<html>
|
||||
<!--[if lt IE 9]>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>
|
||||
<script src="https://g.alicdn.com/aliww/ww/json/json.js" charset="utf-8"></script>
|
||||
<![endif]-->
|
||||
<!-- 自动适配移动端与pc端 -->
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=yes" />
|
||||
<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script src="https://g.alicdn.com/aliww/??h5.openim.sdk/1.0.6/scripts/wsdk.js,h5.openim.kit/0.4.0/scripts/kit.js"
|
||||
charset="utf-8"></script>
|
||||
<script src="https://g.alicdn.com/aliww/h5.openim.sdk/1.0.6/scripts/wsdk.js"></script>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
$.ajax({
|
||||
url: '/sys/openim/check',
|
||||
method: 'PUT',
|
||||
contentType: 'application/json',
|
||||
success: function (resp) {
|
||||
console.log(resp);
|
||||
window.uid = resp.user_id;
|
||||
window.touid = resp.user_id;
|
||||
window.password = resp.password;
|
||||
window.appKey = resp.appkey;
|
||||
loginOpenim();
|
||||
},
|
||||
error: function (jqXHR) {
|
||||
}
|
||||
});
|
||||
$("#back").bind('click',function () {
|
||||
parent.hideContent();
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
function loginOpenim() {
|
||||
WKIT.init({
|
||||
container: document.getElementById('J_demo'),
|
||||
width: 700,
|
||||
height: 500,
|
||||
uid: window.uid,
|
||||
appkey: window.appKey,
|
||||
credential: window.password,
|
||||
touid: window.touid,
|
||||
onLoginSuccess: function (data) {
|
||||
initLayout();
|
||||
WKIT.Conn.sdk.Event.on('MSG_RECEIVED', function (data) {
|
||||
updateContractList(data.data);
|
||||
});
|
||||
initUnreadMsgAndContact();
|
||||
WKIT.Conn.sdk.Base.startListenAllMsg();
|
||||
window.sdk = parent.document.getElementById("subPageList").contentWindow;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function switchTouid(touid) {
|
||||
window.uid = touid;
|
||||
WKIT.switchTouid({
|
||||
touid: touid
|
||||
});
|
||||
WKIT.Conn.sdk.Chat.setReadState({
|
||||
touid: touid,
|
||||
timestamp: Math.floor((+new Date()) / 1000),
|
||||
success: function (data) {
|
||||
},
|
||||
error: function (error) {
|
||||
console.log('set read state fail', error);
|
||||
}
|
||||
});
|
||||
window.sdk.unreadMap[touid].msgCount = 0;
|
||||
window.sdk.showContactList(window.sdk.unreadMap);
|
||||
}
|
||||
|
||||
function initUnreadMsgAndContact() {
|
||||
WKIT.Conn.sdk.Base.getRecentContact({
|
||||
count: 40,
|
||||
success: function (data) {
|
||||
var cnts = data.data.cnts;
|
||||
for (var i = cnts.length - 1; i >= 0; i--) {
|
||||
var unreadmapEle = {msgCount: 0};
|
||||
window.sdk.unreadMap[WKIT.Conn.sdk.Base.getNick(
|
||||
cnts[i].from)] = unreadmapEle;
|
||||
}
|
||||
getUnreadMsgCount();
|
||||
},
|
||||
error: function (error) {
|
||||
console.log('get contact msg count fail',
|
||||
error);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getUnreadMsgCount() {
|
||||
WKIT.Conn.sdk.Base.getUnreadMsgCount({
|
||||
count: 40,
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
var unreads = data.data;
|
||||
var uids = "";
|
||||
for (var i = unreads.length - 1; i >= 0; i--) {
|
||||
if (window.sdk.unreadMap[WKIT.Conn.sdk.Base.getNick(
|
||||
unreads[i].contact)]) {
|
||||
|
||||
}
|
||||
window.sdk.unreadMap[WKIT.Conn.sdk.Base.getNick(
|
||||
unreads[i].contact)].msgCount =
|
||||
unreads[i].msgCount;
|
||||
var nick = WKIT.Conn.sdk.Base.getNick(
|
||||
unreads[i].contact)
|
||||
uids +=
|
||||
nick.substr(0, nick.length - 6) + ",";
|
||||
}
|
||||
window.sdk.loadContactList(uids);
|
||||
},
|
||||
error: function (error) {
|
||||
console.log('get recent contact fail', error);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function updateContractList(data) {
|
||||
var msg = data.msgs[0];
|
||||
var msg_uid = WKIT.Conn.sdk.Base.getNick(msg.from).toUpperCase();
|
||||
if (window.sdk.unreadMap[msg_uid]) {
|
||||
window.sdk.unreadMap[msg_uid].msgCount = window.sdk.unreadMap[msg_uid].msgCount + 1;
|
||||
window.sdk.unreadMap[msg_uid].lastMsg =msg.msg ;
|
||||
|
||||
} else {
|
||||
var unreadMapEle = {msgCount: 1,msg:msg.msg}
|
||||
window.sdk.unreadMap[msg_uid] = unreadMapEle;
|
||||
}
|
||||
window.sdk.loadContactList(msg_uid.substr(0, msg_uid - 6));
|
||||
}
|
||||
|
||||
function initLayout() {
|
||||
$("#J_wkitUserInfo").hide();
|
||||
$("#J_wkitPluginFrameWrap").height("100%");
|
||||
$("#J_wkitPluginFrameWrap").css("margin", "0 0 0 0");
|
||||
}
|
||||
|
||||
function getQueryString(name) {
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = window.location.search.substr(1).match(reg);
|
||||
if (r != null) {
|
||||
return unescape(r[2]);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
</script>
|
||||
|
||||
<body>
|
||||
<div style="width: 2rem;height: 2rem;position: absolute;z-index:99999;" id="back">
|
||||
<img style="width: 2rem" src="/static/images/im/back.png">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,92 @@
|
||||
<html>
|
||||
<!--[if lt IE 9]>
|
||||
<meta charset="utf-8"/>
|
||||
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>
|
||||
<script src="https://g.alicdn.com/aliww/ww/json/json.js" charset="utf-8"></script>
|
||||
<link href="static/lib/bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
|
||||
<![endif]-->
|
||||
<!-- 自动适配移动端与pc端 -->
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=yes" />
|
||||
<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
|
||||
<script src="https://g.alicdn.com/aliww/??h5.openim.sdk/1.0.6/scripts/wsdk.js,h5.openim.kit/0.4.0/scripts/kit.js"
|
||||
charset="utf-8"></script>
|
||||
<script src="https://g.alicdn.com/aliww/h5.openim.sdk/1.0.6/scripts/wsdk.js"></script>
|
||||
<style>
|
||||
.content{
|
||||
width: 99%;
|
||||
height: 99%;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.onload = function () {
|
||||
$('#submit').bind("click", function () {
|
||||
var data = {};
|
||||
data.loginId = $("#uid").val();
|
||||
data.password = $("#pwd").val();
|
||||
data.verifyCode = 'noop';
|
||||
$.ajax({
|
||||
url: '/sys/openim/signin',
|
||||
method: 'POST',
|
||||
data: JSON.stringify(data),
|
||||
contentType: 'application/json',
|
||||
success: function () {
|
||||
window.subPage = document.getElementById("subPage").contentWindow;
|
||||
window.subPageList =
|
||||
document.getElementById("subPageList").contentWindow;
|
||||
window.subPage.location.href = "/service_client_app.html";
|
||||
window.subPageList.location.href = "/service_contact_list_app.html";
|
||||
$("#subPageDiv").show();
|
||||
hideList();
|
||||
},
|
||||
error: function (jqXHR) {
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function hideList() {
|
||||
$("#loginInput").hide();
|
||||
$("#subPageDiv").show();
|
||||
$("#subPageListDiv").hide();
|
||||
}
|
||||
function hideContent() {
|
||||
$("#loginInput").hide();
|
||||
$("#subPageDiv").hide();
|
||||
$("#subPageListDiv").show();
|
||||
}
|
||||
</script>
|
||||
<body>
|
||||
|
||||
|
||||
<div id="loginInput" class="col-xs-12 login-box-body login-box-bg">
|
||||
<form action="" method="post">
|
||||
<div class="form-group has-feedback">
|
||||
<input type="text" id="uid" class="form-control" placeholder="账号">
|
||||
<span class="glyphicon glyphicon-user form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="form-group has-feedback">
|
||||
<input type="password" id="pwd" class="form-control" placeholder="密码">
|
||||
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12 margin-bottom">
|
||||
<button type="button" id="submit" style="background-color: #f06010" class="btn btn-warning btn-block btn-flat">Sign In</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="subPageDiv" style="display: none" class="content">
|
||||
<iframe id="subPage" class="content">
|
||||
</iframe>
|
||||
</div>
|
||||
<div id="subPageListDiv" style="display: none" class="content">
|
||||
<iframe id="subPageList" class="content">
|
||||
</iframe>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,212 @@
|
||||
<html>
|
||||
<!--[if lt IE 9]>
|
||||
<meta charset="utf-8"/>
|
||||
<script src="https://g.alicdn.com/aliww/ww/json/json.js" charset="utf-8"></script>
|
||||
<![endif]-->
|
||||
<!-- 自动适配移动端与pc端 -->
|
||||
<script src="https://g.alicdn.com/aliww/h5.openim.sdk/1.0.6/scripts/wsdk.js"
|
||||
charset="UTF-8"></script>
|
||||
<script src="https://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
|
||||
|
||||
<style>
|
||||
li {
|
||||
float: left;
|
||||
list-style-type: none;
|
||||
transition: background-color .1s;
|
||||
margin-bottom: 13px;
|
||||
width: 100%;
|
||||
height: 2rem;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body{
|
||||
width: 98%;
|
||||
height: 98%;
|
||||
|
||||
}
|
||||
.search-div {
|
||||
height: 3%;
|
||||
}
|
||||
|
||||
.search-div input {
|
||||
background: #D8D8D8;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.hover {
|
||||
color: black;
|
||||
background-color: rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
|
||||
.active {
|
||||
color: red;
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.avatar {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.headimg {
|
||||
float: left;
|
||||
border-radius: 50%;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border: 1px solid #000;
|
||||
border-radius: 50%;
|
||||
background-position: center;
|
||||
background-attachment: inherit;
|
||||
}
|
||||
|
||||
.headimg-img {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
margin-top: 11px;
|
||||
padding-left: 42px;
|
||||
}
|
||||
.msg {
|
||||
margin-top: 11px;
|
||||
padding-left: 42px;
|
||||
}
|
||||
|
||||
.notice {
|
||||
width: 1.2rem;
|
||||
height: 1.2rem;
|
||||
line-height: 1.2rem;
|
||||
font-size: 10px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background-color: #f00;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
right: -23px;
|
||||
top: -8px;
|
||||
}
|
||||
|
||||
.frm_search {
|
||||
width: 98%;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
border: 0;
|
||||
border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
background-color: #D8D8D8;
|
||||
color: #fff;
|
||||
padding-left: 30px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.search_bar {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
margin: 0 auto 6px;
|
||||
}
|
||||
|
||||
.web_wechat_search {
|
||||
background: url(/static/images/search.png) no-repeat;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 25px;
|
||||
height: 30px;
|
||||
position: absolute;
|
||||
line-height: 1.6;
|
||||
background-size: 16px;
|
||||
background-position: 5px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var unreadMap = {};
|
||||
function searchContact() {
|
||||
var uid = $('#searchText').val();
|
||||
var searchContactList = {};
|
||||
for (var key in unreadMap) {
|
||||
if (key.search(uid) > -1) {
|
||||
searchContactList[key] = unreadMap[key];
|
||||
}
|
||||
}
|
||||
var param = {clientMoniker: uid};
|
||||
$.ajax({
|
||||
url: '/sys/openim/list',
|
||||
method: 'GET',
|
||||
data: param,
|
||||
contentType: 'application/json',
|
||||
dataType: 'json',
|
||||
success: function (resp) {
|
||||
for (var i = 0; i <= resp.length - 1; i++) {
|
||||
resp[i].msgCount = 0;
|
||||
searchContactList[resp[i].nick] = resp[i];
|
||||
unreadMap[resp[i].nick] = resp[i];
|
||||
}
|
||||
showContactList(searchContactList);
|
||||
},
|
||||
error: function () {
|
||||
showContactList(searchContactList);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadContactList(uids) {
|
||||
var param = {userNames: uids};
|
||||
$.ajax({
|
||||
url: '/sys/openim/list',
|
||||
method: 'GET',
|
||||
data: param,
|
||||
contentType: 'application/json',
|
||||
dataType: 'json',
|
||||
success: function (resp) {
|
||||
for (var i = 0; i <= resp.length - 1; i++) {
|
||||
unreadMap[resp[i].nick].headimg = resp[i].headimg;
|
||||
}
|
||||
showContactList(unreadMap);
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
function showContactList(map) {
|
||||
var contact_list = '';
|
||||
for (var key in map) {
|
||||
var ele= map[key];
|
||||
var headImUrl = '';
|
||||
if (ele.headimg) {
|
||||
headImUrl = ele.headimg;
|
||||
} else {
|
||||
headImUrl = "/static/images/act/encourage_money/default_headimg.png";
|
||||
}
|
||||
contact_list +=
|
||||
"<li onclick=switchToUser('" + key
|
||||
+ "')>"
|
||||
+ "<div class=\"headimg\" style='background-image:url(" + headImUrl
|
||||
+ "')>"
|
||||
+ "<div class=\"notice\">" + ele.msgCount + "</div>"
|
||||
+ "</div>"
|
||||
+ "<div class=\"avatar\">" + key + "</div>";
|
||||
if(ele.lastMsg){
|
||||
contact_list +="<div class=\"msg\">" + ele.lastMsg + "</div>";
|
||||
}
|
||||
contact_list+= "</li>";
|
||||
}
|
||||
$("#contact_list").html(contact_list);
|
||||
}
|
||||
function switchToUser(touid) {
|
||||
parent.document.getElementById("subPage").contentWindow.switchTouid(touid);
|
||||
parent.hideList();
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<div class="search_bar">
|
||||
<i class="web_wechat_search"></i>
|
||||
<input id="searchText" class="frm_search" type="text" onchange="searchContact()">
|
||||
</div>
|
||||
<div class="list">
|
||||
<ul id="contact_list">
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 4.2 KiB |
@ -0,0 +1,204 @@
|
||||
define(['angular', 'static/commons/commons', 'uiBootstrap', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], function (angular) {
|
||||
'use strict';
|
||||
var app = angular.module('customManagement', ['ui.bootstrap', 'ui.router', 'frapontillo.bootstrap-switch', 'ngFileUpload']);
|
||||
app.config(['$stateProvider', function ($stateProvider) {
|
||||
$stateProvider.state('custom', {
|
||||
url: '/custom',
|
||||
templateUrl: '/static/payment/custom/templates/custom.html',
|
||||
controller: 'customCtrl'
|
||||
})
|
||||
}]);
|
||||
app.controller('customCtrl', ['$scope', '$http', 'commonDialog','$filter','$uibModal', function ($scope, $http, commonDialog,$filter,$uibModal) {
|
||||
$scope.pagination = {};
|
||||
$scope.customOrders = {};
|
||||
$scope.params = {channel:'ALL',report_status:'ALL'};
|
||||
$scope.loadList = function () {
|
||||
var params = angular.copy($scope.params);
|
||||
if (params.channel =='ALL'){
|
||||
delete params.channel;
|
||||
}
|
||||
if (params.report_status =='ALL'){
|
||||
delete params.report_status;
|
||||
}
|
||||
params.page = $scope.pagination.page || 1;
|
||||
$http.get('/custom/query',{params: params}).then(function (resp) {
|
||||
$scope.customOrders = resp.data.data;
|
||||
$scope.pagination = resp.data.pagination;
|
||||
})
|
||||
};
|
||||
|
||||
$scope.loadList(1);
|
||||
$scope.add = function (order) {
|
||||
$uibModal.open({
|
||||
templateUrl: '/static/payment/custom/templates/custom_add.html',
|
||||
controller: 'customAddCtrl',
|
||||
size: 'lg',
|
||||
resolve: {
|
||||
order_id: function () {
|
||||
return order.order_id;
|
||||
},
|
||||
channelCustom:['$http', '$stateParams', function ($http, $stateParams) {
|
||||
return $http.get('/custom/channelCustom?channel='+order.channel);
|
||||
}]
|
||||
}
|
||||
}).result.then(function () {
|
||||
$scope.loadList(1);
|
||||
|
||||
})
|
||||
};
|
||||
|
||||
$scope.edit = function (order) {
|
||||
$uibModal.open({
|
||||
templateUrl: '/static/payment/custom/templates/custom_add.html',
|
||||
controller: 'customEditCtrl',
|
||||
size: 'lg',
|
||||
resolve: {
|
||||
customOrder: ['$http', '$stateParams', function ($http, $stateParams) {
|
||||
return $http.get('/custom/'+order.report_id);
|
||||
}],
|
||||
order_id: function () {
|
||||
return order.order_id;
|
||||
},
|
||||
channelCustom:['$http', '$stateParams', function ($http, $stateParams) {
|
||||
return $http.get('/custom/channelCustom?channel='+order.channel);
|
||||
}]
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$scope.detail = function (order) {
|
||||
$uibModal.open({
|
||||
templateUrl: '/static/payment/custom/templates/custom_detail.html',
|
||||
controller: 'customDetailCtrl',
|
||||
size: 'lg',
|
||||
resolve: {
|
||||
customOrder: ['$http', '$stateParams', function ($http, $stateParams) {
|
||||
return $http.get('/custom/'+order.report_id);
|
||||
}]
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}]);
|
||||
|
||||
app.controller('customAddCtrl', ['$scope', '$http','commonDialog','order_id','channelCustom', function ($scope, $http,commonDialog,order_id,channelCustom) {
|
||||
$scope.custom = {has_sub:false,order_id:order_id,isSubmit:true};
|
||||
$scope.subOrders = new Array();
|
||||
$scope.subOrder = {};
|
||||
$scope.channelCustom = channelCustom.data;
|
||||
$scope.addSubOrders = function () {
|
||||
var subOrder = angular.copy($scope.subOrder);
|
||||
subOrder.idNum = $scope.subOrders.length+1;
|
||||
$scope.subOrders.push(subOrder);
|
||||
};
|
||||
$scope.submit=function () {
|
||||
if($scope.custom.custom==''){
|
||||
alert('请输入海关名称');
|
||||
}
|
||||
if($scope.custom.mchCustomId==''){
|
||||
alert('请输入备案号');
|
||||
}
|
||||
$scope.custom.subOrders = $scope.subOrders;
|
||||
var param = angular.copy($scope.custom);
|
||||
$http.post('/custom', param).then(function (resp) {
|
||||
$scope.$close();
|
||||
}, function (resp) {
|
||||
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
||||
$scope.$close();
|
||||
})
|
||||
}
|
||||
$scope.removeSubOrders = function (order) {
|
||||
for(var i= 0 ;i<$scope.subOrders.length;i++){
|
||||
if($scope.subOrders[i].idNum == order.idNum){
|
||||
$scope.subOrders.splice(i,1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}]);
|
||||
|
||||
app.controller('customEditCtrl', ['$scope', '$http','commonDialog','order_id','customOrder','channelCustom', function ($scope, $http,commonDialog,order_id,customOrder,channelCustom) {
|
||||
$scope.custom =customOrder.data;
|
||||
$scope.custom.has_sub = false;
|
||||
$scope.custom.order_id = order_id;
|
||||
$scope.custom.isSubmit = false;
|
||||
$scope.subOrders = customOrder.data.sub_orders;
|
||||
$scope.subOrder = {};
|
||||
$scope.channelCustom = channelCustom.data;
|
||||
if($scope.subOrders.length>0) {
|
||||
for (var i = 0; i < $scope.subOrders.length; i++) {
|
||||
var idNum = i;
|
||||
$scope.subOrders[i].idNum = idNum;
|
||||
}
|
||||
$scope.custom.has_sub = true;
|
||||
}else{
|
||||
$scope.custom.has_sub = false;
|
||||
}
|
||||
|
||||
$scope.addSubOrders = function () {
|
||||
var subOrder = angular.copy($scope.subOrder);
|
||||
subOrder.idNum = $scope.subOrders.length+1;
|
||||
$scope.subOrders.push(subOrder);
|
||||
};
|
||||
|
||||
$scope.submit=function () {
|
||||
if($scope.custom.custom==''){
|
||||
alert('请输入海关名称');
|
||||
}
|
||||
if($scope.custom.mchCustomId==''){
|
||||
alert('请输入备案号');
|
||||
}
|
||||
$scope.custom.subOrders = $scope.subOrders;
|
||||
var param = angular.copy($scope.custom);
|
||||
$http.post('/custom', param).then(function (resp) {
|
||||
$scope.$close();
|
||||
}, function (resp) {
|
||||
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'});
|
||||
})
|
||||
}
|
||||
$scope.removeSubOrders = function (order) {
|
||||
for(var i= 0 ;i<$scope.subOrders.length;i++){
|
||||
if($scope.subOrders[i].idNum == order.idNum){
|
||||
$scope.subOrders.splice(i,1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}]);
|
||||
|
||||
app.controller('customDetailCtrl', ['$scope', '$http','commonDialog','customOrder', function ($scope, $http,commonDialog,customOrder) {
|
||||
$scope.custom = customOrder.data;
|
||||
if(customOrder.data.sub_orders.length>0){
|
||||
$scope.custom.has_sub = true;
|
||||
$scope.subOrders = $scope.custom.sub_orders;
|
||||
}else {
|
||||
$scope.custom.has_sub = false;
|
||||
}
|
||||
}]);
|
||||
|
||||
|
||||
app.filter('reportStatus', function () {
|
||||
return function (status) {
|
||||
switch (status + '') {
|
||||
case '0':
|
||||
return 'Saved';
|
||||
case '1':
|
||||
return 'Submitted';
|
||||
case '2':
|
||||
return 'Failed';
|
||||
case '3':
|
||||
return 'Success';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
return app;
|
||||
});
|
@ -0,0 +1,155 @@
|
||||
<style>
|
||||
.delete {
|
||||
text-decoration-line: line-through;
|
||||
}
|
||||
</style>
|
||||
<div ui-view>
|
||||
<section class="content-header">
|
||||
<h1>Custom</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-sitemap"></i> Custom
|
||||
</li>
|
||||
<li class="active">Report Custom </li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="box-solid">
|
||||
<div class="box box-warning">
|
||||
<div class="box-header">
|
||||
<div class="form-horizontal col-sm-8">
|
||||
<!-- <div class="form-group">
|
||||
<label class="control-label col-xs-4 col-sm-3">Channel</label>
|
||||
<div class="col-xs-8 col-sm-6">
|
||||
<p class="form-control-static">
|
||||
<a role="button" ng-class="{'bg-primary':params.channel=='ALL'}"
|
||||
ng-click="params.channel='ALL';loadList()">All</a> |
|
||||
<a role="button" ng-class="{'bg-primary':params.channel=='Wechat'}"
|
||||
ng-click="params.channel='Wechat';loadList()">Wechat Pay</a> |
|
||||
<a role="button" ng-class="{'bg-primary':params.channel=='Alipay'}"
|
||||
ng-click="params.channel='Alipay';loadList()">Alipay</a> |
|
||||
</p>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4 col-sm-3">Report Status</label>
|
||||
<div class="col-xs-8 col-sm-6">
|
||||
<p class="form-control-static">
|
||||
<a role="button" ng-class="{'bg-primary':params.report_status=='ALL'}"
|
||||
ng-click="params.report_status='ALL';loadList()">All</a> |
|
||||
<a role="button" ng-class="{'bg-primary':params.report_status=='0'}"
|
||||
ng-click="params.report_status='0';loadList()">Saved</a> |
|
||||
<a role="button" ng-class="{'bg-primary':params.report_status=='1'}"
|
||||
ng-click="params.report_status='1';loadList()">Submitted</a> |
|
||||
<a role="button" ng-class="{'bg-primary':params.report_status=='2'}"
|
||||
ng-click="params.report_status='2';loadList()">Failed</a> |
|
||||
<a role="button" ng-class="{'bg-primary':params.report_status=='3'}"
|
||||
ng-click="params.report_status='3';loadList()">Success</a> |
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-4 col-sm-3">Date</label>
|
||||
<div class="col-xs-8 col-sm-6">
|
||||
<input class="form-control" ng-model="params.date"
|
||||
uib-datepicker-popup size="10" is-open="ctrl.dateInput"
|
||||
ng-click="ctrl.dateInput=true"
|
||||
datepicker-options="{minDate:minDate,maxDate:maxDate}" name="date" required>
|
||||
</div>
|
||||
<button class="btn btn-primary" type="button" ng-click="loadList(1)"><i
|
||||
class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">
|
||||
Custom Order List
|
||||
</h3>
|
||||
</div>
|
||||
<div class="box-body table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Order Id</th>
|
||||
<th>Time</th>
|
||||
<th>Order Amount</th>
|
||||
<th>CNY Amount</th>
|
||||
<th>Report Status</th>
|
||||
<th>Operation</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="order in customOrders">
|
||||
<td>
|
||||
<p class="form-control-static">
|
||||
<img src="/static/images/wechatpay_sign.png"
|
||||
uib-tooltip="WechatPay" ng-if="order.channel=='Wechat'"/>
|
||||
<img src="/static/images/wechatpay_sign.png"
|
||||
uib-tooltip="Znyoo" ng-if="order.channel=='Znyoo'"/>
|
||||
<img src="/static/images/bestpay_sign.png"
|
||||
uib-tooltip="BestPay" ng-if="order.channel=='Bestpay'"/>
|
||||
<img src="/static/images/alipay_sign.png"
|
||||
uib-tooltip=Alipay" ng-if="order.channel=='Alipay'"/>
|
||||
<img src="/static/images/alipay_sign.png"
|
||||
uib-tooltip=AlipayOnline" ng-if="order.channel=='AlipayOnline'"/>
|
||||
<img src="/static/images/jd_sign.png"
|
||||
uib-tooltip="JD Pay" ng-if="order.channel=='jd'"/>
|
||||
<img src="/static/images/hf_sign.png"
|
||||
uib-tooltip="HF Pay" ng-if="order.channel=='hf'"/>
|
||||
{{order.order_id}}
|
||||
</td>
|
||||
</p>
|
||||
|
||||
|
||||
</td>
|
||||
<th ng-bind="order.transaction_time"></th>
|
||||
<td ng-bind="order.transaction_amount"></td>
|
||||
<th ng-bind="order.cny_amount"></th>
|
||||
<th ng-bind="order.report_status|reportStatus"></th>
|
||||
<td>
|
||||
<a ng-if="order.report_status==null" class="text-primary" role="button" title="Edit"
|
||||
ng-click="add(order)">
|
||||
Submit
|
||||
</a>
|
||||
<!--<a class="text-primary" role="button" title="Edit"-->
|
||||
<!--ng-click="edit(order)">-->
|
||||
<!--Edit-->
|
||||
<!--</a>-->
|
||||
<a ng-if="order.report_status!=null" class="text-primary" role="button" title="Detail"
|
||||
ng-click="detail(order)">
|
||||
<i class="fa fa-search"></i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="box-footer" ng-if="customOrders.length">
|
||||
<uib-pagination class="pagination"
|
||||
total-items="pagination.totalCount"
|
||||
boundary-links="true"
|
||||
ng-model="pagination.page"
|
||||
items-per-page="pagination.limit"
|
||||
max-size="10"
|
||||
ng-change="loadList(1)"
|
||||
previous-text="‹"
|
||||
next-text="›"
|
||||
first-text="«"
|
||||
last-text="»"></uib-pagination>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total
|
||||
Pages:{{pagination.totalPages}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -0,0 +1,96 @@
|
||||
<div class="modal-header">
|
||||
<h4 ng-if="custom.isSubmit">Submit Declare Custom</h4>
|
||||
<h4 ng-if="!custom.isSubmit">Edit Declare Custom</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form class="form-horizontal" novalidate name="rate_form">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4">Customs</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="form-control" name="industry"
|
||||
ng-model="custom.custom"
|
||||
ng-options="custom.code as custom.name for custom in channelCustom">
|
||||
<option value="">Please Choose</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="mch_custom_no">Customs No</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" ng-model="custom.mch_custom_no" id="mch_custom_no" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="mch_custom_name">Merchant Custom Record Name</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" ng-model="custom.mch_custom_name" id="mch_custom_name" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="has_sub">Split</label>
|
||||
<div class="col-sm-6">
|
||||
<input ng-model="custom.has_sub" id="has_sub" type="checkbox">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="custom.has_sub">
|
||||
<div class="col-sm-1"></div>
|
||||
|
||||
<div class="col-sm-10">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Order Amount</th>
|
||||
<th>Transport Fee</th>
|
||||
<!--<th>消费者名称</th>-->
|
||||
<!--<th>消费者ID</th>-->
|
||||
<th>Operation</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="subOrder in subOrders">
|
||||
<td ng-bind="subOrder.order_fee"></td>
|
||||
<td ng-bind="subOrder.transport_fee"></td>
|
||||
<!--<td ng-bind="subOrder.buyer_name"></td>-->
|
||||
<!--<td ng-bind="subOrder.cert_id"></td>-->
|
||||
<td>
|
||||
<a role="button" class="text-danger text-bold ng-scope" ng-click="removeSubOrders(subOrder)">remove</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="custom.has_sub">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="order_fee">Order Amount</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" ng-model="subOrder.order_fee" id="order_fee" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="transport_fee">Transport Fee</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" ng-model="subOrder.transport_fee" id="transport_fee" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="text-align: right;margin-right: 17%;" ng-click="addSubOrders()">
|
||||
<button class="btn btn-success" type="button"> add</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-success" type="button" ng-click="submit()" ng-disabled="ctrl.sending">Submit</button>
|
||||
<button class="btn btn-danger" type="button" ng-click="$dismiss()">Cancel</button>
|
||||
</div>
|
@ -0,0 +1,64 @@
|
||||
<div class="modal-header">
|
||||
<h4>Add Declare Custom</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form class="form-horizontal" novalidate name="rate_form">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="custom">Customs</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" ng-model="custom.custom" id="custom" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="mch_custom_no">Customs No</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" ng-model="custom.mch_custom_no" id="mch_custom_no" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="mch_custom_name">Merchant Custom Record Name</label>
|
||||
<div class="col-sm-6">
|
||||
<input class="form-control" ng-model="custom.mch_custom_name" id="mch_custom_name" type="text">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-4" for="has_sub">Split</label>
|
||||
<div class="col-sm-6">
|
||||
<input ng-model="custom.has_sub" id="has_sub" type="checkbox">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group" ng-if="custom.has_sub">
|
||||
<div class="col-sm-1"></div>
|
||||
<div class="col-sm-10">
|
||||
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Order Amount</th>
|
||||
<th>Transport Fee</th>
|
||||
<!--<th>消费者名称</th>-->
|
||||
<!--<th>消费者ID</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="subOrder in subOrders">
|
||||
<td ng-bind="subOrder.order_fee"></td>
|
||||
<td ng-bind="subOrder.transport_fee"></td>
|
||||
<!--<td ng-bind="subOrder.buyer_name"></td>-->
|
||||
<!--<td ng-bind="subOrder.cert_id"></td>-->
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in new issue