|
@@ -256,6 +256,17 @@ let sectionTreeObj = {
|
|
|
callback: function (key, opt) {
|
|
|
$('#set-rate-dialog').modal('show');
|
|
|
}
|
|
|
+ },
|
|
|
+ "setJobContent": {
|
|
|
+ name: "设置工作内容",
|
|
|
+ disabled: function () {
|
|
|
+ const section = me.cache[target.row];
|
|
|
+ return locked || !section;
|
|
|
+ },
|
|
|
+ icon: "fa-pencil-square-o",
|
|
|
+ callback: function (key, opt) {
|
|
|
+ $('#set-job-content-dialog').modal('show');
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -401,6 +412,26 @@ let sectionTreeObj = {
|
|
|
$.bootstrapLoading.end();
|
|
|
});
|
|
|
});
|
|
|
+
|
|
|
+ // 设置默认工作内容,设置给其下所有定额
|
|
|
+ $('#set-job-content-confirm').click(function () {
|
|
|
+ $.bootstrapLoading.start();
|
|
|
+ const jobContentText = $('#default-job-content').val();
|
|
|
+ const section = me.tree.selected;
|
|
|
+ const sectionList = me.getSectionLeafList(section);
|
|
|
+ const postData = {
|
|
|
+ rationRepId: pageOprObj.rationLibId,
|
|
|
+ sectionList,
|
|
|
+ updateData: { jobContentText: jobContentText }
|
|
|
+ };
|
|
|
+ $('#default-job-content').val('');
|
|
|
+ CommonAjax.post('/rationRepository/api/updateRationBySection', postData, function () {
|
|
|
+ me.initSelection(section);
|
|
|
+ $.bootstrapLoading.end();
|
|
|
+ }, function () {
|
|
|
+ $.bootstrapLoading.end();
|
|
|
+ });
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
insert: function () {
|