Commit 69099885 by jianshuqin

优化:组件功能

parent c0b58793
......@@ -4,7 +4,6 @@
class="el-dialog-form"
el-dialog
append-to-body
destroy-on-close
v-dialogDrag
v-bind:title="dialog.name"
v-bind:visible.sync="show"
......
......@@ -45,7 +45,7 @@
},
//查询数据
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
}
[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)
{
ResultDTO result = new ResultDTO();
......@@ -1532,6 +1548,22 @@ namespace Bailun.DC.Web.Areas.DataWareHouse.Controllers
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
......
......@@ -40,16 +40,19 @@
var result = response.data;
if (response.status === 200 && result.result && result.data) {
Vue.set(that, "dialog", result.data)
that.show = true;
that.$set(that, "show", true);
if (title) {
Vue.set(that.dialog, "name", title);
}
if (that.dialog.listFormItem && that.dialog.listFormItem.constructor === String) {
Vue.set(that.dialog, "listFormItem", JSON.parse(that.dialog.listFormItem));
}
if (form && that.dialog.listFormItem && that.dialog.listFormItem.length) {
that.dialog.listFormItem.forEach(function (item) {
if (item.type == "select" && (!item.listOption || item.listOption.length) && form[item.prop] && form[item.propname]) {
if (that.dialog.listFormItem) {
that.dialog.listFormItem.forEach(function (item, i) {
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 listPropValue = Array.isArray(form[item.prop]) ? form[item.prop] : [form[item.prop]]
listPropValue.forEach(function (l, i) {
......@@ -80,11 +83,11 @@
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");
});
if (resetFieldsIndex > 0) {
if (resetFieldsIndex >= 0) {
that.$refs.form && that.$refs.form.resetFields && that.$refs.form.resetFields();
};
}
that.show = false
that.$set(that, "show", false);
},
//提交表单
submitForm: function () {
......@@ -101,28 +104,6 @@
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'
});
\ No newline at end of file
......@@ -202,6 +202,10 @@
}
that.$set(that, "item_value", date);
break;
case 'input':
case 'textarea':
that.$set(that, "item_value", that.item.defaultValue);
break;
}
}
},
......@@ -242,7 +246,7 @@
//文件上传成功
onSuccess(response, file, listFile) {
var that = this;
if (response.code = 200) {
if (response.result) {
listFile.splice(listFile.length - 1, 1)
that.$emit("import", true, file)
that.$nextTick(function () {
......
......@@ -47,7 +47,7 @@
var listFilter = [];
//筛选区域过虑条件
if (!filter) {
listFilter = that.$refs.formFilter.getFilter(true);
listFilter = that.$refs.formFilter.getFilter(filter != false);
} else {
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