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.7 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["package1/staff/addStaff"],{"0eee":function(e,t,n){"use strict";(function(e,t){var u=n("47a9");n("7859");u(n("3240"));var r=u(n("43d6"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"346c":function(e,t,n){"use strict";var u=n("9357"),r=n.n(u);r.a},"43d6":function(e,t,n){"use strict";n.r(t);var u=n("e6ed"),r=n("df04");for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);n("346c");var i=n("828b"),o=Object(i["a"])(r["default"],u["b"],u["c"],!1,null,"4e98a883",null,!1,u["a"],void 0);t["default"]=o.exports},"831e":function(e,t,n){"use strict";(function(e){var u=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=u(n("7eb4")),a=u(n("ee10")),i={data:function(){return{addForm:{nickname:"",mobile:"",type:[],password:"123456",warehouseKeeperFlag:0},username:"",id:"",type:"",typeList:[{value:0,text:"管理员"},{value:1,text:"员工"}],wareList:[{value:0,text:"否"},{value:1,text:"是"}],rules:{nickname:{rules:[{required:!0,errorMessage:"不能为空"}]},mobile:{rules:[{required:!0,errorMessage:"不能为空"}]},type:{rules:[{required:!0,errorMessage:"不能为空"}]}}}},onLoad:function(t){var n=t.type,u=JSON.parse(t.item);this.type=t.type,"edit"===n&&(this.addForm.nickname=u.nickname,this.addForm.mobile=u.mobile,this.addForm.warehouseKeeperFlag=Number(u.warehouseKeeperFlag),this.addForm.type=Number(u.type),this.id=u.id),e.setNavigationBarTitle({title:"add"===n?"新增员工":"编辑信息"})},methods:{onFormSubmit:function(){var t=this;this.addForm.type.length<1||(this.addForm.type=JSON.stringify(this.addForm.type),this.$refs.addForm.validate().then((0,a.default)(r.default.mark((function n(){var u,a;return r.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return"edit"==t.type?(u="/app/common/user/edit",t.addForm.username=t.addForm.mobile,t.addForm.id=t.id):u="/app/common/user/add",n.next=3,t.tui.request(u,"post",t.addForm,!1,!0,!1);case 3:a=n.sent,200==a.code?(e.navigateBack(),t.addForm.mobile==e.getStorageSync("username")&&e.setStorageSync("warehouseKeeperFlag",t.addForm.warehouseKeeperFlag)):t.tui.toast(a.message);case 5:case"end":return n.stop()}}),n)}))),(function(e){})))},deleteSubmit:function(){var t=[];t.push(this.id),this.tui.request("/app/common/user/delByIds","POST",{ids:t},!1,!0).then((function(t){e.navigateBack()})).catch((function(e){}))}}};t.default=i}).call(this,n("df3c")["default"])},9357:function(e,t,n){},df04:function(e,t,n){"use strict";n.r(t);var u=n("831e"),r=n.n(u);for(var a in u)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return u[e]}))}(a);t["default"]=r.a},e6ed:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return u}));var u={uniForms:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-forms/components/uni-forms/uni-forms")]).then(n.bind(null,"ac36"))},uniFormsItem:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-forms/components/uni-forms-item/uni-forms-item")]).then(n.bind(null,"b258"))},uniEasyinput:function(){return n.e("uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput").then(n.bind(null,"5fa6"))},uniDataSelect:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-data-select/components/uni-data-select/uni-data-select")]).then(n.bind(null,"90dc"))},uButton:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-button/u-button")]).then(n.bind(null,"e681"))}},r=function(){var e=this.$createElement;this._self._c},a=[]}},[["0eee","common/runtime","common/vendor"]]]);