diff --git a/public/components/scm/configSupplier/configSupplier.html b/public/components/scm/configSupplier/configSupplier.html new file mode 100644 index 000000000..cb3adfc0d --- /dev/null +++ b/public/components/scm/configSupplier/configSupplier.html @@ -0,0 +1,39 @@ +
\ No newline at end of file diff --git a/public/components/scm/configSupplier/configSupplier.js b/public/components/scm/configSupplier/configSupplier.js new file mode 100644 index 000000000..cb9284aba --- /dev/null +++ b/public/components/scm/configSupplier/configSupplier.js @@ -0,0 +1,77 @@ +(function (vc) { + + vc.extends({ + data: { + configSupplierInfo: { + supplierId: '', + configs:[] + + } + }, + _initMethod: function () { + }, + _initEvent: function () { + vc.on('configSupplier', 'openConfigModal', function (_param) { + vc.copyObject(_param,$that.configSupplierInfo); + $('#configSupplierModel').modal('show'); + $that._loadSupplierConfigs(); + }); + }, + methods: { + saveConfigSupplierInfo: function () { + + + vc.http.apiPost( + '/supplierType.saveSupplierConfig', + JSON.stringify(vc.component.configSupplierInfo), + { + emulateJSON: true + }, + function (json, res) { + //vm.menus = vm.refreshMenuActive(JSON.parse(json),0); + let _json = JSON.parse(json); + if (_json.code == 0) { + //关闭model + $('#configSupplierModel').modal('hide'); + vc.component.clearConfigtSupplierInfo(); + return; + } + vc.toast(_json.msg); + }, + function (errInfo, error) { + console.log('请求失败处理'); + vc.toast(errInfo); + }); + }, + clearConfigtSupplierInfo: function () { + vc.component.configSupplierInfo = { + supplierId: '', + configs:[] + }; + }, + _loadSupplierConfigs:function(){ + if(!$that.configSupplierInfo.supplierId){ + return; + } + let _param = { + params:{ + supplierId:$that.configSupplierInfo.supplierId, + page:1, + row:100 + } + } + //发送get请求 + vc.http.apiGet('/supplierType.listSupplierConfig', + _param, + function (json, res) { + let _marketSmsManageInfo = JSON.parse(json); + $that.configSupplierInfo.configs = _marketSmsManageInfo.data; + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + } + } + }); + +})(window.vc); diff --git a/public/pages/scm/supplierManage/supplierManage.html b/public/pages/scm/supplierManage/supplierManage.html index f2769497e..fa8b3afa8 100644 --- a/public/pages/scm/supplierManage/supplierManage.html +++ b/public/pages/scm/supplierManage/supplierManage.html @@ -132,6 +132,13 @@