<!DOCTYPE html>
<html>

	<head style="visibility:hidden;">
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
		<title>内容编辑</title>
		<link rel="stylesheet" type="text/css" href="../css/mui.css" />
	</head>
	
	<body style="visibility:hidden;">
		<div class="header">
			<div class="header_con">
				<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
				<!--<img src="../img/title_news.png" class="oc_logo" />-->
				<p class="title">内容编辑</p>
			</div>
		</div>
		<div class="z"></div>
		<div class="con">
			<div class="row">
				<span class="s1">卡名称:</span>
				<input type="text" name="name" id="name" value="" placeholder="请输入标题" />
			</div>
			<div class="row">
				<span class="s1">卡余额:</span>
				<input type="number" name="cur_cash" id="cur_cash" value="" placeholder="请输入当前余额" />
				<span class="s3">元</span>
			</div>
			<div class="row">
				<span class="s1">卡额度:</span>
				<input type="number" name="credit_cash" id="credit_cash" value="" placeholder="请输入信用卡额度" />
				<span class="s3">元</span>
			</div>
			<div class="row">
				<span class="s1">还款日:</span>
				<input min="1" max="31" type="number" name="return_date" id="return_date" value="1" placeholder="请输入还款日期" />
				<span class="s3">号</span>
			</div>
			<div class="row">
				<span>创建时间：<span id="createTime"></span></span>
			</div>
			<div id="content" v-cloak>
				<div class="row clearfix" v-if="showAdd">
					<span class="s2" style="display: inline-block;">
						<select v-model="newData.type" style="height: 40px;
    margin: 0;
    padding: 0 10px;
    font-size: 16px;">
							<option value="1">购物</option>
							<option value="2">还款</option>
						</select>
					</span>
					<span class="s3" style="display: inline-block;">
						<input v-model="newData.amount" type="number" style="width: 120px;">元
					</span>
					<span class="s1 btn" @click="addNewData">新增</span>
					<span class="s1 btn" @click="triggerShowAdd">取消</span>
				</div>
				<div class="row clearfix" v-for="(each, index) in listData" :data-id="each.id">
					<span class="s1">{{each.create_date}}</span>
					<span class="s2">{{each.type==0?'初始值':(each.type==1?'购物':(each.type==2?'还款':
					(each.type==9?'手动修正':'其他')))}}</span>
					<span class="s3">{{each.amount}}元</span>
					<div @click="delete2(index)" v-if="(each.type == 1 || each.type == 2)" style="color: red;float: right;line-height: 40px;">删除</div>
				</div>
			</div>
		</div>
		<div class="footer" style="display: flex;">
			<div class='save' style="width: 100%;border-right: 1px solid #888;">保存</div>
			<div class='add' style="width: 100%;">新增记录</div>
		</div>
	</body>
	<script src="../js/mui.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/jquery-3.2.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/common.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/uploader.js" type="text/javascript" charset="utf-8"></script>
	<script src="../lib/wangEditor/wangEditor.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../lib/wangEditor/moxie.js" type="text/javascript" charset="utf-8"></script>
	<script src="../lib/wangEditor/qiniu.js" type="text/javascript" charset="utf-8"></script>
	<script src="../lib/wangEditor/plupload.dev.js" type="text/javascript" charset="utf-8"></script>
	<script src="../lib/vue/vue.min.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		mui.plusReady(function() {
			var element;
			var parent = document.body;
			element = document.createElement('script');
			element.src = localStorage.getItem("jsUrl") + 'common.js?ver=' + localStorage.getItem('version');
			parent.appendChild(element);		
			element.onload = function() {
				var style = [JZL.getCssUrl('credit_edit.css'), JZL.getCssUrl("global.css"), JZL.getCssUrl("header.css")];
				JZL.css_init(style);
				var script = [JZL.getJsUrl('credit_edit.js')];
				JZL.js_init(script);
				setTimeout(function() {
					parent.style.visibility = "visible";
				}, 100);
			};
		})
		
	</script>
</html>
