Commit 4574f91a authored by 黄奎's avatar 黄奎

页面修改

parent 10764642
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
padding: 20px; padding: 20px;
margin-bottom: 25px; margin-bottom: 25px;
} }
.addPhase .bold{
.addPhase .bold {
font-weight: 760; font-weight: 760;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
...@@ -31,51 +32,39 @@ ...@@ -31,51 +32,39 @@
<div class="bold">名称</div> <div class="bold">名称</div>
<q-input clearable debounce filled maxlength="20" counter v-model="addMsg.FlowName" style="width:600px" <q-input clearable debounce filled maxlength="20" counter v-model="addMsg.FlowName" style="width:600px"
@input="$forceUpdate()" placeholder="名称" :rules="[val => !!val || '不能为空']" /> @input="$forceUpdate()" placeholder="名称" :rules="[val => !!val || '不能为空']" />
</div> </div>
<div class="box"> <div class="box">
<div class="bold">阶段适用范围</div> <div class="bold">阶段适用范围</div>
<q-btn class="q-mr-md" label="选择部门/成员" @click="outerVisible = true" /> <q-btn class="q-mr-md" label="选择部门/成员" @click="outerVisible = true" />
</div> </div>
<div class="box"> <div class="box">
<div class="bold">选择使用阶段</div> <div class="bold">选择使用阶段</div>
<div style="display:flex;align-items: center;"> <div style="display:flex;align-items: center;">
</div> </div>
</div> </div>
<div v-if="StageList"> <div v-if="StageList">
<div class="box" v-for="(x,y) in StageList" v-if="x.Type==2"> <div class="box" v-for="(x,y) in StageList" v-if="x.Type==2">
<div class="bold" v-if="x.Name=='已输单'">选择输单原因</div> <div class="bold" v-if="x.Name=='已输单'">选择输单原因</div>
<div class="bold" v-if="x.Name=='无效'">选择无效原因</div> <div class="bold" v-if="x.Name=='无效'">选择无效原因</div>
<div style="display:flex;align-items: center;flex-wrap: wrap;"> <div style="display:flex;align-items: center;flex-wrap: wrap;">
<q-checkbox v-model="addMsg.LoseCause" v-if="x.Name=='已输单'" <q-checkbox v-model="addMsg.LoseCause" v-if="x.Name=='已输单'" v-for="(item,index) in x.OptionsList" :key='index'
v-for="(item,index) in x.OptionsList" :key='index' :val="item.Id" :val="item.Id" :label="item.Name" />
:label="item.Name" /> <q-checkbox v-model="addMsg.InvalidCause" v-if="x.Name=='无效'" v-for="(item,index) in x.OptionsList"
<q-checkbox v-model="addMsg.InvalidCause" v-if="x.Name=='无效'" :key='index' :val="item.Id" :label="item.Name" />
v-for="(item,index) in x.OptionsList" :key='index' :val="item.Id"
:label="item.Name" />
</div> </div>
</div> </div>
</div> </div>
<div class="box"> <div class="box">
<el-form label-width="120px"> <el-form label-width="120px">
</el-form> </el-form>
<q-card-actions align="left" class="bg-white" > <q-card-actions align="left" class="bg-white">
<q-btn color="accent" class="q-mr-md" label="保存" @click="savemove()" style="width: 100px;" <q-btn color="accent" class="q-mr-md" label="保存" @click="savemove()" style="width: 100px;" :loading="loading" />
:loading="loading" />
<q-btn class="q-mr-md" label="返回" @click="goblck()" style="width: 60px;" /> <q-btn class="q-mr-md" label="返回" @click="goblck()" style="width: 60px;" />
</q-card-actions> </q-card-actions>
</div> </div>
<!-- 人员/部门选择 --> <!-- 人员/部门选择 -->
<choiceapprovalorbranch v-if="outerVisible" @close="outerVisible = false" @success="getsuccess2" :byval='showMember' cptype="1"></choiceapprovalorbranch> <choiceapprovalorbranch v-if="outerVisible" @close="outerVisible = false" @success="getsuccess2" :byval='showMember'
cptype="1"></choiceapprovalorbranch>
</div> </div>
</template> </template>
...@@ -97,48 +86,38 @@ ...@@ -97,48 +86,38 @@
data() { data() {
return { return {
loading: false, loading: false,
outerVisible:false, outerVisible: false,
addMsg:{ addMsg: {
FlowName:'', FlowName: '',
DeptEmpList:[], DeptEmpList: [],
UseStage:'', UseStage: '',
LoseCause:[], LoseCause: [],
InvalidCause:[], InvalidCause: [],
}, },
showMember:[], showMember: [],
StageList:[], StageList: [],
} }
}, },
created() { created() {
this.getCustomerStageList() this.getCustomerStageList()
}, },
methods: { methods: {
goblck() { //返回上一个页面
goblck() {//返回上一个页面 this.$router.go(-1); //返回上一层
this.$router.go(-1);//返回上一层
},
savemove(){
}, },
getCustomerStageList(){ savemove() {},
getCustomerStageList() {
getCustomerStageList({}).then(res => { getCustomerStageList({}).then(res => {
this.loading = false this.loading = false
if (res.Code == 1) { if (res.Code == 1) {
this.StageList = res.Data this.StageList = res.Data
} }
}) })
}, },
getsuccess2(list,type){ getsuccess2(list, type) {
console.log(list)
this.showMember = list this.showMember = list
this.outerVisible = false this.outerVisible = false
}, },
} }
} }
</script> </script>
\ No newline at end of file
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
text-indent: 15px; text-indent: 15px;
border-bottom: 1px dotted #eee; border-bottom: 1px dotted #eee;
} }
</style> </style>
<template> <template>
...@@ -35,28 +36,25 @@ ...@@ -35,28 +36,25 @@
<q-card-section class="q-pt-none" style="padding: 20px 0;"> <q-card-section class="q-pt-none" style="padding: 20px 0;">
<div style="display: flex;align-items: flex-start;justify-content: space-between;"> <div style="display: flex;align-items: flex-start;justify-content: space-between;">
<div style="width: 300px; margin: 0 20px;"> <div style="width: 300px; margin: 0 20px;">
<p style="margin: 0 0 10px 0;display: flex;align-items: center;">选择:<el-input <p style="margin: 0 0 10px 0;display: flex;align-items: center;">选择:<el-input style="width: 200px;"
style="width: 200px;" placeholder="输入关键字进行过滤" v-model="filterText"> placeholder="输入关键字进行过滤" v-model="filterText">
</el-input> </el-input>
</p> </p>
<el-tree class='ApprovalProcessBg' :filter-node-method="filterNode" :data="memberList" <el-tree class='ApprovalProcessBg' :filter-node-method="filterNode" :data="memberList" show-checkbox
show-checkbox ref="treeUser" :props="defaultProps" :render-after-expand="false" ref="treeUser" :props="defaultProps" :render-after-expand="false" node-key="DeptId"
node-key="DeptId" @check-change="handleNodeChange" @check='btncheck'> @check-change="handleNodeChange" @check='btncheck'>
</el-tree> </el-tree>
</div> </div>
<div style="width: 300px; margin: 0 20px;"> <div style="width: 300px; margin: 0 20px;">
<p style="margin: 0 0 20px 0;">已选:</p> <p style="margin: 0 0 20px 0;">已选:</p>
<div class="Approval_yxList"> <div class="Approval_yxList">
<li v-for="item in showMember">{{item.DeptName}} <li v-for="item in showMember">{{item.DeptName}}
<i @click="mySetCheckedKeys(item.DeptId)" <i @click="mySetCheckedKeys(item.DeptId)" class="el-icon-circle-close showMemberIcon"></i>
class="el-icon-circle-close showMemberIcon"></i>
</li> </li>
</div> </div>
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="closeEditOrder" /> <q-btn class="q-mr-md" label="取消" @click="closeEditOrder" />
...@@ -64,7 +62,6 @@ ...@@ -64,7 +62,6 @@
</q-card-actions> </q-card-actions>
</q-card> </q-card>
</q-dialog> </q-dialog>
</div> </div>
</template> </template>
...@@ -74,23 +71,20 @@ ...@@ -74,23 +71,20 @@
} from '../../../../../api/users/user' } from '../../../../../api/users/user'
export default { export default {
props: { props: {
outerindex: { outerindex: {
type: String, type: String,
default: '', default: '',
}, },
byval:{ byval: {
type: Array, type: Array,
default: [], default: [],
}, },
cptype:{//1是列表上使用2 新增使用 cptype: { //1是列表上使用2 新增使用
type:String, type: String,
default: '1', default: '1',
} }
}, },
data() { data() {
return { return {
IsShow: true, IsShow: true,
...@@ -104,21 +98,20 @@ ...@@ -104,21 +98,20 @@
showMember: [], showMember: [],
memberSetCheckedKeys: [], memberSetCheckedKeys: [],
sysUserKeys: [], sysUserKeys: [],
newList:[] newList: []
} }
}, },
created() { created() {
if(this.byval.length>0){ if (this.byval.length > 0) {
this.memberSetCheckedKeys = []; this.memberSetCheckedKeys = [];
this.showMember = JSON.parse(JSON.stringify(this.byval)) this.showMember = JSON.parse(JSON.stringify(this.byval))
this.byval.forEach(x=>{ this.byval.forEach(x => {
this.memberSetCheckedKeys.push(x.DeptId) this.memberSetCheckedKeys.push(x.DeptId)
}) })
} }
this.getMember()//部门下面选择员工 this.getMember() //部门下面选择员工
}, },
mounted() { mounted() {
}, },
watch: { watch: {
filterText(val) { filterText(val) {
...@@ -135,17 +128,13 @@ ...@@ -135,17 +128,13 @@
_this.$refs.treeUser.setCheckedKeys(_arr); _this.$refs.treeUser.setCheckedKeys(_arr);
} }
}).catch(() => { }).catch(() => {
}) })
}, },
filterNode(value, data) { filterNode(value, data) {
if (!value) return true; if (!value) return true;
return data.DeptName.indexOf(value) !== -1; return data.DeptName.indexOf(value) !== -1;
}, },
handleNodeChange(data, checked) { handleNodeChange(data, checked) {
console.log(data,checked)
data.IsCheck = checked; data.IsCheck = checked;
if (data.DataType == 2 && data.IsCheck) { //是员工且选中 if (data.DataType == 2 && data.IsCheck) { //是员工且选中
let isExsit = false let isExsit = false
...@@ -159,7 +148,7 @@ ...@@ -159,7 +148,7 @@
this.showMember.push({ this.showMember.push({
DeptName: data.DeptName, DeptName: data.DeptName,
DeptId: data.DeptId, DeptId: data.DeptId,
DataType:data.DataType DataType: data.DataType
}) })
this.memberSetCheckedKeys.push(data.DeptId) this.memberSetCheckedKeys.push(data.DeptId)
} }
...@@ -185,15 +174,15 @@ ...@@ -185,15 +174,15 @@
} }
} }
}, },
btncheck(){//对数据的处理 btncheck() { //对数据的处理
this.getdataprocess() this.getdataprocess()
}, },
getdataprocess(){ getdataprocess() {
}, },
getChildList(x,list){ getChildList(x, list) {
}, },
mySetCheckedKeys(id) { mySetCheckedKeys(id) {
...@@ -212,7 +201,7 @@ ...@@ -212,7 +201,7 @@
this.$emit('close') this.$emit('close')
}, },
saveOrderInfo() { saveOrderInfo() {
this.$emit('success',this.showMember,this.cptype) this.$emit('success', this.showMember, this.cptype)
} }
......
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