Files
zszq-trs/YLErpWeb/wwwroot/Scripts/fast/test.html
T
2025-05-19 15:44:20 +08:00

123 lines
4.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="/Statics/bundles/bundle.min.css" rel="stylesheet" />
<script src="/Statics/libs/jquery/jquery-3.5.1.min.js"></script>
<script src="/Statics/libs/jquery/jquery.autocomplete.min.js"></script>
<script src="/Statics/libs/pinyin/dict/pinyin_dict_firstletter.js"></script>
<script src="/Statics/libs/pinyin/pinyinUtil.js"></script>
<script src="/scripts/app/tradeHelper.js"></script>
<script src="fastVue.base.js"></script>
<script src="fastVue.form.js"></script>
<script src="/front/basicdata?types=品种"></script>
<style>
/**autocomplete**/
.autocomplete-suggestions { border: 1px solid #999; background: #FFF; overflow: auto; }
.autocomplete-suggestion { padding: 2px 5px; white-space: nowrap; overflow: hidden; text-align: center; cursor: pointer; }
.autocomplete-selected { background: #f8f9fa; }
.autocomplete-suggestions strong { font-weight: normal; color: #3399FF; }
.autocomplete-group { padding: 2px 5px; }
.autocomplete-group strong { display: block; border-bottom: 1px solid #000; }
.form-col-1 .form-group { display: -ms-flexbox; display: flex; -ms-flex-wrap: wrap; flex-wrap: wrap; }
.form-col-1 .form-group > label { -ms-flex: 0 0 auto; flex: 0 0 auto; width: auto; max-width: 100%; line-height: 30px; }
.form-col-1 .form-group > div { flex-basis: 0; flex-grow: 1; max-width: 100%; }
</style>
</head>
<body>
<div class="container mt-5">
<div class="card mb-5">
<div class="card-body" id="div1">
<div class="form-inline">
<div class="form-group">
<label>test</label>
<input type="text" class="form-control" readonly />
</div>
<div class="form-group">
<label>test2</label>
<input type="text" id="test1" />
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-auto" style="width:400px" id="tradeEditLeft">
</div>
</div>
</div>
</div>
</div>
<form autocomplete="off"></form>
<script>
var formVue = new FastVue.Form({
el: '#tradeEditLeft',
data: {
},
fields: {
id: {
type: 'hidden',
value: 1111
},
TradeType: {
type: 'text',
title: '结构类型',
value: '香草期权',
autocomplete: tradeHelper.OptionTradeTypes,
onchange(newVal, oldVal) {
console.log('[TradeType]newVal:' + newVal + ",oldVal:" + oldVal);
}
},
TradeNumber: {
type: 'text',
title: '交易编号',
value: '',
placeholder: '留空自动生成',
onchange: function (newVal, oldVal) {
this.TradeType = '';
}
},
UnderlyingInstrumentType: {
type: 'select',
title: '标的资产类型',
options: ['商品期货', '股票', '商品现货']
},
VarietyId: {
type: 'text',
title: '标的品种',
value: 1,
autocomplete: {
items: ylotc.varieties,
nameField: 'Name',
valueField: 'id'
},
onchange(newVal, oldVal) {
console.log('[TradeType]newVal:' + newVal + ",oldVal:" + oldVal);
}
},
},
layout: {
display: 'col-1',
class: 'left-pane',
title: {
width: 100
},
input: {
width: 150
}
},
created() {
},
destroyed() {
}
});
</script>
</body>
</html>