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

judgment

parent 92481535
...@@ -2,7 +2,7 @@ import Api from '@/plugins/request' ...@@ -2,7 +2,7 @@ import Api from '@/plugins/request'
export default { export default {
index: `${PlanUrl}/orderexecutequalityrecord/dispatchproductcodes`, index: `${PlanUrl}/orderexecutequalityrecord/dispatchproductcodes`,
getpaged(params) { getpaged(params) {
return Api.post(`${PlanUrl}/orderexecutequalityrecord/dispatchproductcodes`, params); return Api.get(`${PlanUrl}/orderexecutequalityrecord/dispatchproductcodes`, params);
}, },
submitData(params) { submitData(params) {
return Api.post(`${PlanUrl}/orderexecutequalityrecord/checkdispatchproduct`, params); return Api.post(`${PlanUrl}/orderexecutequalityrecord/checkdispatchproduct`, params);
......
...@@ -9,19 +9,21 @@ ...@@ -9,19 +9,21 @@
<Button class="button" type="primary" @click="rechecked">反选</Button> <Button class="button" type="primary" @click="rechecked">反选</Button>
</p> </p>
<div class="list01"> <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" <!-- -->
<Tag type="dot" :checkable="true" class="tag_card" size="large" v-for="(item,index) in cardlist" :name="item.id" :key="index" :checked="item.checked"
color="primary" @on-change="changeCards" > color="primary" @on-change="changeCards" >
{{item.code}}</Tag> {{item.prefix}}.{{item.code}}</Tag>
</div> </div>
</div> </div>
<div class="chuanse"> <div class="chuanse">
<Button class="button01" @click="chanserang">让步</Button> <Button class="button01" @click="chanserang">让步</Button>
<Button class="button02" @click="chansefan">返修</Button> <Button class="button02" @click="chansefan">返修</Button>
<Button class="button03" @click="chansefei"></Button> <Button class="button03" @click="chansefei">不合格</Button>
</div> </div>
<div class="mass_list rangbu" v-if="ranglist.length>0"> <div class="mass_list rangbu" v-if="ranglist.length>0">
<h2 class="rangb">让步({{ranglist.length}} <h2 class="rangb">让步({{ranglist.length}}
<Button class="fr" @click="cansolRang">取消让步</Button> <!-- consoleFun cansolRang -->
<Button class="fr" @click="consoleFun(1)"><Icon type="md-close" /></Button>
</h2> </h2>
<div class="list02"> <div class="list02">
...@@ -30,7 +32,8 @@ ...@@ -30,7 +32,8 @@
</div> </div>
<div class="mass_list fanxiu_box" v-if="fanlist.length>0"> <div class="mass_list fanxiu_box" v-if="fanlist.length>0">
<h2 class="fanxiu">返修({{fanlist.length}} <h2 class="fanxiu">返修({{fanlist.length}}
<Button class="fr" @click="cansolfan">取消返修</Button> <!-- consoleFun(1) cansolfan -->
<Button class="fr" @click="consoleFun(2)"><Icon type="md-close" /></Button>
</h2> </h2>
<div class="list02"> <div class="list02">
<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> <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>
...@@ -38,8 +41,9 @@ ...@@ -38,8 +41,9 @@
</div> </div>
<div class="mass_list fei_box" v-if="feilist.length>0"> <div class="mass_list fei_box" v-if="feilist.length>0">
<h2 class="feipin">废品({{feilist.length}} <h2 class="feipin">不合格品({{feilist.length}}
<Button class="fr" @click="cansolfei">取消废品</Button> <!-- consoleFun(1) cansolfei-->
<Button class="fr" @click="consoleFun(3)"><Icon type="md-close" /></Button>
</h2> </h2>
<div class="list02"> <div class="list02">
<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> <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>
...@@ -55,23 +59,15 @@ ...@@ -55,23 +59,15 @@
<FormItem label="问题原因:" prop="question" style="width:100%"> <FormItem label="问题原因:" prop="question" style="width:100%">
<Select v-model="orderForm.question"style="width:80%"> <Select v-model="orderForm.question"style="width:80%">
<Option value="" class="option-text">请选择</Option><!-- :disabled="feilist.length == 0 ? true:false" placeholder="选择问题原因" --> <Option value="" class="option-text">请选择</Option><!-- :disabled="feilist.length == 0 ? true:false" placeholder="选择问题原因" -->
<Option v-for="item in problemList" :value="item.number" :key="item.index">{{ item.number }}</Option> <Option v-for="item in problemList" :value="item.problem" :key="item.index">{{ item.problem }}</Option>
</Select> </Select>
</FormItem> </FormItem>
<FormItem label="责任归属:" prop="useroption" style="width:100%"> <FormItem label="责任归属:" prop="useroption" style="width:100%">
<Select v-model="orderForm.useroption" style="width:80%"> <Select v-model="orderForm.useroption" style="width:80%">
<Option value="" class="option-text">请选择</Option><!-- :disabled="feilist.length == 0 ? true:false" placeholder="选择问题原因" --> <Option value="" class="option-text">请选择</Option>
<Option v-for="item in blameList" :value="item.user" :key="item.index">{{ item.user }}</Option> <Option v-for="item in blameList" :value="item.user" :key="item.index">{{ item.user }}</Option>
</Select> </Select>
</FormItem> </FormItem>
<!-- <p>问题原因:<Select style="width:80%">
<Option value="" class="option-text">请选择</Option><!-- :disabled="feilist.length == 0 ? true:false" 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>
<Option v-for="item in blameList" :value="item.user" :key="item.index">{{ item.user }}</Option>
</Select></p> -->
</Form> </Form>
</div> </div>
</div> </div>
...@@ -93,6 +89,13 @@ ...@@ -93,6 +89,13 @@
<Button type="primary" @click="orderSendOk">确定送审</Button> <Button type="primary" @click="orderSendOk">确定送审</Button>
</div> </div>
</Modal> </Modal>
<!-- 确定弹框 @on-cancel="cancelModal"-->
<Modal
v-model="suModal"
:title="mTitle"
@on-ok="okModal">
<p>是否全部取消?</p>
</Modal>
</div> </div>
</template> </template>
<script> <script>
...@@ -105,6 +108,10 @@ export default { ...@@ -105,6 +108,10 @@ export default {
return{ return{
checkedflag:false, checkedflag:false,
ModalOrder:false, ModalOrder:false,
suModal:false,
mTitle:'确认弹框',
num:'',
surMasg:'',
rules:{ rules:{
question: [ question: [
{ {
...@@ -125,96 +132,14 @@ export default { ...@@ -125,96 +132,14 @@ export default {
question:'', question:'',
useroption:'' useroption:''
}, },
cardlist:[ cardlist:[],
{
status:0,
code:100111111,
id:1,
checked:false,
},{
status:1,
code:100111222,
id:2,
checked:false,
},{
status:2,
code:100111333,
id:3,
checked:false,
},{
status:3,
code:100111444,
id:4,
checked:false,
},{
status:0,
code:100111555,
id:5,
checked:false,
},{
status:1,
code:100111666,
id:6,
checked:false,
},{
status:2,
code:100111777,
id:7,
checked:false,
},{
status:3,
code:100111888,
id:8,
checked:false,
},{
status:0,
code:100111999,
id:9,
checked:false,
},{
status:1,
code:101112000,
id:10,
checked:false,
},{
status:2,
code:101112111,
id:11,
checked:false,
},{
status:3,
code:101112222,
id:12,
checked:false,
},{
status:0,
code:101112333,
id:13,
checked:false,
},{
status:1,
code:101112444,
id:14,
checked:false,
},{
status:2,
code:101112555,
id:15,
checked:false,
},{
status:3,
code:101112666,
id:16,
checked:false,
},
],
ranglist:[], ranglist:[],
fanlist:[], fanlist:[],
feilist:[], feilist:[],
problemList:[ problemList:[
{ number:"问题描述01" , }, { problem:"问题描述01" , },
{ number:"问题描述02" , }, { problem:"问题描述02" , },
{ number:"问题描述03" , }, { problem:"问题描述03" , },
], ],
blameList:[ blameList:[
{ user:"责任人01" , }, { user:"责任人01" , },
...@@ -239,28 +164,34 @@ export default { ...@@ -239,28 +164,34 @@ export default {
}, },
methods: { methods: {
loadFun(){ loadFun(){
let pid = JSON.stringify(this.$route.query.id) let pid = this.$route.query.id // JSON.stringify()
Api.getpaged({id:pid}).then(res=>{ Api.getpaged({id:pid}).then(res=>{
console.log(res) if(res.success){
let resoult = res.result
resoult.filter(u=>{ u.checked = false})
this.cardlist = resoult
}else{
console.log(res.error)
}
}) })
}, },
delCard(){
this.$Message.success("删除一条")
},
// 全选 // 全选
allcheck(){ allcheck(){
this.cardlist.map((u,i)=>{ let cardslist = this.cardlist
u.checked = true cardslist.map((a)=>{
a.checked = true
}) })
}, },
// 反选 // 反选
rechecked(){ rechecked(){
this.cardlist.map((u,i)=>{ u.checked = !u.checked }) let cardslist = this.cardlist
cardslist.map((b)=>{ b.checked = !b.checked })
}, },
// 单选
changeCards(checked,name){ changeCards(checked,name){
let lists = this.cardlist let lists = this.cardlist
lists.map((u,i)=>{ lists.map((u,i)=>{
if(u.id==name){ u.checked = checked } if(u.id==name){ u.checked = true }
}) })
}, },
// 让步 // 让步
...@@ -288,7 +219,7 @@ export default { ...@@ -288,7 +219,7 @@ export default {
indese = oldList.filter(item => !this.fanlist.includes(item)) indese = oldList.filter(item => !this.fanlist.includes(item))
this.cardlist = indese this.cardlist = indese
}, },
// // 不合格
chansefei(){ chansefei(){
let oldList = this.cardlist let oldList = this.cardlist
let indese=[] let indese=[]
...@@ -311,6 +242,25 @@ export default { ...@@ -311,6 +242,25 @@ export default {
this.ranglist.splice(index, 1); this.ranglist.splice(index, 1);
this.cardlist.splice( 0,0, itemlist[0]); this.cardlist.splice( 0,0, itemlist[0]);
}, },
consoleFun(u){
this.suModal = true
this.num = u
},
okModal(){
let unmb = this.num
if(unmb==1){
this.cansolRang()
this.suModal = false
}
if(unmb==2){
this.cansolfan()
this.suModal = false
}
if(unmb==3){
this.cansolfei()
this.suModal = false
}
},
cansolRang(){ cansolRang(){
let rangblist = this.ranglist let rangblist = this.ranglist
rangblist.map(v =>{ rangblist.map(v =>{
......
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