xiejiahao 4 years ago
parent
commit
c17073104b
  1. 8
      src/api/branch.js
  2. 38
      src/api/login.js
  3. 5
      src/api/xm/core/xmProductProjectLink.js
  4. 66
      src/common/js/util.js
  5. 146
      src/views/login/BranchAdd.vue
  6. 121
      src/views/login/index.vue
  7. 56
      src/views/login/register.vue
  8. 81
      src/views/login/resetPassword.vue
  9. 4
      src/views/mdp/form/formData/FormDataMng.vue
  10. 4
      src/views/mdp/workflow/hi/procinst/ProcinstMng.vue
  11. 6
      src/views/mdp/workflow/ru/execution/ExecutionMng.vue
  12. 4
      src/views/mdp/workflow/ru/procinstParames/ProcinstParamesStartSet.vue
  13. 8
      src/views/mdp/workflow/ru/task/TaskMng.vue
  14. 4
      src/views/xm/core/xmPhase/XmPhaseAdd.vue
  15. 12
      src/views/xm/core/xmPhase/XmPhaseBatch.vue
  16. 12
      src/views/xm/core/xmPhase/XmPhaseForProduct.vue
  17. 12
      src/views/xm/core/xmPhase/XmPhaseMng.vue
  18. 12
      src/views/xm/core/xmProduct/XmProductInfo.vue
  19. 39
      src/views/xm/core/xmProductProjectLink/XmProductProjectLinkMng.vue
  20. 36
      src/views/xm/core/xmProject/XmProjectForLink.vue
  21. 44
      src/views/xm/core/xmTask/XmTaskAdd.vue
  22. 46
      src/views/xm/core/xmTask/XmTaskEdit.vue
  23. 6
      src/views/xm/core/xmTask/XmTaskMng.vue

8
src/api/branch.js

