<!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>折让信息</title>
|
<script src="../../../jsnew/elementDefault.js?v=20220425"></script>
|
<script src="../../../jsnew/vue/vue.js"></script>
|
<script src="../../../jsnew/vue/element-ui/element-ui_15/index.js"></script>
|
<script src="../../../jsnew/myelement.js?v=20220425"></script>
|
<script src="../../../jsnew/page.js?v=20220425"></script>
|
<!-- <script src="../../../setting.js"></script> -->
|
|
<link href="../../../jsnew/vue/element-ui/element-ui_15/theme-chalk/index.css" rel="stylesheet">
|
<link href="../../../jsnew/myelement.css?v=20220426" rel="stylesheet">
|
<link href="../../../jsnew/theme.css?v=20220426" rel="stylesheet">
|
<link href="../../../css/iconfont.css" rel="stylesheet">
|
<link href="../../../jsnew/page.css?v=20220425" rel="stylesheet">
|
<link href="//at.alicdn.com/t/font_2374495_13ltsxm2eor.css" rel="stylesheet">
|
</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>{{title}}</span>
|
</div>
|
</div>
|
|
<div class="h_dialog__body">
|
<h-form
|
ref="form1"
|
:form-attr="formAttr"
|
:table-fields="formFields"
|
:form-data="formData"
|
:table-field-click="formfieldClick"
|
>
|
</h-form>
|
</div>
|
|
<!-- 底部工具栏 -->
|
<div class="el-dialog__footer">
|
<el-button size="small" type="default" @click="closeDialog">取 消</el-button>
|
<el-button size="small" type="primary" @click="saveAfter">确 定</el-button>
|
</div>
|
</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>
|
</body>
|
|
<script type="text/javascript">
|
function initVue() {
|
new FormVue({
|
el: "#vbody",
|
data: {
|
dataname: "md_org_data",
|
title: "折让明细",
|
|
formAttr: {
|
istitle: false,
|
title: "表单名称",
|
columnnumber: 1,
|
labelwidth: "100px",
|
labelposition: "left",//"left",// right//top
|
size: "mini",
|
border: "3px solid #c6c6c600"
|
},
|
formFields: [],
|
|
pageAttr: {
|
heightType: "popuppage"
|
},
|
|
default_filterFields: [
|
{isshow: "T", field: "fee_type", name: "折让类型", },
|
],
|
|
default_tableFields: [
|
{isshow: "T", field: "fee_type", name: "折让类型", type: "span"},
|
{isshow: "T", field: "under_take_name", name: "承担人", type:"popup"},
|
{isshow: "T", field: "fee_price", name: "折让金额", type:"input"},
|
],
|
tableData: [],
|
formData: {
|
fee_type: "个人承担",
|
},
|
|
filterfieldClick: {},
|
tablefieldClick: {},
|
formfieldClick: {},
|
|
selectedrows: [],
|
},
|
|
created() {
|
this.popupParames = clone(Root.popupParames);
|
// Root.setPopupTitle(this.title);
|
// this.title = this.popupParames.title || this.popupParames.text;
|
if (this.popupParames.filter) {
|
this.filterTxt = this.popupParames.filter;
|
}
|
|
if (this.popupParames.sceneCode) {
|
if (this.popupParames.sceneCode == "add") {//新增
|
this.isedit = true;
|
|
if (this.newformData) {
|
let formData_ = clone(this.formData);
|
|
for (var k in this.newformData) {
|
formData_[k] = this.newformData[k];
|
}
|
this.formData = formData_;
|
}
|
}
|
}
|
},
|
|
mounted() {
|
//获取数据
|
this.initData();
|
|
// 以服务的方式调用的 Loading 需要异步关闭
|
this.$nextTick(() => {
|
hideLoading();
|
|
//重新设置弹窗宽高
|
this.$nextTick(function(){
|
//let w_ = this.$refs.popup_body.offsetWidth "px";
|
let w_ = "900px";
|
// let h_ = "650px";
|
let h_ = this.$refs.popup_body.offsetHeight + "px";
|
Root.setPopupWH(w_, h_);
|
})
|
});
|
},
|
|
methods:{
|
//关闭弹窗
|
closeDialog() {
|
this.docloseDialog(true);
|
},
|
|
//关闭前调回调
|
saveAfter() {
|
var me = this;
|
if(this.popupParames.callback) {
|
let obj = {
|
row: clone(this.formData)
|
}
|
this.popupParames.callback(obj, function() {
|
me.docloseDialog();
|
});
|
}
|
else {
|
me.docloseDialog();
|
}
|
},
|
|
initData() {
|
var me = this;
|
|
me.formFields = clone(me.default_tableFields);
|
|
//字段数组转字段obj
|
me.fieldsToFieldsObj();
|
|
//设置字段事件
|
me.tableFieldClick();
|
|
// this.onQuery(function(result, callback) {//查询后的回调,用于获取字段的
|
// if (result.meta && result.meta[me.dataname] && result.meta[me.dataname].fields) {
|
// var metas = clone(result.meta[me.dataname].fields);
|
// var filterFields_ = [];
|
// var tableFields_ = [];
|
|
// metas.map(f=>{
|
// f.isshow = "T";
|
|
// if (f.isfilter) {
|
// filterFields_.push(clone(f));
|
// }
|
// else {
|
// var filter_f = clone(f);
|
// filter_f.isshow = "F";
|
// filterFields_.push(filter_f);
|
// }
|
|
// tableFields_.push(clone(f));
|
// })
|
// if (!me.filterFields || (me.filterFields && me.filterFields.length == 0)) {
|
// me.filterFields = clone(filterFields_);
|
// me.tableFields = clone(tableFields_);
|
|
// //字段数组转字段obj
|
// me.fieldsToFieldsObj();
|
|
// //设置字段事件
|
// me.tableFieldClick();
|
// }
|
// }
|
|
// if (callback) {
|
// callback();
|
// }
|
// });
|
},
|
|
selectionChange(obj){
|
var me = this;
|
me.selectedrows = obj;
|
},
|
saveShoppingcart(list) {
|
var me = this;
|
me.selectedrows = list;
|
},
|
|
tableFieldClick() {
|
var me = this;
|
//表单字段事件设置
|
this.formfieldClick = {
|
under_take_name: {
|
popup: {
|
onclick: function(obj) {//弹窗点击事件
|
var config = {
|
totab: false, //true: 以Tab导航的方式打开
|
width: "900px",
|
height: "450px",
|
icon: "icon-product",
|
text: "选择承担人",
|
id: "popup_actual_op_list",//totab: true时需设置,用于判断是否已打开此页面
|
url: "../agreement/popup/popup_actual_op_list.html",
|
data: {},
|
delta: {},
|
dataname: "vemployee",
|
filter: "1 = 1",
|
sceneCode: "add", //"add"//"browse",
|
callback: function(popObj, callback) {
|
let formData = clone(me.formData)
|
|
formData['under_take_code'] = popObj.row.md_code
|
formData['under_take_name'] = popObj.row.md_description
|
|
me.formData = formData
|
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
}
|
},
|
},
|
};
|
|
//表格字段事件设置
|
this.tablefieldClick = {
|
};
|
},
|
|
onRowDblClick() {
|
if (this.isedit) {
|
this.saveAfter();
|
}
|
},
|
}
|
});
|
};
|
|
initVue();
|
</script>
|
|
<style>
|
/* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */
|
[v-cloak] {
|
display: none !important;
|
}
|
</style>
|
</html>
|