|
|
@@ -1,4 +1,5 @@
|
|
|
var ExcelData, ExcelKind;
|
|
|
+var clickflag = 0;
|
|
|
function ConfirmImport() {
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
@@ -92,19 +93,18 @@ layui.config({
|
|
|
, cols: [[
|
|
|
{ type: 'checkbox', fixed: 'left' }
|
|
|
, { field: 'Id', fixed: 'left', title: 'ID', width: 80, sort: true, unresize: true }
|
|
|
- , { field: 'UserId', width: 200, title: '创客', sort: true }
|
|
|
+ , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
|
|
|
+ , { field: 'Status', width: 200, title: '扣款状态', sort: true }
|
|
|
, { field: 'MakerCode', width: 200, title: '创客编号', sort: true }
|
|
|
, { field: 'MakerName', width: 200, title: '创客姓名', sort: true }
|
|
|
- , { field: 'CreateDate', width: 200, title: '创建时间', sort: true }
|
|
|
- , { field: 'TotalAmount', width: 200, title: '扣款总金额', sort: true }
|
|
|
- , { field: 'StartDate', width: 200, title: '扣款开始时间', sort: true }
|
|
|
, { field: 'TimeNumber', width: 200, title: '期数', sort: true }
|
|
|
+ , { field: 'TotalAmount', width: 200, title: '扣款总金额', sort: true }
|
|
|
, { field: 'ChargeAmount', width: 200, title: '已扣金额', sort: true }
|
|
|
- , { field: 'Status', width: 200, title: '扣款状态', sort: true }
|
|
|
+ , { field: 'StartDate', width: 200, title: '扣款开始时间', sort: true }
|
|
|
, { field: 'Remark', width: 200, title: '备注', sort: true }
|
|
|
, { field: 'SeoTitle', width: 200, title: '操作人', sort: true }
|
|
|
|
|
|
- , { title: '操作', align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
|
|
|
+ , { title: '操作', width: 300, align: 'center', fixed: 'right', toolbar: '#table-list-tools' }
|
|
|
]]
|
|
|
, where: {
|
|
|
|
|
|
@@ -278,36 +278,56 @@ layui.config({
|
|
|
}
|
|
|
});
|
|
|
}, 300);
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ var times = layero.find('iframe').contents().find('input[type=number][name=TimeNumber]').val();
|
|
|
+ var ChargeAmounts = '';
|
|
|
+ var StartDates = '';
|
|
|
+ var num = 0;
|
|
|
+ for (var i = 0; i < times; i++) {
|
|
|
+ num += 1;
|
|
|
+ ChargeAmounts += layero.find('iframe').contents().find('#ChargeAmounts' + num).val() + ',';
|
|
|
+ StartDates += layero.find('iframe').contents().find('#StartDates' + num).val() + ',';
|
|
|
+ // layero.find('iframe').contents().find('#ChargeAmounts' + num).each(function (i) {
|
|
|
+ // ChargeAmounts += $(this).val() + ','
|
|
|
+ // });
|
|
|
+ // layero.find('iframe').contents().find('#StartDates' + num).each(function (i) {
|
|
|
+ // StartDates += $(this).val() + ','
|
|
|
+ // });
|
|
|
+ }
|
|
|
+ console.log(times);
|
|
|
+ console.log(ChargeAmounts);
|
|
|
+ console.log(StartDates);
|
|
|
|
|
|
//监听提交
|
|
|
iframeWindow.layui.form.on('submit(' + submitID + ')', function (data) {
|
|
|
- var field = data.field; //获取提交的字段
|
|
|
- var userdata = "";
|
|
|
- for (var prop in field) {
|
|
|
- userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
|
|
|
- }
|
|
|
- //提交 Ajax 成功后,静态更新表格中的数据
|
|
|
- //$.ajax({});
|
|
|
-
|
|
|
- $.ajax({
|
|
|
- type: "POST",
|
|
|
- url: "/Admin/ToChargeByStage/Add?r=" + Math.random(1),
|
|
|
- data: userdata,
|
|
|
- dataType: "text",
|
|
|
- success: function (data) {
|
|
|
- layer.close(index); //关闭弹层
|
|
|
- if (data == "success") {
|
|
|
- table.reload('LAY-list-manage'); //数据刷新
|
|
|
- } else {
|
|
|
- layer.msg(data);
|
|
|
- }
|
|
|
+ if (clickflag == 0) {
|
|
|
+ clickflag = 1;
|
|
|
+ var field = data.field; //获取提交的字段
|
|
|
+ field.ChargeAmounts = ChargeAmounts;
|
|
|
+ field.StartDates = StartDates;
|
|
|
+ var userdata = "";
|
|
|
+ for (var prop in field) {
|
|
|
+ userdata += prop + "=" + encodeURIComponent(field[prop]) + "&";
|
|
|
}
|
|
|
- });
|
|
|
+ userdata += "StartDates=" + encodeURIComponent(StartDates) + "&ChargeAmounts=" + encodeURIComponent(ChargeAmounts) + "&";
|
|
|
+ //提交 Ajax 成功后,静态更新表格中的数据
|
|
|
+ //$.ajax({});
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ url: "/Admin/ToChargeByStage/Add?r=" + Math.random(1),
|
|
|
+ data: userdata,
|
|
|
+ dataType: "text",
|
|
|
+ success: function (data) {
|
|
|
+ clickflag = 0;
|
|
|
+ layer.close(index); //关闭弹层
|
|
|
+ if (data == "success") {
|
|
|
+ table.reload('LAY-list-manage'); //数据刷新
|
|
|
+ } else {
|
|
|
+ layer.msg(data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
submit.trigger('click');
|