@ -9,11 +9,11 @@ let base=config.getSysBasePath();
*1 默认只开放普通查询所有查询只要上传 分页参数 {currentPage:当前页码从1开始,pageSize:每页记录数,total:总记录数如果是0后台会自动计算总记录数非0不会自动计算}后台都会自动按分页查询 其它 api用到再打开没用到的api请注释掉
*2 查询新增修改的参数格式 params={id:'机构编号 主键',branchName:'机构名称',enabled:'是否可用',industryCategory:'行业分类',cuserid:'创建人编号',cdate:'创建日期',cusername:'创建人姓名',phoneNo:'联系电话',emaill:'邮件'}
**/
//普通查询 条件之间and关系
//普通查询 条件之间and关系
export const listBranchNoAuth = params => { return axios.get(`${base}/mdp/sys/branch/listBranchNoAuth`, { params: params }); };
//模糊查询管理端机构表(机构下面若干部门) 条件之间or关系
//模糊查询管理端机构表(机构下面若干部门) 条件之间or关系
//export const listBranchKey = params => { return axios.get(`${base}/mdp/sys/branch/listKey`, { params: params }); };
//删除一条管理端机构表(机构下面若干部门) params={id:'机构编号 主键'}
@ -30,4 +30,4 @@ export const addBranchNoAuth = params => { return axios.post(`${base}/mdp/sys/br
//新增一条企业入驻审核流程
export const addUserJoinBranchRequire = params => { return axios.post(`${base}/mdp/sys/userJoinBranchRequire/add`, params); };
export const addUserJoinBranchRequire = params => { return axios.post(`${base}/mdp/sys/userJoinBranchRequire/add`, params); };

38
src/api/login.js

@ -7,13 +7,14 @@ import config from '@/common/config'
let base=config.getOauth2LoginBasePath();
//let base='';
export function doLoginByUserloginid(userloginid, password,grantType,authType,deptid) {
export function doLoginByUserloginid(userloginid, password,grantType,authType,deptid,userid) {
removeToken();
const data = {
userloginid: userloginid,
password: password,
authType:authType,
deptid:deptid
deptid:deptid,
userid:userid,
}
return axios({
url: base+'/login/token?grantType='+grantType,
@ -55,6 +56,14 @@ export function checkPhoneno(phoneno ) {
data
})
}
export function queryByUserloginid( params ) {
return axios({
url: base+'/user/queryByUserloginid',
method: 'get',
params:params
})
}
export function doRegister( userInfo ) {
removeToken();
const data = {
@ -79,6 +88,7 @@ export function resetPasswordByPhoneno( userInfo ) {
newPassword:userInfo.newPassword,
phoneno:userInfo.phoneno,
smsCode:userInfo.smsCode,
userid:userInfo.userid
}
return axios({
url: base+'/user/password/reset?type=sms',
@ -109,3 +119,27 @@ export function getUserInfo(params) {
data
})
}
/**
* 发送邮件
*/
export function sendEmail(params) {
const data=params;
return axios({
url: base+'/user/sendEmail',
method: 'post',
data
})
}
/**
* 验证邮箱
*/
export function validEmailCode(params) {
return axios({
url: base+'/user/validEmailCode',
method: 'get',
params:params
})
}

5
src/api/xm/core/xmProductProjectLink.js

@ -27,4 +27,7 @@ export const batchDelXmProductProjectLink = params => { return axios.post(`${bas
export const editXmProductProjectLink = params => { return axios.post(`${base}/xm/core/xmProductProjectLink/edit`, params); };
//新增一条产品与项目的关联关系表,一般由产品经理挂接项目到产品上
export const addXmProductProjectLink = params => { return axios.post(`${base}/xm/core/xmProductProjectLink/add`, params); };
export const addXmProductProjectLink = params => { return axios.post(`${base}/xm/core/xmProductProjectLink/add`, params); };
//新增一条产品与项目的关联关系表,一般由产品经理挂接项目到产品上
export const editSomeFieldsXmProductProjectLink = params => { return axios.post(`${base}/xm/core/xmProductProjectLink/editSomeFields`, params); };

66
src/common/js/util.js

@ -13,6 +13,60 @@ function padding(s, len) {
export default {
/**
* 通过字典值获取其名称
* 界面上可以
* {{formatDicts(dicts,'xxx',scope.row.xxx)}}
* @param {*} dicts
* @param {*} itemCode
* @param {*} cellValue
* @returns
*/
formatDicts: function(dicts,itemCode,cellValue){
let key=itemCode;
if( dicts[key]==undefined || dicts[key]==null || dicts[key].length==0 ){
return cellValue;
}
let dict=dicts[key].find(i=>i.id===cellValue)
if(dict){
return dict.name
}else{
return cellValue
}
},
/**
* 通过字典值获取其名称返回根值相同的字典,并自动计算其对应显示样式
* 界面上可以类似使用
* <el-tag v-for="(item,index) in formatDictsWithClass(dicts,'xxxx',scope.row.xxxx)" :key="index" :type="item.className">{{item.name}}</el-tag>
*
* @param {*} dicts
* @param {*} itemCode
* @param {*} cellValue
* @returns [{id:'',name:'',className:''}]
*/
formatDictsWithClass: function(dicts,itemCode,cellValue){
debugger;
var classNames=['info','primary','success','warning','danger'];
let key=itemCode;
if(!cellValue){
return [];
}
if(dicts[key]==undefined || dicts[key]==null || dicts[key].length==0 ){
var className=cellValue%5;
return [{id:cellValue,name:cellValue,className:classNames[cellValue%5]}];
}
let data=dicts[key].find(i=>i.id===cellValue)
let index=dicts[key].findIndex(i=>i.id===cellValue)
if(data){
data['className']=classNames[index%5]
return [data];
}else{
return [{id:cellValue,name:cellValue,className:classNames[cellValue%5]}]
}
},
calcTableMaxHeight(cssSelector) {
var table=cssSelector;
if(typeof cssSelector == 'string'){
@ -157,10 +211,8 @@ export default {
*/
toLine(name) {
return name.replace(/([A-Z])/g, "_$1").toLowerCase();
},
formatDate: {
format: function(date, pattern) {
},
formatDate: function(date, pattern) {
pattern = pattern || DEFAULT_PATTERN
return pattern.replace(SIGN_REGEXP, function($0) {
switch ($0.charAt(0)) {
@ -183,7 +235,7 @@ export default {
}
})
},
parse: function(dateString, pattern) {
parseDate: function(dateString, pattern) {
var matchs1 = pattern.match(SIGN_REGEXP)
var matchs2 = dateString.match(/(\d)+/g)
if (matchs1.length == matchs2.length) {
@ -215,9 +267,7 @@ export default {
return _date
}
return null
},
},
},
//type date/daterange
pickerOptions: function(type) {

146
src/views/login/BranchAdd.vue

@ -7,16 +7,16 @@
<el-row class="app-container">
<el-radio v-model="addOrJoinBranch" label="add" >创建新公司</el-radio><el-radio v-model="addOrJoinBranch" label="join" ></el-radio>
</el-row>
<!--新增界面 Branch 管理端机构表机构下面若干部门-->
<!--新增界面 Branch 管理端机构表机构下面若干部门-->
<el-form :model="addForm" v-show="addOrJoinBranch=='add'" label-width="100px" :rules="addFormRules" ref="addForm">
<el-form-item label="公司名称" prop="branchName">
<el-input v-model="addForm.branchName" auto-complete="off">
<el-button slot="append" round type="primary" plain @click="checkBranchExists">查询机构是否存在</el-button>
<el-button slot="append" round type="primary" plain @click="checkBranchExists">查询机构是否存在</el-button>
</el-input>
</el-form-item>
<el-form-item label="行业分类" prop="industryCategory">
</el-form-item>
<el-form-item label="行业分类" prop="industryCategory">
<el-select
v-model="addForm.industryCategory"
v-model="addForm.industryCategory"
filterable
allow-create
default-first-option
@ -28,29 +28,29 @@
:value="item.optionValue">
</el-option>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item label="联系人姓名" prop="cusername">
<el-input v-model="addForm.cusername" auto-complete="off"></el-input>
</el-form-item>
</el-form-item>
<el-form-item label="联系电话" prop="phoneNo">
<el-input v-model="addForm.phoneNo" auto-complete="off"></el-input>
</el-form-item>
</el-form-item>
<el-form-item label="邮件" prop="emaill">
<el-input v-model="addForm.emaill" auto-complete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button @click.native="handleCancel">取消</el-button>
<el-button v-loading="load.add" type="primary" round @click.native="addSubmit" >创建新公司</el-button>
</el-form-item>
</el-form-item>
<el-form-item>
<el-button @click.native="handleCancel">取消</el-button>
<el-button v-loading="load.add" type="primary" round @click.native="addSubmit" >创建新公司</el-button>
</el-form-item>
</el-form>
<!--新增界面 Branch 管理端机构表机构下面若干部门-->
<!--新增界面 Branch 管理端机构表机构下面若干部门-->
<el-form :model="joinForm" v-show="addOrJoinBranch=='join'" label-width="100px" :rules="joinFormRules" ref="joinForm">
<el-form-item label="公司查询" prop="joinBranchId">
<el-select
v-model="joinForm.joinBranchId"
v-model="joinForm.joinBranchId"
filterable
remote
remote
clearable
placeholder="请输入2个关键词查询"
:remote-method="searchBranchs"
@ -61,23 +61,23 @@
:key="item.id"
:label="item.branchName"
:value="item.id">
</el-option>
</el-select>
</el-option>
</el-select>
<el-tag>选择已有公司-申请加入</el-tag>
</el-form-item>
</el-form-item>
<el-form-item label="加入理由" prop="joinReason">
<el-input type="textarea" rows="4" v-model="joinForm.joinReason" auto-complete="off"></el-input>
</el-form-item>
</el-form-item>
<el-form-item label="联系人姓名" prop="joinUsername" >
<el-input v-model="joinForm.joinUsername" auto-complete="off"></el-input>
</el-form-item>
</el-form-item>
<el-form-item label="联系电话" prop="joinUserPhoneno" >
<el-input v-model="joinForm.joinUserPhoneno" auto-complete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button @click.native="handleCancel">取消</el-button>
<el-button v-loading="load.add" type="warning" round @click.native="joinBranch" >加入公司</el-button>
</el-form-item>
</el-form-item>
<el-form-item>
<el-button @click.native="handleCancel">取消</el-button>
<el-button v-loading="load.add" type="warning" round @click.native="joinBranch" >加入公司</el-button>
</el-form-item>
</el-form>
</el-row>
</section>
@ -88,49 +88,49 @@
import { listOption } from '@/api/itemOption';//
import { addBranchNoAuth,listBranchNoAuth,addUserJoinBranchRequire } from '@/api/branch';
import { mapGetters } from 'vuex'
export default {
props:['branch','visible'],
watch: {
'branch':function( branch ) {
this.addForm = branch;
},
'visible':function(visible) {
'visible':function(visible) {
if(visible==true){
//
}
}
},
}
},
data() {
const validateBranchName = (rule, value, callback) => {
const validateBranchName = (rule, value, callback) => {
if( !value || value.length<=6){
callback(new Error('请输入6位以上公司名称'))
}else{
callback()
}
}
}
const validatePhoneNo = (rule, value, callback) => {
const validatePhoneNo = (rule, value, callback) => {
if( !value || value.length !=11 ){
callback(new Error('手机号码必须为11位号码'))
}else{
callback()
}
}
const validateCusername = (rule, value, callback) => {
}
}
const validateCusername = (rule, value, callback) => {
if( !value || value.length <2 ){
callback(new Error('请输入联系人名称'))
}else{
callback()
}
}
}
}
return {
options:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
options:{},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//...
addFormRules: {
branchName: [{ required: true, trigger: 'blur', validator: validateBranchName }],
cusername: [{ required: true, trigger: 'blur', validator: validateCusername }],
phoneNo: [{ required: true, trigger: 'blur', validator: validatePhoneNo }],
phoneNo: [{ required: true, trigger: 'blur', validator: validatePhoneNo }],
},
//
addForm: {
@ -139,18 +139,18 @@
joinFormRules: {
//branchName: [{ required: true, trigger: 'blur', validator: validateBranchName }],
joinUsername: [{ required: true, trigger: 'blur', validator: validateCusername }],
joinUserPhoneno: [{ required: true, trigger: 'blur', validator: validatePhoneNo }],
joinUserPhoneno: [{ required: true, trigger: 'blur', validator: validatePhoneNo }],
joinBranchId:[{ required: true, message: '要加入的公司不能为空', trigger: 'blur' }],
joinReason:[{ required: true, message: '加入理由不能为空', trigger: 'blur' }],
},
//
joinForm: {
id:'',joinBranchId:'',joinUserPhoneno:'',joinUserid:'',joinUsername:'',joinDeptid:'',joinReason:''
},
},
branchs:[],
addOrJoinBranch:'join'
/**begin 在下面加自定义属性,记得补上面的一个逗号**/
/**end 在上面加自定义属性**/
}//end return
},//end data
@ -161,10 +161,10 @@
},
//Branch @submit="afterAddSubmit"
addSubmit: function () {
this.$refs.addForm.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
if(this.addForm.branchName.length>=6){
var params={
key:"%"+this.addForm.branchName+"%"
@ -173,32 +173,32 @@
if(res.data.tips.isOk){
if(res.data.data.length<=0){
this.load.add=true
let params = Object.assign({}, this.addForm);
let params = Object.assign({}, this.addForm);
params.cuserid=this.userInfo.userid
addBranchNoAuth(params).then((res) => {
this.load.add=false
var tips=res.data.tips;
if(tips.isOk){
if(tips.isOk){
this.$emit('submit',res.data.data );// @submit="afterAddSubmit"
}
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: tips.isOk?'success':'error' });
}).catch(() => this.load.add=false);
}else{
this.$notify({position:'bottom-left',showClose:true,message: "该公司名已注册,不可以使用", type: 'error' });
this.$notify({position:'bottom-left',showClose:true,message: "该公司名已注册,不可以使用", type: 'error' });
return;
}
}
})
}else{
this.$notify({position:'bottom-left',showClose:true,message: "公司名必须6个字以上", type: 'error' });
this.$notify({position:'bottom-left',showClose:true,message: "公司名必须6个字以上", type: 'error' });
return;
}
});
}
});
},
searchBranchs:function(query){
this.load.list=true;
if(query.length>=2){
@ -219,29 +219,29 @@
})
}else{
this.load.list=false;
this.$notify({position:'bottom-left',showClose:true,message: "最少输入两个字", type: 'info' });
this.$notify({position:'bottom-left',showClose:true,message: "最少输入两个字", type: 'info' });
return;
}
},
joinBranch:function(){
joinBranch:function(){
this.$refs.joinForm.validate((valid) => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
if (valid) {
this.$confirm('确认提交吗?', '提示', {}).then(() => {
var params= this.joinForm
addUserJoinBranchRequire(params).then(res=>{
addUserJoinBranchRequire(params).then(res=>{
var tips = res.data.tips;
if(tips.isOk){
this.$notify({position:'bottom-left',showClose:true,message:tips.msg, type: 'success' });
//this.$emit('submit',res.data.data );// @submit="afterAddSubmit"
return;
}else{
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: 'error' });
if(tips.isOk){
this.$notify({position:'bottom-left',showClose:true,message:tips.msg, type: 'success' });
//this.$emit('submit',res.data.data );// @submit="afterAddSubmit"
return;
}else{
this.$notify({position:'bottom-left',showClose:true,message: tips.msg, type: 'error' });
return;
}
})
});
}
});
});
},
checkBranchExists:function(){
if(this.addForm.branchName.length>=2){
@ -251,25 +251,25 @@
listBranchNoAuth(params).then(res=>{
if(res.data.tips.isOk){
if(res.data.data.length<=0){
this.$notify({position:'bottom-left',showClose:true,message: "该公司名未注册,可以使用", type: 'success' });
this.$notify({position:'bottom-left',showClose:true,message: "该公司名未注册,可以使用", type: 'success' });
return;
}else{
this.$notify({position:'bottom-left',showClose:true,message: "该公司名已注册,不可以使用", type: 'error' });
this.$notify({position:'bottom-left',showClose:true,message: "该公司名已注册,不可以使用", type: 'error' });
return;
}
}
})
}else{
this.$notify({position:'bottom-left',showClose:true,message: "最少输入两个字", type: 'error' });
this.$notify({position:'bottom-left',showClose:true,message: "最少输入两个字", type: 'error' });
return;
}
}
/**begin 在下面加自定义方法,记得补上面的一个逗号**/
/**end 在上面加自定义方法**/
},//end method
components: {
components: {
// 'branch-edit':BranchEdit
},
computed: {
@ -278,7 +278,7 @@
])
},
mounted() {
this.addForm=Object.assign(this.addForm, this.branch);
this.addForm=Object.assign(this.addForm, this.branch);
this.addForm.cusername=this.userInfo.username
this.addForm.phoneNo=this.userInfo.phoneno;
this.addForm.cuserid=this.userInfo.userid;
@ -299,4 +299,4 @@
<style scoped>
</style>
</style>

121
src/views/login/index.vue

@ -12,14 +12,14 @@
</div>
<el-form-item prop="authType">
<el-radio-group v-model="loginForm.authType">
<el-radio label="password_display_userid">账户密码登录</el-radio>
<el-radio label="password_display_userid">账户密码</el-radio>
<el-radio label="sms">短信验证码快速登录</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="displayUserid" v-show="loginForm.authType=='password_display_userid'">
<el-input name="displayUserid" type="text" v-model="loginForm.displayUserid" autoComplete="on" placeholder="用户编号" >
<el-form-item prop="userloginid" v-show="loginForm.authType=='password_display_userid'">
<el-input title="登陆账号" name="userloginid" type="text" v-model="loginForm.userloginid" autoComplete="on" placeholder="用户编号" >
<template slot="prepend">账号</template>
</el-input>
</el-input>
</el-form-item>
<el-form-item prop="password" v-show="loginForm.authType=='password_display_userid'">
@ -33,8 +33,13 @@
<el-form-item prop="phoneno" v-show="loginForm.authType=='sms'">
<el-input name="phoneno" type="text" v-model="loginForm.phoneno" autoComplete="on" placeholder="手机号码">
<template slot="prepend">手机号码&nbsp;&nbsp;&nbsp;</template>
<el-button slot="append" @click.prevent="sendPhonenoSmsCode">发送验证码</el-button>
<el-button slot="append" @click.prevent="sendPhonenoSmsCode" v-loading="load.sendSmsCode">发送验证码</el-button>
</el-input>
<span v-if="users!=null && users.length>0"> 该手机号有{{users.length}}个账户,请选择需要登录的账户<font color="blue"></font>
<br>
<el-tag v-if="selectUser && selectUser.userid">已选择:{{selectUser.username}}</el-tag> <el-button type="text" @click="phonenoUsersVisible=true">选择账户</el-button>
</span>
</el-form-item>
<el-form-item prop="smsCode" v-show="loginForm.authType=='sms'">
<el-input name="smsCode" type="text" v-model="loginForm.smsCode" autoComplete="on" placeholder="短信验证码">
@ -86,6 +91,27 @@
<el-dialog title="新增机构" :visible.sync="addBranchFormVisible" width="50%" :close-on-click-modal="false" append-to-body>
<branch-add :visible="addBranchFormVisible" @cancel="addBranchFormVisible=false" @submit="afterAddBranchSubmit"></branch-add>
</el-dialog>
<el-dialog
title="查看已有账户"
:visible.sync="phonenoUsersVisible"
width="600" append-to-body>
<el-table :data="users">
<el-table-column prop="userid" label="编号">
</el-table-column>
<el-table-column prop="displayUserid" label="登录账号">
</el-table-column>
<el-table-column prop="username" label="姓名">
</el-table-column>
<el-table-column prop="branchName" label="企业">
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary" @click="onUserSelect(scope.row)">选中</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
@ -95,6 +121,7 @@ import LangSelect from '@/components/LangSelect';
import SocialSign from './socialsignin';
import Register from './register';
import ResetPassword from './resetPassword';
import { queryByUserloginid } from '@/api/login';
import BranchAdd from './BranchAdd';
import { mapGetters } from 'vuex';
@ -150,14 +177,14 @@ export default {
}
return {
loginForm: {
displayUserid: '',
userloginid: '',
password: '',
authType:'password_display_userid',//password/sms/password_display_userid
phoneno:'',//
smsCode:'',//
},
loginRules: {
displayUserid: [{ required: true, trigger: 'blur', validator: validateDisplayUserid }],
userloginid: [{ required: true, trigger: 'blur', validator: validateDisplayUserid }],
password: [{ required: true, trigger: 'blur', validator: validatePassword }],
phoneno: [{ required: true, trigger: 'blur', validator: validatePhoneno }],
smsCode: [{ required: true, trigger: 'blur', validator: validateSmsCode }],
@ -165,13 +192,16 @@ export default {
passwordType: 'password',
loading: false,
load:{sendSmsCode:false,},
showResetPasswordDialog:false,//
showTpLoginDialog: false, //
showRegisterDialog: false,//
deptSelectVisible:false,//
userDeptid:'',//
userBranchId:'',//
addBranchFormVisible:false, //
users:[],
phonenoUsersVisible:false,
selectUser:null,
}
},
methods: {
@ -183,17 +213,30 @@ export default {
}
},
sendPhonenoSmsCode(){
var params={
phoneno:this.loginForm.phoneno,
scene:"login"
}
sendSmsCode(params).then(res=>{
if(res.data.tips.isOk){
this.$message.info(res.data.tips.msg);
this.load.sendSmsCode=true;
this.$refs.loginForm.validateField("phoneno",(err)=>{
if(err){
this.$message.error(err);
this.load.sendSmsCode=false;
return;
}else{
this.$message.error(res.data.tips.msg);
var params={
phoneno:this.loginForm.phoneno,
scene:"login"
}
sendSmsCode(params).then(res=>{
this.load.sendSmsCode=false;
if(res.data.tips.isOk){
this.$message.success(res.data.tips.msg);
this.queryByUserloginid();
}else{
this.$message.error(res.data.tips.msg);
}
}).catch(()=>this.load.sendSmsCode=false)
}
})
});
},
handleLogin() {
@ -201,29 +244,29 @@ export default {
if (valid) {
this.loading = true
let params={
displayUserid:this.loginForm.displayUserid,
userloginid:this.loginForm.userloginid,
password:md5(this.loginForm.password),
deptid:this.userDeptid,
authType:this.loginForm.authType,
phoneno:this.loginForm.phoneno,
smsCode:this.loginForm.smsCode,
branchId:this.userBranchId,
smsCode:this.loginForm.smsCode
}
var loginParams={ }
if(params.authType=='password_display_userid'){
loginParams.userloginid=params.displayUserid
loginParams.userloginid=params.userloginid
loginParams.password=params.password
loginParams.grantType="password"
loginParams.authType='password_display_userid'
//loginParams.deptid=params.deptid
loginParams.branchId=params.branchId
loginParams.deptid=params.deptid
}else if(params.authType=='sms'){
loginParams.userloginid=params.phoneno
loginParams.password=params.smsCode
loginParams.grantType="password"
loginParams.authType="sms"
//loginParams.deptid=params.deptid
loginParams.branchId=params.branchId
loginParams.deptid=params.deptid
}
if(this.selectUser){
loginParams.userid=this.selectUser.userid
}
this.$store.dispatch("LoginByUserloginid",loginParams).then(res => {
this.loading = false
@ -234,11 +277,7 @@ export default {
//this.userDeptid=res2.data.userInfo.deptid
this.loading = false
if(res2.data.tips.isOk==true){
if(this.$store.state.user.myBranchs==null ||this.$store.state.user.myBranchs.length==0||this.$store.state.user.myDepts==null || this.$store.state.user.myDepts.length<=0){
//if(1==1){
//this.$message.error("\n ");
this.addBranchFormVisible=true;
}else if(this.$store.state.user.myDepts.length>1 ){
if(this.$store.state.user.myDepts.length>1 ){
//this.$message.info("");
if( !this.userDeptid ){
this.userDeptid=res2.data.userInfo.deptid
@ -282,10 +321,8 @@ export default {
return
}
let depts=this.myDepts.filter(d=>d.deptid==this.userDeptid)
if(this.$store.state.user.userInfo.deptid!=this.userDeptid){
let depts=this.myDepts.filter(d=>d.deptid==this.userDeptid)
this.userBranchId=depts[0].branchId
this.handleLogin();
return;
}else{
@ -328,6 +365,24 @@ export default {
// this.$router.push({ path: '/' })
// })
// }
},
queryByUserloginid(){
var params={userloginid:this.loginForm.userloginid}
if(this.loginForm.authType=='sms'){
params.idType="phoneno"
}else{
params.idType='all'
}
queryByUserloginid(params).then(res=>{
var tips = res.data.tips;
if(tips.isOk){
this.users=res.data.data
}
})
},
onUserSelect(user){
this.selectUser=user
this.phonenoUsersVisible=false;
}
},
created() {

56
src/views/login/register.vue

@ -11,8 +11,11 @@
</div>
<el-form-item prop="phoneno" label="手机号码">
<el-input name="phoneno" type="text" v-model="loginForm.phoneno" autoComplete="on" placeholder="手机号码">
<el-button slot="append" @click.prevent="sendPhonenoSmsCode">发送验证码</el-button>
<span slot="append"> <el-button @click.prevent="sendPhonenoSmsCode" v-loading="load.sendSmsCode">发送验证码</el-button> </span>
</el-input>
<span v-if="phonenoUsers!=null && phonenoUsers.length>0"> 该手机号已注册有{{phonenoUsers.length}}个账户<font color="blue"></font>
<el-button type="text" @click="phonenoUsersVisible=true">查看明细</el-button>
</span>
</el-form-item>
<el-form-item prop="smsCode" label="短信验证码">
<el-input name="smsCode" type="text" v-model="loginForm.smsCode" autoComplete="on" placeholder="短信验证码">
@ -54,7 +57,22 @@
</el-col>
</el-row >
</el-dialog>
<el-dialog
title="查看已有账户"
:visible.sync="phonenoUsersVisible"
width="600" append-to-body>
<el-table :data="phonenoUsers">
<el-table-column prop="userid" label="编号">
</el-table-column>
<el-table-column prop="displayUserid" label="登录账号">
</el-table-column>
<el-table-column prop="username" label="姓名">
</el-table-column>
<el-table-column prop="branchName" label="企业">
</el-table-column>
</el-table>
</el-dialog>
<!-- 第三方登陆窗口 -->
<el-dialog :title="$t('login.thirdparty')" :visible.sync="showTpLoginDialog" append-to-body>
{{$t('login.thirdpartyTips')}}
@ -73,7 +91,7 @@
<script>
import { sendSmsCode } from '@/api/sms/sms';
import { checkPhoneno,checkDisplayUserid,doRegister } from '@/api/login';
import { checkPhoneno,checkDisplayUserid,doRegister,queryByUserloginid } from '@/api/login';
import LangSelect from '@/components/LangSelect';
import SocialSign from './socialsignin';
@ -140,10 +158,13 @@ export default {
passwordType: 'password',
loading: false,
load:{sendSmsCode:false,},
showTpLoginDialog: false, //
deptSelectVisible:false,//
userDeptid:'',//
addBranchFormVisible:false, //
phonenoUsers:[],//
phonenoUsersVisible:false,
}
},
methods: {
@ -155,18 +176,35 @@ export default {
}
},
sendPhonenoSmsCode(){
this.load.sendSmsCode=true;
if(!this.loginForm.phoneno){
this.$message.error("手机号码不能为空");
this.$message.error("手机号码不能为空");
this.load.sendSmsCode=false;
return;
}
if(this.loginForm.phoneno.length !=11 ){
this.$message.error("手机号码必须为11位");
this.load.sendSmsCode=false;
return;
}
var params={
phoneno:this.loginForm.phoneno,
scene:"register"
}
}
queryByUserloginid({userloginid:this.loginForm.phoneno,idType:"phoneno"}).then(res0=>{
this.load.sendSmsCode=false;
if(res0.data.tips.isOk){
this.phonenoUsers=res0.data.data;
sendSmsCode(params).then(res=>{
if(res.data.tips.isOk){
this.$message.success(res.data.tips.msg);
}else{
this.$message.error(res.data.tips.msg);
}
})
}
}).catch(err=> this.load.sendSmsCode=false)
/**
checkPhoneno(this.loginForm.phoneno).then(res0=>{
if(res0.data.tips.isOk){
sendSmsCode(params).then(res=>{
@ -180,8 +218,16 @@ export default {
this.$message.error("手机号码已存在,不允许注册,请直接登录");
}
})
*/
},
checkPhonenoUsers(){
queryByUserloginid({userloginid:this.loginForm.phoneno,idType:"phoneno",atype:'1'}).then(res0=>{
if(res0.data.tips.isOk){
this.phonenoUsers=res0.data.data;
}
})
},
checkDisplayUserid(){
if(!this.loginForm.displayUserid){
this.$message.error("账号不能为空");

81
src/views/login/resetPassword.vue

@ -13,6 +13,11 @@
<el-input name="phoneno" type="text" v-model="loginForm.phoneno" autoComplete="on" placeholder="手机号码">
<el-button slot="append" @click.prevent="sendPhonenoSmsCode">发送验证码</el-button>
</el-input>
<span v-if="phonenoUsers!=null && phonenoUsers.length>0"> 该手机号有{{phonenoUsers.length}}个账户,请选择需要重置密码的账户<font color="blue"></font>
<br>
<el-tag v-if="selectUser && selectUser.userid">已选择:{{selectUser.username}}</el-tag> <el-button type="text" @click="phonenoUsersVisible=true">选择账户</el-button>
</span>
</el-form-item>
<el-form-item prop="smsCode" label="短信验证码">
<el-input name="smsCode" type="text" v-model="loginForm.smsCode" autoComplete="on" placeholder="短信验证码">
@ -28,6 +33,27 @@
</el-form-item>
<el-button type="primary" style="width:100%;margin-bottom:30px;" :loading="loading" @click.native.prevent="handleResetPasswordByPhoneno">重置密码</el-button>
</el-form>
<el-dialog
title="查看已有账户"
:visible.sync="phonenoUsersVisible"
width="600" append-to-body>
<el-table :data="phonenoUsers">
<el-table-column prop="userid" label="编号">
</el-table-column>
<el-table-column prop="displayUserid" label="登录账号">
</el-table-column>
<el-table-column prop="username" label="姓名">
</el-table-column>
<el-table-column prop="branchName" label="企业">
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="primary" @click="onUserSelect(scope.row)">选中</el-button>
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-dialog
title="请选择一个部门进行登陆"
:visible.sync="deptSelectVisible"
@ -63,13 +89,13 @@
<script>
import { sendSmsCode } from '@/api/sms/sms';
import { checkPhoneno,resetPasswordByPhoneno } from '@/api/login';
import { checkPhoneno,resetPasswordByPhoneno,queryByUserloginid } from '@/api/login';
import LangSelect from '@/components/LangSelect';
import SocialSign from './socialsignin';
import BranchAdd from './BranchAdd';
import { mapGetters } from 'vuex';
import md5 from 'js-md5';
import md5 from 'js-md5';
export default {
components: { LangSelect, SocialSign, BranchAdd },
@ -114,6 +140,9 @@ export default {
deptSelectVisible:false,//
userDeptid:'',//
addBranchFormVisible:false, //
phonenoUsersVisible:false,
phonenoUsers:[],
selectUser:null,//
}
},
methods: {
@ -137,24 +166,22 @@ export default {
phoneno:this.loginForm.phoneno,
scene:"changePassword"
}
checkPhoneno(this.loginForm.phoneno).then(res0=>{
if(res0.data.tips.isOk==false){
sendSmsCode(params).then(res=>{
if(res.data.tips.isOk){
this.$message.success(res.data.tips.msg);
}else{
this.$message.error(res.data.tips.msg);
}
})
}else{
this.$message.error("手机号码不存在");
}
})
queryByUserloginid({userloginid:this.loginForm.phoneno,idType:"phoneno"}).then(res0=>{
if(res0.data.tips.isOk){
this.phonenoUsers=res0.data.data;
sendSmsCode(params).then(res=>{
if(res.data.tips.isOk){
this.$message.success(res.data.tips.msg);
}else{
this.$message.error(res.data.tips.msg);
}
})
}
})
},
handleResetPasswordByPhoneno() {
this.loading = true
this.$refs.loginForm.validate(valid => {
if (valid) {
let params={
@ -162,6 +189,22 @@ export default {
phoneno:this.loginForm.phoneno,
smsCode:this.loginForm.smsCode
}
if(this.phonenoUsers && this.phonenoUsers.length>0){
if(!this.selectUser || !this.selectUser.userid){
if(this.phonenoUsers.length==1){
this.selectUser=this.phonenoUsers[0]
}else{
this.$notify({position:'bottom-left',showClose:true,message:'请选一个账户进行重置密码',type:'warning'})
return;
}
}
}
if(this.selectUser && this.selectUser.userid){
params.userid=this.selectUser.userid
}
this.loading = true
resetPasswordByPhoneno(params).then(res=>{
this.loading = false
if(res.data.tips.isOk){
@ -232,6 +275,10 @@ export default {
// this.$router.push({ path: '/' })
// })
// }
},
onUserSelect(user){
this.selectUser=user
this.phonenoUsersVisible=false;
}
},
created() {

4
src/views/mdp/form/formData/FormDataMng.vue

@ -274,7 +274,7 @@
tags:[],
users:null,//
cusers:null,//
createTimeRanger:[util.formatDate.format(fromStartTime,'yyyy-MM-dd'),util.formatDate.format(toStartTime,'yyyy-MM-dd')],
createTimeRanger:[util.formatDate(fromStartTime,'yyyy-MM-dd'),util.formatDate(toStartTime,'yyyy-MM-dd')],
flowState:'',// 0 1 2
},
pickerOptions: {
@ -942,7 +942,7 @@
var nullTimeDatas=[];
var tags=[];
var now=new Date();
var dateStr=util.formatDate.format(now,'yyyy-MM-dd');
var dateStr=util.formatDate(now,'yyyy-MM-dd');
datas.forEach(i=>{
var rowData=Object.assign({},i);

4
src/views/mdp/workflow/hi/procinst/ProcinstMng.vue

@ -217,8 +217,8 @@
categoryTreeNodes: [],
tags: [],
startTimeRanger: [
util.formatDate.format(fromStartTime, "yyyy-MM-dd"),
util.formatDate.format(toStartTime, "yyyy-MM-dd")
util.formatDate(fromStartTime, "yyyy-MM-dd"),
util.formatDate(toStartTime, "yyyy-MM-dd")
],
planFinishTimeRanger: [],
endTimeRanger: [],

6
src/views/mdp/workflow/ru/execution/ExecutionMng.vue

@ -328,11 +328,11 @@
procCategory: '',
categoryTreeNodes: [],
tags: [],
startTimeRanger: [util.formatDate.format(fromStartTime, 'yyyy-MM-dd'), util.formatDate.format(toStartTime,
startTimeRanger: [util.formatDate(fromStartTime, 'yyyy-MM-dd'), util.formatDate(toStartTime,
'yyyy-MM-dd')],
planFinishTimeRanger: [],
assignee: null, //
calendarDate: util.formatDate.format(toStartTime, 'yyyy-MM-dd'),
calendarDate: util.formatDate(toStartTime, 'yyyy-MM-dd'),
filterType: '',
suspensionState: '', //1/2
},
@ -988,7 +988,7 @@
var delayTasks = [];
var tags = [];
var now = new Date();
var dateStr = util.formatDate.format(now, 'yyyy-MM-dd');
var dateStr = util.formatDate(now, 'yyyy-MM-dd');
if (dateStr == data.day) {
data.isSelected = true;

4
src/views/mdp/workflow/ru/procinstParames/ProcinstParamesStartSet.vue

@ -333,7 +333,7 @@
},
//
addForm: {
id:seq.sn(),isRefForm:'',monitors:'',sponsors:'',procInstId:'',formId:'',formDataId:'',procDefId:'',userid:'',startDate:util.formatDate.format(new Date(),'yyyy-MM-dd hh:mm:ss'),planFinishTime:'',mainQx:'',isTemplate:'',mainContext:'',mainTitle:'',deptid:'',categoryId:''
id:seq.sn(),isRefForm:'',monitors:'',sponsors:'',procInstId:'',formId:'',formDataId:'',procDefId:'',userid:'',startDate:util.formatDate(new Date(),'yyyy-MM-dd hh:mm:ss'),planFinishTime:'',mainQx:'',isTemplate:'',mainContext:'',mainTitle:'',deptid:'',categoryId:''
},
/**begin 在下面加自定义属性,记得补上面的一个逗号**/
procdefParamesForm: {
@ -603,7 +603,7 @@
this.addForm.sponsors=(this.procdef.sponsors!=null && this.procdef.sponsors!='')?this.procdef.sponsors:this.userInfo.userid;
var planFinishTime = new Date();
planFinishTime.setTime(planFinishTime.getTime() + 3600 * 1000 * 24 * 7);
this.addForm.planFinishTime=util.formatDate.format(planFinishTime,'yyyy-MM-dd hh:mm:ss')
this.addForm.planFinishTime=util.formatDate(planFinishTime,'yyyy-MM-dd hh:mm:ss')
this.addForm.tagIds=this.procdef.tagIds;
this.addForm.tagNames=this.procdef.tagNames;
this.addForm.mainQx=this.procdef.mainQx;

8
src/views/mdp/workflow/ru/task/TaskMng.vue

@ -292,11 +292,11 @@
categoryTreeNodes: [],
tags: [],
startTimeRanger: [
util.formatDate.format(fromStartTime, "yyyy-MM-dd"),
util.formatDate.format(toStartTime, "yyyy-MM-dd")
util.formatDate(fromStartTime, "yyyy-MM-dd"),
util.formatDate(toStartTime, "yyyy-MM-dd")
],
planFinishTimeRanger: [],
calendarDate: util.formatDate.format(toStartTime, 'yyyy-MM-dd'),
calendarDate: util.formatDate(toStartTime, 'yyyy-MM-dd'),
},
pickerOptions: {
shortcuts: [{
@ -1153,7 +1153,7 @@
var tags = [];
var now = new Date();
var dateStr = util.formatDate.format(now, "yyyy-MM-dd");
var dateStr = util.formatDate(now, "yyyy-MM-dd");
if (dateStr == data.day) {
data.isSelected = true;
}

4
src/views/xm/core/xmPhase/XmPhaseAdd.vue

@ -218,8 +218,8 @@
id:'',name:'',remark:'',parentPhaseId:'',branchId:'',taskType:'kf',planType:'m1',projectId:'',beginDate:'',endDate:'',budgetHours:'',budgetStaffNu:'',ctime:'',budgetNouserAt:'',budgetIuserAt:'',budgetOuserAt:'',baselineId:'',bizProcInstId:'',bizFlowState:'',budgetWorkload:'',totalActWorkload:'',totalActNouserAt:'',totalActInerUserAt:'',totalActOuserAt:'',planType:'',taskType:'',seqNo:'1',budgetIuserCnt:'',budgetOuserCnt:'',budgetIuserPrice:80,budgetOuserPrice:100,budgetIuserWorkload:0,budgetOuserWorkload:0,ntype:'0'
},
dateRanger: [
util.formatDate.format(beginDate, "yyyy-MM-dd HH:mm:ss"),
util.formatDate.format(endDate, "yyyy-MM-dd HH:mm:ss")
util.formatDate(beginDate, "yyyy-MM-dd HH:mm:ss"),
util.formatDate(endDate, "yyyy-MM-dd HH:mm:ss")
],
/**begin 在下面加自定义属性,记得补上面的一个逗号**/
pickerOptions: util.pickerOptions('datarange'),

12
src/views/xm/core/xmPhase/XmPhaseBatch.vue

@ -781,9 +781,9 @@ export default {
var beginDate = new Date();
const endDate = new Date();
endDate.setTime(ctime.getTime() + 3600 * 1000 * 24 * 7 * 4); //
i.ctime = util.formatDate.format(ctime, "yyyy-MM-dd HH:mm:ss");
i.beginDate = util.formatDate.format(beginDate, "yyyy-MM-dd HH:mm:ss");
i.endDate = util.formatDate.format(endDate, "yyyy-MM-dd HH:mm:ss");
i.ctime = util.formatDate(ctime, "yyyy-MM-dd HH:mm:ss");
i.beginDate = util.formatDate(beginDate, "yyyy-MM-dd HH:mm:ss");
i.endDate = util.formatDate(endDate, "yyyy-MM-dd HH:mm:ss");
});
batchImportFromTemplate(phaseTemplates2)
.then((res) => {
@ -1669,12 +1669,12 @@ export default {
var beginDate = new Date();
const endDate = new Date();
endDate.setTime(ctime.getTime() + 3600 * 1000 * 24 * 7 * 4); //
subRow.ctime = util.formatDate.format(ctime, "yyyy-MM-dd HH:mm:ss");
subRow.beginDate = util.formatDate.format(
subRow.ctime = util.formatDate(ctime, "yyyy-MM-dd HH:mm:ss");
subRow.beginDate = util.formatDate(
beginDate,
"yyyy-MM-dd HH:mm:ss"
);
subRow.endDate = util.formatDate.format(endDate, "yyyy-MM-dd HH:mm:ss");
subRow.endDate = util.formatDate(endDate, "yyyy-MM-dd HH:mm:ss");
this.fieldChange(subRow, "seqNo");
this.xmPhases.unshift(subRow);

12
src/views/xm/core/xmPhase/XmPhaseForProduct.vue

@ -538,9 +538,9 @@ import XmTaskList from '../xmTask/XmTaskList.vue';
var beginDate=new Date();
const endDate=new Date();
endDate.setTime(ctime.getTime() + 3600 * 1000 * 24 * 7 *4);//
i.ctime=util.formatDate.format(ctime,'yyyy-MM-dd HH:mm:ss')
i.beginDate=util.formatDate.format(beginDate,'yyyy-MM-dd HH:mm:ss')
i.endDate=util.formatDate.format(endDate,'yyyy-MM-dd HH:mm:ss')
i.ctime=util.formatDate(ctime,'yyyy-MM-dd HH:mm:ss')
i.beginDate=util.formatDate(beginDate,'yyyy-MM-dd HH:mm:ss')
i.endDate=util.formatDate(endDate,'yyyy-MM-dd HH:mm:ss')
});
batchImportFromTemplate(phaseTemplates2).then(res=>{
this.phaseTemplateVisible=false;
@ -1182,9 +1182,9 @@ import XmTaskList from '../xmTask/XmTaskList.vue';
var beginDate=new Date();
const endDate=new Date();
endDate.setTime(ctime.getTime() + 3600 * 1000 * 24 * 7 *4);//
subRow.ctime=util.formatDate.format(ctime,'yyyy-MM-dd HH:mm:ss')
subRow.beginDate=util.formatDate.format(beginDate,'yyyy-MM-dd HH:mm:ss')
subRow.endDate=util.formatDate.format(endDate,'yyyy-MM-dd HH:mm:ss')
subRow.ctime=util.formatDate(ctime,'yyyy-MM-dd HH:mm:ss')
subRow.beginDate=util.formatDate(beginDate,'yyyy-MM-dd HH:mm:ss')
subRow.endDate=util.formatDate(endDate,'yyyy-MM-dd HH:mm:ss')
this.fieldChange(subRow,'seqNo');
this.xmPhases.unshift(subRow);

12
src/views/xm/core/xmPhase/XmPhaseMng.vue

@ -573,9 +573,9 @@ import XmTaskList from '../xmTask/XmTaskList.vue';
var beginDate=new Date();
const endDate=new Date();
endDate.setTime(ctime.getTime() + 3600 * 1000 * 24 * 7 *4);//
i.ctime=util.formatDate.format(ctime,'yyyy-MM-dd HH:mm:ss')
i.beginDate=util.formatDate.format(beginDate,'yyyy-MM-dd HH:mm:ss')
i.endDate=util.formatDate.format(endDate,'yyyy-MM-dd HH:mm:ss')
i.ctime=util.formatDate(ctime,'yyyy-MM-dd HH:mm:ss')
i.beginDate=util.formatDate(beginDate,'yyyy-MM-dd HH:mm:ss')
i.endDate=util.formatDate(endDate,'yyyy-MM-dd HH:mm:ss')
});
batchImportFromTemplate(phaseTemplates2).then(res=>{
this.phaseTemplateVisible=false;
@ -1217,9 +1217,9 @@ import XmTaskList from '../xmTask/XmTaskList.vue';
var beginDate=new Date();
const endDate=new Date();
endDate.setTime(ctime.getTime() + 3600 * 1000 * 24 * 7 *4);//
subRow.ctime=util.formatDate.format(ctime,'yyyy-MM-dd HH:mm:ss')
subRow.beginDate=util.formatDate.format(beginDate,'yyyy-MM-dd HH:mm:ss')
subRow.endDate=util.formatDate.format(endDate,'yyyy-MM-dd HH:mm:ss')
subRow.ctime=util.formatDate(ctime,'yyyy-MM-dd HH:mm:ss')
subRow.beginDate=util.formatDate(beginDate,'yyyy-MM-dd HH:mm:ss')
subRow.endDate=util.formatDate(endDate,'yyyy-MM-dd HH:mm:ss')
this.fieldChange(subRow,'seqNo');
this.xmPhases.unshift(subRow);

12
src/views/xm/core/xmProduct/XmProductInfo.vue

@ -43,6 +43,7 @@
<el-menu-item index="缺陷">
<span slot="title"><i class="el-icon-question"></i>缺陷</span>
</el-menu-item>
<!--
<el-submenu index="团队">
<template slot="title"><i class="el-icon-user-solid"></i>团队</template>
<el-menu-item index="产品团队">
@ -52,15 +53,26 @@
<span slot="title"><i class="el-icon-solid"></i>项目团队</span>
</el-menu-item>
</el-submenu >
-->
<el-menu-item index="项目团队">
<span slot="title"><i class="el-icon-user-solid"></i>团队</span>
</el-menu-item>
<!--
<el-submenu index="计划">
<template slot="title"><i class="el-icon-odometer"></i>计划</template>
<el-menu-item index="产品计划">
<span slot="title"><i class="el-icon-view"></i>产品计划</span>
</el-menu-item>
<el-menu-item index="项目计划">
<span slot="title"><i class="el-icon-video-camera"></i>项目计划</span>
</el-menu-item>
</el-submenu >
-->
<el-menu-item index="项目计划">
<span slot="title"><i class="el-icon-odometer"></i>计划</span>
</el-menu-item>
<el-submenu index="财务" class="hidden-sm-and-down">
<template slot="title"><i class="el-icon-coin"></i>财务</template>
<el-menu-item index="合同管理">

39
src/views/xm/core/xmProductProjectLink/XmProductProjectLinkMng.vue

@ -17,6 +17,12 @@
<el-table ref="xmProductProjectLink" :data="xmProductProjectLinks" :height="maxTableHeight" @sort-change="sortChange" highlight-current-row v-loading="load.list" border @selection-change="selsChange" @row-click="rowClick" style="width: 100%;">
<el-table-column prop="name" v-if="xmProduct" label="包含的项目名称" min-width="150" ></el-table-column>
<el-table-column prop="productName" v-if="selProject" label="包含的产品名称" min-width="150" ></el-table-column>
<el-table-column prop="seq" label="顺序" min-width="80" sortable>
<template scope="scope">
<span class="cell-text"> {{scope.row.seq}} </span>
<span class="cell-bar"><el-input style="display:inline;" title="0-999之间,数值越小越靠前" v-model="scope.row.seq" placeholder="" @change="editSomeFields(scope.row,'seq',$event)" :maxlength="22"></el-input></span>
</template>
</el-table-column>
<el-table-column prop="ctime" label="加入时间" min-width="80" ></el-table-column>
<el-table-column prop="cusername" label="操作者" min-width="80" ></el-table-column>
<el-table-column label="操作" width="120" fixed="right">
@ -35,7 +41,7 @@
import util from '@/common/js/util';//
import config from '@/common/config';//
import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { listXmProductProjectLink,addXmProductProjectLink, delXmProductProjectLink, batchDelXmProductProjectLink } from '@/api/xm/core/xmProductProjectLink';
import { listXmProductProjectLink,addXmProductProjectLink, delXmProductProjectLink, batchDelXmProductProjectLink,editSomeFieldsXmProductProjectLink } from '@/api/xm/core/xmProductProjectLink';
import XmProductProjectLinkAdd from './XmProductProjectLinkAdd';//
import XmProductProjectLinkEdit from './XmProductProjectLinkEdit';//
import { mapGetters } from 'vuex'
@ -68,8 +74,8 @@ import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect.vue'
pageSize:10,//
count:false,//
pageNum:1,//1
orderFields:[],// ['sex','student_id']
orderDirs:[]// asc,desc ['asc','desc']
orderFields:['seq'],// ['sex','student_id']
orderDirs:['asc']// asc,desc ['asc','desc']
},
load:{ list: false, edit: false, del: false, add: false },//...
sels: [],//
@ -259,7 +265,32 @@ import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect.vue'
this.$notify({ message: tips.msg, type: tips.isOk?'success':'error'});
}).catch( err => this.load.del=false );
});
}
},
editSomeFields(row,fieldName,$event){
let params={};
if(this.sels.length>0){
if(!this.sels.some(k=> k.projectId==row.projectId && k.productId==row.productId)){
this.$notify({position:'bottom-left',showClose:true,message:'请编辑选中的行',type:'warning'})
Object.assign(this.editForm,this.editFormBak)
return;
}
params['pkList']=this.sels.map(i=>{ return { projectId:i.projectId, productId:i.productId}})
}else{
params['pkList']=[row].map(i=>{ return { projectId:i.projectId, productId:i.productId}})
}
params[fieldName]=$event
var func = editSomeFieldsXmProductProjectLink
func(params).then(res=>{
let tips = res.data.tips;
if(tips.isOk){
this.getXmProductProjectLinks();
}else{
Object.assign(this.editForm,this.editFormBak)
this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'})
}
}).catch((e)=>Object.assign(this.editForm,this.editFormBak))
},
/**end 自定义函数请在上面加**/

36
src/views/xm/core/xmProject/XmProjectForLink.vue

@ -14,6 +14,10 @@
<el-table-column type="index" label="序号" width="55" ></el-table-column>
<el-table-column prop="id" label="项目编码" min-width="80" ></el-table-column>
<el-table-column prop="name" label="标题名称" min-width="80" ></el-table-column>
<el-table-column prop="seq" label="顺序" min-width="80" >
<span class="cell-text"> {{scope.row.username}}} </span>
<span class="cell-bar"><el-input style="display:inline;" v-model="scope.row.username" placeholder="" @change="editSomeFields(scope.row,'username',$event)" :maxlength="22"></el-input></span>
</el-table-column>
<el-table-column label="操作" width="245" fixed="right">
<template slot-scope="scope">
<el-button-group>
@ -42,7 +46,7 @@
//import { initSimpleDicts } from '@/api/mdp/meta/item';//
import { listXmProject, } from '@/api/xm/core/xmProject';
import { mapGetters } from 'vuex'
import { delXmProductProjectLink, addXmProductProjectLink,batchDelXmProductProjectLink } from '@/api/xm/core/xmProductProjectLink';
import { delXmProductProjectLink, addXmProductProjectLink,batchDelXmProductProjectLink,editSomeFieldsXmProductProjectLink } from '@/api/xm/core/xmProductProjectLink';
import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect.vue';
@ -201,7 +205,35 @@ import XmProjectSelect from '@/views/xm/core/components/XmProjectSelect.vue';
});
})
}
},
editSomeFields(row,fieldName,$event){
let params={};
if(this.sels.length>0){
if(!this.sels.some(k=> k.projectId==row.projectId && k.productId==row.productId)){
this.$notify({position:'bottom-left',showClose:true,message:'请编辑选中的行',type:'warning'})
Object.assign(this.editForm,this.editFormBak)
return;
}
params['pkList']=this.sels.map(i=>{ return { projectId:i.projectId, productId:i.productId}})
}else{
params['pkList']=[row].map(i=>{ return { projectId:i.projectId, productId:i.productId}})
}
params[fieldName]=$event
var func = editSomeFieldsXmProductProjectLink
func(params).then(res=>{
let tips = res.data.tips;
if(tips.isOk){
if(this.sels.length>0){
this.getXmProjects();
}
this.editFormBak=[...this.editForm]
}else{
Object.assign(this.editForm,this.editFormBak)
this.$notify({position:'bottom-left',showClose:true,message:tips.msg,type:tips.isOk?'success':'error'})
}
}).catch((e)=>Object.assign(this.editForm,this.editFormBak))
},
/**end 自定义函数请在上面加**/
},//end methods

44
src/views/xm/core/xmTask/XmTaskAdd.vue

@ -207,22 +207,22 @@
</el-col>
<el-col :span="8">
<el-form-item label="实际工作量" prop="actWorkload">
<el-input type="number" style="width:150px;" v-model="addForm.actWorkload" :precision="2" :step="8" :min="0" placeholder="实际总工作量(人时,不包括下一级)"></el-input type="number"> <el-tag>h</el-tag>
<el-input type="number" style="width:150px;" v-model="addForm.actWorkload" :precision="2" :step="8" :min="0" placeholder="实际总工作量(人时,不包括下一级)"></el-input> <el-tag>h</el-tag>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="成本" name="6">
<el-form-item label="自研工时单价" prop="uniInnerPrice">
<el-input type="number" style="width:150px;" v-model="addForm.uniInnerPrice" :precision="2" :step="10" :min="0" placeholder="自研工时单价" ></el-input > /h
</el-form-item>
<el-form-item label="外包、众包单价" prop="uniOutPrice">
<el-input type="number" style="width:150px;" v-model="addForm.uniOutPrice" :precision="2" :step="10" :min="0" placeholder="外发工时单价" ></el-input > /h
</el-form-item>
<el-form-item label="预估金额" prop="budgetAt">
<el-row v-if="addForm.taskOut!=='1'">
工时单价&nbsp;<el-input type="number" style="width:150px;" v-model="addForm.uniInnerPrice" :precision="2" :step="10" :min="0" placeholder="工时单价"></el-input type="number"> /h
</el-row>
<el-row v-if="addForm.taskOut==='1'">
工时单价&nbsp;<el-input type="number" style="width:150px;" v-if="addForm.taskOut==='1'" v-model="addForm.uniOutPrice" :precision="2" :step="10" :min="0" placeholder="外发工时单价"></el-input type="number"> /h
</el-row>
<el-row>
预估金额&nbsp;<el-input type="number" style="width:150px;" v-model="addForm.budgetAt" :precision="2" :step="100" :min="0" placeholder="预算金额"></el-input type="number">
</el-row>
<el-input type="number" style="width:150px;" v-model="addForm.budgetAt" :precision="2" :step="100" :min="0" placeholder="预算金额" ></el-input >
</el-form-item>
</el-tab-pane>
@ -236,9 +236,21 @@
</el-select>
</el-form-item>
</el-tab-pane>
<el-tab-pane label="众包" name="8" v-if="addForm.ntype!='1' && addForm.taskOut=='1'">
<el-checkbox v-model="addForm.toTaskCenter" true-label="1" false-label="0" id="taskOut">发布到互联网任务大厅</el-checkbox>
<el-tab-pane label="外包、众包、互联网" name="8" v-if="addForm.ntype!='1' ">
<el-form-item>
<el-checkbox v-model="addForm.taskOut" true-label="1" false-label="0" id="taskOut" >外包</el-checkbox>
<el-checkbox v-model="addForm.crowd" true-label="1" false-label="0" id="crowd" v-if="addForm.taskOut==='1'">开通众包</el-checkbox>
<el-checkbox v-model="addForm.toTaskCenter" true-label="1" false-label="0" id="toTaskCenter" v-if="addForm.taskOut==='1'">发布到互联网任务大厅</el-checkbox>
</el-form-item>
<el-form-item label="分享赚" prop="oshare" v-if="addForm.taskOut==='1'">
<el-checkbox v-model="addForm.oshare" true-label="1" false-label="0" id="oshare" >开通分享赚</el-checkbox>
</el-form-item>
<el-form-item label="分享佣金" prop="shareFee" v-if="addForm.oshare==='1' && addForm.taskOut==='1'">
<el-input type="number" style="width:150px;" v-model="addForm.shareFee" :precision="2" :step="100" :min="0" placeholder="分享赚佣金" ></el-input >
<font color="blue">开通分享赚后起效佣金从任务预算中扣除如果未发生分享佣金则不扣除一般建议为任务佣金的1%-5%</font>
</el-form-item>
<el-steps :active="calcTaskStep" align-center simple>
<el-step title="发布" description="任务创建成功后即发布"></el-step>
@ -364,7 +376,7 @@
id:'',name:'',parentTaskid:'',parentTaskname:'',projectId:'',projectName:'',level:'3',sortLevel:'0',executorUserid:'',executorUsername:'',
preTaskid:'',preTaskname:'',startTime:'',endTime:'',milestone:'',description:'',remarks:'',createUserid:'',createUsername:'',createTime:'',taskOut:'0',
rate:0,budgetAt:'',budgetWorkload:'',actAt:'',actWorkload:'',taskState:'0',taskClass:'0',toTaskCenter:'0',actStartTime:'',actEndTime:'',taskType:'4',planType:'w2',settleSchemel:'1',ntype:'0',childrenCnt:0,
uniInnerPrice:80,uniOutPrice:100,
uniInnerPrice:80,uniOutPrice:100,crowd:'0',oshare:'0',shareFee:0
},
/**begin 在下面加自定义属性,记得补上面的一个逗号**/
menuVisible:false,
@ -377,8 +389,8 @@
groupUserSelectVisible:false,
execGroupUserSelectVisible:false,
budgetDateRanger: [
util.formatDate.format(beginDate, "yyyy-MM-dd HH:mm:ss"),
util.formatDate.format(endDate, "yyyy-MM-dd HH:mm:ss")
util.formatDate(beginDate, "yyyy-MM-dd HH:mm:ss"),
util.formatDate(endDate, "yyyy-MM-dd HH:mm:ss")
],
actDateRanger: [
],

46
src/views/xm/core/xmTask/XmTaskEdit.vue

@ -98,7 +98,6 @@
<el-col :span="10">
<el-form-item label="" prop="milestone">
<el-checkbox v-model="editForm.milestone" true-label="1" false-label="0" @change="editXmTaskSomeFields(editForm,'milestone',$event)">里程碑</el-checkbox>
<el-checkbox v-model="editForm.taskOut" @change="editXmTaskSomeFields(editForm,'taskOut',$event)" true-label="1" false-label="0" >众包</el-checkbox>
</el-form-item>
</el-col>
<el-col :span="14">
@ -170,17 +169,17 @@
<el-tab-pane label="工时" name="5">
<xm-task-workload-record :visible="visible" :xm-task="editForm" ></xm-task-workload-record>
</el-tab-pane>
<el-tab-pane label="成本" name="6">
<el-tab-pane label="预算金额" name="6">
<el-form-item label="自研工时单价" prop="uniInnerPrice">
<el-input type="number" style="width:150px;" v-model="editForm.uniInnerPrice" :precision="2" :step="10" :min="0" placeholder="自研工时单价" @change="editXmTaskSomeFields(editForm,'uniInnerPrice',$event)"></el-input > /h
</el-form-item>
<el-form-item label="外包、众包单价" prop="uniOutPrice">
<el-input type="number" style="width:150px;" v-model="editForm.uniOutPrice" :precision="2" :step="10" :min="0" placeholder="外发工时单价" @change="editXmTaskSomeFields(editForm,'uniOutPrice',$event)"></el-input > /h
</el-form-item>
<el-form-item label="预估金额" prop="budgetAt">
<el-row v-if="editForm.taskOut!=='1'">
工时单价&nbsp;<el-input type="number" style="width:150px;" v-model="editForm.uniInnerPrice" :precision="2" :step="10" :min="0" placeholder="工时单价" @change="editXmTaskSomeFields(editForm,'uniInnerPrice',$event)"></el-input > /h
</el-row>
<el-row v-if="editForm.taskOut==='1'">
工时单价&nbsp;<el-input type="number" style="width:150px;" v-if="editForm.taskOut==='1'" v-model="editForm.uniOutPrice" :precision="2" :step="10" :min="0" placeholder="外发工时单价" @change="editXmTaskSomeFields(editForm,'uniOutPrice',$event)"></el-input > /h
</el-row>
<el-row>
预估金额&nbsp;<el-input type="number" style="width:150px;" v-model="editForm.budgetAt" :precision="2" :step="100" :min="0" placeholder="预算金额" @change="editXmTaskSomeFields(editForm,'budgetAt',$event)"></el-input >
</el-row>
<el-input type="number" style="width:150px;" v-model="editForm.budgetAt" :precision="2" :step="100" :min="0" placeholder="预算金额" @change="editXmTaskSomeFields(editForm,'budgetAt',$event)"></el-input >
</el-form-item>
</el-tab-pane>
@ -194,10 +193,21 @@
</el-select>
</el-form-item>
</el-tab-pane>
<el-tab-pane label="众包" name="8" v-if="editForm.ntype!='1' && editForm.taskOut=='1'">
<el-checkbox v-model="editForm.toTaskCenter" true-label="1" false-label="0" id="taskOut" @change="editXmTaskSomeFields(editForm,'taskOut',$event)">发布到互联网任务大厅</el-checkbox>
<el-tab-pane label="众包、互联网访问" name="8" v-if="editForm.ntype!='1'">
<el-form-item>
<el-checkbox v-model="editForm.taskOut" true-label="1" false-label="0" id="taskOut" @change="editXmTaskSomeFields(editForm,'taskOut',$event)">外购</el-checkbox>
<el-checkbox v-model="editForm.crowd" v-if="editForm.taskOut==='1'" true-label="1" false-label="0" id="crowd" @change="editXmTaskSomeFields(editForm,'crowd',$event)">开通众包</el-checkbox>
<el-checkbox v-model="editForm.toTaskCenter" v-if="editForm.taskOut==='1'" true-label="1" false-label="0" id="toTaskCenter" @change="editXmTaskSomeFields(editForm,'toTaskCenter',$event)">发布到互联网任务大厅</el-checkbox>
</el-form-item>
<el-form-item label="分享赚" prop="oshare" v-if="editForm.taskOut==='1'">
<el-checkbox v-model="editForm.oshare" true-label="1" false-label="0" id="oshare" @change="editXmTaskSomeFields(editForm,'oshare',$event)">开通分享赚</el-checkbox>
</el-form-item>
<el-form-item label="分享佣金" prop="shareFee" v-if="editForm.oshare==='1' && editForm.taskOut==='1'">
<el-input type="number" style="width:150px;" v-model="editForm.shareFee" :precision="2" :step="100" :min="0" placeholder="分享赚佣金" @change="editXmTaskSomeFields(editForm,'shareFee',$event)"></el-input >
<font color="blue">开通分享赚后起效佣金从任务预算中扣除如果未发生分享佣金则不扣除一般建议为任务佣金的1%-5%</font>
</el-form-item>
<el-steps :active="calcTaskStep" align-center simple>
<el-step title="发布" description="任务创建成功后即发布"></el-step>
<el-step title="竞标" description="候选人参与竞标,或者由责任人主动设置候选人"></el-step>
@ -345,7 +355,7 @@ import XmMenuEdit from '../xmMenu/XmMenuEdit.vue';
id:'',name:'',parentTaskid:'',parentTaskname:'',projectId:'',projectName:'',level:'3',sortLevel:'0',executorUserid:'',executorUsername:'',
preTaskid:'',preTaskname:'',startTime:'',endTime:'',milestone:'',description:'',remarks:'',createUserid:'',createUsername:'',createTime:'',taskOut:'0',
rate:0,budgetAt:'',budgetWorkload:'',actAt:'',actWorkload:'',taskState:'0',taskClass:'0',toTaskCenter:'0',actStartTime:'',actEndTime:'',taskType:'4',planType:'w2',settleSchemel:'1',ntype:'0',childrenCnt:0,wtype:'',rworkload:0,
uniInnerPrice:80,uniOutPrice:100,
uniInnerPrice:80,uniOutPrice:100,crowd:'0',oshare:'0',shareFee:0
},
/**begin 在下面加自定义属性,记得补上面的一个逗号**/
menuVisible:false,
@ -357,8 +367,8 @@ import XmMenuEdit from '../xmMenu/XmMenuEdit.vue';
groupUserSelectVisible:false,
execGroupUserSelectVisible:false,
budgetDateRanger: [
util.formatDate.format(beginDate, "yyyy-MM-dd HH:mm:ss"),
util.formatDate.format(endDate, "yyyy-MM-dd HH:mm:ss")
util.formatDate(beginDate, "yyyy-MM-dd HH:mm:ss"),
util.formatDate(endDate, "yyyy-MM-dd HH:mm:ss")
],
actDateRanger: [
],

6
src/views/xm/core/xmTask/XmTaskMng.vue

@ -1754,12 +1754,12 @@ export default {
var startTime = new Date();
const endTime = new Date();
endTime.setTime(startTime.getTime() + 3600 * 1000 * 24 * 7 * 2); //
i.createTime = util.formatDate.format(
i.createTime = util.formatDate(
createTime,
"yyyy-MM-dd HH:mm:ss"
);
i.startTime = util.formatDate.format(startTime, "yyyy-MM-dd HH:mm:ss");
i.endTime = util.formatDate.format(endTime, "yyyy-MM-dd HH:mm:ss");
i.startTime = util.formatDate(startTime, "yyyy-MM-dd HH:mm:ss");
i.endTime = util.formatDate(endTime, "yyyy-MM-dd HH:mm:ss");
});
var params={
xmTasks:taskTemplates2,

Loading…
Cancel
Save