|
|
@@ -2,7 +2,8 @@ define([ 'app/app' ], function(app) {
|
|
|
//品牌审批
|
|
|
app.register.controller('AuditRegulpicListCtrl', ['$scope', '$modal', 'BaseService', 'toaster', 'ngTableParams', 'StoreAdminListInformation',
|
|
|
function ($scope, $modal, BaseService, toaster, ngTableParams, StoreAdminListInformation) {
|
|
|
- $scope.storeStatus = 'all'
|
|
|
+ $scope.storeStatus = 'all';
|
|
|
+ $scope.keyword = ''
|
|
|
$scope.storeTableParams = new ngTableParams({
|
|
|
page : 1,
|
|
|
count : 10
|
|
|
@@ -94,12 +95,18 @@ define([ 'app/app' ], function(app) {
|
|
|
* 审核通过 回调
|
|
|
*/
|
|
|
function passAudit(data, item) {
|
|
|
+ console.log(data)
|
|
|
// 是否需要打开规格书选择项
|
|
|
- if (data.mallAttach !== '') {
|
|
|
- openRegulChooseModal(data, item).then(function (reason) {
|
|
|
- // 刷新页面
|
|
|
- $scope.storeTableParams.page(1);
|
|
|
- $scope.storeTableParams.reload();
|
|
|
+ if (data.code === 1) {
|
|
|
+ openRegulChooseModal(data, item).then(function (data) {
|
|
|
+ if (data.success) {
|
|
|
+ toaster.pop('success', '操作成功')
|
|
|
+ // 刷新页面
|
|
|
+ $scope.storeTableParams.page(1);
|
|
|
+ $scope.storeTableParams.reload();
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
}, function (error) {
|
|
|
console.log(error);
|
|
|
});
|
|
|
@@ -307,19 +314,13 @@ define([ 'app/app' ], function(app) {
|
|
|
* 保存不通过原因
|
|
|
*/
|
|
|
function saveReason() {
|
|
|
- // if (!$scope.reason || $scope.reason === '') {
|
|
|
- // toaster.pop('error', '请填写审核不通过原因');
|
|
|
- // return ;
|
|
|
- // }
|
|
|
- // 请求保存规格书接口
|
|
|
- // alert($scope.checked)
|
|
|
var chooseAttach = ''
|
|
|
if ($scope.checked === 'store') {
|
|
|
- chooseAttach = responseData.mallAttach
|
|
|
+ chooseAttach = responseData.data.mallAttach
|
|
|
} else {
|
|
|
- chooseAttach = item.uploadAttach
|
|
|
+ chooseAttach = responseData.data.uploadAttach
|
|
|
}
|
|
|
- StoreAdminListInformation.chooseAttach({}, {chooseAttach: chooseAttach, submit: responseData}, function(data) {
|
|
|
+ StoreAdminListInformation.chooseAttach({}, {chooseAttach: chooseAttach, submit: item}, function(data) {
|
|
|
$modalInstance.close(data);
|
|
|
})
|
|
|
|