|
@@ -1,56 +1,57 @@
|
|
|
-;
|
|
|
-var operationPage = new Vue({
|
|
|
- el: "#operationPage",
|
|
|
- mixins: [cmSysVitaMixins],
|
|
|
- data: {
|
|
|
- loginLoading: false,
|
|
|
- userId: 0,
|
|
|
- addForm: {
|
|
|
- mobile: '',
|
|
|
- linkName: '',
|
|
|
- userId: '',
|
|
|
- shopId: '',
|
|
|
- configFlag: 2
|
|
|
- },
|
|
|
- rule: {
|
|
|
- name: '^[a-zA-Z\\u4e00-\\u9fa5]{2,}$',
|
|
|
- phone: '^\\d{6,12}$'
|
|
|
- }
|
|
|
- },
|
|
|
- computed: {
|
|
|
-
|
|
|
- },
|
|
|
- methods: {
|
|
|
- addConfirmFn:function(data){//添加运营人员
|
|
|
- var _self = this;
|
|
|
- var pass = verifyForm();
|
|
|
- if (_self.loginLoading) { return false; }
|
|
|
- if (!pass) {return false;}
|
|
|
- _self.loginLoading = true;
|
|
|
- UserApi.AddOperationUse(_self.addForm,function (response) {
|
|
|
- if(response.code == 0 ){ //删除成功
|
|
|
- CAIMEI.dialog('添加成功',true,function () {
|
|
|
- window.location.href='/supplier/operation/list.html';
|
|
|
- _self.loginLoading = false;
|
|
|
- });
|
|
|
- }else{
|
|
|
- CAIMEI.Alert(response.msg,'确定',false);
|
|
|
- _self.loginLoading = false;
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- blurHandle: function(event) { // 失去焦点校验
|
|
|
- var el = event.currentTarget;
|
|
|
- verifyHandle(el);
|
|
|
- }
|
|
|
- },
|
|
|
- mounted: function () {
|
|
|
- if(globalUserData){
|
|
|
- this.addForm.userId = globalUserData.userId;
|
|
|
- this.addForm.shopId = globalUserData.shopId;
|
|
|
- }
|
|
|
- $('.navLayout').find('.navList').removeClass("on").find('.con').hide().find('a').removeClass("on");
|
|
|
- $('.navLayout').find('.navList').eq(1).addClass("on").find('.con').show().find('a').eq(1).addClass("on");
|
|
|
-
|
|
|
- }
|
|
|
-});
|
|
|
+;
|
|
|
+var operationPage = new Vue({
|
|
|
+ el: "#operationPage",
|
|
|
+ mixins: [cmSysVitaMixins],
|
|
|
+ data: {
|
|
|
+ loginLoading: false,
|
|
|
+ userId: 0,
|
|
|
+ addForm: {
|
|
|
+ mobile: '',
|
|
|
+ linkName: '',
|
|
|
+ userId: '',
|
|
|
+ shopId: '',
|
|
|
+ configFlag: 2
|
|
|
+ },
|
|
|
+ rule: {
|
|
|
+ name: '^[a-zA-Z\\u4e00-\\u9fa5]{2,}$',
|
|
|
+ phone: '^\\d{6,12}$'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ addConfirmFn:function(data){//添加运营人员
|
|
|
+ var _self = this;
|
|
|
+ var pass = verifyForm();
|
|
|
+ if (_self.loginLoading) { return false; }
|
|
|
+ if (!pass) {return false;}
|
|
|
+ _self.loginLoading = true;
|
|
|
+ UserApi.AddOperationUse(_self.addForm,function (response) {
|
|
|
+ if(response.code == 0 ){ //删除成功
|
|
|
+ CAIMEI.dialog('添加成功',true,function () {
|
|
|
+ window.location.href='/supplier/operation/list.html';
|
|
|
+ _self.loginLoading = false;
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ CAIMEI.Alert(response.msg,'确定',false);
|
|
|
+ _self.loginLoading = false;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ blurHandle: function(event) { // 失去焦点校验
|
|
|
+ var el = event.currentTarget;
|
|
|
+ verifyHandle(el);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted: function () {
|
|
|
+ if(globalUserData){
|
|
|
+ this.addForm.userId = globalUserData.userId;
|
|
|
+ this.addForm.shopId = globalUserData.shopId;
|
|
|
+ }
|
|
|
+ setTimeout(()=>{
|
|
|
+ $('.navLayout').find('.navList').removeClass("on").find('.con').hide().find('a').removeClass("on");
|
|
|
+ $('.navLayout').find('.navList').eq(1).addClass("on").find('.con').show().find('a').eq(1).addClass("on");
|
|
|
+ },200)
|
|
|
+ }
|
|
|
+});
|