Commit 24654464 by fairyly

fix: 修改部门接口

parent 910f1369
<!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.24.css><link href=./static/css/app.e0edf499551ee52551a4ff7e4cdde824.css rel=stylesheet></head><body style="min-width: 1400px;" class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.79f4892db42c4afbaf43.js></script><script type=text/javascript src=./static/js/vendor.2cff6c68669f76f7bb26.js></script><script type=text/javascript src=./static/js/app.4ad545414a2bd6f8aef7.js></script></body></html> <!DOCTYPE html><html><head><meta charset=utf-8><link rel="shortcut icon" href=./favicon.ico><title>好办管理平台</title><link rel=stylesheet type=text/css href=//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.24.css><link href=./static/css/app.fbf833bbfc0591a1f4749db1f8152915.css rel=stylesheet></head><body style="min-width: 1400px;" class=damolish><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.04.js></script><script>// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();</script><script type=text/javascript src=./static/js/manifest.c14d68a259b29570cf8b.js></script><script type=text/javascript src=./static/js/vendor.2cff6c68669f76f7bb26.js></script><script type=text/javascript src=./static/js/app.4ad545414a2bd6f8aef7.js></script></body></html>
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([12],{JARP:function(t,e){},Z3Aa:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("3E4D"),r=a("Ch4/"),n=a("PI0u"),o=a("P9l9"),i={name:"app-detail",props:{brandId:{type:String,default:function(){return""}},tabType:{type:String,default:function(){return"1"}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",wxEnterpriseRelatedId:JSON.parse(localStorage.getItem("userInfo")).wxEnterpriseId,myCustomData:{searchFlag:!1},activeId:"1"}},methods:{submit:Object(n.a)(function(t){this.setData(t)},500),setData:function(t){var e=this,a={wxEnterpriseRelatedId:e.wxEnterpriseRelatedId},n=void 0;"showFlag"!=t&&(a[t]=e.myCustomData[t]?1:0,n="/haoban-app-customer-web/customer/save-online-chat-setting","searchFlag"===t&&(n="/haoban-app-customer-web/customer/save-customer-setting")),Object(o.b)(n,a).then(function(t){var e=t.data;1!=e.errorCode?r.a.errorMsg(e):s.a.showmsg("保存成功","success")}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},changeAllowGuide:function(t){this.myCustomData.allowGuideMobile=t,this.myCustomData.allowGuideMessage=t,this.myCustomData.allowGuideOnlineChat=t},changeContact:function(){this.myCustomData.allowGuideMobile||this.myCustomData.allowGuideMessage||this.myCustomData.allowGuideOnlineChat||(this.myCustomData.allowGuideContact=!1)},getCustomerSet:function(t){var e=this,a={wxEnterpriseRelatedId:e.wxEnterpriseRelatedId};Object(o.b)("/haoban-app-customer-web/customer/find-customer-setting",a).then(function(t){var a=t.data;1!=a.errorCode?r.a.errorMsg(a):a.result&&(e.myCustomData.searchFlag=!!a.result.searchFlag)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{},mounted:function(){this.$emit("showTab","13"),this.getCustomerSet(this.brandId)},components:{}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"app-detail-pane border-box p-20"},[a("el-checkbox",{model:{value:t.myCustomData.searchFlag,callback:function(e){t.$set(t.myCustomData,"searchFlag",e)},expression:"myCustomData.searchFlag"}},[t._v("允许全品牌搜索")]),t._v(" "),a("div",{staticClass:"m-t-46"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submit("searchFlag")}}},[t._v("保 存")])],1)],1)])},staticRenderFns:[]};var c=a("VU/8")(i,u,!1,function(t){a("JARP")},"data-v-5eaead02",null);e.default=c.exports}}); webpackJsonp([12],{JARP:function(t,e){},Z3Aa:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("3E4D"),r=a("Ch4/"),n=a("PI0u"),o=a("P9l9"),i={name:"app-detail",props:{brandId:{type:String,default:function(){return""}},tabType:{type:String,default:function(){return"1"}},activeGroupId:{type:String,default:function(){return""}}},data:function(){return{projectName:"",wxEnterpriseRelatedId:JSON.parse(localStorage.getItem("userInfo")).wxEnterpriseId,myCustomData:{searchFlag:!1},activeId:"1"}},methods:{submit:Object(n.a)(function(t){this.setData(t)},500),setData:function(t){var e=this,a={wxEnterpriseRelatedId:e.wxEnterpriseRelatedId},n=void 0;"showFlag"!=t&&(a[t]=e.myCustomData[t]?1:0,n="/haoban-app-customer-web/customer/save-online-chat-setting","searchFlag"===t&&(n="/haoban-app-customer-web/customer/save-customer-setting")),Object(o.c)(n,a).then(function(t){var e=t.data;1!=e.errorCode?r.a.errorMsg(e):s.a.showmsg("保存成功","success")}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})},changeAllowGuide:function(t){this.myCustomData.allowGuideMobile=t,this.myCustomData.allowGuideMessage=t,this.myCustomData.allowGuideOnlineChat=t},changeContact:function(){this.myCustomData.allowGuideMobile||this.myCustomData.allowGuideMessage||this.myCustomData.allowGuideOnlineChat||(this.myCustomData.allowGuideContact=!1)},getCustomerSet:function(t){var e=this,a={wxEnterpriseRelatedId:e.wxEnterpriseRelatedId};Object(o.c)("/haoban-app-customer-web/customer/find-customer-setting",a).then(function(t){var a=t.data;1!=a.errorCode?r.a.errorMsg(a):a.result&&(e.myCustomData.searchFlag=!!a.result.searchFlag)}).catch(function(t){e.$message.error({duration:1e3,message:t.message})})}},watch:{},mounted:function(){this.$emit("showTab","13"),this.getCustomerSet(this.brandId)},components:{}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"app-detail-wrap"},[a("div",{staticClass:"app-detail-pane border-box p-20"},[a("el-checkbox",{model:{value:t.myCustomData.searchFlag,callback:function(e){t.$set(t.myCustomData,"searchFlag",e)},expression:"myCustomData.searchFlag"}},[t._v("允许全品牌搜索")]),t._v(" "),a("div",{staticClass:"m-t-46"},[a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submit("searchFlag")}}},[t._v("保 存")])],1)],1)])},staticRenderFns:[]};var c=a("VU/8")(i,u,!1,function(t){a("JARP")},"data-v-5eaead02",null);e.default=c.exports}});
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,o){for(var f,d,i,u=0,b=[];u<r.length;u++)d=r[u],t[d]&&b.push(t[d][0]),t[d]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,o);b.length;)b.shift()();if(o)for(u=0;u<o.length;u++)i=a(a.s=o[u]);return i};var r={},t={21:0};function a(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,a){n=t[e]=[r,a]});n[2]=r;var c=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,a.nc&&o.setAttribute("nonce",a.nc),o.src=a.p+"static/js/"+e+"."+{0:"dd15fc8f789c4a23939c",1:"9a1776fdc262362d75b8",2:"53aaff1d88a8c5a7d818",3:"20d1761e07019549d17c",4:"397d2b5066a8e689096c",5:"afc7b726a46486df899a",6:"9e12ea68528f2ad5f9a5",7:"4c95fe66c59573d7da03",8:"c2a3c1c2b9ffb4687826",9:"4b8efecc95608bc88200",10:"9c5ebbe659b7a663ddb3",11:"29941951e052f4942eca",12:"c95e6e2e763aa2d73679",13:"610798bb673465353c40",14:"5d02db8ed545dbc606d9",15:"b2964c8a20328a2a5e5f",16:"188fa59e318626239ae8",17:"51b70d6c25a1be5ec7ba",18:"b918fbf8403d96eac90a"}[e]+".js";var f=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return o.onerror=o.onload=d,c.appendChild(o),r},a.m=e,a.c=r,a.d=function(e,n,r){a.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},a.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(n,"a",n),n},a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},a.p="./",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,o,c){for(var f,d,i,u=0,b=[];u<r.length;u++)d=r[u],a[d]&&b.push(a[d][0]),a[d]=0;for(f in o)Object.prototype.hasOwnProperty.call(o,f)&&(e[f]=o[f]);for(n&&n(r,o,c);b.length;)b.shift()();if(c)for(u=0;u<c.length;u++)i=t(t.s=c[u]);return i};var r={},a={21:0};function t(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,t),a.l=!0,a.exports}t.e=function(e){var n=a[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,t){n=a[e]=[r,t]});n[2]=r;var o=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.timeout=12e4,t.nc&&c.setAttribute("nonce",t.nc),c.src=t.p+"static/js/"+e+"."+{0:"1d32d63fa419a4b86bba",1:"9a1776fdc262362d75b8",2:"4f6028dc180eb7d4593d",3:"20599248eac439adeae8",4:"59cbb98ef3301b7d1be0",5:"afc7b726a46486df899a",6:"9e12ea68528f2ad5f9a5",7:"4c95fe66c59573d7da03",8:"c2a3c1c2b9ffb4687826",9:"4b8efecc95608bc88200",10:"ac7009c4a56552235c6f",11:"cdcdaabe8dd05b754b5f",12:"2bf38ff033ad1f7a922b",13:"b13f744cd55ac3168789",14:"840b162a636493a5d4f9",15:"b2964c8a20328a2a5e5f",16:"188fa59e318626239ae8",17:"17423916aa77b50f2ee3",18:"b918fbf8403d96eac90a"}[e]+".js";var f=setTimeout(d,12e4);function d(){c.onerror=c.onload=null,clearTimeout(f);var n=a[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),a[e]=void 0)}return c.onerror=c.onload=d,o.appendChild(c),r},t.m=e,t.c=r,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="./",t.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @version: 1.0.0 * @version: 1.0.0
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-07-03 18:50:33 * @Date: 2019-07-03 18:50:33
* @LastEditors: 无尘 * @LastEditors : 无尘
* @LastEditTime: 2019-09-25 17:14:56 * @LastEditTime : 2020-02-21 11:28:01
--> -->
<!-- <!--
限制输入框组件 限制输入框组件
...@@ -83,7 +83,7 @@ export default { ...@@ -83,7 +83,7 @@ export default {
toInput: function(e) { toInput: function(e) {
const that = this; const that = this;
let temp = ''; let temp = '';
that.itemValue = e.target.value.replace(/[^0-9]/gi, '') that.itemValue = e.target.value.replace(/[^0-9]/gi, '');
that.$emit('input', that.itemValue); that.$emit('input', that.itemValue);
}, },
inputBlur() { inputBlur() {
...@@ -92,14 +92,14 @@ export default { ...@@ -92,14 +92,14 @@ export default {
}, },
getNationalData() { getNationalData() {
let that = this; let that = this;
postRequest('/haoban-manage-web/nationcode/get-nationcode-list', {}) postRequest('/haoban-manage3-web/nationcode/get-nationcode-list', {})
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
let arr = []; let arr = [];
resData.result.forEach(ele => { resData.result.forEach(ele => {
arr = arr.concat(ele.datas); arr = arr.concat(ele.datas);
}) });
that.nationCodeList = arr; that.nationCodeList = arr;
return; return;
} }
...@@ -121,7 +121,7 @@ export default { ...@@ -121,7 +121,7 @@ export default {
nationCode: function(newData, oldData) { nationCode: function(newData, oldData) {
const that = this; const that = this;
that.selCode = newData || '86'; that.selCode = newData || '86';
}, }
}, },
/* 接收数据 */ /* 接收数据 */
mounted() { mounted() {
...@@ -156,17 +156,16 @@ export default { ...@@ -156,17 +156,16 @@ export default {
background-color: rgba(255, 255, 255, 0.1); background-color: rgba(255, 255, 255, 0.1);
} }
} }
.el-input { .el-input {
/deep/ .el-input__inner { /deep/ .el-input__inner {
font-size: 14px; font-size: 14px;
color: #606266; color: #606266;
background-color: rgba(255, 255, 255, 0.1); background-color: rgba(255, 255, 255, 0.1);
} }
&.is-disabled { &.is-disabled {
opacity: 0.5; opacity: 0.5;
} }
.is-disabled { .is-disabled {
/deep/ .el-input__inner { /deep/ .el-input__inner {
font-size: 14px; font-size: 14px;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<el-dialog width="600px" :title="'新增子部门'" :visible.sync="departVisible" append-to-body :before-close="handleClose"> <el-dialog width="600px" :title="'新增子部门'" :visible.sync="departVisible" append-to-body :before-close="handleClose">
<el-form :model="partForm" :rules="rules" ref="form" label-width="100px" class="dialog-form"> <el-form :model="partForm" :rules="rules" ref="form" label-width="100px" class="dialog-form">
<el-form-item label="部门名称" prop="code"> <el-form-item label="部门名称" prop="code">
<limitInput :inputWidth="440" :inputValue.sync="partForm.departmentName" :getByType="char" :holder="'请输入姓名'" :maxLength="32"> </limitInput> <limitInput :inputWidth="440" :inputValue.sync="partForm.departmentName" :getByType="'char'" :holder="'请输入姓名'" :maxLength="32"> </limitInput>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author : 无尘 * @Author : 无尘
* @Date : 2020-02-13 16:13:59 * @Date : 2020-02-13 16:13:59
* @LastEditors : 无尘 * @LastEditors : 无尘
* @LastEditTime : 2020-02-17 11:30:35 * @LastEditTime : 2020-02-21 14:23:52
* @FilePath : \Hapi-demoj:\公司\haoban-3\src\components\company\add-member.vue * @FilePath : \Hapi-demoj:\公司\haoban-3\src\components\company\add-member.vue
--> -->
<!-- <!--
...@@ -17,37 +17,37 @@ ...@@ -17,37 +17,37 @@
<div class="add-title m-b-20 font-14 color-303133 font-w-500">基本信息</div> <div class="add-title m-b-20 font-14 color-303133 font-w-500">基本信息</div>
<el-form :model="partForm" :rules="rules" ref="form" label-width="100px" class="dialog-form"> <el-form :model="partForm" :rules="rules" ref="form" label-width="100px" class="dialog-form">
<el-form-item label="姓名" prop="staffName"> <el-form-item label="姓名" prop="staffName">
<limitInput :inputWidth="357" :inputValue.sync="partForm.staffName" :getByType="char" :holder="'请输入姓名'" :maxLength="12"> </limitInput> <limitInput :inputWidth="357" :inputValue.sync="partForm.staffName" :getByType="'char'" :holder="'请输入姓名'" :maxLength="12"> </limitInput>
</el-form-item> </el-form-item>
<el-form-item label="昵称"> <el-form-item label="昵称">
<limitInput :inputWidth="357" :inputValue.sync="partForm.nickName" :getByType="char" :holder="'请输入昵称'" :maxLength="12"> </limitInput> <limitInput :inputWidth="357" :inputValue.sync="partForm.nickName" :getByType="'char'" :holder="'请输入昵称'" :maxLength="12"> </limitInput>
</el-form-item> </el-form-item>
<el-form-item label="性别" prop="sex"> <el-form-item label="性别" prop="sex">
<el-radio v-model="partForm.sex" label="1"></el-radio> <el-radio v-model="partForm.sex" :label="1"></el-radio>
<el-radio v-model="partForm.sex" label="2"></el-radio> <el-radio v-model="partForm.sex" :label="2"></el-radio>
</el-form-item> </el-form-item>
<el-form-item label="手机号码" prop="phoneNumber"> <el-form-item label="手机号码" prop="phoneNumber">
<countryMobile :disflag="partForm.staffId ? true : false" :inputWidth="357" :nationCode.sync="partForm.nationcode" :limitClass="'limit-color'" v-model="partForm.phoneNumber" :holder="'请输入手机号码'"> </countryMobile> <countryMobile :disflag="partForm.staffId ? true : false" :inputWidth="357" :nationCode.sync="partForm.nationcode" :limitClass="'limit-color'" v-model="partForm.phoneNumber" :holder="'请输入手机号码'"> </countryMobile>
</el-form-item> </el-form-item>
<el-form-item label="部门" prop="department"> <el-form-item label="部门" prop="departmentList">
<select-department :selectData="partForm.department" @checkGroupIds="checkGroupIds"> </select-department> <select-department :selectData="partForm.departmentList" @checkGroupIds="checkGroupIds"> </select-department>
</el-form-item> </el-form-item>
<el-form-item label="职务" prop="postion"> <el-form-item label="职务" prop="postion">
<limitInput :inputWidth="357" :inputValue.sync="partForm.postion" :getByType="char" :holder="'请输入职务'" :maxLength="12"> </limitInput> <limitInput :inputWidth="357" :inputValue.sync="partForm.postion" :getByType="'char'" :holder="'请输入职务'" :maxLength="12"> </limitInput>
</el-form-item> </el-form-item>
<el-form-item v-if="partForm.staffId" label="激活状态"> <span class="span-dot"></span><span>未激活</span><el-button type="text" class="m-l-30">邀请</el-button> </el-form-item> <el-form-item v-if="partForm.staffId && partForm.activeFlag" label="激活状态"> <span class="span-dot"></span><span>未激活</span><el-button type="text" class="m-l-30">邀请</el-button> </el-form-item>
<div class="m-b-20 font-14 color-303133 font-w-500">对外信息</div> <div class="m-b-20 font-14 color-303133 font-w-500">对外信息</div>
<el-form-item label="职务" prop="extendPostion"> <el-form-item label="职务" prop="extendPostion">
<el-radio-group v-model="partForm.syncPostionFlag" @change="changeExtendPostion"> <el-radio-group v-model="partForm.syncPostionFlag" @change="changeExtendPostion">
<div style="line-height: 32px;"> <div style="line-height: 32px;">
<el-radio label="1">同步公司内职务</el-radio> <el-radio :label="1">同步公司内职务</el-radio>
</div> </div>
<div><el-radio label="2" class="m-r-10">自定义</el-radio><limitInput :inputWidth="285" :inputValue.sync="partForm.extendPostion" :getByType="char" :holder="'请输入职务'" :maxLength="12"> </limitInput></div> <div><el-radio :label="2" class="m-r-10">自定义</el-radio><limitInput :inputWidth="285" :inputValue.sync="partForm.extendPostion" :getByType="'char'" :holder="'请输入职务'" :maxLength="12"> </limitInput></div>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-checkbox v-model="checked" style="margin: -8px 24px 0 0;">通过邮件或短信发送企业邀请</el-checkbox <el-checkbox v-model="partForm.activeFlag" style="margin: -8px 24px 0 0;">通过邮件或短信发送企业邀请</el-checkbox
><!-- <span class="font-14 color-606266">通过邮件或短信发送企业邀请</span> --> ><!-- <span class="font-14 color-606266">通过邮件或短信发送企业邀请</span> -->
<el-button @click="cancel('form')">取消</el-button> <el-button @click="cancel('form')">取消</el-button>
<el-button v-if="!partForm.staffId" type="primary" @click="submitForm('form')">新建</el-button> <el-button v-if="!partForm.staffId" type="primary" @click="submitForm('form')">新建</el-button>
...@@ -100,11 +100,11 @@ export default { ...@@ -100,11 +100,11 @@ export default {
nationCode: '86', nationCode: '86',
phoneNumber: '', phoneNumber: '',
postion: '', postion: '',
activeFlag: 0, activeFlag: false,
department: [], departmentList: [],
departmentIds: '', departmentIds: '',
sex: '1', sex: 1,
syncPostionFlag: '1', syncPostionFlag: 1,
extendPostion: '' extendPostion: ''
}, },
rules: { rules: {
...@@ -119,10 +119,10 @@ export default { ...@@ -119,10 +119,10 @@ export default {
{ {
required: true, required: true,
validator: checkPhone, validator: checkPhone,
trigger: 'change' trigger: 'blur'
} }
], ],
department: [ departmentList: [
{ {
type: 'array', type: 'array',
required: true, required: true,
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
*/ */
checkGroupIds: function(nodes) { checkGroupIds: function(nodes) {
const that = this; const that = this;
that.partForm.departmentIds = nodes; that.partForm.departmentList = nodes;
}, },
/** /**
* 改变对外职务 * 改变对外职务
...@@ -158,15 +158,13 @@ export default { ...@@ -158,15 +158,13 @@ export default {
handleClose(done) { handleClose(done) {
const that = this; const that = this;
that.$refs['form'].resetFields(); that.$refs['form'].resetFields();
that.partVisible = false;
done(); done();
that.$emit('refreshData'); that.$emit('refreshData', 'close');
}, },
cancel() { cancel() {
const that = this; const that = this;
that.$refs['form'].resetFields(); that.$refs['form'].resetFields();
that.partVisible = false; that.$emit('refreshData', 'close');
that.$emit('refreshData');
}, },
/** /**
* 确定保存 * 确定保存
...@@ -183,6 +181,9 @@ export default { ...@@ -183,6 +181,9 @@ export default {
}, },
toAddPost() { toAddPost() {
const that = this; const that = this;
if (that.partForm.syncPostionFlag == 1) {
that.partForm.extendPostion = that.partForm.postion;
}
let params = { let params = {
staffId: that.partForm.staffId, staffId: that.partForm.staffId,
staffName: that.partForm.staffName, staffName: that.partForm.staffName,
...@@ -190,10 +191,10 @@ export default { ...@@ -190,10 +191,10 @@ export default {
sex: that.partForm.sex, sex: that.partForm.sex,
nationCode: that.partForm.nationCode, nationCode: that.partForm.nationCode,
phoneNumber: that.partForm.phoneNumber, phoneNumber: that.partForm.phoneNumber,
departmentIds: that.partForm.departmentIds, departmentIds: that.partForm.departmentList.map(ele => ele.departmentId).join(','),
postion: that.partForm.postion, postion: that.partForm.postion,
extendPostion: that.partForm.extendPostion, extendPostion: that.partForm.extendPostion,
activeFlag: that.partForm.activeFlag, activeFlag: that.partForm.activeFlag ? 1 : 0,
syncPostionFlag: that.partForm.syncPostionFlag syncPostionFlag: that.partForm.syncPostionFlag
}; };
postRequest(that.partForm.staffId ? '/haoban-manage3-web/staff-edit' : '/haoban-manage3-web/staff-add', params) postRequest(that.partForm.staffId ? '/haoban-manage3-web/staff-edit' : '/haoban-manage3-web/staff-add', params)
...@@ -220,10 +221,11 @@ export default { ...@@ -220,10 +221,11 @@ export default {
let params = { let params = {
staffId: that.partForm.staffId staffId: that.partForm.staffId
}; };
getRequest('/haoban-manage3-web/staff-add', params) getRequest('/haoban-manage3-web/staff-sel', params)
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
resData.result.activeFlag = resData.result.activeFlag == 0 ? false : true;
that.partForm = resData.result; that.partForm = resData.result;
return false; return false;
} }
...@@ -242,6 +244,7 @@ export default { ...@@ -242,6 +244,7 @@ export default {
const that = this; const that = this;
if (Object.keys(newData).length) { if (Object.keys(newData).length) {
that.partForm = newData; that.partForm = newData;
that.getData();
} }
} }
}, },
...@@ -249,6 +252,7 @@ export default { ...@@ -249,6 +252,7 @@ export default {
const that = this; const that = this;
if (Object.keys(that.memberObj).length) { if (Object.keys(that.memberObj).length) {
that.partForm = that.memberObj; that.partForm = that.memberObj;
that.getData();
} }
} }
}; };
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author : 无尘 * @Author : 无尘
* @Date : 2020-02-13 14:02:22 * @Date : 2020-02-13 14:02:22
* @LastEditors : 无尘 * @LastEditors : 无尘
* @LastEditTime : 2020-02-20 20:58:21 * @LastEditTime : 2020-02-21 10:50:36
* @FilePath : \Hapi-demoj:\公司\haoban-3\src\components\company\depart-list.vue * @FilePath : \Hapi-demoj:\公司\haoban-3\src\components\company\depart-list.vue
--> -->
<!-- <!--
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0"> <div class="block common-wrap__page text-right m-t-24" v-if="tableData.length != 0">
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[20, 40, 60, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination> <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 40, 60, 80]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination>
</div> </div>
</div> </div>
</div> </div>
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
*/ */
getChildren(item) { getChildren(item) {
const that = this; const that = this;
that.$emit('resetData', item); that.$emit('changeDepart', item);
// that.currentPage = 1; // that.currentPage = 1;
// that.getTableList(); // that.getTableList();
}, },
...@@ -286,7 +286,7 @@ export default { ...@@ -286,7 +286,7 @@ export default {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
that.tableData = resData.result.list || []; that.tableData = resData.result.list || [];
that.total = resData.result.pageInfo.total; that.total = resData.result.total;
return false; return false;
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @Author : 无尘 * @Author : 无尘
* @Date : 2020-02-13 14:02:40 * @Date : 2020-02-13 14:02:40
* @LastEditors : 无尘 * @LastEditors : 无尘
* @LastEditTime : 2020-02-17 14:48:49 * @LastEditTime : 2020-02-21 15:26:36
* @FilePath : \haoban-3\src\components\company\depart-member.vue * @FilePath : \Hapi-demoj:\公司\haoban-3\src\components\company\depart-member.vue
--> -->
<!-- <!--
<depart-member :departObj="departObj" @resetData="resetData"></depart-member> <depart-member :departObj="departObj" @resetData="resetData"></depart-member>
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
</div> </div>
</div> </div>
<add-member v-if="memberVisible" :memberObj="memberObj" @refreshData="refreshData"></add-member> <add-member v-if="memberVisible" :memberObj="memberObj" @refreshData="refreshData"></add-member>
<mod-depart v-if="modVisible" :selectObj="multipleSelection" @modDepartData="modDepartData"></mod-depart>
</div> </div>
</template> </template>
<script> <script>
...@@ -59,10 +60,12 @@ import { getRequest, postRequest } from '@/api/api'; ...@@ -59,10 +60,12 @@ import { getRequest, postRequest } from '@/api/api';
import errMsg from '@/common/js/error'; import errMsg from '@/common/js/error';
import showMsg from '@/common/js/showmsg'; import showMsg from '@/common/js/showmsg';
import addMember from '@/components/company/add-member.vue'; import addMember from '@/components/company/add-member.vue';
import modDepart from '@/components/company/mod-depart.vue';
export default { export default {
name: 'depart-list', name: 'depart-list',
components: { components: {
addMember addMember,
modDepart
}, },
props: { props: {
departObj: { departObj: {
...@@ -106,7 +109,9 @@ export default { ...@@ -106,7 +109,9 @@ export default {
// 新增 // 新增
memberVisible: false, memberVisible: false,
memberObj: {}, memberObj: {},
multipleSelection: [] //勾选数据 multipleSelection: [], //勾选数据
// 调整部门
modVisible: false
}; };
}, },
methods: { methods: {
...@@ -140,32 +145,15 @@ export default { ...@@ -140,32 +145,15 @@ export default {
showMsg.showmsg('请先选择成员!', 'warning'); showMsg.showmsg('请先选择成员!', 'warning');
return false; return false;
} }
that.postMod(); that.modVisible = true;
}, },
postMod() { modDepartData() {
const that = this; const that = this;
let params = {
currDepartmentIds: ''
};
postRequest('/haoban-manage3-web/staff-batch-edit-department', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.currentPage = 1; that.currentPage = 1;
that.getTableList(); that.getTableList();
// 是否需要更新左侧 tree that.multipleSelection = [];
return false; that.modVisible = false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}, },
/** /**
* 邀请 * 邀请
*/ */
...@@ -189,6 +177,7 @@ export default { ...@@ -189,6 +177,7 @@ export default {
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
showMsg.showmsg('邀请成功', 'success');
that.currentPage = 1; that.currentPage = 1;
that.getTableList(); that.getTableList();
// 是否需要更新左侧 tree // 是否需要更新左侧 tree
...@@ -205,7 +194,7 @@ export default { ...@@ -205,7 +194,7 @@ export default {
}, },
/** /**
* 邀请 * 删除
*/ */
toDel() { toDel() {
const that = this; const that = this;
...@@ -218,15 +207,15 @@ export default { ...@@ -218,15 +207,15 @@ export default {
postDel() { postDel() {
const that = this; const that = this;
let params = { let params = {
staffDepartmentRelatedIds: '' staffDepartmentRelatedIds: that.multipleSelection.map(ele => ele.staffDepartmentRelatedIds).join(',')
}; };
postRequest('/haoban-manage3-web/staff-batch-del', params) postRequest('/haoban-manage3-web/staff-batch-del', params)
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
showMsg.showmsg('删除成功', 'success');
that.currentPage = 1; that.currentPage = 1;
that.getTableList(); that.getTableList();
// 是否需要更新左侧 tree
return false; return false;
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
...@@ -238,14 +227,6 @@ export default { ...@@ -238,14 +227,6 @@ export default {
}); });
}); });
}, },
/**
* 获取子部门
*/
getChildren(item) {
const that = this;
that.currentPage = 1;
that.getTableList();
},
/** /**
* 显示详情弹窗 * 显示详情弹窗
...@@ -255,11 +236,6 @@ export default { ...@@ -255,11 +236,6 @@ export default {
that.memberObj = item; that.memberObj = item;
that.memberVisible = true; that.memberVisible = true;
}, },
closeDetail(item) {
const that = this;
that.memberObj = {};
that.memberVisible = false;
},
/** /**
* 新建成员 * 新建成员
...@@ -267,52 +243,20 @@ export default { ...@@ -267,52 +243,20 @@ export default {
addMember() { addMember() {
const that = this; const that = this;
that.memberVisible = true; that.memberVisible = true;
that.memberObj = {};
}, },
/** /**
* 确认新建后刷新 * 确认新建后刷新
*/ */
refreshData() { refreshData(res) {
const that = this; const that = this;
that.memberVisible = false; that.memberVisible = false;
that.currentPage = 1; that.memberObj = {};
that.getTableList(); if (res == 'close') {
},
/**
* 确定授权
*/
submitForm(form) {
const that = this;
that.$refs[form].validate(valid => {
if (valid) {
that.toAddPost();
} else {
return false; return false;
} }
});
},
toAddPost() {
const that = this;
let params = {
parentId: that.departObj.departmentId,
departmentName: that.form.departmentName
};
postRequest('/haoban-manage3-web/department-add', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.currentPage = 1; that.currentPage = 1;
that.getTableList(); that.getTableList();
// 是否需要更新左侧 tree
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}, },
/** /**
...@@ -350,6 +294,7 @@ export default { ...@@ -350,6 +294,7 @@ export default {
getTableList(val) { getTableList(val) {
const that = this; const that = this;
let para = { let para = {
departmentId: that.departObj.departmentId,
activeFlag: that.activeFlag, activeFlag: that.activeFlag,
keyWord: that.searchInput || '', // 搜索字段 keyWord: that.searchInput || '', // 搜索字段
pageNum: that.currentPage, // 当前页 pageNum: that.currentPage, // 当前页
...@@ -359,8 +304,8 @@ export default { ...@@ -359,8 +304,8 @@ export default {
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
that.tableData = resData.result.list || []; that.tableData = resData.result.result || resData.result.list || [];
that.total = resData.result.pageInfo.total; that.total = resData.result.totalCount || resData.result.total;
return false; return false;
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
......
<!--
* @Descripttion : 当前组件信息
* @Author : 无尘
* @Date : 2020-02-13 16:13:59
* @LastEditors : 无尘
* @LastEditTime : 2020-02-21 15:21:29
* @FilePath : \Hapi-demoj:\公司\haoban-3\src\components\company\mod-depart.vue
-->
<!--
<mod-depart :selectObj="selectObj" @modDepartData="modDepartData"></mod-depart>
import modDepart from '@/components/company/mod-depart.vue';
-->
<template>
<el-dialog width="600px" title="调整所在部门" :visible.sync="memberVisible" append-to-body :before-close="handleClose">
<el-form :model="partForm" :rules="rules" ref="form" label-width="100px" class="dialog-form">
<el-form-item label="部门名称" prop="departmentList">
<select-department :selectData="partForm.departmentList" @checkGroupIds="checkGroupIds"> </select-department>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel('form')">取消</el-button>
<el-button type="primary" @click="submitForm('form')">确定</el-button>
</div>
</el-dialog>
</template>
<script>
import selectDepartment from '@/components/company/select-department.vue';
import { postJson } from '@/api/api';
import errMsg from '@/common/js/error';
export default {
name: 'mod-depart',
components: {
selectDepartment
},
props: {
selectObj: {
type: [Object, Array],
default() {
return [];
}
}
},
data() {
return {
memberVisible: true,
staffArr: [],
partForm: {
departmentList: []
},
rules: {
departmentList: [
{
type: 'array',
required: true,
message: '请选择部门',
trigger: 'change'
}
]
}
};
},
methods: {
/**
* 改变对外职务
*/
checkGroupIds: function(nodes) {
const that = this;
that.partForm.departmentList = nodes;
},
/**
* 关闭弹窗
*/
handleClose(done) {
const that = this;
that.$refs['form'].resetFields();
done();
that.$emit('refreshData', 'close');
},
cancel() {
const that = this;
that.$refs['form'].resetFields();
that.$emit('refreshData', 'close');
},
/**
* 确定保存
*/
submitForm(form) {
const that = this;
that.$refs[form].validate(valid => {
if (valid) {
that.postMod();
} else {
return false;
}
});
},
postMod() {
const that = this;
that.staffArr.forEach(ele => {
ele.currDepartmentIds = that.partForm.departmentList.map(ele => ele.departmentId).join(',');
});
let paramsArr = [];
that.staffArr.forEach(ele => {
paramsArr.push({
staffDepartmentRelatedId: ele.staffDepartmentRelatedId,
currDepartmentIds: ele.currDepartmentIds
});
});
let params = {
params: paramsArr
};
postJson('/haoban-manage3-web/staff-batch-edit-department', params)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.$emit('modDepartData');
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
selectObj(newData, oldData) {
const that = this;
if (newData.length) {
that.staffArr = newData;
}
}
},
mounted() {
const that = this;
if (that.selectObj.length) {
that.staffArr = that.selectObj;
}
}
};
</script>
<style lang="less" scoped>
.span-dot {
display: inline-block;
width: 6px;
height: 6px;
margin-right: 5px;
background: rgba(217, 217, 217, 1);
border-radius: 50%;
}
.m-l-30 {
margin-left: 30px;
}
</style>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2020-02-08 10:27:21 * @Date: 2020-02-08 10:27:21
* @LastEditors : 无尘 * @LastEditors : 无尘
* @LastEditTime : 2020-02-15 14:17:17 * @LastEditTime : 2020-02-21 12:54:42
--> -->
<!-- <!--
添加成员选择部门组件: 添加成员选择部门组件:
...@@ -21,12 +21,12 @@ ...@@ -21,12 +21,12 @@
}, },
--> -->
<template> <template>
<el-popover placement="bottom" style="min-width: 282px" v-model="departmentVisible"> <el-popover placement="bottom" style="min-width: 357px" v-model="departmentVisible">
<div class="select-search"> <div class="select-search">
<el-input placeholder="请输入内容" v-model="searchSelect" style="width: 100%;" @keyup.native="value => toInput(value, searchSelect)" @clear="clearSearch"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input> <el-input placeholder="请输入内容" v-model="searchSelect" style="width: 100%;" @keyup.native="value => toInput(value, searchSelect)" @clear="clearSearch"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
</div> </div>
<div class="select-tree-wrap"> <div class="select-tree-wrap m-t-10">
<el-tree :data="storeData" node-key="groupId" ref="storeTree" show-checkbox default-expand-all :props="defaultProps" :expand-on-click-node="false" @check="checkStore"> <el-tree :data="groupData" :load="loadNode" node-key="departmentId" ref="groupTree" check-strictly lazy show-checkbox default-expand-all :props="defaultProps" :expand-on-click-node="false" @check="checkGroup">
<span class="custom-tree-node" slot-scope="{ node, data }"> <span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="['font-14 p-r-10 iconfont', node.isStore == 1 ? 'icondianpu-kuai' : 'iconqiye-tianchong', node.bindFlag == 1 ? 'color-2f54eb' : 'color-dedfe6']"></span><span class="font-14 color-606266">{{ node.label }}</span> <span :class="['font-14 p-r-10 iconfont', node.isStore == 1 ? 'icondianpu-kuai' : 'iconqiye-tianchong', node.bindFlag == 1 ? 'color-2f54eb' : 'color-dedfe6']"></span><span class="font-14 color-606266">{{ node.label }}</span>
</span> </span>
...@@ -35,13 +35,13 @@ ...@@ -35,13 +35,13 @@
<div class="flex-column item-cell-select inline-block " slot="reference"> <div class="flex-column item-cell-select inline-block " slot="reference">
<div class="depart-item-wrap"> <div class="depart-item-wrap">
<div :style="{ width: width }" class="el-select el-select--large depart-item-content"> <div :style="{ width: width }" class="el-select el-select--large depart-item-content">
<span class="font-14 color-c0c4cc p-l-10" style="display: inline-block;line-height: 32px;color: #c0c4cc;" v-if="!storeGroupIds.length">请选择部门</span> <span class="font-14 color-c0c4cc p-l-10" style="display: inline-block;line-height: 32px;color: #c0c4cc;" v-if="!groupIds.length">请选择部门</span>
<div class="el-select__tags" style="max-width: 181px;"> <div class="el-select__tags" style="max-width: 181px;">
<span> <span>
<template v-for="(item, index) in storeGroupIds"> <template v-for="(item, index) in groupIds">
<span class="el-tag el-tag--info el-tag--small" :key="index"> <span class="el-tag el-tag--info el-tag--small" :key="index">
<span class="el-select__tags-text">{{ item.departmentName }}</span> <span class="el-select__tags-text">{{ item.departmentName }}</span>
<i class="el-tag__close el-icon-close" @click.stop="delDepart(index, storeGroupIds)"></i> <i class="el-tag__close el-icon-close" @click.stop="delDepart(index, groupIds)"></i>
</span> </span>
</template> </template>
</span> </span>
...@@ -56,20 +56,15 @@ import { getRequest } from '@/api/api'; ...@@ -56,20 +56,15 @@ import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error'; import errMsg from '@/common/js/error';
import { _debounce } from '@/common/js/public'; import { _debounce } from '@/common/js/public';
export default { export default {
name: 'store-tree-select', name: 'select-department',
props: { props: {
brandId: {
type: String,
default() {
return '';
}
},
width: { width: {
type: String, type: String,
default() { default() {
return '357px'; return '357px';
} }
}, },
selectData: { selectData: {
type: [Object, Array], type: [Object, Array],
default() { default() {
...@@ -82,46 +77,67 @@ export default { ...@@ -82,46 +77,67 @@ export default {
projectName: '', // 当前项目名 projectName: '', // 当前项目名
searchSelect: '', // 搜索字段 searchSelect: '', // 搜索字段
departmentVisible: false, departmentVisible: false,
storeGroupIds: [], groupIds: [],
storeData: [], groupData: [],
defaultProps: { defaultProps: {
children: 'children', children: 'children',
label: 'name' label: 'departmentName'
} }
}; };
}, },
methods: { methods: {
/** /**
* 加载更多
*/
async loadNode(node, resolve) {
// console.log(node, resolve);
const that = this;
if (node.level === 0) {
return resolve(that.getGroup());
} else {
await that.getGroup(node, node.data, resolve);
}
},
/**
* 输入 * 输入
*/ */
toInput: _debounce(function(e, value) { toInput: _debounce(function(e, value) {
const that = this; const that = this;
if (!that.storesCopy.length) { that.getGroup();
return false;
}
if (value == '') {
that.stores = JSON.parse(JSON.stringify(that.storesCopy));
}
let filterData = JSON.parse(JSON.stringify(that.storesCopy)).filter(ele => {
return ele.storeName.includes(value);
});
that.stores = filterData;
}, 500), }, 500),
/** /**
* 清空 * 清空
*/ */
clearSearch() { clearSearch() {
const that = this; const that = this;
that.stores = JSON.parse(JSON.stringify(that.storesCopy)); that.getGroup();
}, },
/** /**
* 删除 * 删除
*/ */
delDepart(index, obj) { delDepart(index, arr) {
// const that = this; const that = this;
obj.splice(index, 1); arr.splice(index, 1);
const keys = arr.map(ele => ele.departmentId);
that.setCheckedKeys(keys);
},
/**
* 选择 tree 节点,获取选择节点信息
*/
checkGroup: function(e) {
const that = this;
that.groupIds = that.$refs.groupTree.getCheckedNodes();
that.$emit('checkGroupIds', that.$refs.groupTree.getCheckedNodes());
},
/**
* 设置 tree
*/
setCheckedKeys(keys) {
const that = this;
that.$refs.groupTree.setCheckedKeys(keys);
}, },
/** /**
...@@ -142,27 +158,69 @@ export default { ...@@ -142,27 +158,69 @@ export default {
}, },
/** /**
* 获取门店分组 * 搜素获取门店分组
*/ */
getStoreGroup() { getSearchGroup(keyword) {
let that = this; let that = this;
let para = { let para = {
parentId: '', parentId: '',
isStore: '', isStore: 0,
keyword: '' keyword: keyword
}; };
getRequest('/haoban-manage3-web/department-list', para) getRequest('/haoban-manage3-web/department-list-level', para)
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
if (!!resData.result && !!resData.result.length) { if (!!resData.result && resData.result.length) {
that.treeData(resData.result);
resData.result.forEach(ele => { resData.result.forEach(ele => {
if (ele.groupId == that.activeGroupId) { ele.expand = false;
that.storeData = [ele]; ele.children = [];
ele.label = ele.departmentName;
});
} }
that.groupData = resData.result || [];
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
}); });
});
},
/**
* 获取门店分组
*/
getGroup(node, data, resolve) {
let that = this;
let para = {
parentId: data ? data.departmentId : '',
isStore: 0
};
getRequest('/haoban-manage3-web/department-list-level', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (!!resData.result && resData.result.length) {
resData.result.forEach(ele => {
ele.expand = false;
ele.children = [];
ele.label = ele.departmentName;
});
}
if (node) {
resolve(resData.result);
if (!data.children) {
that.$set(data, 'children', []);
} }
data.children = resData.result || [];
that.$forceUpdate();
return false;
}
that.groupData = resData.result || [];
return; return;
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
...@@ -176,29 +234,16 @@ export default { ...@@ -176,29 +234,16 @@ export default {
} }
}, },
watch: { watch: {
brandId: function(newData, oldData) {
const that = this;
if (!!newData) {
that.activeBrand = newData;
that.checkStore();
that.getStoreGroup();
}
},
selectData: function(newData, oldData) { selectData: function(newData, oldData) {
let that = this; let that = this;
if (!!newData.length) { if (!!newData.length) {
that.storeGroupIds = newData; that.groupIds = newData;
} }
} }
}, },
mounted() { mounted() {
const that = this; const that = this;
if (!!that.brandId) { that.getGroup();
that.activeBrand = that.brandId;
that.storeGroupIds = that.selectData;
that.checkStore();
that.getStoreGroup();
}
} }
}; };
</script> </script>
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
* @Author : 无尘 * @Author : 无尘
* @Date : 2020-02-13 14:02:40 * @Date : 2020-02-13 14:02:40
* @LastEditors : 无尘 * @LastEditors : 无尘
* @LastEditTime : 2020-02-17 13:46:51 * @LastEditTime : 2020-02-21 10:08:11
* @FilePath : \haoban-3\src\components\company\store-member.vue * @FilePath : \Hapi-demoj:\公司\haoban-3\src\components\company\store-member.vue
--> -->
<!-- <!--
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<div class="depart-condition-wrap flex flex-space-between m-t-20"> <div class="depart-condition-wrap flex flex-space-between m-t-20">
<div> <div>
<el-input placeholder="请输入姓名/手机号" v-model="searchInput" class="w-274" @keyup.native="value => toInput(value, searchInput)" clearable @clear="clearInput"></el-input> <el-input placeholder="请输入姓名/手机号" v-model="searchInput" class="w-274" @keyup.native="value => toInput(value, searchInput)" clearable @clear="clearInput"></el-input>
<el-select v-model="activeFlag" placeholder="所有状态" class="m-l-6"> <el-select v-model="activeFlag" placeholder="所有状态" class="m-l-6" @change="changeStatus">
<el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option> <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select> </el-select>
</div> </div>
...@@ -204,6 +204,12 @@ export default { ...@@ -204,6 +204,12 @@ export default {
that.currentPage = 1; that.currentPage = 1;
that.getTableList(); that.getTableList();
}, },
// 选择状态
changeStatus() {
const that = this;
that.currentPage = 1;
that.getTableList();
},
/** /**
* 调整部门 * 调整部门
*/ */
...@@ -416,18 +422,18 @@ export default { ...@@ -416,18 +422,18 @@ export default {
getTableList(val) { getTableList(val) {
const that = this; const that = this;
let para = { let para = {
parentId: '', departmentId: that.departObj.departmentId,
isStore: '', activeFlag: that.activeFlag,
keyWord: that.searchInput || '', // 搜索字段 keyWord: that.searchInput || '', // 搜索字段
pageNum: that.currentPage, // 当前页 pageNum: that.currentPage, // 当前页
pageSize: that.pageSize // 一页显示个数 pageSize: that.pageSize // 一页显示个数
}; };
getRequest('/haoban-manage3-web/department-list', para) getRequest('/haoban-manage3-web/staff-list', para)
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
that.tableData = resData.result.list || []; that.tableData = resData.result.result || resData.result.list || [];
that.total = resData.result.total; that.total = resData.result.totalCount || resData.result.total;
return false; return false;
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
...@@ -439,6 +445,22 @@ export default { ...@@ -439,6 +445,22 @@ export default {
}); });
}); });
} }
},
watch: {
departObj(newData, oldData) {
const that = this;
if (Object.keys(newData)) {
that.currentPage = 1;
that.getTableList();
}
}
},
mounted() {
const that = this;
if (Object.keys(that.departObj)) {
that.currentPage = 1;
that.getTableList();
}
} }
}; };
</script> </script>
...@@ -452,6 +474,9 @@ export default { ...@@ -452,6 +474,9 @@ export default {
} }
.depart-list-body { .depart-list-body {
.depart-id {
margin-top: 2px;
}
.depart-children-list { .depart-children-list {
padding: 16px 10px; padding: 16px 10px;
background: #f5f7fa; background: #f5f7fa;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: 无尘 * @Author: 无尘
* @Date: 2019-03-20 14:36:37 * @Date: 2019-03-20 14:36:37
* @LastEditors : 无尘 * @LastEditors : 无尘
* @LastEditTime : 2020-02-20 16:05:41 * @LastEditTime : 2020-02-21 10:22:54
--> -->
<template> <template>
<div class="my-customer-wrap common-set-wrap"> <div class="my-customer-wrap common-set-wrap">
...@@ -172,19 +172,24 @@ export default { ...@@ -172,19 +172,24 @@ export default {
}); });
}); });
}, },
getWxData(item) { getWxData() {
const that = this; const that = this;
let para = { let para = {
enterpriseId: item.enterpriseId, // parentId: '',
wxEnterpriseId: item.wxEnterpriseId, // isStore: 0
version: item.version
}; };
getRequest('/haoban-manage3-web/wx-enterprise-bind', para) getRequest('/haoban-manage3-web/department-list-level', para)
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
if (resData.errorCode == 1) { if (resData.errorCode == 1) {
that.tableData = resData.result.list || []; if (!!resData.result && resData.result.length) {
that.total = resData.result.total; resData.result.forEach(ele => {
ele.expand = false;
ele.children = [];
ele.label = ele.departmentName;
});
}
that.wxData = resData.result || [];
return false; return false;
} }
errMsg.errorMsg(resData); errMsg.errorMsg(resData);
...@@ -226,7 +231,7 @@ export default { ...@@ -226,7 +231,7 @@ export default {
}, },
/** /**
* 获取列表数据 * 获取企业列表数据
*/ */
getTableList(val) { getTableList(val) {
const that = this; const that = this;
...@@ -248,19 +253,11 @@ export default { ...@@ -248,19 +253,11 @@ export default {
}); });
} }
}, },
watch: { watch: {},
activeBrand: function(newData, oldData) {
const that = this;
that.activeBrand = newData;
},
activeGroup: function(newData, oldData) {
const that = this;
that.activeGroup = newData;
}
},
mounted() { mounted() {
const that = this; const that = this;
that.getTableList(); that.getTableList();
that.getWxData();
document.documentElement.style.backgroundColor = '#f0f2f5'; document.documentElement.style.backgroundColor = '#f0f2f5';
}, },
destroyed() { destroyed() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment