|
@@ -9,6 +9,41 @@ $(function () {
|
|
|
$('#add-transfer-form').submit();
|
|
|
});
|
|
|
|
|
|
+ let editPeriod = null;
|
|
|
+ $('.edit-time').on('click', function () {
|
|
|
+ const t_time = $(this).data('time');
|
|
|
+ const ftid = parseInt($(this).data('ftid'));
|
|
|
+ console.log(t_time, ftid);
|
|
|
+ $('#edit-transfer-date').val('');
|
|
|
+ $('#edit-ftid').val(ftid);
|
|
|
+ $('#edit-transfer-date').val(t_time);
|
|
|
+ editPeriod = !editPeriod ? $('#edit-transfer-date').datepicker().data('datepicker') : editPeriod;
|
|
|
+ editPeriod.clear();
|
|
|
+ editPeriod.selectDate(new Date(t_time));
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#edit-ok').click(function () {
|
|
|
+ const id = parseInt($('#edit-ftid').val());
|
|
|
+ if (!id) {
|
|
|
+ toastr.error('获取资金划拨信息失败');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const trInfo = _.find(transferList, { id });
|
|
|
+ if (!trInfo) {
|
|
|
+ toastr.error('获取资金划拨信息失败');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const t_time = $('#edit-transfer-date').val();
|
|
|
+ if (t_time === '') {
|
|
|
+ toastr.error('请选择划拨年月');
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ postData(window.location.pathname + '/update', {postType: 'edit-transfer-time', postData: { id, t_time }}, function (result) {
|
|
|
+ window.location.reload();
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
$('body').on('click', '#transfer-list .del-transfer-btn', function () {
|
|
|
const trid = $(this).data('id');
|
|
|
deleteAfterHint(function () {
|