Commit 77479028 authored by 康振飞's avatar 康振飞

质量判定0

parent f01d4d91
......@@ -384,13 +384,12 @@
margin: 0 0 20px 0;
}
.list01{
min-height: 50px;
max-height: 155px;
overflow-x: auto;
.tag_card{
cursor: pointer;
margin: 0 20px 15px 0;
.hege{ i{color: #2680EB;} }
.rang{ i{color: #515A6E;} }
.fanxiu{ i{color: #FFA000;} }
.feipin{ i{color: #FE7777;} }
}
.ivu-tag-checked{
border: 1px solid #2680EB !important;
......@@ -400,6 +399,7 @@
}
}
.list02{
min-height: 50px;
.tag_card02{
margin: 0 20px 15px 0;
}
......
......@@ -5,8 +5,8 @@
<h2 class="heger">合格({{cardlist.length}}</h2>
<div class="mass_list">
<p class="btn_play">
<Button class="button" type="primary">全选</Button>
<Button class="button" type="primary">反选</Button>
<Button class="button" type="primary" @click="allcheck">全选</Button>
<Button class="button" type="primary" @click="rechecked">反选</Button>
</p>
<div class="list01">
<Tag type="dot" :checkable="true" class="tag_card" :checked="item.checked" size="large" v-for="(item,index) in cardlist" :name="item.id" :key="index"
......@@ -15,9 +15,9 @@
</div>
</div>
<div class="chuanse">
<Button class="button01">让步</Button>
<Button class="button02">返修</Button>
<Button class="button03">废品</Button>
<Button class="button01" @click="chanserang">让步</Button>
<Button class="button02" @click="chansefan">返修</Button>
<Button class="button03" @click="chansefei">废品</Button>
</div>
<div class="mass_list rangbu">
<h2 class="rangb">让步({{ranglist.length}}</h2>
......@@ -27,16 +27,16 @@
</div>
</div>
<div class="mass_list fanxiu_box">
<h2 class="fanxiu">返修({{ranglist.length}}</h2>
<h2 class="fanxiu">返修({{fanlist.length}}</h2>
<div class="list02">
<Tag type="dot" class="tag_card02" v-for="(item,index) in ranglist" :key="index" :name="item.id" :checkable="false" closable @on-close="handleClose">{{ item.code}}</Tag>
<Tag type="dot" class="tag_card02" v-for="(item,index) in fanlist" :key="index" :name="item.id" :checkable="false" closable @on-close="fanClose">{{ item.code}}</Tag>
</div>
</div>
<div class="mass_list fei_box">
<h2 class="feipin">废品({{ranglist.length}}</h2>
<h2 class="feipin">废品({{feilist.length}}</h2>
<div class="list02">
<Tag type="dot" class="tag_card02" v-for="(item,index) in ranglist" :key="index" :name="item.id" :checkable="false" closable @on-close="handleClose">{{ item.code}}</Tag>
<Tag type="dot" class="tag_card02" v-for="(item,index) in feilist" :key="index" :name="item.id" :checkable="false" closable @on-close="feiClose">{{ item.code}}</Tag>
<!-- <div class="file_card" v-for="(item,index) in ranglist" :label="item.id" :key="index">
{{item.code}}
<a class="del_card" @click="delCard"><Icon type="ios-close"/></a>
......@@ -44,19 +44,19 @@
</div>
</div>
<div class="fei_right">
<p>问题原因:<Select style="width:80%">
<!-- <Option value="" class="option-text">请选择</Option> placeholder="选择问题原因" -->
<p>问题原因:<Select style="width:80%" :disabled="feilist.length == 0 ? true:false">
<Option value="" class="option-text">请选择</Option><!-- :disabled="feilist.length>0" placeholder="选择问题原因" -->
<Option v-for="item in problemList" :value="item.number" :key="item.index">{{ item.number }}</Option>
</Select></p>
<p>责任归属:<Select style="width:80%">
<!-- <Option value="" class="option-text">请选择</Option> placeholder="选择责任人" -->
<p>责任归属:<Select style="width:80%" :disabled="feilist.length == 0 ? true:false">
<Option value="" class="option-text">请选择</Option> <!-- placeholder="选择责任人" -->
<Option v-for="item in blameList" :value="item.user" :key="item.index">{{ item.user }}</Option>
</Select></p>
</div>
</div>
<div class="futer flex fc-ev" >
<Button class="button" size='large' type="primary"> 提交</Button>
<Button class="button" size='large' type="primary"> 取消</Button>
<Button class="button" size='large' type="primary" @click="submit"> 提交</Button>
<Button class="button" size='large' @click="toOrder"> 取消</Button>
</div>
</div>
</template>
......@@ -69,129 +69,89 @@ export default {
cardlist:[
{
status:0,
code:1001210011,
code:1001210101,
id:1,
checked:false,
},{
status:1,
code:1001210012,
code:1001210102,
id:2,
checked:false,
},{
status:2,
code:1001210013,
code:1001210103,
id:3,
checked:false,
},{
status:3,
code:1001210014,
code:1001210104,
id:4,
checked:false,
},{
status:0,
code:1001210011,
code:1001210105,
id:5,
checked:false,
},{
status:1,
code:1001210012,
code:1001210106,
id:6,
checked:false,
},{
status:2,
code:1001210013,
code:1001210107,
id:7,
checked:false,
},{
status:3,
code:1001210014,
code:1001210108,
id:8,
checked:false,
},{
status:0,
code:1001210015,
code:1001210109,
id:9,
checked:false,
},{
status:1,
code:1001210016,
code:1001210110,
id:10,
checked:false,
},{
status:2,
code:1001210017,
code:1001210111,
id:11,
checked:false,
},{
status:3,
code:1001210018,
code:1001210112,
id:12,
checked:false,
},{
status:0,
code:1001210019,
code:1001210113,
id:13,
checked:false,
},{
status:1,
code:10012100110,
code:1001210114,
id:14,
checked:false,
},{
status:2,
code:10012100111,
code:1001210115,
id:15,
checked:false,
},{
status:3,
code:10012100112,
code:1001210116,
id:16,
checked:false,
},
],
ranglist:[
{
status:0,
code:1001210011,
id:1,
checked:false,
},{
status:1,
code:1001210012,
id:2,
checked:false,
},{
status:2,
code:1001210013,
id:3,
checked:false,
},{
status:3,
code:1001210014,
id:4,
checked:false,
},{
status:0,
code:1001210011,
id:1,
checked:false,
},{
status:1,
code:1001210012,
id:2,
checked:true,
},{
status:2,
code:1001210013,
id:3,
checked:false,
},{
status:3,
code:1001210014,
id:4,
checked:false,
},
],
ranglist:[],
fanlist:[],
feilist:[],
problemList:[
{ number:"问题描述01" , },
{ number:"问题描述02" , },
......@@ -225,14 +185,96 @@ export default {
delCard(){
this.$Message.success("删除一条")
},
// 全选
allcheck(){
this.cardlist.map((u,i)=>{
u.checked = true
})
},
// 反选
rechecked(){
this.cardlist.map((u,i)=>{ u.checked = !u.checked })
},
changeCards(checked,name){
// console.log(checked)
// console.log(name)
let lists = this.cardlist
lists.map((u,i)=>{
if(u.id==name){ u.checked = checked }
})
},
// 让步
chanserang(){
let oldList = this.cardlist
let indese=[]
oldList.map((u,i)=>{
if(u.checked){
this.ranglist.push(u)
}
})
indese = oldList.filter(item => !this.ranglist.includes(item))
this.cardlist = indese
},
// 返工
chansefan(){
let oldList = this.cardlist
let indese=[]
oldList.map((u,i)=>{
if(u.checked){
this.fanlist.push(u)
}
})
indese = oldList.filter(item => !this.fanlist.includes(item))
this.cardlist = indese
},
// 废品
chansefei(){
let oldList = this.cardlist
let indese=[]
oldList.map((u,i)=>{
if(u.checked){
this.feilist.push(u)
}
})
indese = oldList.filter(item => !this.feilist.includes(item))
this.cardlist = indese
},
handleClose(event,name){
console.log(name)
let rangold = this.ranglist
let index = this.ranglist.indexOf(name);
let ide = this.cardlist.includes(name);
let itemlist = rangold.filter(item => {
if(item.id == name){ return item }
})
this.ranglist.splice(index, 1);
this.cardlist.splice(ide, 0, itemlist[0]);
},
fanClose(event,name){
let fanold = this.fanlist
let index = this.fanlist.indexOf(name);
let ide = this.cardlist.includes(name);
let itemlist = fanold.filter(item => {
if(item.id == name){ return item }
})
this.fanlist.splice(index, 1);
this.cardlist.splice(ide, 0, itemlist[0]);
},
feiClose(event,name){
let feiold = this.feilist
let index = this.feilist.indexOf(name);
let ide = this.cardlist.includes(name);
let itemlist = feiold.filter(item => {
if(item.id == name){ return item }
})
this.feilist.splice(index, 1);
this.cardlist.splice(ide, 0, itemlist[0]);
},
// 提交
submit(){
this.$Message.success("提交中...")
},
// 取消
toOrder(){
this.$router.push("/produce/orderlist");
},
},
}
......
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