Commit 3b235bbe authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into product

parents 19fd0a8f 9fd98ed7
<template> <template>
<div class="data-filling"> <div class="data-filling">
<div class="data-title"> <div class="data-title flex">
<span class="ml20">产品号</span> <div class="fg">
<ProductNumberSelect <span class="ml20">产品号</span>
v-model="product_ID" <ProductNumberSelect
:eid="row.orderId" v-model="product_ID"
ref="codes" :eid="row.orderId"
@on-change="change" ref="codes"
class="select-produt-name" @on-change="change"
/> :multiple="false"
class="select-produt-name"
/>
</div>
<!-- <template v-if="datasearch.isMain!=1"> <!-- <template v-if="datasearch.isMain!=1">
<span class="ml20">汇报板次</span> <span class="ml20">汇报板次</span>
<Select @on-change="boardonchange" v-model="board_ID" class="w200"> <Select @on-change="boardonchange" v-model="board_ID" class="w200">
...@@ -20,7 +24,8 @@ ...@@ -20,7 +24,8 @@
>{{ item.boardNumber }}</Option> >{{ item.boardNumber }}</Option>
</Select> </Select>
</template>--> </template>-->
<Button type="primary" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button> <div class="tr">
<Button type="primary" @click="QcCardChecker(1)" class="title_btn ml10">自检</Button>
<Button type="primary" :disabled="ishavhj" @click="QcCardChecker(2)" class="title_btn ml10">互检</Button> <Button type="primary" :disabled="ishavhj" @click="QcCardChecker(2)" class="title_btn ml10">互检</Button>
<Button type="primary" :disabled="ishavzj" @click="SendCheck()" class="title_btn ml10">送检</Button> <Button type="primary" :disabled="ishavzj" @click="SendCheck()" class="title_btn ml10">送检</Button>
<Button <Button
...@@ -29,6 +34,8 @@ ...@@ -29,6 +34,8 @@
@click="SendCheckRecord()" @click="SendCheckRecord()"
class="title_btn ml10" class="title_btn ml10"
>送检记录</Button> >送检记录</Button>
</div>
</div> </div>
<div class="table-i"> <div class="table-i">
<Table border :columns="columns12" :data="recorddata"> <Table border :columns="columns12" :data="recorddata">
...@@ -413,7 +420,7 @@ export default { ...@@ -413,7 +420,7 @@ export default {
}); });
}, },
change(v) { change(v) {
this.datasearch.productcode = v.join(","); this.datasearch.productcode = v;
this.loaddata(); this.loaddata();
}, },
showrecordData(params, fill_in_user_type, isedit) { showrecordData(params, fill_in_user_type, isedit) {
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
</Form> </Form>
</div> </div>
</div> </div>
<div class="futer flex fc-ev" v-if="ranglist.length>0||fanlist.length>0||feilist.length>0"> <div class="futer flex fc-ev" v-if="hegelist.length>0||ranglist.length>0||fanlist.length>0||feilist.length>0">
<Button class="button" size="large" type="primary" @click="sendOrder" v-if="feilist.length>0" >送审</Button> <Button class="button" size="large" type="primary" @click="sendOrder" v-if="feilist.length>0" >送审</Button>
<Button class="button" size="large" type="primary" @click="submit" v-else>保存</Button> <Button class="button" size="large" type="primary" @click="submit" v-else>保存</Button>
<!-- :disabled="hegelist.length!=0&&fanlist.length!=0&&ranglist.length!=0" --> <!-- :disabled="hegelist.length!=0&&fanlist.length!=0&&ranglist.length!=0" -->
...@@ -220,7 +220,8 @@ export default { ...@@ -220,7 +220,8 @@ export default {
} }
if(u.productStatus==4){ if(u.productStatus==4){
this.fanlist.push(u) this.fanlist.push(u)
}if(u.productStatus==0){ }
if(u.productStatus==0){
this.cardlist.push(u) this.cardlist.push(u)
} }
}); });
...@@ -332,19 +333,19 @@ export default { ...@@ -332,19 +333,19 @@ export default {
okModal() { okModal() {
let unmb = this.num; let unmb = this.num;
if (unmb == 1) { if (unmb == 1) {
this.cansolhege(); this.cansolRang();
this.suModal = false; this.suModal = false;
} }
if (unmb == 2) { if (unmb == 2) {
this.cansolfei(); this.cansolfan();
this.suModal = false; this.suModal = false;
} }
if (unmb == 3) { if (unmb == 3) {
this.cansolRang(); this.cansolfei();
this.suModal = false; this.suModal = false;
} }
if (unmb == 4) { if (unmb == 0) {
this.cansolfan(); this.cansolhege();
this.suModal = false; this.suModal = false;
} }
}, },
...@@ -545,6 +546,7 @@ export default { ...@@ -545,6 +546,7 @@ export default {
} }
} }
} }
// console.log(lists)
let parmes={ let parmes={
dispatchId: this.$route.query.id, dispatchId: this.$route.query.id,
orderId: this.$route.query.orderId, orderId: this.$route.query.orderId,
...@@ -585,6 +587,7 @@ export default { ...@@ -585,6 +587,7 @@ export default {
if(res.success){ if(res.success){
// this.$refs.orderSendReview.info.orderInfo.code = res.result.code // this.$refs.orderSendReview.info.orderInfo.code = res.result.code
this.entity.code = res.result.code this.entity.code = res.result.code
this.entity.idlist = res.result.id
}else{ }else{
console.log("获取编号失败") console.log("获取编号失败")
} }
...@@ -600,10 +603,12 @@ export default { ...@@ -600,10 +603,12 @@ export default {
// 确定送审 // 确定送审
orderSendOk() { orderSendOk() {
// console.log("old->",this.entity) // console.log("old->",this.entity)
let orderids = []
orderids.push(this.entity.idlist)
console.log("new->",this.entity) console.log("new->",this.entity)
let parmese ={ let parmese ={
schemaId: "c2e09c9b-02a9-4188-97a6-cdb68d50a64a", schemaId: "c2e09c9b-02a9-4188-97a6-cdb68d50a64a",
idList: this.entity.orderIds, idList: orderids,
code: this.entity.code, code: this.entity.code,
operatorIdList: this.$refs.orderSendReview.returnDataList(), operatorIdList: this.$refs.orderSendReview.returnDataList(),
} }
......
<template> <template>
<div class="gs_set"> <div class="gs_set">
<div class="gs_top"> <div class="gs_top">
<div class="gs_top_box total_time"> <div class="gs_top_box total_time">
<img src="@/assets/imgicon/execute/time01.png" alt=""/> <img src="@/assets/imgicon/execute/time01.png" alt />
<!-- <Icon type="ios-time" /> --> <!-- <Icon type="ios-time" /> -->
<div class="gs_bo01"> <div class="gs_bo01">
<span class="shi">总工时</span> <span class="shi">总工时</span>
<span class="number">{{allHours}}</span> <span class="number">{{allHours}}</span>
</div>
</div>
<Divider type="vertical" class="line_slit"/>
<div class="gs_top_box allocated">
<!-- <Icon type="md-pie" /> -->
<img src="@/assets/imgicon/execute/time02.png" alt=""/>
<div class="gs_bo01">
<span class="shi">待分配</span>
<span class="number">{{waitHours}}</span>
</div>
</div>
</div> </div>
<div class="gs_card_box"> </div>
<Card class="gs_card" v-for="(item,index) in cardMan" :key="index"> <Divider type="vertical" class="line_slit" />
<p slot="title" class="gs_title"> <div class="gs_top_box allocated">
{{item.userTitle}} <!-- <Icon type="md-pie" /> -->
<!-- <span class="fr">{{item.cardNo}}</span> --> <img src="@/assets/imgicon/execute/time02.png" alt />
</p> <div class="gs_bo01">
<!-- <p class="gs_p">所属车间:车间A{{i}}</p> <span class="shi">待分配</span>
<p class="gs_p">所属班组:班组B{{i}}</p> --> <span class="number">{{waitHours}}</span>
<p class="gs_time"> </div>
<span class="b_size">{{item.workHour}}</span> 工时 </div>
</p> </div>
<!-- <p class="gs_p"> <div class="gs_card_box">
<Card class="gs_card" v-for="(item,index) in cardMan" :key="index">
<p slot="title" class="gs_title">
{{item.userTitle}}
<!-- <span class="fr">{{item.cardNo}}</span> -->
</p>
<!-- <p class="gs_p">所属车间:车间A{{i}}</p>
<p class="gs_p">所属班组:班组B{{i}}</p>-->
<p class="gs_time">
<span class="b_size">{{item.workHour}}</span> 工时
</p>
<!-- <p class="gs_p">
<span class="b_size">100</span> <span class="b_size">100</span>
</p> </p>
<p class="gs_p"> <p class="gs_p">
<span class="b_size">100</span> <span class="b_size">100</span>
</p> --> </p>-->
<p class="gs_footer"> <p class="gs_footer">
<!-- <a class="gs_edit" @click="editItem"> <!-- <a class="gs_edit" @click="editItem">
<Icon type="md-create" /> <Icon type="md-create" />
编辑</a> --> 编辑</a>-->
<a class="gs_del" @click="delItem(item.id)"> <a class="gs_del" @click="delItem(item.id)">
<Icon type="ios-trash-outline" /> <Icon type="ios-trash-outline" />删除
删除</a> </a>
</p> </p>
</Card> </Card>
<a class="gs_card gs_add" @click="addItem"> <a class="gs_card gs_add" @click="addItem" v-show="this.allHours!=0">
<Icon type="ios-add" /> <Icon type="ios-add" />
</a> </a>
</div>
<!-- 新增弹框 -->
<Modal
v-model="addmodal" width='1100' :mask-closable="false"
title="添加人员" footer-hide >
<addview ref="addview" @on-close="cancel" @on-ok="addInfo"></addview>
</Modal>
</div> </div>
<!-- 新增弹框 -->
<Modal v-model="addmodal" width="1100" :mask-closable="false" title="添加人员" footer-hide>
<addview ref="addview" @on-close="cancel" @on-ok="addInfo"></addview>
</Modal>
</div>
</template> </template>
<script> <script>
import addview from "./add"; import addview from "./add";
import Api from "../api"; import Api from "../api";
export default { export default {
name:'starOrder', name: "starOrder",
components: {addview,}, components: { addview },
data(){ data() {
return{ return {
starmodal: false, starmodal: false,
msg:'确认要删除吗?', msg: "确认要删除吗?",
title:'删除确认', title: "删除确认",
addmodal: false, addmodal: false,
allHours: 240, allHours: 240,
waitHours: 200, waitHours: 200,
cardMan:[ cardMan: [
// { // {
// userName:"张三", // userName:"张三",
// cardNo:123123, // cardNo:123123,
// workHour:50, // workHour:50,
// } // }
] ]
};
},
created() {
// this.treeHeight = window.innerHeight - 120;
this.laodHorse();
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
mounted() {
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
this.treeHeight = window.innerHeight - 120;
})();
};
},
methods: {
laodHorse() {
let parme = {
dispatchId: this.$route.query.id,
routingDetailId: this.$route.query.routid,
count: this.$route.query.quantity
};
Api.getallhours(parme).then(res => {
if (res.result) {
this.allHours = res.result.allHours;
this.waitHours = res.result.waitHours;
this.$refs.addview.maxHour = this.waitHours;
} else {
console.log("获取失败。");
} }
});
let parm = {
conditions: [
{
fieldName: "dispatchId",
fieldValue: this.$route.query.id,
conditionalType: "Equal"
}
]
};
Api.getentrylist(parm).then(rest => {
if (rest.success) {
this.cardMan = rest.result;
} else {
console.log("获取失败。");
}
});
}, },
created() { addItem() {
// this.treeHeight = window.innerHeight - 120; // let aa=this.$refs.addview.$refs.userSelected.getSelectItems()
this.laodHorse() // console.log("1",aa)
}, // if(this.allHours==0){
async fetch({ store, params }) { // this.$Message.info("无工时分配...")
await store.dispatch("loadDictionary"); // 加载数据字典 // return
// }
this.addmodal = true;
let id = this.$route.query.id;
Api.getentryusers({ Id: id }).then(res => {
let result = res.result;
result.map(u => {
u.checked = false;
});
this.$refs.addview.listMan = result;
});
}, },
mounted() { editItem() {
window.onresize = () => { this.$Message.success("编辑工时...");
///浏览器窗口大小变化
return (() => {
this.treeHeight = window.innerHeight - 120;
})();
};
}, },
methods: { delItem(itmid) {
laodHorse(){ this.$Modal.confirm({
let parme = { title: this.title,
dispatchId: this.$route.query.id, content: "<p>" + this.msg + "</p>",
routingDetailId: this.$route.query.routid, onOk: () => {
count: this.$route.query.quantity Api.deletehours(itmid).then(res => {
} if (res.success) {
Api.getallhours(parme).then(res=>{ this.laodHorse();
if(res.result){ this.$Message.success("工时已删除");
this.allHours = res.result.allHours } else {
this.waitHours = res.result.waitHours this.$Message.error("删除失败...");
this.$refs.addview.maxHour = this.waitHours
}else{
console.log("获取失败。")
}
})
let parm = {
conditions: [
{
fieldName: "dispatchId",
fieldValue: this.$route.query.id,
conditionalType: "Equal"
}
],
}
Api.getentrylist(parm).then(rest =>{
if(rest.success){
this.cardMan = rest.result
}else{
console.log("获取失败。")
}
})
},
addItem(){
// let aa=this.$refs.addview.$refs.userSelected.getSelectItems()
// console.log("1",aa)
if(this.allHours==0){
this.$Message.info("无工时分配...")
return
} }
this.addmodal = true });
let id = this.$route.query.id
Api.getentryusers({Id:id}).then(res=>{
let result = res.result
result.map(u=>{
u.checked = false
})
this.$refs.addview.listMan = result
})
},
editItem(){
this.$Message.success("编辑工时...")
},
delItem(itmid){
this.$Modal.confirm({
title: this.title,
content: "<p>" + this.msg + "</p>",
onOk: () => {
Api.deletehours(itmid).then(res=>{
if(res.success){
this.laodHorse()
this.$Message.success("工时已删除")
}else{
this.$Message.error("删除失败...")
}
})
}
});
},
cancel(){
this.addmodal = false
},
addInfo(formdata){
let parme = {
users: [
{
userTitle: formdata.userName,
userId: formdata.userId
}
],
workHour: formdata.workHour,
dispatchId: this.$route.query.id,
routingDetailId: this.$route.query.routid,
count: this.$route.query.quantity
}
Api.subcreatehours(parme).then(res => {
if(res.success){ this.laodHorse() }
})
this.addmodal = false
} }
});
},
cancel() {
this.addmodal = false;
}, },
} addInfo(formdata) {
let parme = {
users: [
{
userTitle: formdata.userName,
userId: formdata.userId
}
],
workHour: formdata.workHour,
dispatchId: this.$route.query.id,
routingDetailId: this.$route.query.routid,
count: this.$route.query.quantity
};
Api.subcreatehours(parme).then(res => {
if (res.success) {
this.laodHorse();
this.addmodal = false;
}else{
this.addmodal = true;
}
});
}
}
};
</script> </script>
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