Commit a25dc3f1 authored by renjintao's avatar renjintao

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

parents ebee90b0 0152898e
......@@ -60,6 +60,9 @@ div::-webkit-scrollbar{
.fg{
flex-grow: 1;
}
.fs{
flex-shrink: 0;
}
.fg2{
flex-grow: 2;
}
......@@ -1292,4 +1295,45 @@ html [type=button] {
//显示富文本框样式
.detail .ivu-row .filed-col p .html p{
margin: 0 10px 0 0;
}
\ No newline at end of file
}
.lay100 {
height: calc(100vh - 105px);
background-color: #f5f6fa;
.con {
padding: 5px 5px 0px 10px;
}
.con_bord {
// margin: 15px 32px;
box-shadow: #c7c7c7 1px 2px 7px 3px;
}
background: rgba(245, 246, 250, 1);
}
.menu_side{
background: #fff!important;
margin: 5px 0 0 0!important;
border: 1px solid #dcdee2!important;
}
.show_menu{
width: 30px;
height: 30px;
position: fixed;
top: 100px;
left: 0;
z-index: 9;
.menu_play{
width: 30px;
height: 30px;
line-height: 34px;
font-size: 14px;
text-align: center;
color: #515A6E;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
background: #ffffff;
box-shadow: #ccc 2px 2px 4px 1px;
}
.menu_play:hover{
background-color: #2d8cf0;
color: white;
}
}
\ No newline at end of file
......@@ -24,22 +24,22 @@
</dl>
</div>
<div class="footer flex">
<div v-width="50" class="flex fa-m">
<span> 已选项</span>
<div v-width="50" class="fa-m fs">
<span>已选项</span>
</div>
<dl class="fg">
<div class="fg">
<dl>
<dd v-for="(li,i) in checkedItems">
<div class="flex">
<span class="fg">
{{li.userName}}
</span>
<a>
X
<span class="fg">{{li.userName}}</span>
<a @click="removeItem(li)">
<Icon type="md-close" size="16" />
</a>
</div>
</dd>
</dd>
</dl>
</div>
</div>
</div>
......@@ -113,7 +113,7 @@ export default {
default: ""
}
},
methods: {
methods: {
change(event) {
// console.log(event)
this.$emit("on-change", event);
......@@ -131,18 +131,27 @@ export default {
})
.then(r => {
this.data = r.result;
if(this.theme=="list"){
this.departmentGroup();
}
});
},
departmentGroup() {
var group = [];
group = this.$u.group(this.data, u => {
var users=this.$u.clone(this.data);
if(this.name&&this.name.length>0){
users.map(u=>{
u.checked=this.name.indexOf(u.id)>-1;
})
}
group = this.$u.group(users, u => {
return u.departmentId;
});
var deps = [];
group.map((u, i) => {
deps.push({
departmentTitle: u[0].departmentTitle,
departmentId: u[0].departmentId,
children: u,
opened: (i = 0),
checked: false
......@@ -158,39 +167,75 @@ export default {
item.checked = !item.checked;
this.group[i][j] = item;
this.$set(this.group, i, this.group[i]);
this.listSetValue();
},
removeItem(item) {
this.group.map((u, i) => {
if (u.departmentId == item.departmentId) {
u.children.map(p => {
if (p.id == item.id) {
p.checked = false;
}
});
this.$set(this.group, i, u);
}
});
this.listSetValue();
},
checkAll(item,i){
item.children.map(u=>{
u.checked=item.checked;
//list 时,设置值。
listSetValue(){
var ids=[];
this.checkedItems.map(u=>{
ids.push(u.id)
})
this.$set(this.group,i,this.group[i]);
this.$emit("on-change",ids);
},
checkAll(item, i) {
item.children.map(u => {
u.checked = item.checked;
});
this.$set(this.group, i, this.group[i]);
this.listSetValue();
},
//获取所有的选中项
getSelectItems() {
var items = [];
if (!this.multiple) {
//单选时返回信息
var item1 = this.dic.filter(u => u.value == this.value);
if (item1 && item1[0]) {
items.push(item1[0]);
}
if (this.theme == "list") {
this.checkedItems.map(u => {
items.push(u);
});
} else {
//复选时返回
this.value.forEach(v => {
var item = this.dic.filter(u => u.value == v);
if (item && item[0]) {
items.push(item[0]);
if (!this.multiple) {
//单选时返回信息
var item1 = this.dic.filter(u => u.value == this.value);
if (item1 && item1[0]) {
items.push(item1[0]);
}
});
} else {
//复选时返回
this.value.forEach(v => {
var item = this.dic.filter(u => u.value == v);
if (item && item[0]) {
items.push(item[0]);
}
});
}
}
return items;
},
//获取所有选中项的名称
getSelectNames() {
var names = [];
this.getSelectItems().forEach(v => {
names.push(v.label);
});
if (this.theme == "list") {
this.checkedItems.map(u => {
items.push(u.userName);
});
} else {
this.getSelectItems().forEach(v => {
names.push(v.label);
});
}
return names;
}
},
......@@ -253,6 +298,7 @@ export default {
font-size: 14px;
}
dl {
width: 100%;
margin-bottom: 2px;
dt,
dd {
......@@ -302,6 +348,20 @@ export default {
border: 2px solid transparent;
color: #515a6e;
margin: 10px;
a {
display: inline-flex;
width: 20px;
height: 20px;
border-radius: 4px;
border: 1px solid transparent;
justify-items: center;
align-items: center;
margin-top: 5px;
}
a:hover {
background: rgb(241, 14, 14);
color: white;
}
}
dd:hover {
// background: rgba(38, 128, 235, 1);
......@@ -324,7 +384,7 @@ export default {
opacity: 1;
border-radius: 4px;
min-height: 48px;
flex-wrap:wrap;
flex-wrap: wrap;
}
}
}
......
......@@ -400,6 +400,7 @@ export default {
left: 56%;
top: 57%;
min-width: 1084px;
// min-width: 777px;
min-height: 300px;
box-shadow: 0px 5px 17px 5px rgba(0, 0, 0, 0.28);
background: #f5f6fa;
......
......@@ -66,7 +66,6 @@
</p>
<p>{{li.beginTime}}--{{li.endTime}}</p>
<p>人员 :{{li.userNames}}</p>
<!-- <p>设备 :{{item.equipCode}}</p> -->
</div>
</Card>
</Col>
......@@ -105,7 +104,6 @@
v-else-if="item.dispatchStatus!=2 && item.pid != 0"
@click="removeDetail(item,index)"
></op>
<!-- -->
</p>
<p>{{item.beginTime}}--{{item.endTime}}</p>
<p>人员 :{{item.userNames}}</p>
......@@ -135,7 +133,8 @@
</span>
</p>
<div class="dispatch_part_body" :style="{height:byheight}">
<h4 class="tc" v-if="listMan.length==0 || listSheBei.length==0">暂无数据</h4>
<h4 class="tc" v-if="listSheBei.length==0 && button2 == '设备'">暂无数据</h4>
<h4 class="tc" v-else-if="listMan.length==0 && button2 == '人员'">暂无数据</h4>
<div class="shebei" v-if="button2 == '设备'">
<Row :gutter="15">
<!-- {{shebeiId}} -->
......@@ -200,8 +199,7 @@
:mask-closable="false"
ok-text="拆分"
@on-ok="okChai()"
>
拆分数量:
> 拆分数量:
<Tag>{{chaiNum}}</Tag>
<Slider v-model="chaiNum" :max="maxnum" show-stops :min="1"></Slider>
</Modal>
......@@ -232,8 +230,7 @@
v-model="entity.userIds"
:multiple="true"
style="width: 500px"
/>
<!-- :type="3" -->
/><!-- :type="3" -->
</FormItem>
</Col>
<Col span="24" class="drawer_midell">
......@@ -268,12 +265,9 @@
<FormItem label="工时" prop="taskTime">
<DatePicker
v-model="pentity.taskTime"
type="datetimerange"
placement="bottom-start"
:options="dateRange"
@on-change="handleChange"
placeholder="请选择时间段"
style="width: 330px"
type="datetimerange" placement="bottom-start"
:options="dateRange" @on-change="handleChange"
placeholder="请选择时间段" style="width: 330px"
></DatePicker>
</FormItem>
</Col>
......@@ -285,13 +279,9 @@
<Col span="24">
<FormItem label="备注" style="width:100%">
<Input
maxlength="200"
v-model="pentity.remark"
type="textarea"
:autosize="{minRows: 3,maxRows: 5}"
show-word-limit
class="drawer_row_textarea"
/>
maxlength="200" v-model="pentity.remark"
type="textarea" :autosize="{minRows: 3,maxRows: 5}"
show-word-limit class="drawer_row_textarea"/>
</FormItem>
</Col>
</Row>
......@@ -317,8 +307,7 @@ export default {
listShow: "订单",
shebei: "",
curTask:null,
dateRange: {
//禁选工时时间区间
dateRange: {//禁选工时时间区间
disabledDate(date) {
return date && date.valueOf() < Date.now() - 86400000;
}
......@@ -454,9 +443,7 @@ export default {
res.result.map(u => {
if (u.pid) {
pid = u.pid;
} else {
pid = 0;
}
} else { pid = 0;}
let detailnew = {
beginTime: u.beginTime, //开始时间
dispatchStatus: u.dispatchStatus, //
......@@ -499,7 +486,6 @@ export default {
},
// 过滤条件
changeStatus(a) {
// console.log(a)
this.getUserInfoFn();
},
// 打开抽屉
......@@ -509,7 +495,6 @@ export default {
let timebegin = formData[0].beginTime;
let timend = formData[0].endTime;
this.newList = [];
// console.log("选中的id",chekids)
chekids.forEach(v => {
var item = formData.filter(u => {
return u.id == v;
......@@ -523,24 +508,12 @@ export default {
this.facilityModal = true;
} else {
this.pentity.taskTime = [timebegin, timend];
// if (
// formData.map(t => {
// this.newList.filter(m => {
// if ((m.id = t.id)) {
// console.log(m.checked);
// }
// });
// })
// ) {
// }
this.manModal = true;
}
// console.log("选中的数据", this.newList);
}// console.log("选中的数据", this.newList);
},
// 设备派工
sendSheBei() {
let item = this.newList;
// console.log(item)
item.map(u => {
u.userIds = this.entity.userIds;
u.remark = this.entity.remark;
......@@ -569,7 +542,6 @@ export default {
// 人员派工
sendUser() {
let item = this.newList;
// console.log("派工的数据",item)
item.map(u => {
u.userIds = this.peploeId;
u.remark = this.pentity.remark;
......@@ -596,22 +568,20 @@ export default {
},
// 拆分方法
setChai(item, index) {
// console.log(item, index)
this.curTask=item;
this.chaiModal = true;
this.chaiNum = 1;
this.maxnum = item.quantity - 1;
this.rowIndex = index;
},
// 拆分保存
okChai() {
var old = this.$u.clone(this.curTask);
var add = this.$u.clone(this.curTask);
old.quantity -= this.chaiNum;
add.quantity = this.chaiNum;
add.id = 0;
add.pid = old.id;
old.quantity -= this.chaiNum;
add.quantity = this.chaiNum;
add.id = 0;
add.pid = old.id;
let params = {
isDispatch: 0, //派工是1,保存是0
entryList: [old, add]
......@@ -636,14 +606,9 @@ export default {
this.$Message.error("拆分项删除失败!");
}
});
// let oldList = this.listTask;
// let clickRow = oldList.filter(listRow=>listRow.process_name===item.process_name)[0];
// clickRow.quantity += this.chaiNum
// this.listTask.splice(index, 1)
// this.$Message.success('拆分项已删除。')
},
//取消
cancle() {
//取消
this.facilityModal = false;
this.manModal = false;
this.footerToolbar = false;
......@@ -653,20 +618,15 @@ export default {
ids() {
let ids = [];
this.listTask.map(u => {
if (u.checked) {
ids.push(u.id);
}
if (u.checked) { ids.push(u.id);}
});
if (ids.length > 0) {
this.footerToolbar = true;
}
if (ids.length > 0) {this.footerToolbar = true;}
return ids;
},
listOrder() {
let orders = this.$u.group(this.listTask, u => {
return u.mesCode;
});
// console.warn("listOrder", orders);
});// console.warn("listOrder", orders);
return orders;
},
peploeId() {
......@@ -687,6 +647,4 @@ export default {
},
watch: {}
};
</script>
<style lang="less">
</style>
\ No newline at end of file
</script>
\ No newline at end of file
<template>
<Layout class="full">
<Sider hide-trigger :style="{background: '#fff'}" width="260">
<!-- <Sider hide-trigger :style="{background: '#fff'}" width="260">
<div class="zh-tree" :style="{height:treeHeight+'px'}">
<h3 class="zh-title">产品结构</h3>
<div class="zh-box">
......@@ -13,8 +13,16 @@
></Tree>
</div>
</div>
</Sider> -->
<Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" />
</Sider>
<Content class="content">
<div v-if="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn" title="展开">
<Icon type="ios-arrow-forward" size="24" />
</a>
</div>
<Content class="content" :class="!showMenu?'con_bord':''">
<!--:data="dataT"-->
<DataGrid
:action="action"
......@@ -100,19 +108,21 @@ import Detail from "./detail";
import Search from "./search";
import Split from "./split";
import Send from "./send";
import ProductTree from "@/components/page/productTree.vue";
export default {
name: "list",
components: {
Add,
Add,
Edit,
Detail,
Search,
Split,
Send
Send,ProductTree,
},
data() {
return {
action: Api.index,
showMenu: true,
easySearch: {
keys: {
op: "mesCode,productName",
......@@ -763,6 +773,18 @@ export default {
this.$Message.error("数量为1,不能进行分解");
}
},
onHide() {
// this.$Message.info("收起左侧树")
this.showMenu = false;
},
showMenuFn() {
//this.$Message.info("展开左侧树")
this.showMenu = true;
},
productSearch(id, item, ids) {
let where = { productId: { op: "In", value: ids } };
this.$refs.grid.reload(where);
},
//确定分解
orderSplitOk() {
let returnDatalist = this.$refs.orderSplit.returnDataList();
......
......@@ -4,8 +4,16 @@
<Sider hide-trigger :style="{background: '#fff'}" width="260">
<Tree-Type @func="getMsgFormSon" :style="{ height: treeHeight + 'px' }"></Tree-Type>
</Sider>
<!-- <Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<ProductTree @on-hide="onHide" @on-select="productSearch" />
</Sider>
<div v-if="!showMenu" class="show_menu">
<a class="menu_play fr" @click="showMenuFn" title="展开">
<Icon type="ios-arrow-forward" size="24" />
</a>
</div> -->
<!-- 右侧内容 -->
<Content class="content">
<Content class="content" :class="!showMenu?'con_bord':''">
<Tabs v-model="selectName" @on-click="handleClick">
<TabPane label="订单报价" key="offer" name="offer">
<div class="search-form">
......@@ -140,7 +148,7 @@ import MetalQuotation from "./components/metalQuotation.vue"; //订单报价弹
import Photosensitive from "./components/photosensitive.vue"; //订单报价弹框光敏
import MetalDetails from "./components/metalDetails.vue"; //报价历史记录铺粉详情弹框
import PhotosensitiveDetails from "./components/photosensitiveDetails.vue"; //报价历史记录光敏详情弹框
import ProductTree from "@/components/page/productTree.vue";//左侧树列表
import MetalQuotationGeneration from "./components/metalQuotationGeneration.vue"; //生成报价单弹框
import PhotosensitiveGeneration from "./components/photosensitiveGeneration.vue"; //生成报价单弹框
export default {
......@@ -152,7 +160,7 @@ export default {
MetalQuotation,
Photosensitive,
MetalDetails,
PhotosensitiveDetails,
PhotosensitiveDetails,ProductTree,
MetalQuotationGeneration,
PhotosensitiveGeneration
},
......@@ -162,6 +170,7 @@ export default {
result: []
},
userId: 0,
showMenu: true,
model1: "",
rows: {},
modalDai: false, //待审核
......@@ -381,6 +390,16 @@ export default {
};
},
methods: {
onHide() {
this.showMenu = false;
},
showMenuFn() {
this.showMenu = true;
},
productSearch(id, item, ids) {
let where = { productId: { op: "In", value: ids } };
this.$refs.grid.reload(where);
},
update() {
this.tableTata(this.selectName);
},
......
<style lang="less">
@import "./technolog.less";
.lay100 {
height: calc(100vh - 105px);
background-color: #f5f6fa;
.con {
padding: 5px 5px 0px 10px;
}
.con_bord {
// margin: 15px 32px;
box-shadow: #c7c7c7 1px 2px 7px 3px;
}
background: rgba(245, 246, 250, 1);
}
.fullWindow {
position: fixed;
width: 100%;
......@@ -20,7 +9,7 @@
bottom: 0;
right: 0;
// bottom:100%;
// right: 100%;
// right: 100%;
z-index: 898;
background-color: white;
// background: red;
......
......@@ -4,9 +4,9 @@
.bg1{
background:#fefefe ;
}
.fg {
overflow: auto;
}
// &.fg {
// // overflow: auto;
// }
}
.layout-copy {
text-align: center;
......
......@@ -2,8 +2,9 @@
<div style="padding:50px;">
<UserSelect v-model="user" :multiple="true" theme="list"/>
<!-- <DepartmentSelect v-model="dep" />
{{user}}
<Button @click="setUser">Set</Button>{{dep}} -->
{{user}}
</div>
</template>
<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