Commit 4dadd9a8 authored by neo's avatar neo

[dev] bb approval liu cheng tu

parent 3907a401
...@@ -650,7 +650,7 @@ ...@@ -650,7 +650,7 @@
{ caption: '审批时间', width: '7.5%', dataField: "approvalTime"} { caption: '审批时间', width: '7.5%', dataField: "approvalTime"}
], ],
onRowClick: function (e) { onRowClick: function (e) {
$scope.newProductModalInstance = ackUibModal($scope, 'addNewProduct.html', 'addNewProduct', '.app-overview ', 'static') $scope.newProductModalInstance = ackUibModal($scope, 'liucheng.html', 'liucheng', '.app-overview ', 'static')
$scope.newProductModalInstance.open(); $scope.newProductModalInstance.open();
} }
...@@ -664,129 +664,6 @@ ...@@ -664,129 +664,6 @@
}; };
$scope.modalService = {
open: function () {
$scope.product = {
fYear: "",
fSetId: "",
fSetName: "",
fManager: ""
};
var treeView;
var syncTreeViewSelection = function (treeView) {
if (!treeView) return;
if (!$scope.treeBoxValue) {
treeView.unselectAll();
return;
}
$scope.treeBoxValue.forEach(function (key) {
treeView.selectItem(key);
});
};
$scope.treeBoxValue = [""];
$scope.treeDataSource = [];
$scope.treeBoxNameValue = [""];
// productService.getProductList().success(function (data) {
// data.forEach(function (v) {
// if (!v.productIDs) {
// var item = new Object;
// item.name = v.fSetName;
// item.content = { id: v.fSetCode, guid: v.id};
// $scope.treeDataSource.push(item);
// }
// });
// });
$scope.treeBoxOptions = {
bindingOptions: {
value: 'treeBoxNameValue'
},
valueExpr: "ID",
displayExpr: "name",
placeholder: "选择...",
showClearButton: false,
dataSource: $scope.treeDataSource,
onValueChanged: function () {
syncTreeViewSelection(treeView);
},
treeView: {
dataSource: $scope.treeDataSource,
dataStructure: "plain",
keyExpr: "ID",
parentIdExpr: "categoryId",
displayExpr: "name",
selectByClick: true,
selectNodesRecursive: false,
showCheckBoxesMode: "normal",
bindingOptions: {
selectionMode: "selectionMode"
},
onContentReady: function (e) {
treeView = e.component;
syncTreeViewSelection(treeView);
},
onItemSelectionChanged: function (args) {
var keyValue = args.component.getSelectedNodesKeys();
if (keyValue.length===0) {
keyValue = [""];
}
var value = [""];
var nodes = args.component.getNodes();
var newValue = [""];
var nameValue = [""];
keyValue.forEach(function (v) {
var findResult = _.find(nodes, function (node) {
return node.key === v;
});
if (findResult) {
newValue.push(findResult.itemData.content.guid);
value.push(findResult.itemData.content.id);
nameValue.push(findResult.itemData.name);
}
});
$scope.treeBoxValue = keyValue;
$scope.newNewtreeBoxValue = value;
$scope.newTreeBoxValue = newValue;
var tempArray = nameValue.length===1?nameValue:nameValue.shift();
$scope.treeBoxNameValue = nameValue;
}
}
};
$timeout(function () {
var ele2 = $("#productStartDate");
ele2.datepicker({
startDate: $scope.startDate,
endDate: $scope.endDate,
language: region,
viewMode: $scope.viewMode,
minViewMode: $scope.viewMode,
autoclose: true, //选中之后自动隐藏日期选择框
clearBtn: true, //清除按钮
todayBtn: false, //今日按钮
format: $scope.dateFormat //日期格式,详见 http://bootstrap-datepicker.readthedocs.org/en/release/options.html#format
}).on('changeDate', function (e) {
$scope.changeStartDate(e);
});
ele2.datepicker("setDate", $scope.selectedStartDate);
}, 100);
$scope.newProductModalInstance = ackUibModal($scope, 'addNewProduct.html', 'addNewProduct', '.app-overview ', 'static')
$scope.newProductModalInstance.open();
},
save: function (result) {
$scope.saveProduct();
$scope.newProductModalInstance.close();
},
cancel: function () {
$scope.newProductModalInstance.cancel();
}
};
(function initialize() { (function initialize() {
initDatePickers(); initDatePickers();
$scope.updateStatus = false; $scope.updateStatus = false;
......
...@@ -89,78 +89,27 @@ ...@@ -89,78 +89,27 @@
<div class="vat-preview-input-invoice" id="mainPreviewDiv"> <div class="vat-preview-input-invoice" id="mainPreviewDiv">
<div id="mainAreaDiv" class="main-area"> <div id="mainAreaDiv" class="main-area">
<div class="inputInvoiceGrid" id="grid" dx-data-grid="gridOptions"> <div class="inputInvoiceGrid" id="grid" dx-data-grid="gridOptions">
<div class="watermark" ng-show="!gridOptions.data.length"><span translate="NoDataAvailable"></span> <div class="watermark" ng-show="!gridOptions.data.length"><span
translate="NoDataAvailable"></span>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<script type="text/ng-template" id="addNewProduct.html"> <script type="text/ng-template" id="liucheng.html">
<div class="modal-header"> <div class="modal-content" style="width:900px">
<div class="modal-title" id="modal-title">新增产品</div> <div class="modal-header" style="width:900px">
</div> <div class="modal-title" id="modal-title">报表审批流程</div>
<div class="modal-body" id="modal-body"> </div>
<div class="content"> <div class="modal-body" id="modal-body" style="width:900px">
<form name="add-product-form" id="add-product-form" class="form-horizontal"> <div class="content">
<div class="form-group" style="margin-bottom:5px"> <img src="../../../app-resources/images/vat/liucheng.png">
<label for="year" class="col-sm-3 control-label">年份</label> </div>
<div class="col-sm-8 input-group"> </div>
<input class="form-control" name="year" id="year" ng-model="product.fYear" maxlength="50"> <div class="modal-footer">
</div> <button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancel()">关闭</button>
</div>
<div class="form-group" style="margin-bottom:5px">
<label for="setId" class="col-sm-3 control-label">产品标识</label>
<div class="col-sm-8 input-group">
<input class="form-control" name="setId" id="setId" ng-model="product.fSetId" maxlength="50">
</div>
</div>
<div class="form-group" style="margin-bottom:5px">
<label for="setCode" class="col-sm-3 control-label">产品编号</label>
<div class="col-sm-8 input-group">
<input class="form-control" name="setCode" id="setCode" ng-model="product.fSetCode" maxlength="50">
</div>
</div>
<div class="form-group" style="margin-bottom:5px">
<label for="aliaSetCode" class="col-sm-3 control-label">关联产品</label>
<div class="col-sm-8 input-group">
<div class="dx-field-value" style="width:265px">
<div dx-drop-down-box="treeBoxOptions">
<div data-options="dxTemplate: { name: 'content' }">
<div dx-tree-view="treeBoxOptions.treeView"></div>
</div>
</div>
</div>
</div>
</div>
<div class="form-group" style="margin-bottom:5px">
<label for="setName" class="col-sm-3 control-label">产品描述</label>
<div class="col-sm-8 input-group">
<input class="form-control" name="setName" id="setName" ng-model="product.fSetName" maxlength="50">
</div>
</div>
<div class="form-group" style="margin-bottom:5px">
<label for="manager" class="col-sm-3 control-label">财务主管</label>
<div class="col-sm-8 input-group">
<input class="form-control" name="manager" id="manager" ng-model="product.fManager" maxlength="50">
</div>
</div>
<div class="form-group" style="margin-bottom:5px">
<label for="startDate" class="col-sm-3 control-label">启用日期</label>
<div class="overview-picker">
<input type="text" id="productStartDate" class="datepicker vat-subheader" style="width:200px;" readonly="readonly" />
<i class="fa fa-calendar vat-subheader red-color" style="width:20px;"></i>
</div>
</div>
</form>
</div> </div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-third" data-dismiss="modal" ng-click="cancel()">{{'Cancel' | translate }}</button>
</div> </div>
</script> </script>
</div> </div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment