Commit 69099885 by jianshuqin

优化:组件功能

parent c0b58793
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
class="el-dialog-form" class="el-dialog-form"
el-dialog el-dialog
append-to-body append-to-body
destroy-on-close
v-dialogDrag v-dialogDrag
v-bind:title="dialog.name" v-bind:title="dialog.name"
v-bind:visible.sync="show" v-bind:visible.sync="show"
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
}, },
//查询数据 //查询数据
onSearch: function (firstPage) { onSearch: function (firstPage) {
this.$refs.tableQuery.onSearch(null, firstPage); this.$refs.tableQuery.onSearch(false, firstPage);
} }
} }
}) })
......
...@@ -1476,6 +1476,22 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers ...@@ -1476,6 +1476,22 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
} }
[HttpPost] [HttpPost]
public JsonResult SaveFlowingSalesFeeDetail([FromBody] flowing_sales_fee_detail entity)
{
ResultDTO result = default(ResultDTO);
try
{
result = new Services.DataWareHouse.PlatformOrderFeeServices().SaveFlowingSalesFeeDetail(entity);
}
catch (Exception ex)
{
result = new ResultDTO() { Message = ex.Message };
}
return Json(result);
}
[HttpPost]
public JsonResult ImportFlowingSalesFee(IFormFile file) public JsonResult ImportFlowingSalesFee(IFormFile file)
{ {
ResultDTO result = new ResultDTO(); ResultDTO result = new ResultDTO();
...@@ -1532,6 +1548,22 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers ...@@ -1532,6 +1548,22 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
return Json(result); return Json(result);
} }
[HttpPost]
public JsonResult DeleteFlowingSalesFeeDetail(int[] id)
{
ResultDTO result = default(ResultDTO);
try
{
result = new Services.DataWareHouse.PlatformOrderFeeServices().DeleteFlowingSalesFeeDetail(id);
}
catch (Exception ex)
{
result = new ResultDTO() { Message = ex.Message };
}
return Json(result);
}
#endregion #endregion
......
...@@ -40,16 +40,19 @@ ...@@ -40,16 +40,19 @@
var result = response.data; var result = response.data;
if (response.status === 200 && result.result && result.data) { if (response.status === 200 && result.result && result.data) {
Vue.set(that, "dialog", result.data) Vue.set(that, "dialog", result.data)
that.show = true; that.$set(that, "show", true);
if (title) { if (title) {
Vue.set(that.dialog, "name", title); Vue.set(that.dialog, "name", title);
} }
if (that.dialog.listFormItem && that.dialog.listFormItem.constructor === String) { if (that.dialog.listFormItem && that.dialog.listFormItem.constructor === String) {
Vue.set(that.dialog, "listFormItem", JSON.parse(that.dialog.listFormItem)); Vue.set(that.dialog, "listFormItem", JSON.parse(that.dialog.listFormItem));
} }
if (form && that.dialog.listFormItem && that.dialog.listFormItem.length) { if (that.dialog.listFormItem) {
that.dialog.listFormItem.forEach(function (item) { that.dialog.listFormItem.forEach(function (item, i) {
if (item.type == "select" && (!item.listOption || item.listOption.length) && form[item.prop] && form[item.propname]) { if (that.$refs.dialog && that.$refs.dialog.rendered && item.defaultValue) {
that.$refs.control[i].setDefaultValue();
}
if (form && item.type == "select" && (!item.listOption || item.listOption.length) && form[item.prop] && form[item.propname]) {
var listOption = []; var listOption = [];
var listPropValue = Array.isArray(form[item.prop]) ? form[item.prop] : [form[item.prop]] var listPropValue = Array.isArray(form[item.prop]) ? form[item.prop] : [form[item.prop]]
listPropValue.forEach(function (l, i) { listPropValue.forEach(function (l, i) {
...@@ -80,11 +83,11 @@ ...@@ -80,11 +83,11 @@
var resetFieldsIndex = that.dialog.listFormItem && that.dialog.listFormItem.findIndex(function (l, i) { var resetFieldsIndex = that.dialog.listFormItem && that.dialog.listFormItem.findIndex(function (l, i) {
return (l.type == "input" || l.type == "number" || l.type == "select" || l.type == "daterange" || l.type == "date" || l.type == "month" || l.type == "year" || l.type == "switch"); return (l.type == "input" || l.type == "number" || l.type == "select" || l.type == "daterange" || l.type == "date" || l.type == "month" || l.type == "year" || l.type == "switch");
}); });
if (resetFieldsIndex > 0) { if (resetFieldsIndex >= 0) {
that.$refs.form && that.$refs.form.resetFields && that.$refs.form.resetFields(); that.$refs.form && that.$refs.form.resetFields && that.$refs.form.resetFields();
}; };
} }
that.show = false that.$set(that, "show", false);
}, },
//提交表单 //提交表单
submitForm: function () { submitForm: function () {
...@@ -101,28 +104,6 @@ ...@@ -101,28 +104,6 @@
that.javaScript.call(that, that.dialog.saveScript, that.form) that.javaScript.call(that, that.dialog.saveScript, that.form)
} }
}, },
//
visibleChange: function (visible, item) {
var that = this
if (visible && item.api && (!item.listOption || item.listOption.length <= 1 || (that.form && item.prop && that.form[item.prop] && Array.isArray(that.form[item.prop]) && that.form[item.prop].length == item.listOption.length))) {
//that.$set(item, "loading", true)
//if (item.apiType == "post") {
// request.post(item.api, { limit: 2147483647 }).then(response => {
// if (response.code == 200 && response.data) {
// that.$set(item, "listOption", response.data.list)
// }
// that.$set(item, "loading", false)
// })
//} else {
// request.get(item.api, { limit: 2147483647 }).then(response => {
// if (response.code == 200 && response.data) {
// that.$set(item, "listOption", response.data.list)
// }
// that.$set(item, "loading", false)
// })
//}
}
}
}, },
template: '#elDialogForm' template: '#elDialogForm'
}); });
\ No newline at end of file
...@@ -202,6 +202,10 @@ ...@@ -202,6 +202,10 @@
} }
that.$set(that, "item_value", date); that.$set(that, "item_value", date);
break; break;
case 'input':
case 'textarea':
that.$set(that, "item_value", that.item.defaultValue);
break;
} }
} }
}, },
...@@ -242,7 +246,7 @@ ...@@ -242,7 +246,7 @@
//文件上传成功 //文件上传成功
onSuccess(response, file, listFile) { onSuccess(response, file, listFile) {
var that = this; var that = this;
if (response.code = 200) { if (response.result) {
listFile.splice(listFile.length - 1, 1) listFile.splice(listFile.length - 1, 1)
that.$emit("import", true, file) that.$emit("import", true, file)
that.$nextTick(function () { that.$nextTick(function () {
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
var listFilter = []; var listFilter = [];
//筛选区域过虑条件 //筛选区域过虑条件
if (!filter) { if (!filter) {
listFilter = that.$refs.formFilter.getFilter(true); listFilter = that.$refs.formFilter.getFilter(filter != false);
} else { } else {
listFilter = filter.length > 0 ? filter : []; listFilter = filter.length > 0 ? filter : [];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment