<!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 class="topbar">
|
<span>{{title}}</span>
|
</div>
|
|
<el-dialog title="选择折让类型" :visible.sync="selectType"
|
:close-on-press-escape="false"
|
:close-on-click-modal="false"
|
:show-close="false"
|
height="50%">
|
<h-form
|
ref="form_temp"
|
:form-attr="formAttr_temp"
|
:table-fields="formFields"
|
:form-data="formData"
|
:table-field-click="formfieldClick"
|
>
|
</h-form>
|
|
<div slot="footer" class="dialog-footer" >
|
<el-button size="small" type="default" @click="closeDialog">取 消</el-button>
|
<el-button size="small" type="primary" @click="setType">确 定</el-button>
|
</div>
|
</el-dialog>
|
|
<el-dialog title="选择导入信息" :visible.sync="selectInfo"
|
:close-on-press-escape="false"
|
:close-on-click-modal="false"
|
:show-close="false"
|
height="50%">
|
<h-form
|
ref="form_temp1"
|
:form-attr="formAttr_info"
|
:table-fields="formFields_info"
|
:form-data="formData_info"
|
:table-field-click="formfieldClick"
|
>
|
</h-form>
|
|
<div slot="footer" class="dialog-footer" >
|
<el-button size="small" type="default" @click="closeDialog">取 消</el-button>
|
<el-button size="small" type="primary" @click="setInfo">确 定</el-button>
|
</div>
|
</el-dialog>
|
|
<div class="topbar-line">
|
<div class="query-bar">
|
<h-form-filter ref="form1"
|
:form-attr="filterAttr"
|
:table-fields="filterFields"
|
:form-data="filterObj"
|
:table-field-click="filterfieldClick"
|
:isdraggableorder="false"
|
|
v-on:on-query="onQuery"
|
v-on:on-init-query="onInitFilter"
|
v-on:order-fields="orderFilterFields"
|
>
|
</h-form-filter>
|
</div>
|
</div>
|
|
<div class="h_dialog__body" :style="{height: t_height +'px', 'overflow-y': 'auto', 'padding-top': '15px'}">
|
<template v-if="isRefresh && tableFields">
|
<div v-for="(row, index) in tableData" :key="'c' + index" class="" style="margin-bottom: 10px;" @click="onClickRowCard(row)">
|
<el-card :class="[selectedrow && selectedrow.id == row.id ? 'h_select_card' : '','h_table_card']" shadow="hover" style="position: relative;" >
|
<div class="h_table_card_title">
|
<div style="width: 100%; height: 100%; display: flex;">
|
<div style="padding: 10px; display: inline-block;">
|
<el-tag>
|
{{planMap[row.plan_id]}}
|
</el-tag>
|
</div>
|
<div class="state" @click="" style="padding: 20px 5px; display: inline-block; color: red;">
|
{{row.state_name}}
|
</div>
|
<div class="" @click="" style="padding: 20px 5px; display: inline-block; color: red;">
|
{{row.name}}
|
</div>
|
<div class="" @click="" style="padding: 20px 5px; display: inline-block; color: red;">
|
创建时间:{{row.create_time?row.create_time.split(' ')[0]:""}}
|
</div>
|
</div>
|
</div>
|
|
<el-row :gutter="20">
|
<el-col :span="2" class="h_table_card_front">
|
<!-- <div style="width: 100%; height: 100%;background-color: #b780e600;">前缀</div> -->
|
</el-col>
|
<el-col :span="20" class="h_table_card_body">
|
<h-form
|
:ref="'cf' + index"
|
:form-attr="formAttr"
|
:table-fields="tableFields"
|
:form-data="row"
|
:table-field-click="tablefieldClick"
|
>
|
</h-form>
|
</el-col>
|
<el-col :span="2" class="h_table_card_after" style="position: absolute; right: 5%; height: 100vh;">
|
<div style="width: 100%; background-color: #83e67300; display: flex;">
|
<div>
|
<el-button
|
plain
|
icon="el-icon-arrow-right"
|
class="button-card"
|
@click="showInfo(row)" >
|
</el-button>
|
</div>
|
</div>
|
</el-col>
|
</el-row>
|
</el-card>
|
</div>
|
</template>
|
</div>
|
|
<div style="text-align: right; padding: 16px 0px;">
|
<el-pagination
|
background
|
layout="prev, pager, next"
|
:total="total"
|
v-on:current-change="changePage"
|
>
|
</el-pagination>
|
</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>
|
|
<script type="text/javascript">
|
function initVue() {
|
new ListVue({
|
el: "#vbody",
|
data: {
|
dataname: "fee_task",
|
title: "扣留告知函",
|
dataurl: "rootjemin/data/getEntitySet",
|
orderby: "update_time desc",
|
filterTxt: "status = 'open' and plan_id in ('P001', 'P003', 'P004', 'P007')",
|
default_filterFields: [
|
{
|
isshow: "T", field: "plan_id", name: "类型", type:"select",
|
options: [],
|
filteroperator: "like",
|
},
|
{
|
isshow: "T", field: "month", name: "月份", type:"select",
|
options: [
|
{value: "1", code: "1"},
|
{value: "2", code: "2"},
|
{value: "3", code: "3"},
|
{value: "4", code: "4"},
|
{value: "5", code: "5"},
|
{value: "6", code: "6"},
|
{value: "7", code: "7"},
|
{value: "8", code: "8"},
|
{value: "9", code: "9"},
|
{value: "10", code: "10"},
|
{value: "11", code: "11"},
|
{value: "12", code: "12"},
|
],
|
},
|
],
|
default_tableFields: [
|
{isshow: "T",field: "from_source",name: "来源",width: "150", type: "span", formatter: "formatter_json", formatpattern: "from_source"},
|
{isshow: "F",field: "state_name",name: "状态",width: "150", type: "span"},
|
{isshow: "T",field: "amt",name: "折让汇总",width: "150", type: "span", formatter: "formatter_money"},
|
{isshow: "T", field: "start_date",name: "开始时间", width: "100", align: "center", isminwidth: true, type: "span", formatter: "formatter_date"},
|
{isshow: "T", field: "end_date",name: "结束时间", width: "100", align: "center", isminwidth: true, type: "span", formatter: "formatter_date"},
|
],
|
filterfieldClick: {},
|
tablefieldClick: {},
|
formfieldClick: {},
|
|
formAttr: {
|
istitle: false,
|
title: "表单名称",
|
columnnumber: 4,
|
labelwidth: "80px",
|
labelposition: "left",//"left",// right//top
|
size: "mini",
|
border: "1px solid #c6c6c600"
|
},
|
|
tableData: [],
|
t_height:null,
|
|
selectType: false,
|
formFields:[
|
{
|
isshow: "T", required: true, field: "plan_id", name: "类型", type: "select",
|
options: [],
|
},
|
],
|
formAttr_temp: {//变更申请弹窗属性
|
columnnumber: 1,
|
labelwidth: "100px",
|
labelposition: "left",//"left",// right//top
|
size: "mini",
|
border: "10px solid #c6c6c600",
|
},
|
formData: {},
|
|
dataRequest: [
|
{
|
name: "fee_model_plan",
|
url: "rootjemin/data/getEntitySet",
|
paramsobj: {dataname: "fee_model_plan", filter: ""},
|
isnotoption: false, //true:不是选项
|
}
|
],
|
planMap: {},
|
|
selectInfo: false,
|
formFields_info:[
|
{
|
isshow: "T", required: true, field: "plan_id", name: "类型", type: "select",
|
options: [],
|
},
|
{
|
isshow: "T", required: true, field: "year_month", name: "年月", type: "month",
|
},
|
],
|
formAttr_info: {//变更申请弹窗属性
|
columnnumber: 1,
|
labelwidth: "100px",
|
labelposition: "left",//"left",// right//top
|
size: "mini",
|
border: "10px solid #c6c6c600",
|
},
|
formData_info: {},
|
|
},
|
created() {
|
|
},
|
|
mounted() {
|
var me = this;
|
me.t_height = document.documentElement.clientHeight*1 - 152;
|
|
if (this.dataRequest && this.dataRequest.length) {
|
var result = {};
|
this.loadRequestData(this.dataRequest, result, function(data) {
|
me.dataRequestObj = data;
|
//获取数据
|
me.initData();
|
});
|
}
|
else {
|
//获取数据
|
me.initData();
|
}
|
this.$nextTick(() => { // 以服务的方式调用的 Loading 需要异步关闭
|
hideLoading();
|
});
|
},
|
|
methods:{
|
onInitFilter() {
|
//清空
|
this.filterObj = {};
|
this.selectedrow = {};
|
this.initData();
|
},
|
|
closeDialog() {
|
var me = this;
|
me.selectType = false;
|
me.selectInfo = false;
|
},
|
|
setType() {
|
var me = this;
|
var bo_form_change = this.$refs.form_temp.checkForm();
|
if (!bo_form_change) {
|
Root.message({
|
type: 'error',
|
message: '请填写必填项'
|
});
|
return
|
}
|
me.selectType = false;
|
me.addData(me.formData.plan_name);
|
},
|
|
setInfo() {
|
var me = this;
|
var bo_form_change = this.$refs.form_temp1.checkForm();
|
if (!bo_form_change) {
|
Root.message({
|
type: 'error',
|
message: '请填写必填项'
|
});
|
return
|
}
|
me.selectInfo = false;
|
},
|
|
initData() {
|
var me = this;
|
// if (!me.filterFields || (me.filterFields && me.filterFields.length == 0)) {
|
// me.filterFields = clone(me.default_filterFields);
|
// me.tableFields = clone(me.default_tableFields);
|
|
// //字段数组转字段obj
|
// me.fieldsToFieldsObj();
|
|
// //设置字段事件
|
// me.tableFieldClick();
|
// }
|
// this.tableDataAfter();
|
|
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_ = [];
|
|
me.default_filterFields.map(f => {
|
if (f.field == 'plan_id') {
|
me.dataRequestObj.fee_model_plan.data.entityset.map(e => {
|
e.value = e.name
|
e.code = e.id
|
|
me.planMap[e.id] = e.name
|
})
|
f.options = me.dataRequestObj.fee_model_plan.data.entityset
|
}
|
})
|
if (!me.filterFields || (me.filterFields && me.filterFields.length == 0)) {
|
me.filterFields = clone(me.default_filterFields);
|
me.tableFields = clone(me.default_tableFields);
|
|
//字段数组转字段obj
|
me.fieldsToFieldsObj();
|
|
//设置字段事件
|
me.tableFieldClick();
|
}
|
}
|
|
if (me.tableData.length > 0) {
|
let tableData = clone(me.tableData)
|
tableData.map(e => {
|
e.plan_name = me.planMap[e.plan_id]
|
})
|
me.tableData = tableData
|
}
|
|
if (callback) {
|
callback();
|
}
|
});
|
},
|
|
importSelect() {
|
this.selectInfo = true;
|
},
|
|
changePage(pageNo) {
|
this.pagenum = pageNo
|
this.selectedrow = {};
|
this.doQuery()
|
},
|
|
tableFieldClick() {
|
var me = this;
|
//筛选字段事件设置
|
this.filterfieldClick = {
|
|
};
|
//表格字段事件设置
|
this.tablefieldClick = {
|
|
};
|
|
//表单字段事件设置
|
this.formfieldClick = {
|
plan_id: {
|
select: {
|
onchange: function(obj) {
|
me.$set(me.formData, "plan_name", obj.selectoption.value);
|
// this.formData.plan_name = obj.selectoption.value;
|
}
|
}
|
}
|
};
|
},
|
|
beforeAddData() {
|
this.selectType = true;
|
},
|
|
returnData() {
|
var me = this;
|
// var row = me.selectedrow;
|
|
var config = {
|
totab: false, //true: 以Tab导航的方式打开
|
width: "900px",
|
height: "650px",
|
icon: "icon-product",
|
text: "返还信息",
|
id: "",//totab: true时需设置,用于判断是否已打开此页面
|
// url: "../tradeDiscount/discount/popup_return_data_info.html",
|
url: "../tradeDiscount/discount/popup_return_step_info.html",
|
data: "",
|
delta: {},
|
sceneCode: "add",//"refuseedit",//"approval", //"add"//"browse",
|
callback: function(obj, callback) {
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
},
|
|
showInfo(row) {
|
var me = this;
|
|
var config = {
|
totab: true, //true: 以Tab导航的方式打开
|
width: "900px",
|
height: "900px",
|
icon: "icon-product",
|
text: row.plan_name + "信息查看",
|
id: "detain_reform_info" + row.id,//totab: true时需设置,用于判断是否已打开此页面
|
url: '../tradeDiscount/discount/detain_reform_info.html',
|
data: row,
|
delta: {},
|
sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse",
|
callback: function(obj, callback) {
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
},
|
|
addData(plan_name) {
|
let me = this;
|
me.formData.plan_id = me.formData.plan_name = "";
|
|
var config = {
|
totab: true, //true: 以Tab导航的方式打开
|
width: "900px",
|
height: "900px",
|
icon: "icon-product",
|
text: plan_name + "信息新增",
|
id: plan_name || "",//totab: true时需设置,用于判断是否已打开此页面
|
url: '../tradeDiscount/discount/detain_reform_info.html',
|
data: "",
|
delta: {
|
plan_name: plan_name,
|
},
|
sceneCode: "add",//"refuseedit",//"approval", //"add"//"browse",
|
callback: function(obj, callback) {
|
me.onQuery();
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
},
|
|
onEditData(config, scope) {
|
var me = this;
|
var row = scope.row;
|
|
//1. empty row
|
if (!row || !row.id) {
|
Root.message({
|
type: 'warning',
|
message: '请选择要编辑的数据'
|
});
|
return false;
|
}
|
|
//3. popup
|
var config = {
|
totab: false, //true: 以Tab导航的方式打开
|
width: "500px",
|
height: "300px",
|
icon: "icon-product",
|
text: "产品线信息",
|
id: "product_edit" + row.id,//totab: true时需设置,用于判断是否已打开此页面
|
url: "module/md/page/product/page/product_edit.html",
|
data: row,
|
delta: null,
|
sceneCode: "edit",//"refuseedit",//"approval", //"add"//"browse",
|
callback: function(obj, callback) {
|
me.onQuery();
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
},
|
|
onClickRowCard(row) {
|
this.selectedrow = clone(row);
|
this.$forceUpdate();
|
},
|
}
|
});
|
};
|
|
initVue();
|
</script>
|
<style>
|
/* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */
|
[v-cloak] {
|
display: none !important;
|
}
|
|
.h_form_filter {
|
padding-top: 1px;
|
}
|
|
/* .el-button--mini {
|
color: #FFF;
|
background-color: #2984e2;
|
border-color: #409EFF;
|
} */
|
|
.state {
|
text-decoration: underline;
|
cursor: pointer;
|
}
|
.state:hover {
|
cursor: pointer;
|
font-weight: bolder;
|
}
|
.h_table_card:hover {
|
cursor: pointer;
|
}
|
.h_select_card {
|
border: 2px solid rgb(72, 172, 211);
|
}
|
|
/* .el-card__body {
|
padding: 5px;
|
}
|
|
.button-card {
|
width: 80px;
|
} */
|
|
.el-card {
|
border-radius: 8px;
|
}
|
</style>
|
</body>
|
</html>
|