<!doctype html>
|
<html>
|
<head>
|
<meta charset="utf-8"><meta http-equiv="Expires" content="0"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Cache-control" content="no-cache"><meta http-equiv="Cache" content="no-cache">
|
<title>备案信息对比ById</title>
|
|
<script type="text/javascript">
|
var pageVue = null;
|
function loadJsCss(callback) {
|
var jscss_urls = [];
|
window.top.initJsCss(document, jscss_urls, callback);
|
};
|
|
function initVue() {
|
new BasicsVue({
|
el: "#vbody",
|
data: {
|
//dataname: "agm_record",
|
form_dataname: "agm_record",
|
//table_dataname: "receiptDetail",
|
dataRequest: [],
|
|
title: "备案信息对比",
|
formAttr: {
|
istitle: false,
|
title: "备案信息对比",
|
columnnumber: 2,
|
labelwidth: "110px",
|
labelposition: "left",// right
|
size: "medium",
|
border: "0px solid #c6c6c600"
|
},
|
formFields: [
|
{isshow: "T", field: "code", name: "备案号", type: "span", notvalunit: true},
|
{isshow: "T", field: "versionno", name: "版本号", type: "span", notvalunit: true},
|
|
{isshow: "T", field: "creator_name", name: "创建人", type: "span", notvalunit: true},
|
{isshow: "T", field: "create_time", name: "创建时间", type: "span", notvalunit: true},
|
//{isshow: "T", field: "customer_id", name: "客户-id"},
|
{isshow: "T", field: "customer_name", name: "客户名称", type: "popup", notvalunit: true},
|
//{isshow: "T", field: "product_id", name: "产品-id"},
|
{isshow: "T", field: "product_name", name: "产品名称", type: "popup", notvalunit: true},
|
{isshow: "T", field: "customer_code", name: "客户编码", type: "span", notvalunit: true},
|
{isshow: "T", field: "product_code", name: "产品编码", type: "span", notvalunit: true},
|
//{isshow: "T", field: "type_code", name: "类型编码", type: "selectbyadd", isrefresh: true, options: [{label: "选项1",value: "s1"}, {label: "选项2",value: "s2"}], notvalunit: true},
|
{isshow: "T", field: "type_code", name: "备案类型", type: "select", isrefresh: true, options: [{label: "主渠道",value: "ZQD"}, {label: "佣金",value: "YJ"}, {label: "二次议价",value: "ECYJ"}], notvalunit: true},
|
//{isshow: "T", field: "type_name", name: "类型名称", type: "select", isrefresh: true, options: [{label: "主渠道",value: "ZQD"}, {label: "佣金",value: "YJ"}, {label: "二次议价",value: "ECYJ"}], notvalunit: true},
|
//{isshow: "T", field: "state_code", name: "状态-编码"},
|
//{isshow: "T", field: "state_name", name: "状态名称", notvalunit: true},
|
{isshow: "T", field: "price_raw", name: "原始价格/政策价格", labelwidth: "140px", align: "right", notvalunit: true},
|
{isshow: "T", field: "rate", name: "扣率", align: "right", valunit: "%"},
|
{isshow: "T", field: "price", name: "价格/补偿单价", align: "right", notvalunit: true},
|
{isshow: "T", field: "date_from", name: "生效时间", type: "date", notvalunit: true},
|
{isshow: "T", field: "date_to", name: "失效时间", type: "date", notvalunit: true},
|
{isshow: "T", field: "remark", name: "备注", type: "textarea", notvalunit: true},
|
//{isshow: "T", field: "creator_id", name: "创建人-id"},
|
|
// {isshow: "T", field: "update_time", name: "更新时间", notvalunit: true},
|
],
|
newRowDefault: {
|
//id: uuid_short(),
|
code: createCode("BA"),
|
versionno: "1",
|
create_time: createDatetime(),
|
state_code: "Input",
|
},
|
formData: {},
|
formDataOld: {id: "11", code: "BA202207170001"},
|
isWithinEditTableData: false,
|
notdisabled: true,
|
Approval: false,
|
|
tableData2: [],
|
|
isCommit: false,
|
contrastMode: "formContrast",
|
},
|
created() {
|
this.popupParames = clone(Root.popupParames);
|
|
if (this.popupParames.data) {
|
this.formData = clone(this.popupParames.data);
|
}
|
|
if (this.popupParames.sceneCode) {
|
if (this.popupParames.sceneCode == "browse") {
|
this.formAttr.disabled = true;
|
this.isWithinEditTableData = false;
|
this.notdisabled = false;
|
this.Approval = false;
|
}
|
else if (this.popupParames.sceneCode == "add") {
|
if (this.newRowDefault) {
|
let formData_ = clone(this.formData);
|
|
for (var k in this.newRowDefault) {
|
formData_[k] = this.newRowDefault[k];
|
}
|
this.formData = formData_;
|
}
|
}
|
else if (this.popupParames.sceneCode == "draw") {
|
this.formAttr.disabled = true;
|
this.isWithinEditTableData = false;
|
this.notdisabled = false;
|
this.Approval = false;
|
}
|
}
|
},
|
|
mounted() {
|
var me = this;
|
//预加载数据
|
if (this.dataRequest.length) {
|
var result = {};
|
this.loadRequestData(this.dataRequest, result, function(data) {
|
me.dataRequestObj = data;
|
//预加载数据后给哪些字段设置options或formatterjson
|
|
me.initData();
|
});
|
}
|
else {
|
this.initData();
|
}
|
|
this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
|
hideLoading();
|
|
//重新设置弹窗宽高
|
this.$nextTick(function(){
|
//let w_ = this.$refs.popup_body.offsetWidth + "px";
|
let w_ = "900px";
|
let h_ = this.$refs.popup_body.offsetHeight + "px";
|
Root.setPopupWH(w_, h_);
|
})
|
});
|
},
|
|
methods:{
|
closeDialog() {
|
var me = this;
|
if (me.popupParames.totab){
|
Root.tab.removeItem(Root.tab.selected);
|
Root.tab.open(me.popupParames.parentOption, false);
|
}
|
else {
|
Root.hidePopup();
|
}
|
},
|
saveAfter() {//调回调的关闭
|
var me = this;
|
if(this.popupParames.callback) {
|
let obj = {
|
//row: this.formData
|
}
|
this.popupParames.callback(obj, function() {
|
me.closeDialog();
|
});
|
}
|
else {
|
me.closeDialog();
|
}
|
},
|
|
initData() {
|
let me = this
|
let filter_table = "";
|
|
// if (this.formData.id) {
|
// filter_table = "parentid = '" + this.formData.id + "'";
|
// }
|
|
// let param_table = {
|
// isClientMode: false,
|
// dataname: this.table_dataname,
|
// filter: filter_table,
|
// }
|
|
// Server.call("root/data/getEntitySet", param_table, function(result) {
|
// if (result && result.data) {
|
// me.tableData2= result.data.entityset;
|
// }
|
// });
|
},
|
|
setContrastMode() {
|
if (this.contrastMode == "formContrast") {
|
this.contrastMode = "fieldContrast"
|
}
|
else {
|
this.contrastMode = "formContrast"
|
}
|
},
|
|
}
|
});
|
};
|
|
loadJsCss(function () {
|
initVue();
|
});
|
</script>
|
<style>
|
/* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */
|
[v-cloak] {
|
display: none !important;
|
}
|
</style>
|
|
</head>
|
|
<body style="margin: 0px;">
|
<div v-cloak id="vbody">
|
<div id="page_root">
|
<div ref="popup_body" style="padding: 0 20px;">
|
<div class="el-dialog__header">
|
<div class="dialog-title">
|
<i class="iconfont icon-customermanagement"></i>
|
<span> {{formAttr.title}} </span>
|
|
<el-button size="small" @click="setContrastMode">切换对比方式</el-button>
|
|
</div>
|
</div>
|
<div style="height: 550px; overflow-y: auto;">
|
<div class="el-dialog__body">
|
<h-form
|
ref="form1"
|
:form-attr="formAttr"
|
:table-fields="formFields"
|
:form-data="formData"
|
|
:is-old-contrast="true"
|
:contrast-mode="contrastMode"
|
:form-data-old="formDataOld"
|
>
|
</h-form>
|
</div>
|
</div>
|
<div class="el-dialog__footer">
|
<el-button size="small" v-if="notdisabled" type="primary" @click="saveRowTable":icon="buttonsconfig.save.icon">{{buttonsconfig.save.name}}</el-button>
|
<el-button size="small" v-if="notdisabled" type="success" @click="submitRowTable":icon="buttonsconfig.submit.icon">{{buttonsconfig.submit.name}}</el-button>
|
<el-button size="small" type="default" @click="closeDialog">取 消</el-button>
|
</div>
|
</div>
|
</div>
|
|
<div id="page_loading" style="position: absolute; top:0px; width: 100vw; height: 50vh;">
|
<div class="spinner">
|
<div class="cube1"></div>
|
<div class="cube2"></div>
|
</div>
|
</div>
|
</div>
|
|
</body>
|
</html>
|