You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
3.8 KiB
1 lines
3.8 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/staff/addStaff/addStaff"],{"0a94":function(e,n,t){"use strict";(function(e){var r=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u=r(t("2eee")),o=r(t("c973")),i={data:function(){return{addForm:{username:"",password:"",nickname:"",mobile:"",type:"",sex:"",avatar:[],shopId:"",email:""},typeList:[{value:0,text:"普通用户"},{value:1,text:"管理员"}],sexList:[{value:"男",text:"男"},{value:"女",text:"女"}],shopList:[],rules:{username:{rules:[{required:!0,errorMessage:"不能为空"}]},password:{rules:[{required:!0,errorMessage:"不能为空"}]},nickname:{rules:[{required:!0,errorMessage:"不能为空"}]},mobile:{rules:[{required:!0,errorMessage:"不能为空"}]},shopId:{rules:[{required:!0,errorMessage:"不能为空"}]},type:{rules:[{required:!0,errorMessage:"不能为空"}]}}}},onLoad:function(n){var t=n.type;if("edit"===t){var r=this.$store.getters.editStaffInfo;console.log("editStaffInfo",r),Object.assign(this.addForm,r)}e.setNavigationBarTitle({title:"add"===t?"新增员工":"编辑信息"}),this.getShopList()},methods:{getShopList:function(){var n=this;this.tui.request("/app/common/shops","get",{},!1,!0,!1).then((function(t){if(200!==t.code)return e.showToast({title:t.message,icon:"none"});n.shopList=t.result.map((function(e){return{text:e.shopName,value:e.id}}))}))},onFormSubmit:function(){var n=this;console.log("submit"),this.$refs.addForm.validate().then((0,o.default)(u.default.mark((function t(){var r;return u.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,n.tui.request("/app/common/user/add","post",n.addForm,!1,!0,!1);case 2:if(r=t.sent,200===r.code){t.next=5;break}return t.abrupt("return");case 5:e.navigateBack(),console.log(r);case 7:case"end":return t.stop()}}),t)}))),(function(e){console.log(e)}))}}};n.default=i}).call(this,t("543d")["default"])},"2f9d":function(e,n,t){"use strict";t.d(n,"b",(function(){return u})),t.d(n,"c",(function(){return o})),t.d(n,"a",(function(){return r}));var r={uniForms:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(t.bind(null,"a44d"))},uniFormsItem:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item")]).then(t.bind(null,"8f97"))},uniEasyinput:function(){return t.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(t.bind(null,"02c7"))},uniDataSelect:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-data-select/components/uni-data-select/uni-data-select")]).then(t.bind(null,"7331"))},uniFilePicker:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker")]).then(t.bind(null,"403e"))},uButton:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-button/u-button")]).then(t.bind(null,"a94e"))}},u=function(){var e=this.$createElement;this._self._c},o=[]},"81b6":function(e,n,t){"use strict";t.r(n);var r=t("2f9d"),u=t("fec5");for(var o in u)["default"].indexOf(o)<0&&function(e){t.d(n,e,(function(){return u[e]}))}(o);t("bb1b");var i=t("f0c5"),a=Object(i["a"])(u["default"],r["b"],r["c"],!1,null,"e5d83eea",null,!1,r["a"],void 0);n["default"]=a.exports},"898c":function(e,n,t){},bb1b:function(e,n,t){"use strict";var r=t("898c"),u=t.n(r);u.a},c352:function(e,n,t){"use strict";(function(e,n){var r=t("4ea4");t("c8e4");r(t("66fd"));var u=r(t("81b6"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(u.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},fec5:function(e,n,t){"use strict";t.r(n);var r=t("0a94"),u=t.n(r);for(var o in r)["default"].indexOf(o)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(o);n["default"]=u.a}},[["c352","common/runtime","common/vendor"]]]);
|