Commit 897f05a8 authored by kangzhenfei's avatar kangzhenfei

质量判定

parent de0677ce
...@@ -9,18 +9,12 @@ ...@@ -9,18 +9,12 @@
<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 <Tag
type="dot" type="dot" :checkable="true"
:checkable="true" class="tag_card" size="large"
class="tag_card"
size="large"
v-for="(item,index) in cardlist" v-for="(item,index) in cardlist"
:name="item.id" :name="item.id" :key="index" :checked="item.checked"
:key="index" color="primary" @on-change="changeCards"
:checked="item.checked"
color="primary"
@on-change="changeCards"
>{{item.prefix}}.{{item.code}}</Tag> >{{item.prefix}}.{{item.code}}</Tag>
</div> </div>
</div> </div>
...@@ -47,7 +41,7 @@ ...@@ -47,7 +41,7 @@
:checkable="false" :checkable="false"
closable closable
@on-close="hegeClose" @on-close="hegeClose"
>{{ item.code}}</Tag> >{{item.prefix}}.{{ item.code}}</Tag>
</div> </div>
</div> </div>
<div class="mass_list rangbu" v-if="ranglist.length>0"> <div class="mass_list rangbu" v-if="ranglist.length>0">
...@@ -60,15 +54,11 @@ ...@@ -60,15 +54,11 @@
</h2> </h2>
<div class="list02"> <div class="list02">
<Tag <Tag
type="dot" type="dot" class="tag_card02"
class="tag_card02" v-for="(item,index) in ranglist" :key="index"
v-for="(item,index) in ranglist" :name="item.id" :checkable="false"
:key="index" closable @on-close="handleClose"
:name="item.id" >{{item.prefix}}.{{ item.code}}</Tag>
:checkable="false"
closable
@on-close="handleClose"
>{{ item.code}}</Tag>
</div> </div>
</div> </div>
<div class="mass_list fanxiu_box" v-if="fanlist.length>0"> <div class="mass_list fanxiu_box" v-if="fanlist.length>0">
...@@ -80,15 +70,11 @@ ...@@ -80,15 +70,11 @@
</h2> </h2>
<div class="list02"> <div class="list02">
<Tag <Tag
type="dot" type="dot" class="tag_card02"
class="tag_card02" v-for="(item,index) in fanlist" :key="index"
v-for="(item,index) in fanlist" :name="item.id" :checkable="false"
:key="index" closable @on-close="fanClose"
:name="item.id" >{{item.prefix}}.{{ item.code}}</Tag>
:checkable="false"
closable
@on-close="fanClose"
>{{ item.code}}</Tag>
</div> </div>
</div> </div>
<div class="mass_list fei_box" v-if="feilist.length>0"> <div class="mass_list fei_box" v-if="feilist.length>0">
...@@ -100,15 +86,11 @@ ...@@ -100,15 +86,11 @@
</h2> </h2>
<div class="list02"> <div class="list02">
<Tag <Tag
type="dot" type="dot" class="tag_card02"
class="tag_card02" v-for="(item,index) in feilist" :key="index"
v-for="(item,index) in feilist" :name="item.id" :checkable="false"
:key="index" closable @on-close="feiClose"
:name="item.id" >{{item.prefix}}.{{ item.code}}</Tag>
:checkable="false"
closable
@on-close="feiClose"
>{{ item.code}}</Tag>
</div> </div>
</div> </div>
<div class="fei_right" v-if="feilist.length>0"> <div class="fei_right" v-if="feilist.length>0">
...@@ -134,14 +116,9 @@ ...@@ -134,14 +116,9 @@
</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="ranglist.length>0||fanlist.length>0||feilist.length>0">
<Button <Button class="button" size="large" type="primary" @click="sendOrder" v-if="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="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" -->
<Button class="button" size="large" @click="toOrder">取消</Button> <Button class="button" size="large" @click="toOrder">取消</Button>
</div> </div>
<!-- 订单送审 --> <!-- 订单送审 -->
...@@ -160,7 +137,7 @@ ...@@ -160,7 +137,7 @@
</template> </template>
<script> <script>
import Api from "../api"; import Api from "../api";
import OrderSendReview from "@/components/orderOperator/orderSendReview"; import OrderSendReview from "./orderSendReview";
export default { export default {
name: "starOrder", name: "starOrder",
components: { OrderSendReview }, components: { OrderSendReview },
...@@ -172,6 +149,7 @@ export default { ...@@ -172,6 +149,7 @@ export default {
mTitle: "确认弹框", mTitle: "确认弹框",
num: "", num: "",
surMasg: "", surMasg: "",
entity: {},//获取展示数据
rules: { rules: {
question: [ question: [
{ {
...@@ -225,18 +203,37 @@ export default { ...@@ -225,18 +203,37 @@ export default {
}, },
methods: { methods: {
loadFun() { loadFun() {
let pid = this.$route.query.id; // JSON.stringify() let pid = Number(this.$route.query.id); // JSON.stringify()
Api.getpaged({ id: pid }).then(res => { Api.getpaged({ id: pid }).then(res => {
if (res.success) { if (res.success) {
let resoult = res.result; let resoult = res.result;
resoult.filter(u => { resoult.filter(u => {
u.checked = false; u.checked = false;
if(u.productStatus==1){
this.hegelist.push(u)
}
if(u.productStatus==2){
this.feilist.push(u)
}
if(u.productStatus==3){
this.ranglist.push(u)
}
if(u.productStatus==4){
this.fanlist.push(u)
}if(u.productStatus==0){
this.cardlist.push(u)
}
}); });
this.cardlist = resoult;
} else {
console.log(res.error);
} }
})
.catch(e => {
this.$Message.error("连接错误");
}); });
Api.orderanddispatchinfos({ id: pid }).then(res=>{
if (res.success && res.result) {
this.entity = res.result;
}
})
}, },
// 全选 // 全选
allcheck() { allcheck() {
...@@ -345,7 +342,8 @@ export default { ...@@ -345,7 +342,8 @@ export default {
if (unmb == 3) { if (unmb == 3) {
this.cansolfei(); this.cansolfei();
this.suModal = false; this.suModal = false;
} else { }
if (unmb == 0) {
this.cansolhege(); this.cansolhege();
this.suModal = false; this.suModal = false;
} }
...@@ -356,21 +354,21 @@ export default { ...@@ -356,21 +354,21 @@ export default {
v.productStatus = 0 v.productStatus = 0
this.cardlist.unshift(v); this.cardlist.unshift(v);
}); });
this.hegeplist = []; this.hegelist = [];
}, },
hegeClose(event, name) { hegeClose(event, name) {
let hegeold = this.hegelist; let hegeold = this.hegelist;
let inde = this.hegelist.findIndex(item => { let ind = this.hegelist.findIndex(hgitem => {
return item.id === name; return hgitem.id === name;
}); });
let utemlist = hegeold.filter(utem => { let hgtemlist = hegeold.filter(hgtem => {
if (utem.id == name) { if (hgtem.id == name) {
utem.productStatus = 0 hgtem.productStatus = 0
return utem; return hgtem;
} }
}); });
this.hegelist.splice(inde, 1); this.hegelist.splice(ind, 1);
this.cardlist.splice(0, 0, utemlist[0]); this.cardlist.splice(0, 0, hgtemlist[0]);
}, },
cansolRang() { cansolRang() {
let rangblist = this.ranglist; let rangblist = this.ranglist;
...@@ -426,27 +424,54 @@ export default { ...@@ -426,27 +424,54 @@ export default {
}, },
// 提交 // 提交
submit() { submit() {
this.$Message.success("提交中..."); console.log(this.ranglist)
// this.feilist.cause = this.orderForm.question;
// this.feilist.reporter = this.orderForm.useroption;
let hegeops = {
prodcutIds: [],
productStatus: this.hegelist[0].productStatus||''
};
let rangops = {
prodcutIds: [],
productStatus: this.ranglist[0].productStatus||''
};
let fanxops = {
prodcutIds: [],
productStatus: this.fanlist[0].productStatus||''
};
// let prodcutIds = [],productStatus=this.hegelist[0].productStatus;
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)})
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)})
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)})
let lists = [hegeops,rangops,fanxops];
let parmes={ let parmes={
dispatchId: this.$route.query.id, dispatchId: this.$route.query.id,
orderId: this.$route.query.orderId, orderId: this.$route.query.orderId,
list: [ list: lists
{ // [
"productStatus": 0, // this.feilist,
"prodcutIds": [ // this.hegelist,
0 // this.ranglist,
], // this.fanlist,
"cause": "string", // {
"reporter": "string" // "productStatus": 0,
} // "prodcutIds": [
] // 0
}; // ],
// "cause": "string",
let executeId = this.$route.query.executeId; // "reporter": "string"
console.log() // }
// Api.submitData().then(res=>{ // ]
};
// }) // let executeId = this.$route.query.executeId;
console.log(parmes)
Api.submitData(parmes).then(res=>{
if(res.success){
this.$Message.success("提交成功!");
}else{
this.$Message.success("提交失败~");
}
})
}, },
// 送审 // 送审
sendOrder() { sendOrder() {
...@@ -454,6 +479,7 @@ export default { ...@@ -454,6 +479,7 @@ export default {
if (valid) { if (valid) {
// this.$Message.success("送审...") // this.$Message.success("送审...")
this.ModalOrder = true; this.ModalOrder = true;
this.$refs.orderSendReview.intData(this.entity);
} }
}); });
}, },
......
<template>
<div class="detail">
<Row>
<Filed :span="6" :name="l('productName')">{{info.orderInfo.productName}}</Filed>
<Filed :span="6" :name="l('drawnNumber')">{{info.orderInfo.drawnNumber}}</Filed>
<Filed :span="6" :name="l('status')">{{info.orderInfo.status}}</Filed>
<Filed :span="6" :name="l('mesCode')">{{info.orderInfo.mesCode}}</Filed>
<Filed :span="6" :name="l('batchNumber')">{{info.orderInfo.batchNumber}}</Filed>
<Filed :span="6" :name="l('quantity')">{{info.orderInfo.quantity}}</Filed>
<Filed :span="6" :name="l('demandFinishDate')">{{info.orderInfo.demandFinishDate}}</Filed>
<Filed :span="6" :name="l('urgencyLevel')">
<state code="plan.order.urgencyLevel" :value="info.orderInfo.urgencyLevel+''" type="text"></state>
</Filed>
<Filed :span="6" :name="l('stage')">
<state code="plan.order.stage" :value="info.orderInfo.stage+''" type="text"></state>
</Filed>
<Filed :span="6" :name="l('taskType')">
<state code="plan.order.taskType" :value="info.orderInfo.taskType+''" type="text"></state>
</Filed>
<Filed :span="6" :name="l('materialId')">
<state code="plan.order.material" :value="info.orderInfo.materialId+''" type="text"></state>
</Filed>
</Row>
</div>
</template>
<script>
export default {
name: 'orderInfos',
props: ['info'],
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
},
data() {
return {}
},
methods: {
arry2Name(arryList, values) {
//预警类别转换
var codes = arryList
var name = ''
for (let i in codes) {
if (values == codes[i].value) {
name = codes[i].name
}
}
return name
},
l(key) {
key = 'orderInfo' + '.' + key
return this.$t(key)
}
}
}
</script>
\ No newline at end of file
<template>
<div style="width:80%;margin:0 auto" :style="{ height: divHeight }">
<OrderInfos v-if="info.status" :info="info"></OrderInfos>
<Table
:loading="loading"
border
:columns="columns1"
:data="dataList"
class="tableCommon"
v-if="osrMoreList"
></Table>
<Process
ref="userProcess"
schemaIdVal="123327da-42b3-41f6-b785-cf933f137a95"
/>
</div>
</template>
<script>
import OrderInfos from './orderInfos'
import Process from '@/components/orderOperator/process'
export default {
name: 'orderSendReview',
components: {
OrderInfos,
Process
},
data() {
return {
loading: false,
divHeight: '300px',
osrOneList: false, //一条数据显示详细
osrMoreList: false, //多条数据只显示列表
info: {
status: true,
orderInfo: []
},
ruleValidate: {
// reviewUser: [
// {
// required: true,
// message: '请选择审批人',
// trigger: 'blur',
// type: 'array'
// }
// ]
},
orderSearchForm: {
reviewUser: '' //订单名称
},
columns1: [
{
title: '订单编码',
key: 'mesCode',
width: 180,
tooltip: true
},{
title: '产品名称',
key: 'productName',
tooltip: true
},{
title: '图号',
key: 'drawnNumber',
width: 80
},{
title: '状态',
key: 'status',
width: 100,
tooltip: true
},{
title: '批次号',
key: 'batchNumber',
align: 'right',
width: 70
},{
title: '节点日期',
key: 'demandFinishDate',
width: 100,
tooltip: true
},{
title: '计划数量',
key: 'quantity',
width: 100,
tooltip: true
},
],
dataList: [],
dataListRetrun: [], //确定后返回数据
dataListRetrunNew: {
schemaId: '123327da-42b3-41f6-b785-cf933f137a95', //订单送审的schemaId
idList: [], //订单id List
codeList: [], //订单编号List
operatorIdList: [] //操作员id
} //确定后返回数据
}
},
created() {
var theight = window.innerHeight - 460 + 'px'
this.divHeight = theight
},
mounted() {
//this.dataList=;
window.onresize = () => {
///浏览器窗口大小变化
return (() => {
window.screenHeight = window.innerHeight
this.divHeight = window.screenHeight - 460 + 'px'
})()
}
},
methods: {
intData(data) {
//打开modal层时给订单list赋值
this.orderInfo = []
this.dataList = []
this.dataList = data
this.osrOneList = false
this.osrMoreList = false
this.orderSearchForm.reviewUser = ''
if (data.length == 1) {
this.info.status = true
this.info.orderInfo = data[0]
} else if (data.length > 1) {
this.osrMoreList = true
this.info.status = false
this.info.orderInfo = []
}
},
returnDataList() {
this.dataListRetrunNew.idList = []
this.dataListRetrunNew.codeList = []
this.dataListRetrunNew.operatorIdList = []
this.dataList.forEach((item) => {
this.dataListRetrunNew.idList.push(item.id)
this.dataListRetrunNew.codeList.push(item.mesCode)
})
//this.dataListRetrunNew.operatorIdList= this.orderSearchForm.reviewUser
let ues = this.$refs.userProcess
this.dataListRetrunNew.operatorIdList = ues.immutData
// alert(JSON.stringify( this.dataListRetrunNew))
//返回审批数据
return this.dataListRetrunNew
}
}
}
</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