Merge branch 'main' of zentao/zentaopms (#2670)
This commit is contained in:
@@ -199,7 +199,7 @@ window.renderRowData = function($row, index, story)
|
||||
window.loadBranches = function(product, obj)
|
||||
{
|
||||
$this = $(obj.target);
|
||||
branch = $this.find('input[name^=branch]').val();
|
||||
branch = $this.find('input[name^=branch]').val().replace('branch', '');
|
||||
|
||||
let storyID = $this.closest('tr').find('.form-batch-input[data-name="storyIdList"]').val();
|
||||
let $module = $this.closest('tr').find('.form-batch-control[data-name="module"]');
|
||||
@@ -209,9 +209,16 @@ window.loadBranches = function(product, obj)
|
||||
{
|
||||
let $picker = $this.closest('tr').find('.picker-box[data-name="module"]').zui('picker');
|
||||
let options = $picker.options;
|
||||
options.items = items;
|
||||
$picker.render(options);
|
||||
$picker.$.setValue(0);
|
||||
|
||||
let oldItems = options.items.map(item => item.value.toString());
|
||||
let newItems = items.map(item => item.value.toString());
|
||||
|
||||
if(JSON.stringify(newItems.slice().sort()) != JSON.stringify(oldItems.slice().sort()))
|
||||
{
|
||||
options.items = items;
|
||||
$picker.render(options);
|
||||
$picker.$.setValue(0);
|
||||
}
|
||||
});
|
||||
|
||||
let $plan = $this.closest('tr').find('.form-batch-control[data-name="plan"]');
|
||||
@@ -221,9 +228,16 @@ window.loadBranches = function(product, obj)
|
||||
{
|
||||
let $picker = $this.closest('tr').find('.picker-box[data-name="plan"]').zui('picker');
|
||||
let options = $picker.options;
|
||||
options.items = items;
|
||||
$picker.render(options);
|
||||
$picker.$.setValue('');
|
||||
|
||||
let oldItems = options.items.map(item => item.value.toString());
|
||||
let newItems = items.map(item => item.value.toString());
|
||||
|
||||
if(JSON.stringify(newItems.slice().sort()) != JSON.stringify(oldItems.slice().sort()))
|
||||
{
|
||||
options.items = items;
|
||||
$picker.render(options);
|
||||
$picker.$.setValue('');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user