Commit fcb8fc80 authored by 周远喜's avatar 周远喜

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

parents 29b52897 c5a4a51d
...@@ -400,6 +400,7 @@ export default { ...@@ -400,6 +400,7 @@ export default {
left: 56%; left: 56%;
top: 57%; top: 57%;
min-width: 1084px; min-width: 1084px;
// min-width: 777px;
min-height: 300px; min-height: 300px;
box-shadow: 0px 5px 17px 5px rgba(0, 0, 0, 0.28); box-shadow: 0px 5px 17px 5px rgba(0, 0, 0, 0.28);
background: #f5f6fa; background: #f5f6fa;
......
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
</p> </p>
<p>{{li.beginTime}}--{{li.endTime}}</p> <p>{{li.beginTime}}--{{li.endTime}}</p>
<p>人员 :{{li.userNames}}</p> <p>人员 :{{li.userNames}}</p>
<!-- <p>设备 :{{item.equipCode}}</p> -->
</div> </div>
</Card> </Card>
</Col> </Col>
...@@ -105,7 +104,6 @@ ...@@ -105,7 +104,6 @@
v-else-if="item.dispatchStatus!=2 && item.pid != 0" v-else-if="item.dispatchStatus!=2 && item.pid != 0"
@click="removeDetail(item,index)" @click="removeDetail(item,index)"
></op> ></op>
<!-- -->
</p> </p>
<p>{{item.beginTime}}--{{item.endTime}}</p> <p>{{item.beginTime}}--{{item.endTime}}</p>
<p>人员 :{{item.userNames}}</p> <p>人员 :{{item.userNames}}</p>
...@@ -135,7 +133,8 @@ ...@@ -135,7 +133,8 @@
</span> </span>
</p> </p>
<div class="dispatch_part_body" :style="{height:byheight}"> <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 == '设备'"> <div class="shebei" v-if="button2 == '设备'">
<Row :gutter="15"> <Row :gutter="15">
<!-- {{shebeiId}} --> <!-- {{shebeiId}} -->
...@@ -200,8 +199,7 @@ ...@@ -200,8 +199,7 @@
:mask-closable="false" :mask-closable="false"
ok-text="拆分" ok-text="拆分"
@on-ok="okChai()" @on-ok="okChai()"
> > 拆分数量:
拆分数量:
<Tag>{{chaiNum}}</Tag> <Tag>{{chaiNum}}</Tag>
<Slider v-model="chaiNum" :max="maxnum" show-stops :min="1"></Slider> <Slider v-model="chaiNum" :max="maxnum" show-stops :min="1"></Slider>
</Modal> </Modal>
...@@ -232,8 +230,7 @@ ...@@ -232,8 +230,7 @@
v-model="entity.userIds" v-model="entity.userIds"
:multiple="true" :multiple="true"
style="width: 500px" style="width: 500px"
/> /><!-- :type="3" -->
<!-- :type="3" -->
</FormItem> </FormItem>
</Col> </Col>
<Col span="24" class="drawer_midell"> <Col span="24" class="drawer_midell">
...@@ -268,12 +265,9 @@ ...@@ -268,12 +265,9 @@
<FormItem label="工时" prop="taskTime"> <FormItem label="工时" prop="taskTime">
<DatePicker <DatePicker
v-model="pentity.taskTime" v-model="pentity.taskTime"
type="datetimerange" type="datetimerange" placement="bottom-start"
placement="bottom-start" :options="dateRange" @on-change="handleChange"
:options="dateRange" placeholder="请选择时间段" style="width: 330px"
@on-change="handleChange"
placeholder="请选择时间段"
style="width: 330px"
></DatePicker> ></DatePicker>
</FormItem> </FormItem>
</Col> </Col>
...@@ -285,13 +279,9 @@ ...@@ -285,13 +279,9 @@
<Col span="24"> <Col span="24">
<FormItem label="备注" style="width:100%"> <FormItem label="备注" style="width:100%">
<Input <Input
maxlength="200" maxlength="200" v-model="pentity.remark"
v-model="pentity.remark" type="textarea" :autosize="{minRows: 3,maxRows: 5}"
type="textarea" show-word-limit class="drawer_row_textarea"/>
:autosize="{minRows: 3,maxRows: 5}"
show-word-limit
class="drawer_row_textarea"
/>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -317,8 +307,7 @@ export default { ...@@ -317,8 +307,7 @@ export default {
listShow: "订单", listShow: "订单",
shebei: "", shebei: "",
curTask:null, curTask:null,
dateRange: { dateRange: {//禁选工时时间区间
//禁选工时时间区间
disabledDate(date) { disabledDate(date) {
return date && date.valueOf() < Date.now() - 86400000; return date && date.valueOf() < Date.now() - 86400000;
} }
...@@ -454,9 +443,7 @@ export default { ...@@ -454,9 +443,7 @@ export default {
res.result.map(u => { res.result.map(u => {
if (u.pid) { if (u.pid) {
pid = u.pid; pid = u.pid;
} else { } else { pid = 0;}
pid = 0;
}
let detailnew = { let detailnew = {
beginTime: u.beginTime, //开始时间 beginTime: u.beginTime, //开始时间
dispatchStatus: u.dispatchStatus, // dispatchStatus: u.dispatchStatus, //
...@@ -499,7 +486,6 @@ export default { ...@@ -499,7 +486,6 @@ export default {
}, },
// 过滤条件 // 过滤条件
changeStatus(a) { changeStatus(a) {
// console.log(a)
this.getUserInfoFn(); this.getUserInfoFn();
}, },
// 打开抽屉 // 打开抽屉
...@@ -509,7 +495,6 @@ export default { ...@@ -509,7 +495,6 @@ export default {
let timebegin = formData[0].beginTime; let timebegin = formData[0].beginTime;
let timend = formData[0].endTime; let timend = formData[0].endTime;
this.newList = []; this.newList = [];
// console.log("选中的id",chekids)
chekids.forEach(v => { chekids.forEach(v => {
var item = formData.filter(u => { var item = formData.filter(u => {
return u.id == v; return u.id == v;
...@@ -523,24 +508,12 @@ export default { ...@@ -523,24 +508,12 @@ export default {
this.facilityModal = true; this.facilityModal = true;
} else { } else {
this.pentity.taskTime = [timebegin, timend]; 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; this.manModal = true;
} }// console.log("选中的数据", this.newList);
// console.log("选中的数据", this.newList);
}, },
// 设备派工 // 设备派工
sendSheBei() { sendSheBei() {
let item = this.newList; let item = this.newList;
// console.log(item)
item.map(u => { item.map(u => {
u.userIds = this.entity.userIds; u.userIds = this.entity.userIds;
u.remark = this.entity.remark; u.remark = this.entity.remark;
...@@ -569,7 +542,6 @@ export default { ...@@ -569,7 +542,6 @@ export default {
// 人员派工 // 人员派工
sendUser() { sendUser() {
let item = this.newList; let item = this.newList;
// console.log("派工的数据",item)
item.map(u => { item.map(u => {
u.userIds = this.peploeId; u.userIds = this.peploeId;
u.remark = this.pentity.remark; u.remark = this.pentity.remark;
...@@ -596,22 +568,20 @@ export default { ...@@ -596,22 +568,20 @@ export default {
}, },
// 拆分方法 // 拆分方法
setChai(item, index) { setChai(item, index) {
// console.log(item, index)
this.curTask=item; this.curTask=item;
this.chaiModal = true; this.chaiModal = true;
this.chaiNum = 1; this.chaiNum = 1;
this.maxnum = item.quantity - 1; this.maxnum = item.quantity - 1;
this.rowIndex = index; this.rowIndex = index;
}, },
// 拆分保存 // 拆分保存
okChai() { okChai() {
var old = this.$u.clone(this.curTask); var old = this.$u.clone(this.curTask);
var add = this.$u.clone(this.curTask); var add = this.$u.clone(this.curTask);
old.quantity -= this.chaiNum; old.quantity -= this.chaiNum;
add.quantity = this.chaiNum; add.quantity = this.chaiNum;
add.id = 0; add.id = 0;
add.pid = old.id; add.pid = old.id;
let params = { let params = {
isDispatch: 0, //派工是1,保存是0 isDispatch: 0, //派工是1,保存是0
entryList: [old, add] entryList: [old, add]
...@@ -636,14 +606,9 @@ export default { ...@@ -636,14 +606,9 @@ export default {
this.$Message.error("拆分项删除失败!"); 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() { cancle() {
//取消
this.facilityModal = false; this.facilityModal = false;
this.manModal = false; this.manModal = false;
this.footerToolbar = false; this.footerToolbar = false;
...@@ -653,20 +618,15 @@ export default { ...@@ -653,20 +618,15 @@ export default {
ids() { ids() {
let ids = []; let ids = [];
this.listTask.map(u => { this.listTask.map(u => {
if (u.checked) { if (u.checked) { ids.push(u.id);}
ids.push(u.id);
}
}); });
if (ids.length > 0) { if (ids.length > 0) {this.footerToolbar = true;}
this.footerToolbar = true;
}
return ids; return ids;
}, },
listOrder() { listOrder() {
let orders = this.$u.group(this.listTask, u => { let orders = this.$u.group(this.listTask, u => {
return u.mesCode; return u.mesCode;
}); });// console.warn("listOrder", orders);
// console.warn("listOrder", orders);
return orders; return orders;
}, },
peploeId() { peploeId() {
...@@ -687,6 +647,4 @@ export default { ...@@ -687,6 +647,4 @@ export default {
}, },
watch: {} watch: {}
}; };
</script> </script>
<style lang="less"> \ No newline at end of file
</style>
\ No newline at end of file
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