<!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>年度任务计算(OTC经销)计提台账</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=20220425" 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 style="margin-right: 18px;float: right;">
|
<el-button-group style="margin-left: 3px">
|
<el-button @click="exportList">导 出</el-button>
|
</el-button-group>
|
</div>
|
</div>
|
|
<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">
|
<h-table
|
v-if="isRefresh"
|
ref="table1"
|
:table-fields="tableFields"
|
:table-data="tableData"
|
:is-edit-table-data="isEditTableData"
|
:pagesize="pagesize"
|
:pagenum="pagenum"
|
:total="total"
|
:table-height="tableHeight"
|
:table-field-click="tablefieldClick"
|
:is-show-index="false"
|
:tableloading="tableloading"
|
:isdraggableorder="true"
|
|
v-on:get-data="getData"
|
v-on:edit-data="editData"
|
v-on:del-data="delData"
|
v-on:order-fields="orderTableFields"
|
>
|
</h-table>
|
</div>
|
</div>
|
|
<el-dialog title="签收协议" :visible.sync="reasonvisible" height="50%">
|
<el-form label-width="100px">
|
<el-form-item label="签收协议号">
|
<el-input v-model="textarea2_no" placeholder="输入协议号" style="width: 100%;"></el-input>
|
</el-form-item>
|
<el-form-item label="备注">
|
<el-input
|
type="textarea"
|
:autosize="{ minRows: 2, maxRows: 10}"
|
placeholder="备注"
|
v-model="textarea2" style="width: 100%;">
|
</el-input>
|
</el-form-item>
|
</el-form>
|
|
<div class="dialog-footer" style="float: right;margin-top: 30px;">
|
<el-button type="default" @click="reasonvisible = false">取 消</el-button>
|
<el-button type="primary" @click="signingAgreement">确 定</el-button>
|
</div>
|
</el-dialog>
|
</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_working_p004_report",
|
dataurl: "rootjemin/data/getEntitySet",
|
title: "年度任务计算(OTC经销)计提台账",
|
filterTxt: "",
|
orderby: "update_time desc",
|
|
default_filterFields: [
|
{isshow: "T", field: "detail_no", name: "明细编码", filterfield:"", filteroperator: "like", type: ""},
|
],
|
default_tableFields: [
|
{isshow: "T", field: "apply_date", name: "申请日期", type:"span", required: true},
|
{isshow: "T", field: "employee_code", name: "申请人工号", type:"span", width: "150", required: true },
|
{isshow: "T", field: "apply_name", name: "申请人", type:"span", required: true},
|
{isshow: "T", field: "department", name: "所属部门", type:"span", required: true},
|
{isshow: "T",field: "begin_date", name: "有效期开始", width: "100", type:"date", formatter: "formatter_date", required: true},
|
{isshow: "T",field: "end_date", name: "有效期结束", width: "100", type:"date", formatter: "formatter_date", required: true},
|
{isshow: "T", field: "customer_code", name: "商业编码", width: "150", type: "span", required: true},
|
{isshow: "T", field: "eas_code", name: "EAS编码", width: "150", type:"span", required: true},
|
{isshow: "T", field: "customer_name", name: "商业名称", width: "200", type:"popup", required: true},
|
{isshow: "T", field: "province", name: "省份", width: "100", type: "span", required: true},
|
{isshow: "T", field: "delivery_code", name: "发货主体编号", width: "150", type:"span",},
|
{isshow: "T", field: "delivery_name", name: "发货主体名称", width: "200", type:"span",},
|
{isshow: "T", field: "customer_org_name", name: "客户主体名称", width: "200", type: "span", align: "left", required: true},
|
{isshow: "T", field: "com_attr", name: "商业属性", width: "100", type: "span", align: "left", required: true},
|
{isshow: "T", field: "cus_type", name: "客户身份", width: "100", type: "span", align: "left", required: true},
|
{isshow: "T", field: "customer_person_code", name: "商业操作人编码", width: "150", type:"span", required: true},
|
{isshow: "T", field: "customer_person_name", name: "商业操作人名称", width: "150", type:"span", required: true},
|
{isshow: "T", field: "adjust_person_code", name: "实际划拨人编码", width: "150", type:"span", required: true},
|
{isshow: "T", field: "adjust_person_name", name: "实际划拨人名称", width: "150", type:"popup", required: true},
|
{isshow: "T", field: "product_code", name: "药品编号", width: "150", type:"span", required: true},
|
{isshow: "T", field: "product_name", name: "药品名称", width: "200", type: "popup", align: "left", required: true},
|
{isshow: "T", field: "spec", name: "药品规格", width: "100", type: "span", required: true},
|
{isshow: "T", field: "unit", name: "药品单位", width: "100", type: "span", required: true},
|
{isshow: "T", field: "org_name_code", name: "管理主体编码", width: "150", type: "span", align: "left", required: true},
|
{isshow: "T", field: "org_name", name: "管理主体名称", width: "200", type: "select", align: "left", required: true},
|
{isshow: "T", field: "department_code", name: "业务部门编码", width: "150", type: "span", align: "left", required: true},
|
{isshow: "T", field: "department_name", name: "业务部门名称", width: "200", type: "popup", align: "left", required: true},
|
{isshow: "T", field: "pay_type", name: "业务结算类型", width: "150", type: "select", align: "left", required: true},
|
{isshow: "T", field: "con_type", name: "控制类型", width: "100", type: "select", align: "left", required: false},
|
{isshow: "T", field: "pay_days", name: "付款天数", width: "100", type: "span", align: "left", required: false},
|
{isshow: "T", field: "delivery_days", name: "在途天数", width: "100", type: "span", align: "left", required: false},
|
{isshow: "T", field: "pay_time", name: "账期天数", width: "100", align: "right", type: "span", required: false},
|
{isshow: "T", field: "target_type", name: "中标价类型", width: "100", type: "select", formatter: "formatter_money", align: "right", required: false},
|
{isshow: "T", field: "price_target", name: "中标价", width: "100", type: "span", formatter: "formatter_money", align: "right", required: false},
|
{isshow: "T", field: "price2", name: "开票限价", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "price3", name: "供货价", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "price4", name: "分销价", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "price5", name: "零售价", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "price6", name: "结算价", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "delivery_fee", name: "配送费", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "delivery_rate", name: "配送费率", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "com_rate", name: "商业扣率", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "cash_time", name: "兑付时间", width: "100", type: "select", formatter: "formatter_money", align: "right", required: false},
|
{isshow: "T", field: "return_type", name: "商返类型", width: "100", type: "select", formatter: "formatter_money", align: "right", required: false},
|
{isshow: "T", field: "current_customer_person11", name: "当期票折系数", width: "100", type:"span", required: true},
|
{isshow: "T", field: "current_discount_amount", name: "当期票折金额", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "withdraw_customer_person11", name: "回笼履约系数", width: "100", type:"span", required: true},
|
{isshow: "T", field: "withdraw_discount_amount", name: "回笼履约金额", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "withdraw_customer_person12", name: "回笼履约扣留系数", width: "150", type:"span", required: true},
|
{isshow: "T", field: "customer_person11", name: "基础折让系数", width: "100", type:"span", required: true},
|
{isshow: "T", field: "discount_amount", name: "基础折让金额", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "product_code11", name: "商业规范操作折让系数", width: "150", type:"span", required: true},
|
{isshow: "T", field: "spec11", name: "商业规范操作折让金额", width: "150", type: "span", required: true},
|
{isshow: "T", field: "product_code22", name: "调拨折让系数", width: "100", type:"span", required: true},
|
{isshow: "T", field: "spec22", name: "调拨折让金额", width: "100", type: "span", required: true},
|
{isshow: "T", field: "product_code33", name: "流水折让系数", width: "100", type:"span", required: true},
|
{isshow: "T", field: "spec33", name: "流水折让金额", width: "100", type: "span", required: true},
|
{isshow: "T", field: "net_code11", name: "年度任务数量", width: "100", type: "span",},
|
{isshow: "T", field: "net_name11", name: "年度折让系数", width: "100", type: "span", align: "left", required: true},
|
{isshow: "T", field: "target_price11", name: "年度折让金额", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "origin_price11", name: "库存管理系数", width: "100", type: "span", align: "right", required: true},
|
{isshow: "T", field: "gap_price11", name: "库存管理金额", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "pay_type11", name: "项目折让系数", width: "100", type: "span", required: true},
|
{isshow: "T", field: "gap_rate11", name: "项目折让金额", width: "100", type: "span", required: true},
|
{isshow: "T", field: "gap_rate", name: "补税比率", width: "100", type: "span", required: true},
|
{isshow: "T", field: "gap_tax", name: "补税金额", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "tax_qty", name: "补税票数", width: "100", type: "span", formatter: "formatter_money", align: "right", required: true},
|
{isshow: "T", field: "terminal_code", name: "终端区分", width: "100", type: "select",},
|
{isshow: "T", field: "is_agency11", name: "折让小计", width: "100", type: "span", align: "right", required: true},
|
{isshow: "T", field: "agree_no11", name: "折让小计比率", width: "100", type: "span", align: "right", type: "span", required: true},
|
{isshow: "T", field: "remark11", name: "备注", type: "input", width: "150"},
|
],
|
filterfieldClick: {},
|
tablefieldClick: {},
|
formfieldClick: {},
|
reasonvisible: false,
|
textarea2: '',
|
textarea2_no: '',
|
|
dataRequest: [
|
{
|
name: "md_province",
|
url: "rootjemin/data/getEntitySet",
|
paramsobj: {dataname: "md_division", filter: "level = '1'"},
|
isnotoption: false, //true:不是选项
|
}
|
],
|
},
|
created() {
|
|
},
|
|
mounted() {
|
var me = this;
|
let re = false
|
// if (window.top.vue.userinfo.user.roleList && window.top.vue.userinfo.user.roleList.length > 0) {
|
// window.top.vue.userinfo.user.roleList.map(s => {
|
// if (s.id && (s.id == "sp093" || s.id == "sp094" || s.id == "sp096" || s.id == "0")) {
|
// re = true
|
// }
|
// })
|
// }
|
// if (!re) {
|
// this.filterTxt += " and creator_code = '" + window.top.vue.userinfo.employee.code + "' "
|
// }
|
//获取数据
|
if (this.dataRequest && 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();
|
});
|
},
|
|
methods:{
|
signingAgreementOuter() {
|
this.reasonvisible = true;
|
},
|
signingAgreement() {
|
let me = this;
|
var date_ = dateFormat(new Date(),"yyyy-MM-dd");
|
|
let param_ = {
|
dataname:"agm_record",
|
data: {
|
id: this.selectedrow.id,
|
has_sign: 1,
|
sign_remark: this.textarea2,
|
sign_no: this.textarea2_no,
|
sign_time: date_,
|
sign_operate_code: window.top.userinfo.employee.code,
|
sign_operate_name: window.top.userinfo.employee.name
|
}
|
}
|
Server.call("rootjemin/data/saveEntity", param_, function(result) {
|
if(result && result.success) {
|
Root.message({
|
type:"success",
|
message:"签收成功"
|
})
|
|
}
|
me.doQuery()
|
})
|
|
this.reasonvisible = false;
|
},
|
exportList() {
|
exportList(this.dataname, this.getFilterData())
|
},
|
getFilterData: function(filter, isnotencode) {
|
var filter_ = filter ? filter : "1=1";
|
for(var k in this.filterObj) {
|
if (k == 'status') {
|
continue
|
}
|
|
let k_val = this.filterObj[k];
|
|
if (k_val && typeof(k_val) == "string") {
|
//去除两端的空格
|
this.filterObj[k] = k_val = k_val.replace(/(^\s*)|(\s*$)/g, "");
|
|
//去除两端的Tab
|
this.filterObj[k] = k_val = k_val.replace(/(^\t*)|(\t*$)/g, "");
|
}
|
|
let fieldObj_ = this.filterFieldsObj[k];
|
|
if (!fieldObj_) {
|
continue
|
}
|
|
let type_ = fieldObj_.type;
|
let valfield_ = fieldObj_.valfield;
|
if (type_ == "popup" && valfield_) {
|
k_val = this.filterObj[valfield_];
|
if (!this.filterObj[valfield_] && this.filterObj[k]) {
|
k_val = this.filterObj[k];
|
}
|
}
|
|
let field_ = fieldObj_.field;
|
let filteroperator_ = "equal";
|
|
let isnull = false;
|
let ornullval_ = fieldObj_.ornullval;
|
if (ornullval_) {
|
var nullvals_ = ornullval_.split(";");
|
nullvals_.map(v=>{
|
if (v == k_val) {
|
isnull = true;
|
}
|
});
|
}
|
|
if (fieldObj_.filterfield) {
|
field_ = fieldObj_.filterfield
|
}
|
if (fieldObj_.filteroperator) {
|
filteroperator_ = fieldObj_.filteroperator
|
}
|
|
if (k_val && k_val != "" && k_val.length) { filter_ = getFilterByFilterType(filter_, type_, field_, k_val, filteroperator_, isnull); }
|
}
|
|
if (Object.keys(this.filterObjBydefault).length) {
|
for(var k in this.filterObjBydefault) {
|
let k_val = this.filterObjBydefault[k];
|
filter_ += " and " + k + " = '" + k_val +"'";
|
}
|
}
|
|
if (this.filterTxt) {
|
filter_ += " and " + this.filterTxt;
|
}
|
|
|
if (isnotencode) {
|
return filter_;
|
}
|
else {
|
return encodeURI(filter_);
|
}
|
|
},
|
onInitFilter() {
|
//清空
|
this.filterObj = {};
|
this.selectedrow = {};
|
this.initData();
|
},
|
|
// onQuery() {
|
// this.initData();
|
// },
|
|
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_ = [];
|
|
metas.map(f=>{
|
f.isshow = "T";
|
|
if (f.isfilter) {
|
if (f.field == '_province_name' || f.field == '_seller_province_name') {
|
f.isfilterable = true
|
me.dataRequestObj.md_province.data.entityset.map(e => {
|
e.value = e.name
|
e.code = e.name
|
})
|
f.options = me.dataRequestObj.md_province.data.entityset
|
}
|
|
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();
|
}
|
});
|
},
|
doQuery: function(callback) {
|
let me = this;
|
this.oldFilterTxt = clone(this.filterTxt)
|
if(this.filterObj && this.filterObj.status == 'close') {
|
this.filterTxt += " and ara.status = 'close' "
|
}
|
else if(this.filterObj && this.filterObj.status == 'freeze') {
|
this.filterTxt += " and ar.freeze = 'T' and ara.status = 'open' "
|
}
|
else if(this.filterObj && this.filterObj.status == 'end') {
|
this.filterTxt += " and ar.freeze <> 'T' and ar.end_date < now() and ara.status = 'open' and ar.termination_date is null"
|
}
|
else if(this.filterObj && this.filterObj.status == 'termination') {
|
this.filterTxt += " and ar.freeze <> 'T' and ar.termination_date < now() and ara.status = 'open' "
|
}
|
else if(this.filterObj && this.filterObj.status == 'active') {
|
this.filterTxt += " and ara.status = 'open' and ar.freeze <> 'T' and ar.start_date < now() and ar.end_date > now() and ar.termination_date is null "
|
}
|
else if(this.filterObj && this.filterObj.status == 'notactive') {
|
this.filterTxt += " and ara.status = 'open' and ar.start_date > now() and ar.freeze <> 'T' and ar.termination_date is null "
|
}
|
let filter_ = "1=1";
|
this.filterList = [];
|
this.selectedrow = {};
|
for(var k in this.filterObj) {
|
if (k == 'status') {
|
continue
|
}
|
let k_val = this.filterObj[k];
|
/* let fieldObj_ = this.filterFieldsObj[k];
|
|
let type_ = fieldObj_.type;
|
let field_ = fieldObj_.field; */
|
|
if (k_val && typeof(k_val) == "string") {
|
//去除两端的空格
|
this.filterObj[k] = k_val = k_val.replace(/(^\s*)|(\s*$)/g, "");
|
|
//去除两端的Tab
|
this.filterObj[k] = k_val = k_val.replace(/(^\t*)|(\t*$)/g, "");
|
}
|
|
let fieldObj_ = this.filterFieldsObj[k];
|
|
if (!fieldObj_) {
|
continue
|
}
|
if (!fieldObj_) {
|
fieldObj_ = {
|
field: k
|
}
|
}
|
|
let type_ = fieldObj_.type;
|
let valfield_ = fieldObj_.valfield;
|
if (type_ == "popup" && valfield_) {
|
k_val = this.filterObj[valfield_];
|
}
|
|
let field_ = fieldObj_.field;
|
|
let filteroperator_ = "equal";
|
|
let isnull = false;
|
let ornullval_ = fieldObj_.ornullval;
|
if (ornullval_) {
|
var nullvals_ = ornullval_.split(";");
|
nullvals_.map(v=>{
|
if (v == k_val) {
|
isnull = true;
|
}
|
});
|
}
|
|
if (fieldObj_.filterfield) {
|
field_ = fieldObj_.filterfield
|
}
|
if (fieldObj_.filteroperator) {
|
filteroperator_ = fieldObj_.filteroperator
|
}
|
|
//传条件数组由后端拼接筛选数据
|
/* let filterListObj_ = {
|
field: field_,
|
val: k_val,
|
type: filteroperator_
|
}
|
|
this.filterList.push(filterListObj_);
|
*/
|
|
//传条件数据有前端拼接
|
if (k_val && k_val != "" && k_val.length) { filter_ = getFilterByFilterType(filter_, type_, field_, k_val, filteroperator_, isnull); }
|
}
|
|
if (Object.keys(this.filterObjBydefault).length) {
|
for(var k in this.filterObjBydefault) {
|
let k_val = this.filterObjBydefault[k];
|
if (k_val.indexOf(',') != -1) {//包含英文","用in
|
filter_ += " and " + k + " in ('" + k_val +"')";
|
}
|
else {
|
filter_ += " and " + k + " ='" + k_val +"'";
|
}
|
}
|
}
|
|
if (this.filterTxt) {
|
filter_ += " and " + this.filterTxt;
|
}
|
|
var attachmeta_ = false;
|
if (!this.tableFields || (this.tableFields && this.tableFields.length == 0)) {
|
attachmeta_ = true;
|
}
|
|
let param_ = {
|
|
dataname: this.dataname,
|
filterList: this.filterList,
|
filter: filter_,
|
orderby: this.orderby,
|
page: {
|
pageno: this.pagenum,
|
pagesize: this.pagesize
|
},
|
attachMeta: attachmeta_
|
}
|
|
if (Object.keys(this.paramObjBydefault).length) {
|
for(var k in this.paramObjBydefault) {
|
let k_val = this.paramObjBydefault[k];
|
param_[k] = k_val;
|
}
|
}
|
me.tableData = [];
|
//me.total = 0;
|
me.tableloading = true;
|
|
Server.call(me.dataurl, param_, function(result) {
|
|
me.tableloading = false;
|
|
if (result && result.meta) {
|
me.data_tablename_map = result.meta
|
}
|
if (result && result.data && result.data.entityset) {
|
if (result.data.page && result.data.page.recordcount && me.pagenum > 1 && result.data.page.recordcount < (me.pagenum - 1) * me.pagesize) {
|
me.pagenum = 1;
|
me.doQuery(callback);
|
return;
|
}
|
|
var data_ = result.data.entityset;
|
me.tableData = data_;
|
me.total = result.data.page ? result.data.page.recordcount : 0;
|
}
|
else {
|
me.total = 0;
|
}
|
|
me.queryAfter();
|
|
if (callback) {
|
callback(result, function() {
|
me.tableDataAfter();
|
});
|
}
|
|
}, function(){
|
me.tableloading = false;
|
});
|
},
|
|
queryAfter() {
|
let me = this
|
if (me.tableData.length > 0) {
|
let tableData = clone(me.tableData)
|
tableData.map(s => {
|
if (s.freeze && s.freeze == 'T') s.freeze = '是'
|
else s.freeze = '否'
|
})
|
me.tableData = tableData
|
}
|
|
this.filterTxt = clone(this.oldFilterTxt)
|
},
|
|
tableFieldClick() {
|
var me = this;
|
//筛选字段事件设置
|
this.filterfieldClick = {
|
|
};
|
//表格字段事件设置
|
this.tablefieldClick = {
|
status: {//字段事件设置
|
val: {//有值时的点击事件
|
onclick: function(obj) {//数据值点击事件
|
var config = {
|
totab: false, //true: 以Tab导航的方式打开
|
width: "900px",
|
height: "500px",
|
icon: "icon-product",
|
text: "",
|
id: obj.row.id,//totab: true时需设置,用于判断是否已打开此页面
|
url: "../approval_new/ApprovalList_page_new.html?flow_id=" + obj.row.flow_id,
|
data: obj.row,
|
delta: {},
|
sceneCode: "change",//"refuseedit",//"approval", //"add"//"browse",
|
callback: function(obj, callback) {
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
},
|
},
|
},
|
};
|
|
//表单字段事件设置
|
this.formfieldClick = {
|
|
};
|
},
|
|
showInfo(obj) {
|
var me = this;
|
|
var config = {
|
totab: true, //true: 以Tab导航的方式打开
|
width: "900px",
|
height: "900px",
|
icon: "icon-product",
|
text: "赠药政策信息查看",
|
id: "medicine_policy_info" + "browse" + obj.row.id,//totab: true时需设置,用于判断是否已打开此页面
|
url: "../agreement/policy/medicine_policy_info.html",
|
data: obj.row,
|
delta: {},
|
sceneCode: "browse",//"refuseedit",//"approval", //"add"//"browse",
|
callback: function(obj, callback) {
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
|
me.doPopupByPublic(config);
|
},
|
|
opentest() {
|
var me = this;
|
Root.message({
|
type: 'success',
|
message: '后缀点击事件'
|
});
|
|
var config = {
|
totab: false, //true: 以Tab导航的方式打开
|
width: "900px",
|
height: "900px",
|
icon: "icon-product",
|
text: "表单样例页面",
|
id: "test_page",//totab: true时需设置,用于判断是否已打开此页面
|
//url: "module/system/page/coming.html",
|
url: "module/system/page/sample/sample_form.html",
|
data: {},
|
delta: {},
|
sceneCode: "edit", //"add"//"browse",
|
callback: function(obj, callback) {
|
me.onQuery();
|
if (callback) {
|
callback();
|
}
|
}
|
};
|
me.doPopupByPublic(config);
|
},
|
|
addData() {
|
let me = this;
|
var config = {
|
totab: false, //true: 以Tab导航的方式打开
|
width: "500px",
|
height: "300px",
|
icon: "icon-product",
|
text: "产品信息",
|
id: "product_edit",//totab: true时需设置,用于判断是否已打开此页面
|
url: "module/md/page/product/page/product_edit.html",
|
data: {},
|
delta: {},
|
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);
|
},
|
}
|
});
|
};
|
|
initVue();
|
</script>
|
<style>
|
/* 在vue.js中 v-cloak 这个指令是防止页面加载时出现 vuejs 的变量名而设计的 */
|
[v-cloak] {
|
display: none !important;
|
}
|
</style>
|
</body>
|
</html>
|