Commit 2680e4ba authored by renjintao's avatar renjintao

转续...

parent 3ad7209e
...@@ -27,19 +27,18 @@ ...@@ -27,19 +27,18 @@
<div v-width="50" class="fa-m fs"> <div v-width="50" class="fa-m fs">
<span>已选项</span> <span>已选项</span>
</div> </div>
<div class="fg"> <div class="fg">
<dl> <dl>
<dd v-for="(li,i) in checkedItems"> <dd v-for="(li,i) in checkedItems">
<div class="flex"> <div class="flex">
<span class="fg">{{li.userName}}</span> <span class="fg">{{li.userName}}</span>
<a @click="removeItem(li)"> <a @click="removeItem(li)">
<Icon type="md-close" size="16" /> <Icon type="md-close" size="16" />
</a> </a>
</div> </div>
</dd> </dd>
</dl> </dl>
</div> </div>
</div> </div>
</div> </div>
...@@ -53,13 +52,17 @@ ...@@ -53,13 +52,17 @@
clearable clearable
filterable filterable
> >
<Option v-for="item in dic" :value="item.value" :key="item.value" :label="item.label"> <Option
v-for="item in datas?datas:dic"
:value="item.value"
:key="item.value"
:label="item.label"
>
<div> <div>
<Icon :type="item.gender == 1 ? 'ios-man' : 'ios-woman'" /> {{ item.label }}
{{ item.label }}( <span style="color:#c3c3c3" v-if="item.cardNo">({{ item.cardNo }})</span>
<span style="color:#c3c3c3">{{ item.cardNo }}</span>)
<br /> <br />
<span style="color:#c3c3c3">{{ item.departmentTitle }}</span> <span style="color:#c3c3c3" v-if="item.departmentTitle">{{ item.departmentTitle }}</span>
</div> </div>
</Option> </Option>
</Select> </Select>
...@@ -111,6 +114,11 @@ export default { ...@@ -111,6 +114,11 @@ export default {
roleTitle: { roleTitle: {
type: String, type: String,
default: "" default: ""
},
datas: {
//自定义用户数据
type: Array,
default: null
} }
}, },
methods: { methods: {
...@@ -131,18 +139,18 @@ export default { ...@@ -131,18 +139,18 @@ export default {
}) })
.then(r => { .then(r => {
this.data = r.result; this.data = r.result;
if(this.theme=="list"){ if (this.theme == "list") {
this.departmentGroup(); this.departmentGroup();
} }
}); });
}, },
departmentGroup() { departmentGroup() {
var group = []; var group = [];
var users=this.$u.clone(this.data); var users = this.$u.clone(this.data);
if(this.name&&this.name.length>0){ if (this.name && this.name.length > 0) {
users.map(u=>{ users.map(u => {
u.checked=this.name.indexOf(u.id)>-1; u.checked = this.name.indexOf(u.id) > -1;
}) });
} }
group = this.$u.group(users, u => { group = this.$u.group(users, u => {
return u.departmentId; return u.departmentId;
...@@ -180,15 +188,15 @@ export default { ...@@ -180,15 +188,15 @@ export default {
this.$set(this.group, i, u); this.$set(this.group, i, u);
} }
}); });
this.listSetValue(); this.listSetValue();
}, },
//list 时,设置值。 //list 时,设置值。
listSetValue(){ listSetValue() {
var ids=[]; var ids = [];
this.checkedItems.map(u=>{ this.checkedItems.map(u => {
ids.push(u.id) ids.push(u.id);
}) });
this.$emit("on-change",ids); this.$emit("on-change", ids);
}, },
checkAll(item, i) { checkAll(item, i) {
item.children.map(u => { item.children.map(u => {
...@@ -207,9 +215,16 @@ export default { ...@@ -207,9 +215,16 @@ export default {
} else { } else {
if (!this.multiple) { if (!this.multiple) {
//单选时返回信息 //单选时返回信息
var item1 = this.dic.filter(u => u.value == this.value); if (this.datas && this.datas.length > 0) {
if (item1 && item1[0]) { var item2 = this.datas.filter(u => u.value == this.value);
items.push(item1[0]); if (item2 && item2[0]) {
items.push(item2[0]);
}
} else {
var item1 = this.dic.filter(u => u.value == this.value);
if (item1 && item1[0]) {
items.push(item1[0]);
}
} }
} else { } else {
//复选时返回 //复选时返回
...@@ -284,6 +299,11 @@ export default { ...@@ -284,6 +299,11 @@ export default {
this.getselectuser(v); this.getselectuser(v);
}, },
deep: true deep: true
},
datas(v) {
if (v) {
//alert(JSON.stringify(v))
}
} }
} }
}; };
......
...@@ -25,5 +25,14 @@ export default { ...@@ -25,5 +25,14 @@ export default {
entrentrycontinuestart(params) { entrentrycontinuestart(params) {
return Api.post(`${PlanUrl}/orderexecute/entrycontinue`, params); return Api.post(`${PlanUrl}/orderexecute/entrycontinue`, params);
}, },
//转序弹框产品+人员
productsandoperators(params) {
return Api.post(`${PlanUrl}/orderexecutehandon/productsandoperators`, params);
},
//确认发起转序
confirmproductsandoperator(params) {
return Api.post(`${PlanUrl}/orderexecutehandon/confirmproductsandoperator`, params);
},
} }
\ No newline at end of file
...@@ -37,26 +37,29 @@ export default { ...@@ -37,26 +37,29 @@ export default {
return { return {
gnFlag: 0, gnFlag: 0,
listTasks: [], listTasks: [],
dataLength: 0, dataLength: 0
}; };
}, },
props: { props: {
order: { order: {
type: String, type: [String, Number]
default: '',
}, },
asc: { asc: {
type: Boolean, type: Boolean,
default: true, default: true
},
statu: {
type: Number,
default: -9
} }
}, },
created() { created() {
this.loadTree(-9); this.loadTree();
}, },
methods: { methods: {
loadTree(value) { loadTree() {
let parmse = { let parmse = {
status: value, status: this.statu,
isAsc: this.asc isAsc: this.asc
}; };
Api.getCardList(parmse).then(res => { Api.getCardList(parmse).then(res => {
...@@ -83,14 +86,16 @@ export default { ...@@ -83,14 +86,16 @@ export default {
} }
}, },
watch: { watch: {
order(v) order(v) {
{
//alert(v) //alert(v)
}, },
asc(v) asc(v) {
{ this.asc = v;
this.asc=v this.loadTree();
this.loadTree(-9) },
statu(v) {
this.statu=v
this.loadTree();
} }
} }
}; };
......
...@@ -2,33 +2,44 @@ ...@@ -2,33 +2,44 @@
@import "./execute.less"; @import "./execute.less";
</style> </style>
<template> <template>
<div class="execute_box"> <div class="execute_box">
<!-- <div class="top_title"> <!-- <div class="top_title">
<span class="fl">{{orderTitle}}</span> <span class="fl">{{orderTitle}}</span>
<div>工单编号: 12001011</div> <div>工单编号: 12001011</div>
</div> --> </div>-->
<component :is="detail" :gdid="gdId" :row="row"/> <component :is="detail" :gdid="gdId" :row="row" />
<a class="gd_list" @click="orderlistMode = true">工单列表</a> <a class="gd_list" @click="orderlistMode = true">工单列表</a>
<a class="gn_area" @click="functionalMode = true">功能区</a> <a class="gn_area" @click="functionalMode = true">功能区</a>
<!-- 工单列表 --> <!-- 工单列表 -->
<Drawer placement="left" class="gd_box" :closable="false" <Drawer
:inner="true" :transfer="false" v-model="orderlistMode"> placement="left"
<div slot="header"> class="gd_box"
<div class="header"> :closable="false"
<a class="gd_tt" @click="goToOrder"><Icon type="ios-undo-outline" />工单列表</a> :inner="true"
<Dictionary code="taskList.status" class="select_star fr" v-model="odermodel" @on-change="searchOrder"></Dictionary> :transfer="false"
</Option> v-model="orderlistMode"
</Select> >
<div slot="header">
<div class="header">
<a class="gd_tt" @click="goToOrder">
<Icon type="ios-undo-outline" />工单列表
</a>
<Dictionary
code="taskList.status"
class="select_star fr"
v-model="odermodel"
@on-change="searchOrder"
></Dictionary>
</div> </div>
<div class="select_t"> <div class="select_t">
<Button @click="changeAsc">{{ascTitle}}</Button> <Button @click="changeAsc">{{ascTitle}}</Button>
</div> </div>
</div> </div>
<!-- 列表卡片主内容 --> <!-- 列表卡片主内容 -->
<orderlist ref="orderlist" :asc="asc" :order="inputId" /> <orderlist ref="orderlistref" :asc="asc" :statu="statu" :order="inputId" />
</Drawer> </Drawer>
<!-- 功能区 --> <!-- 功能区 -->
<Drawer <Drawer
class="gn_box" class="gn_box"
:closable="false" :closable="false"
:inner="true" :inner="true"
...@@ -54,22 +65,23 @@ export default { ...@@ -54,22 +65,23 @@ export default {
functionalMode: false, functionalMode: false,
gdId: 0, gdId: 0,
detail: null, detail: null,
row:{}, row: {},
odermodel: -9, odermodel: -9,
orderId: this.$route.query.id, orderId: this.$route.query.id,
condition: [], condition: [],
inputId: null, inputId: null,
asc:true, asc: true,
ascTitle:'时间正序排序' ascTitle: "时间正序排序",
statu:-9
}; };
}, },
created() { created() {
let row={} let row = {};
row.id = this.$route.query.id; row.id = this.$route.query.id;
row.orderId = this.$route.query.orderId; row.orderId = this.$route.query.orderId;
row.executeId = this.$route.query.executeId; row.executeId = this.$route.query.executeId;
this.row=row this.row = row;
this.inputId=this.$route.query.id this.inputId = this.$route.query.id;
this.detail = () => import("./starOrder/index"); this.detail = () => import("./starOrder/index");
}, },
async fetch({ store, params }) { async fetch({ store, params }) {
...@@ -84,11 +96,11 @@ export default { ...@@ -84,11 +96,11 @@ export default {
this.$router.push("/produce/orderlist"); this.$router.push("/produce/orderlist");
}, },
searchOrder(value) { searchOrder(value) {
if(value==''||value==null||value==undefined) if (value == null || typeof value == "undefined") {
{ value = -9;
value=-9 }
} this.statu=value
this.$refs.orderlist.loadTree(value); // this.$refs.orderlistref.loadTree(value);
}, },
changeTitle(number, type) { changeTitle(number, type) {
this.orderTitle = type; this.orderTitle = type;
...@@ -97,21 +109,21 @@ export default { ...@@ -97,21 +109,21 @@ export default {
this.detail = () => import("./starOrder/index"); this.detail = () => import("./starOrder/index");
} //进度汇报 } //进度汇报
if (number == 1) { if (number == 1) {
this.$Message.info("尊敬的用户,您没有该权限!") this.$Message.info("尊敬的用户,您没有该权限!");
// this.detail = () => import("./MaterialCollec/index"); // this.detail = () => import("./MaterialCollec/index");
} //物料领用 } //物料领用
if (number == 2) { if (number == 2) {
// this.detail = () => import("./productSet/index"); // this.detail = () => import("./productSet/index");
this.$Message.info("尊敬的用户,您没有该权限!") this.$Message.info("尊敬的用户,您没有该权限!");
} //产品装配 } //产品装配
if (number == 3) { if (number == 3) {
this.detail = () => import("./taskTime/index"); this.detail = () => import("./taskTime/index");
} //工时分配 } //工时分配
if (number == 4) { if (number == 4) {
this.$Message.info("尊敬的用户,您没有该权限!") this.$Message.info("尊敬的用户,您没有该权限!");
// this.detail = () => import("./preparation/index"); // this.detail = () => import("./preparation/index");
} //生产准备 } //生产准备
if (number == 5) { if (number == 5) {
this.detail = () => import("./ProcessCheck/index"); this.detail = () => import("./ProcessCheck/index");
} //工艺查看 } //工艺查看
if (number == 6) { if (number == 6) {
...@@ -124,31 +136,25 @@ export default { ...@@ -124,31 +136,25 @@ export default {
this.detail = () => import("./datafilling/index"); this.detail = () => import("./datafilling/index");
} //数据填报 } //数据填报
if (number == 9) { if (number == 9) {
this.$Message.info("尊敬的用户,您没有该权限!") this.$Message.info("尊敬的用户,您没有该权限!");
// this.detail = () => import("./testdata/index"); // this.detail = () => import("./testdata/index");
} //测试数据 } //测试数据
}, },
changeAsc() changeAsc() {
{ this.asc = !this.asc;
this.asc=!this.asc if (this.asc) {
if(this.asc) this.ascTitle = "时间正序排序";
{ } else {
this.ascTitle='时间正序排序' this.ascTitle = "时间倒序排序";
}
else
{
this.ascTitle='时间倒序排序'
} }
} }
}, },
watch: { watch: {
'$route.query.id'(v) "$route.query.id"(v) {
{ this.row.id = v;
this.row.id = v this.inputId = v;
this.inputId=v this.detail = () => import("./starOrder/index");
this.detail = () => import("./starOrder/index") }
},
} }
}; };
</script> </script>
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
<li>图号:{{entity.drawnNumber}}</li> <li>图号:{{entity.drawnNumber}}</li>
<li> <li>
状态: 状态:
<state code="plan.order.status" ref="state" :value="entity.status" type="text"></state> <state code="plan.order.status" ref="state" :value="entity.status" type="text" ></state>
</li> </li>
<li>订单编号:{{entity.mesCode}}</li> <li>订单编号:{{entity.mesCode}}</li>
<li>批次号:{{entity.batchNumber}}</li> <li>批次号:{{entity.batchNumber}}</li>
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
<ViewerImg :images="images" /> <ViewerImg :images="images" />
</div> </div>
</div> </div>
<Modal v-model="ransferModal" :title="transferTitle" fullscreen style="z-index:99999"> <Modal v-model="ransferModal" :title="transferTitle" fullscreen style="z-index:99999" :footer-hide="cardlist.length>0">
<div class="wu_bgModal"> <div class="wu_bgModal">
<div class="mass_box"> <div class="mass_box">
<div class="mass_list"> <div class="mass_list">
...@@ -99,16 +99,16 @@ ...@@ -99,16 +99,16 @@
:checked="item.checked" :checked="item.checked"
color="primary" color="primary"
@on-change="changeCards" @on-change="changeCards"
>{{item.prefix}}.{{item.code}}</Tag> >{{item.product_code}}</Tag>
</div> </div>
</div> </div>
</div> </div>
<div class="mass_box"> <div class="mass_box">
<UserSelect ref="userSelected" v-width="300" /> <UserSelect ref="userSelected" :datas="userlist" v-model="user" v-width="300" />
</div> </div>
</div> </div>
<div slot="footer"> <div slot="footer" >
<Button class="button" @click="ransferModal=false">取消</Button> <Button class="button" @click="ransferModal=false">取消</Button>
<Button class="button" type="primary" @click="ransOk">确定</Button> <Button class="button" type="primary" @click="ransOk">确定</Button>
</div> </div>
</Modal> </Modal>
...@@ -151,7 +151,12 @@ export default { ...@@ -151,7 +151,12 @@ export default {
: Number(this.$route.query.dispatchStatus) == 5 : Number(this.$route.query.dispatchStatus) == 5
? true ? true
: false, : false,
cardlist: [] cardlist: [],
detailId: null,
nextDetailId: null,
operatorId: null,
userlist: [],
user: null
}; };
}, },
created() { created() {
...@@ -309,12 +314,26 @@ export default { ...@@ -309,12 +314,26 @@ export default {
this.$parent.changeTitle(type, title); this.$parent.changeTitle(type, title);
}, },
getProduce() { getProduce() {
this.cardlist=[] this.cardlist = [];
let pid = Number(this.$route.query.id); // JSON.stringify() let pid = Number(this.$route.query.id); // JSON.stringify()
Api.getpaged({ id: pid }) let params = {
id: Number(this.$route.query.id),
executeId: Number(this.$route.query.executeId)
};
Api.productsandoperators(params)
.then(res => { .then(res => {
if (res.success) { if (res.success && res.result) {
let resoult = res.result; this.detailId = res.result.detailId;
this.nextDetailId = res.result.nextDetailId;
let users = res.result.users;
this.userlist = [];
users.forEach(u => {
(u.value = u.id), (u.label = u.userName);
this.userlist.push(u);
});
let resoult = res.result.products;
resoult.filter(u => { resoult.filter(u => {
u.checked = false; u.checked = false;
this.cardlist.push(u); this.cardlist.push(u);
...@@ -344,19 +363,50 @@ export default { ...@@ -344,19 +363,50 @@ export default {
let cardlist = this.cardlist; let cardlist = this.cardlist;
cardlist.map((u, i) => { cardlist.map((u, i) => {
if (u.id == name) { if (u.id == name) {
u.checked = true; u.checked = checked;
} }
}); });
}, },
//确定转续
ransOk() { ransOk() {
let cardlist = this.cardlist; let userInfo = this.$refs.userSelected.getSelectItems();
let upList=[] let cardlist = this.cardlist;
let upList = [];
cardlist.map((u, i) => { cardlist.map((u, i) => {
if (u.checked) { if (u.checked) {
upList.push(u.id) upList.push(u.id);
} }
}); });
alert(JSON.stringify(upList)); if (upList.length == 0) {
this.$Message.error("请选择转续的产品!");
return;
}
if (!userInfo || userInfo.length == 0) {
this.$Message.error("请选择人员!");
return;
}
let params = {
id: Number(this.$route.query.id),
detailId: this.detailId,
nextDetailId: this.nextDetailId,
productIds: upList,
operatorId: userInfo[0].id,
operator: userInfo[0].userName
};
Api.confirmproductsandoperator(params)
.then(res => {
if (res.success && res.result) {
this.$Message.success("转续成功");
this.ransferModal=false
}
else{
this.$Message.error("转续失败");
}
})
.catch(e => {
this.$Message.error("连接错误");
});
} }
}, },
watch: { watch: {
......
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