index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382
  1. <template>
  2. <view class="ti_page">
  3. <view class="form">
  4. <view class="form-item adfacjb">
  5. <view class="form-item-title red">团队名称</view>
  6. <view class="form-item-inp">
  7. <u-input v-model="teamInfo.teamName" placeholder="请输入团队名称" placeholder-style="color:#B3BFC8;" border="none" inputAlign="right" fontSize="30rpx" color="#667E90"/>
  8. </view>
  9. </view>
  10. <view class="form-item adfacjb">
  11. <view class="form-item-title red">所在公司</view>
  12. <view class="form-item-inp">
  13. <u-input v-model="teamInfo.enterpriseName" placeholder="请输入公司名称" placeholder-style="color:#B3BFC8;" border="none" inputAlign="right" fontSize="30rpx" color="#667E90"/>
  14. </view>
  15. </view>
  16. <view class="form-item adfacjb">
  17. <view class="form-item-title red">所属地区</view>
  18. <view class="form-item-inp adfac" @click="pickerShow('areaShow')">
  19. <text :class="{'active':areaText!=='请选择'}">{{areaText}}</text>
  20. <u-icon name="arrow-right" size="24rpx" color="#B9C0C8"></u-icon>
  21. </view>
  22. </view>
  23. <view class="form-item adfacjb">
  24. <view class="form-item-title red">所属行业</view>
  25. <view class="form-item-inp adfac" @click="turnPage('industry')">
  26. <text :class="{'active':industryText!=='请选择'}">{{industryText}}</text>
  27. <u-icon name="arrow-right" size="20rpx" color="#B9C0C8"></u-icon>
  28. </view>
  29. </view>
  30. <view class="form-item adfacjb">
  31. <view class="form-item-title" :class="{'red':isqtype}">团队职能类型</view>
  32. <view class="form-item-inp adfac" @click="turnPage('function')">
  33. <text :class="{'active':functionTypeText!=='请选择'}">{{functionTypeText}}</text>
  34. <u-icon name="arrow-right" size="20rpx" color="#B9C0C8"></u-icon>
  35. </view>
  36. </view>
  37. <view class="form-item adfacjb">
  38. <view class="form-item-title" :class="{'red':isqtype}">团队模式类型</view>
  39. <view class="form-item-inp adfac" @click="turnPage('architecture')">
  40. <text :class="{'active':architectureTypeText!=='请选择'}">{{architectureTypeText}}</text>
  41. <u-icon name="arrow-right" size="20rpx" color="#B9C0C8"></u-icon>
  42. </view>
  43. </view>
  44. <view class="form-item adfacjb">
  45. <view class="form-item-title" :class="{'red':isqtype}">团队规模</view>
  46. <view class="form-item-inp adfac" @click="selectShow('teamScaleShow')">
  47. <text :class="{'active':teamScaleText!=='请选择'}">{{teamScaleText}}</text>
  48. <u-icon name="arrow-right" size="20rpx" color="#B9C0C8"></u-icon>
  49. </view>
  50. </view>
  51. <!-- <view class="form-item adfacjb">
  52. <view class="form-item-title" :class="{'red':isqtype}">团队层级</view>
  53. <view class="form-item-inp adfac" @click="selectShow('teamLevelShow')">
  54. <text :class="{'active':teamLevelText!=='请选择'}">{{teamLevelText}}</text>
  55. <u-icon name="arrow-right" size="20rpx" color="#B9C0C8"></u-icon>
  56. </view>
  57. </view> -->
  58. </view>
  59. <view class="box">
  60. <view class="box-title-row">
  61. <view class="box-title" :class="{'red':isqtype}">团队简介</view>
  62. <view class="box-title-tip" @click="briefTipShow=true">
  63. <u-icon name="question-circle" size="32rpx" color="#B3BFC8"></u-icon>
  64. </view>
  65. </view>
  66. <view class="box-textarea">
  67. <u-textarea border="none" height="320rpx" maxlength="-1" style="color: #667E90;padding: 0;" :placeholderStyle="{'color':'#B3BFC8','font-size':'30rpx','line-height':'40rpx'}"
  68. v-model="teamInfo.brief" placeholder="示例:这是一个为推动公司ERP系统升级后的落地应用而组建的团队,36名成员由公司副总经理、各部门总监以及核心骨干组成,大部分成员在该公司同事超过10年,团队成员的工作地点分布在香港、深圳、上海、苏州和东莞等地。公司升级ERP系统是配合”中国区业务战略统一”的大方向,促进建立一致性的运作流程体系。但在新ERP系统落地应用的过程中,不同区域、不同业务单元的认知理解不一,推动新系统应用的力度也参差不去,还造成了不同业务单元之间、不同职能部门之间的协作混乱。公司董事会期待这个团队能够精诚合作,打破部门壁垒,积极推动新ERP系统的落地应用,促进公司战略目标达成。"></u-textarea>
  69. </view>
  70. </view>
  71. <view class="zt_btn" @click="handleConfirm">{{confirmText}}</view>
  72. <view class="dialog" v-if="areaShow">
  73. <view class="dialog-box">
  74. <cus-province-city-area @cancel="areaShow=false" @confirm="areaConfirm"></cus-province-city-area>
  75. </view>
  76. </view>
  77. <cus-select :show="teamScaleShow" title="选择团队规模" :list="teamScaleData" @close="teamScaleShow=false" @confirmTeam="e=>selectConfirm(e,'scale','teamScaleText','teamScaleShow')"></cus-select>
  78. <!-- <cus-select :show="teamLevelShow" title="选择团队层级" :list="teamLevelData" @close="teamLevelShow=false" @confirmTeam="e=>selectConfirm(e,'hierarchy','teamLevelText','teamLevelShow')"></cus-select> -->
  79. <!-- 团队简介提示弹层 -->
  80. <u-popup :show="briefTipShow" mode="center" :round="20" :closeable="true" @close="briefTipShow=false">
  81. <view class="brief-tip-content">
  82. <view class="brief-tip-title">示例</view>
  83. <view class="brief-tip-text">这是一个为推动公司ERP系统升级后的落地应用而组建的团队,36名成员由公司副总经理、各部门总监以及核心骨干组成,大部分成员在该公司同事超过10年,团队成员的工作地点分布在香港、深圳、上海、苏州和东莞等地。</view>
  84. <view class="brief-tip-text">公司升级ERP系统是配合"中国区业务战略统一"的大方向,促进建立一致性的运作流程体系。但在新ERP系统落地应用的过程中,不同区域、不同业务单元的认知理解不一,推动新系统应用的力度也参差不齐,还造成了不同业务单元之间、不同职能部门之间的协作混乱。</view>
  85. <view class="brief-tip-text">公司董事会期待这个团队能够精诚合作,打破部门壁垒,积极推动新ERP系统的落地应用,促进公司战略目标达成。</view>
  86. </view>
  87. </u-popup>
  88. </view>
  89. </template>
  90. <script>
  91. import CusSelect from '@/components/CusSelect/index.vue'
  92. import CusProvinceCityArea from '@/components/CusProvinceCityArea/index.vue'
  93. import props from '../../uni_modules/uview-ui/libs/config/props'
  94. export default {
  95. components:{ CusSelect, CusProvinceCityArea },
  96. props:{
  97. confirmText:{
  98. typeof:String,
  99. default:'下一步'
  100. },
  101. qtype:{
  102. typeof:Boolean,
  103. default:false
  104. }
  105. },
  106. options: { styleIsolation: 'shared' },
  107. data(){
  108. return {
  109. teamInfo:{
  110. teamName:'',
  111. enterpriseName:'',
  112. provinceId:'',
  113. cityId:'',
  114. districtId:'',
  115. industryId:'',
  116. functionIds:[],
  117. orgIds:[],
  118. scale:'',
  119. hierarchy:'',
  120. brief:'',
  121. },
  122. areaShow:false,
  123. areaText:'请选择',
  124. industryText:'请选择',
  125. functionTypeText:'请选择',
  126. architectureTypeText:'请选择',
  127. teamScaleShow:false,
  128. teamScaleData:[],
  129. teamScaleText:'请选择',
  130. teamLevelShow:false,
  131. teamLevelData:[],
  132. teamLevelText:'请选择',
  133. isqtype:false,
  134. briefTipShow:false
  135. }
  136. },
  137. mounted() {
  138. this.isqtype = this.$props.qtype||false;
  139. },
  140. methods:{
  141. getTeamScaleData(){
  142. this.$api.get('/getListByType/team_scale').then(({data:res})=>{
  143. if(res.code!==0) return this.$showToast(res.msg)
  144. this.teamScaleData = res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))
  145. })
  146. },
  147. getTeamHierarchyData(){
  148. this.$api.get('/getListByType/team_hierarchy').then(({data:res})=>{
  149. if(res.code!==0) return this.$showToast(res.msg)
  150. this.teamLevelData = res.data.map(d=>({name:d.dictLabel,id:d.dictValue}))
  151. })
  152. },
  153. setTeamInfo(info){
  154. this.teamInfo = info;
  155. },
  156. confirm(e) {
  157. const { value } = e;
  158. this.areaText = value.map(item => item.label).join('-');
  159. this.areaShow = false;
  160. },
  161. cancel() {
  162. this.areaShow = false;
  163. },
  164. close() {
  165. this.areaShow = false;
  166. },
  167. pickerShow(key){
  168. this[key] = true;
  169. },
  170. turnPage(type){
  171. if(type==='industry'){
  172. uni.navigateTo({
  173. url:'/pagesPublish/industry',
  174. events:{
  175. selectConfirm:data=>{
  176. this.teamInfo.industryId = data.industryId;
  177. this.industryText = data.industryName;
  178. }
  179. }
  180. })
  181. }else{
  182. uni.navigateTo({
  183. url:'/pagesPublish/teamTypeMultiple?type='+type,
  184. events:{
  185. selectConfirm:data=>{
  186. if(data.type==='function'){
  187. this.teamInfo.functionIds = data.ids;
  188. this.functionTypeText = data.names.join(',');
  189. }else if(data.type==='architecture'){
  190. this.teamInfo.orgIds = data.ids;
  191. this.architectureTypeText = data.names.join(',');
  192. }
  193. }
  194. }
  195. })
  196. }
  197. },
  198. selectShow(key){
  199. this[key] = true;
  200. this.$nextTick(()=>{
  201. if(key==='teamScaleShow') this.getTeamScaleData();
  202. if(key==='teamLevelShow') this.getTeamHierarchyData();
  203. })
  204. },
  205. pickerConfirm(e,key1,key2,key3){
  206. this.teamInfo[key1] = e.value[0].id;
  207. this[key2] = e.value[0].name;
  208. this[key3] = false;
  209. },
  210. selectConfirm(e,key1,key2,key3){
  211. this.teamInfo[key1] = e.id;
  212. this[key2] = e.name;
  213. this[key3] = false;
  214. },
  215. handleConfirm(){
  216. if(!this.teamInfo.teamName) return this.$showToast('请输入团队名称')
  217. if(!this.teamInfo.enterpriseName) return this.$showToast('请输入公司名称')
  218. if(!this.teamInfo.districtId) return this.$showToast('请选择所属地区')
  219. if(!this.teamInfo.industryId) return this.$showToast('请选择所属行业')
  220. if(this.isqtype){
  221. if(this.teamInfo.functionIds.length===0) return this.$showToast('请选择团队职能类型')
  222. if(this.teamInfo.orgIds.length===0) return this.$showToast('请选择团队模式类型')
  223. if(!this.teamInfo.scale) return this.$showToast('请选择团队规模')
  224. // if(!this.teamInfo.hierarchy) return this.$showToast('请选择团队层级')
  225. if(!this.teamInfo.brief) return this.$showToast('请输入团队简介')
  226. }
  227. this.$emit('handleConfirm',this.teamInfo)
  228. },
  229. areaConfirm(e){
  230. const { provinceId, cityId,districtId,provinceName,cityName,districtName } = e
  231. this.teamInfo.provinceId = provinceId;
  232. this.teamInfo.cityId = cityId;
  233. this.teamInfo.districtId = districtId;
  234. this.areaText = provinceName+' '+cityName+' '+districtName;
  235. this.areaShow = false;
  236. }
  237. }
  238. }
  239. </script>
  240. <style scoped lang="scss">
  241. ::v-deep .u-textarea{
  242. padding: 36rpx 0 !important;
  243. }
  244. ::v-deep .u-textarea textarea{
  245. font-family: PingFangSC, PingFang SC;
  246. font-weight: 400;
  247. font-size: 30rpx;
  248. color: #667E90;
  249. line-height: 40rpx;
  250. }
  251. .ti_page{
  252. width: 100%;
  253. padding: 0 24rpx 162rpx;
  254. box-sizing: border-box;
  255. .form{
  256. background: #FFFFFF;
  257. border-radius: 24rpx;
  258. &-item{
  259. padding: 28rpx 24rpx;
  260. box-shadow: inset 0rpx -1rpx 0rpx 0rpx #EFEFEF;
  261. &-title{
  262. width: 180rpx;
  263. font-family: PingFangSC, PingFang SC;
  264. font-weight: 400;
  265. font-size: 30rpx;
  266. color: #002846;
  267. line-height: 42rpx;
  268. position: relative;
  269. box-sizing: border-box;
  270. &.red{
  271. &::after{
  272. content: "*";
  273. font-family: PingFangSC, PingFang SC;
  274. font-weight: 400;
  275. font-size: 30rpx;
  276. color: #FD4F66;
  277. line-height: 42rpx;
  278. position: absolute;
  279. left: -16rpx;
  280. }
  281. }
  282. }
  283. &-inp{
  284. width: calc(100% - 180rpx);
  285. padding-left: 20rpx;
  286. box-sizing: border-box;
  287. display: flex;
  288. align-items: center;
  289. justify-content: flex-end;
  290. text{
  291. font-family: PingFangSC, PingFang SC;
  292. font-weight: 400;
  293. font-size: 30rpx;
  294. color: #B3BFC8;
  295. line-height: 40rpx;
  296. margin-right: 10rpx;
  297. &.active{
  298. color: #667E90;
  299. line-height: 30rpx;
  300. }
  301. }
  302. }
  303. }
  304. }
  305. .box{
  306. background: #FFFFFF;
  307. box-shadow: inset 0rpx -1rpx 0rpx 0rpx rgba(229,231,235,0.5);
  308. border-radius: 24rpx;
  309. margin-top: 20rpx;
  310. padding: 28rpx 24rpx;
  311. &-title{
  312. font-family: PingFangSC, PingFang SC;
  313. font-weight: 400;
  314. font-size: 30rpx;
  315. color: #002846;
  316. line-height: 42rpx;
  317. position: relative;
  318. &.red{
  319. &::after{
  320. content: "*";
  321. font-family: PingFangSC, PingFang SC;
  322. font-weight: 400;
  323. font-size: 30rpx;
  324. color: #FD4F66;
  325. line-height: 42rpx;
  326. position: absolute;
  327. left: -16rpx;
  328. }
  329. }
  330. }
  331. &-title-row{
  332. display: flex;
  333. align-items: center;
  334. }
  335. &-title-tip{
  336. margin-left: 12rpx;
  337. display: flex;
  338. align-items: center;
  339. }
  340. }
  341. .brief-tip-content{
  342. width: 600rpx;
  343. max-height: 70vh;
  344. padding: 40rpx 32rpx;
  345. box-sizing: border-box;
  346. overflow-y: auto;
  347. }
  348. .brief-tip-title{
  349. font-family: PingFangSC, PingFang SC;
  350. font-weight: 500;
  351. font-size: 32rpx;
  352. color: #002846;
  353. line-height: 44rpx;
  354. margin-bottom: 24rpx;
  355. text-align: center;
  356. }
  357. .brief-tip-text{
  358. font-family: PingFangSC, PingFang SC;
  359. font-weight: 400;
  360. font-size: 28rpx;
  361. color: #667E90;
  362. line-height: 44rpx;
  363. margin-bottom: 20rpx;
  364. text-indent: 2em;
  365. }
  366. .zt_btn{
  367. width: calc(100% - 100rpx);
  368. position: fixed;
  369. left: 50rpx;
  370. bottom: 54rpx;
  371. z-index: 1000;
  372. }
  373. }
  374. </style>