|
@@ -1167,6 +1167,9 @@ const showSelectTab = function(select, spread, afterShow) {
|
|
|
if (viewTags && viewTags.length > 0) viewTags.remove();
|
|
if (viewTags && viewTags.length > 0) viewTags.remove();
|
|
|
billsTags.forEach(x => {x.display = false});
|
|
billsTags.forEach(x => {x.display = false});
|
|
|
};
|
|
};
|
|
|
|
|
+ const getTagId = function(obj) {
|
|
|
|
|
+ return setting.keyType == 'uuid' ? obj.attr('tag-id') : parseInt(obj.attr('tag-id'));
|
|
|
|
|
+ };
|
|
|
|
|
|
|
|
const getTagEditHtml = function(tag) {
|
|
const getTagEditHtml = function(tag) {
|
|
|
const tagClass = classIndexes.find(x => {return x.color === tag.color}) || {};
|
|
const tagClass = classIndexes.find(x => {return x.color === tag.color}) || {};
|
|
@@ -1459,7 +1462,7 @@ const showSelectTab = function(select, spread, afterShow) {
|
|
|
});
|
|
});
|
|
|
$('body').on('click', '#tag-del', function () {
|
|
$('body').on('click', '#tag-del', function () {
|
|
|
const obj = $('[name=tag-edit]').parent();
|
|
const obj = $('[name=tag-edit]').parent();
|
|
|
- postData(setting.updateUrl, {del: parseInt(obj.attr('tag-id'))}, function (result) {
|
|
|
|
|
|
|
+ postData(setting.updateUrl, {del: getTagId(obj)}, function (result) {
|
|
|
if (!result.del) return;
|
|
if (!result.del) return;
|
|
|
|
|
|
|
|
const bills = updateDatasAndShow(result);
|
|
const bills = updateDatasAndShow(result);
|
|
@@ -1469,7 +1472,7 @@ const showSelectTab = function(select, spread, afterShow) {
|
|
|
$('body').on('click', '#tag-edit-ok', function () {
|
|
$('body').on('click', '#tag-edit-ok', function () {
|
|
|
const obj = $('[name=tag-edit]').parent();
|
|
const obj = $('[name=tag-edit]').parent();
|
|
|
const data = {
|
|
const data = {
|
|
|
- id: parseInt(obj.attr('tag-id')),
|
|
|
|
|
|
|
+ id: getTagId(obj),
|
|
|
share: $('#tag-share')[0].checked,
|
|
share: $('#tag-share')[0].checked,
|
|
|
comment: $('#tag-comment').val(),
|
|
comment: $('#tag-comment').val(),
|
|
|
color: $('#tag-change-color').attr('tag-color'),
|
|
color: $('#tag-change-color').attr('tag-color'),
|