Commit e2cbdf26 authored by renjintao's avatar renjintao

jugement

parent 702f110f
<template> <template>
<div class="wu_bg"> <div class="wu_bg">
<div class="mass_box"> <div class="mass_box">
<div class="mass_list"> <div class="mass_list">
<h2 class="btn_play">未完工({{cardlist.length}} <h2 class="btn_play">未完工({{cardlist.length}}
...@@ -8,13 +7,7 @@ ...@@ -8,13 +7,7 @@
<Button class="button" type="primary" @click="rechecked">反选</Button> <Button class="button" type="primary" @click="rechecked">反选</Button>
</h2> </h2>
<div class="list01"> <div class="list01">
<Tag <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">{{item.prefix}}.{{item.code}}</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"
>{{item.prefix}}.{{item.code}}</Tag>
</div> </div>
</div> </div>
<div class="chuanse"> <div class="chuanse">
...@@ -31,16 +24,7 @@ ...@@ -31,16 +24,7 @@
</Button> </Button>
</h2> </h2>
<div class="list02"> <div class="list02">
<Tag <Tag type="dot" class="tag_card02" v-for="(item,index) in hegelist" :key="index" :name="item.id" :checkable="false" closable @on-close="hegeClose">{{item.prefix}}.{{ item.code}}</Tag>
type="dot"
class="tag_card02"
v-for="(item,index) in hegelist"
:key="index"
:name="item.id"
:checkable="false"
closable
@on-close="hegeClose"
>{{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">
...@@ -52,12 +36,7 @@ ...@@ -52,12 +36,7 @@
</Button> </Button>
</h2> </h2>
<div class="list02"> <div class="list02">
<Tag <Tag type="dot" class="tag_card02" v-for="(item,index) in ranglist" :key="index" :name="item.id" :checkable="false" closable @on-close="handleClose">{{item.prefix}}.{{ item.code}}</Tag>
type="dot" class="tag_card02"
v-for="(item,index) in ranglist" :key="index"
:name="item.id" :checkable="false"
closable @on-close="handleClose"
>{{item.prefix}}.{{ 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">
...@@ -68,12 +47,7 @@ ...@@ -68,12 +47,7 @@
</Button> </Button>
</h2> </h2>
<div class="list02"> <div class="list02">
<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.prefix}}.{{ item.code}}</Tag>
type="dot" class="tag_card02"
v-for="(item,index) in fanlist" :key="index"
:name="item.id" :checkable="false"
closable @on-close="fanClose"
>{{item.prefix}}.{{ 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">
...@@ -84,12 +58,7 @@ ...@@ -84,12 +58,7 @@
</Button> </Button>
</h2> </h2>
<div class="list02"> <div class="list02">
<Tag <Tag type="dot" class="tag_card02" v-for="(item,index) in feilist" :key="item.id" :name="item.id" :checkable="false" closable @on-close="feiClose">{{item.prefix}}.{{ item.code}}</Tag>
type="dot" class="tag_card02"
v-for="(item,index) in feilist" :key="item.id"
:name="item.id" :checkable="false"
closable @on-close="feiClose"
>{{item.prefix}}.{{ 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">
...@@ -98,11 +67,7 @@ ...@@ -98,11 +67,7 @@
<Select v-model="orderForm.question" style="width:80%"> <Select v-model="orderForm.question" style="width:80%">
<Option value class="option-text">请选择</Option> <Option value class="option-text">请选择</Option>
<!-- :disabled="feilist.length == 0 ? true:false" placeholder="选择问题原因" --> <!-- :disabled="feilist.length == 0 ? true:false" placeholder="选择问题原因" -->
<Option <Option v-for="item in problemList" :value="item.problem" :key="item.index">{{ item.problem }}</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%">
...@@ -132,14 +97,17 @@ ...@@ -132,14 +97,17 @@
<Modal v-model="suModal" :title="mTitle" @on-ok="okModal"> <Modal v-model="suModal" :title="mTitle" @on-ok="okModal">
<p>是否全部取消?</p> <p>是否全部取消?</p>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "../api"; import Api from "../api";
import OrderSendReview from "./orderSendReview"; import OrderSendReview from "./orderSendReview";
export default { export default {
name: "starOrder", name: "starOrder",
components: { OrderSendReview }, components: {
OrderSendReview
},
data() { data() {
return { return {
checkedflag: false, checkedflag: false,
...@@ -148,22 +116,18 @@ export default { ...@@ -148,22 +116,18 @@ export default {
mTitle: "确认弹框", mTitle: "确认弹框",
num: "", num: "",
surMasg: "", surMasg: "",
entity: {},//获取展示数据 entity: {}, //获取展示数据
rules: { rules: {
question: [ question: [{
{
required: true, required: true,
message: "请选择问题原因", message: "请选择问题原因",
trigger: "change" trigger: "change"
} }],
], useroption: [{
useroption: [
{
required: true, required: true,
message: "请选择责任人", message: "请选择责任人",
trigger: "change" trigger: "change"
} }]
]
}, },
orderForm: { orderForm: {
question: "", question: "",
...@@ -174,23 +138,42 @@ export default { ...@@ -174,23 +138,42 @@ export default {
ranglist: [], ranglist: [],
fanlist: [], fanlist: [],
feilist: [], feilist: [],
titleCode: '',//送审单号 titleCode: '', //送审单号
problemList: [ problemList: [{
{ problem: "问题描述01",id:1 }, problem: "问题描述01",
{ problem: "问题描述02",id:2 }, id: 1
{ problem: "问题描述03",id:3 } },
{
problem: "问题描述02",
id: 2
},
{
problem: "问题描述03",
id: 3
}
], ],
blameList: [ blameList: [{
{ user: "责任人01",id:1 }, user: "责任人01",
{ user: "责任人02",id:2 }, id: 1
{ user: "责任人03",id:3 } },
{
user: "责任人02",
id: 2
},
{
user: "责任人03",
id: 3
}
] ]
}; };
}, },
created() { created() {
this.loadFun(); this.loadFun();
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
mounted() { mounted() {
...@@ -204,24 +187,26 @@ export default { ...@@ -204,24 +187,26 @@ export default {
methods: { methods: {
loadFun() { loadFun() {
let pid = Number(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){ if (u.productStatus == 1) {
this.hegelist.push(u) this.hegelist.push(u)
} }
if(u.productStatus==2){ if (u.productStatus == 2) {
this.feilist.push(u) this.feilist.push(u)
} }
if(u.productStatus==3){ if (u.productStatus == 3) {
this.ranglist.push(u) this.ranglist.push(u)
} }
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)
} }
}); });
...@@ -230,7 +215,9 @@ export default { ...@@ -230,7 +215,9 @@ export default {
.catch(e => { .catch(e => {
this.$Message.error("连接错误"); this.$Message.error("连接错误");
}); });
Api.orderanddispatchinfos({ id: pid }).then(res=>{ Api.orderanddispatchinfos({
id: pid
}).then(res => {
if (res.success && res.result) { if (res.success && res.result) {
this.entity = res.result; this.entity = res.result;
} }
...@@ -425,197 +412,87 @@ export default { ...@@ -425,197 +412,87 @@ export default {
}, },
// 提交 // 提交
submit() { submit() {
let hegeops={}; let hegeops = {};
let rangops={}; let rangops = {};
let fanxops={}; let fanxops = {};
let feipops={}; let feipops = {};
let cardseops={}; let cardseops = {};
let lists = []; let lists = [];
let pass01 = this.hegelist.length>0; let pass01 = this.hegelist.length > 0;
let pass02 = this.ranglist.length>0; let pass02 = this.ranglist.length > 0;
let pass03 = this.fanlist.length>0; let pass03 = this.fanlist.length > 0;
let pass04 = this.feilist.length>0; let pass04 = this.feilist.length > 0;
let pass05 = this.cardlist.length>0; let pass05 = this.cardlist.length > 0;
if(pass01){ if (pass01) {
hegeops = { hegeops = {
prodcutIds: [], prodcutIds: [],
productStatus: this.hegelist[0].productStatus productStatus: this.hegelist[0].productStatus
}; };
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)}) this.hegelist.map(uh => {
lists = [hegeops]; hegeops.prodcutIds.push(uh.id)
if(pass02){ })
rangops = {
prodcutIds: [],
productStatus: this.ranglist[0].productStatus
};
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)})
lists = [hegeops,rangops];
if(pass03){
fanxops = {
prodcutIds: [],
productStatus: this.fanlist[0].productStatus
};
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)})
lists = [hegeops,rangops,fanxops];
if(pass05){
cardseops = {
prodcutIds: [],
productStatus: this.cardlist[0].productStatus
}
this.cardlist.map(ch=>{cardseops.prodcutIds.push(ch.id)})
lists = [cardseops,hegeops,rangops,fanxops];
}
}
}
} }
if(pass02){ if (pass02) {
rangops = { rangops = {
prodcutIds: [], prodcutIds: [],
productStatus: this.ranglist[0].productStatus productStatus: this.ranglist[0].productStatus
}; };
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)}) this.ranglist.map(ur => {
lists = [rangops]; rangops.prodcutIds.push(ur.id)
if(pass01){ })
hegeops = {
prodcutIds: [],
productStatus: this.hegelist[0].productStatus
};
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)})
lists = [hegeops,rangops];
if(pass03){
fanxops = {
prodcutIds: [],
productStatus: this.fanlist[0].productStatus
};
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)})
lists = [hegeops,rangops,fanxops];
if(pass05){
cardseops = {
prodcutIds: [],
productStatus: this.cardlist[0].productStatus
}
this.cardlist.map(ch=>{cardseops.prodcutIds.push(ch.id)})
lists = [cardseops,hegeops,rangops,fanxops];
}
}
}
} }
if(pass03){ if (pass03) {
fanxops = { fanxops = {
prodcutIds: [], prodcutIds: [],
productStatus: this.fanlist[0].productStatus productStatus: this.fanlist[0].productStatus
}; };
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)}) this.fanlist.map(uf => {
lists = [fanxops]; fanxops.prodcutIds.push(uf.id)
if(pass01){ })
hegeops = {
prodcutIds: [],
productStatus: this.hegelist[0].productStatus
};
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)})
lists = [hegeops,fanxops];
if(pass02){
rangops = {
prodcutIds: [],
productStatus: this.ranglist[0].productStatus
};
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)})
lists = [hegeops,rangops,fanxops];
if(pass05){
cardseops = {
prodcutIds: [],
productStatus: this.cardlist[0].productStatus
}
this.cardlist.map(ch=>{cardseops.prodcutIds.push(ch.id)})
lists = [cardseops,hegeops,rangops,fanxops];
}
}
}
} }
if(pass05){ if (pass05) {
cardseops = { cardseops = {
prodcutIds: [], prodcutIds: [],
productStatus: this.cardlist[0].productStatus productStatus: this.cardlist[0].productStatus
} }
this.cardlist.map(ch=>{cardseops.prodcutIds.push(ch.id)}) this.cardlist.map(ch => {
lists = [cardseops]; cardseops.prodcutIds.push(ch.id)
if(pass02){ })
rangops = {
prodcutIds: [],
productStatus: this.ranglist[0].productStatus
};
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)})
lists = [cardseops,rangops];
if(pass01){
hegeops = {
prodcutIds: [],
productStatus: this.hegelist[0].productStatus
};
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)})
lists = [cardseops,hegeops,rangops];
if(pass03){
fanxops = {
prodcutIds: [],
productStatus: this.fanlist[0].productStatus
};
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)})
lists = [cardseops,hegeops,rangops,fanxops];
}
}
}
} }
if(pass04){ if (pass04) {
feipops = { feipops = {
prodcutIds: [], prodcutIds: [],
productStatus: this.feilist[0].productStatus, productStatus: this.feilist[0].productStatus,
cause: this.orderForm.question, cause: this.orderForm.question,
reporter: this.orderForm.useroption reporter: this.orderForm.useroption
}; };
this.feilist.map(un=>{feipops.prodcutIds.push(un.id)}) this.feilist.map(un => {
lists = [cardseops,feipops]; feipops.prodcutIds.push(un.id)
if(pass01){ })
hegeops = {
prodcutIds: [],
productStatus: this.hegelist[0].productStatus
};
this.hegelist.map(uh=>{hegeops.prodcutIds.push(uh.id)})
lists = [hegeops,feipops];
if(pass02){
rangops = {
prodcutIds: [],
productStatus: this.ranglist[0].productStatus
};
this.ranglist.map(ur=>{rangops.prodcutIds.push(ur.id)})
lists = [hegeops,rangops,feipops];
if(pass03){
fanxops = {
prodcutIds: [],
productStatus: this.fanlist[0].productStatus
};
this.fanlist.map(uf=>{fanxops.prodcutIds.push(uf.id)})
lists = [hegeops,rangops,fanxops,feipops];
if(pass05){
cardseops = {
prodcutIds: [],
productStatus: this.cardlist[0].productStatus
}
this.cardlist.map(ch=>{cardseops.prodcutIds.push(ch.id)})
lists = [cardseops,hegeops,rangops,fanxops];
} }
if (cardseops.productStatus) {
lists.push(cardseops)
} }
if (hegeops.productStatus) {
lists.push(hegeops)
} }
if (rangops.productStatus) {
lists.push(rangops)
} }
if (fanxops.productStatus) {
lists.push(fanxops)
} }
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,
list: lists list: lists
}; };
Api.submitData(parmes).then(res=>{ Api.submitData(parmes).then(res => {
if(res.success){ if (res.success) {
this.$Message.success("保存成功!"); this.$Message.success("保存成功!");
}else{ } else {
this.$Message.success("保存失败~"); this.$Message.success("保存失败~");
} }
}) })
...@@ -624,10 +501,10 @@ export default { ...@@ -624,10 +501,10 @@ export default {
sendOrder() { sendOrder() {
let orderse = [] let orderse = []
let orderIds = [] let orderIds = []
this.feilist.map(item=>{ this.feilist.map(item => {
orderse.push(item.prefix+'.'+item.code) orderse.push(item.prefix + '.' + item.code)
// orderIds.push(item.id) // orderIds.push(item.id)
orderIds.push(item.code)//工作流获取数据,暂时传code数组 orderIds.push(item.code) //工作流获取数据,暂时传code数组
}) })
let strOder = orderse.join(",") let strOder = orderse.join(",")
this.entity.cause = this.orderForm.question; this.entity.cause = this.orderForm.question;
...@@ -636,7 +513,7 @@ export default { ...@@ -636,7 +513,7 @@ export default {
this.entity.orderIds = orderIds; this.entity.orderIds = orderIds;
this.$refs["formValidate"].validate(valid => { this.$refs["formValidate"].validate(valid => {
if (valid) { if (valid) {
this.submit()//提交状态改变 this.submit() //提交状态改变
let parme = { let parme = {
reason: this.entity.cause, reason: this.entity.cause,
personLiableId: this.entity.reporter, personLiableId: this.entity.reporter,
...@@ -644,16 +521,16 @@ export default { ...@@ -644,16 +521,16 @@ export default {
orderId: this.$route.query.orderId, orderId: this.$route.query.orderId,
productIds: this.entity.orderIds, productIds: this.entity.orderIds,
} }
Api.getshenliNo(parme).then(res=>{ Api.getshenliNo(parme).then(res => {
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 this.entity.idlist = res.result.id
}else{ } else {
console.log("获取编号失败") console.log("获取编号失败")
} }
}) })
let parmeseData = this.entity// this.$Message.success("送审") let parmeseData = this.entity // this.$Message.success("送审")
console.info(parmeseData) console.info(parmeseData)
this.ModalOrder = true; this.ModalOrder = true;
this.$refs.orderSendReview.alertFun(parmeseData); this.$refs.orderSendReview.alertFun(parmeseData);
...@@ -666,8 +543,8 @@ export default { ...@@ -666,8 +543,8 @@ export default {
// console.log("old->",this.entity) // console.log("old->",this.entity)
let orderids = [] let orderids = []
orderids.push(this.entity.idlist) 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: orderids, idList: orderids,
code: this.entity.code, code: this.entity.code,
......
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