|
|
@@ -152,6 +152,7 @@ define([ 'app/app' ], function(app) {
|
|
|
//发票信息
|
|
|
$scope.invoiceData = {};
|
|
|
|
|
|
+ $scope.orderIdArr = [];
|
|
|
// 数据处理
|
|
|
$scope.dealData = function () {
|
|
|
var submitItem = submitInvoice;
|
|
|
@@ -159,6 +160,7 @@ define([ 'app/app' ], function(app) {
|
|
|
var tmpPriceArr = [];
|
|
|
angular.forEach(submitItem, function (item) {
|
|
|
var index = temStoreIdArr.indexOf(item.storeid);
|
|
|
+ $scope.orderIdArr.push(item.orderid);
|
|
|
if (index == -1) {
|
|
|
temStoreIdArr.push(item.storeid);
|
|
|
tmpPriceArr.push({price: item.price, storeName: item.storeName, orderid: item.orderid});
|
|
|
@@ -218,12 +220,12 @@ define([ 'app/app' ], function(app) {
|
|
|
|
|
|
//提交申请
|
|
|
$scope.apply = function () {
|
|
|
- var orderids = '';
|
|
|
+ /* var orderids = '';
|
|
|
angular.forEach($scope.submitInvoice, function (item) {
|
|
|
orderids += item.orderid + ',';
|
|
|
})
|
|
|
- orderids = orderids.substring(0, orderids.length-1)
|
|
|
- BillSubmit.submitBillApply(null, {orderids: orderids, invoiceid: $scope.invoiceData.id}, function (data) {
|
|
|
+ orderids = orderids.substring(0, orderids.length-1)*/
|
|
|
+ BillSubmit.submitBillApply(null, {orderids: $scope.orderIdArr.join(','), invoiceid: $scope.invoiceData.id}, function (data) {
|
|
|
toaster.pop('success', '申请发票成功');
|
|
|
$scope.closeModal();
|
|
|
$state.reload();
|