Commit 6f24cdd2 authored by renjintao's avatar renjintao

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

parents dbdeb7c7 69eb19e7
...@@ -96,6 +96,9 @@ export default { ...@@ -96,6 +96,9 @@ export default {
this.load(); this.load();
} }
}, },
value(v){
this.name=v;
}
}, },
}; };
</script> </script>
......
...@@ -16,6 +16,9 @@ export default { ...@@ -16,6 +16,9 @@ export default {
update(params) { update(params) {
return Api.post(`${material}/projectplan/update`, params); return Api.post(`${material}/projectplan/update`, params);
}, },
batchUpdate(params) {
return Api.post(`${material}/projectplan/updatepartbatch`, params);
},
sendtask(params) { sendtask(params) {
return Api.post(`${material}/projectplan/sendtask`, params); return Api.post(`${material}/projectplan/sendtask`, params);
}, },
......
<!--
/**
* @fileoverview Header component
* @license MIT
* @author Rafal Pospiech <neuronet.io@gmail.com>
* @package GanttElasticHeader
*/
-->
<template>
<div class="gantt-elastic__header" :style="{ ...style['header'] }">
<div class="gantt-elastic__header-title" :style="{ ...style['header-title'] }">
<div
class="gantt-elastic__header-title--text"
:style="{ ...style['header-title--text'] }"
v-if="!opts.title.html"
>{{ opts.title.label }}</div>
<div
class="gantt-elastic__header-title--html"
:style="{ ...style['header-title--html'] }"
v-if="opts.title.html"
v-html="opts.title.label"
></div>
</div>
<div class="gantt-elastic__header-options" :style="{ ...style['header-options'] }">
<!-- <button
class="gantt-elastic__header-btn-recenter"
:style="{ ...style['header-btn-recenter'] }"
@click.prevent="recenterPosition"
>
{{ opts.locale.Now }}
</button>-->
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["X-Scale"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="scale"
:max="24"
:min="2"
width="100px"
></vue-slider>
</div>
</label>
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["Y-Scale"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="height"
:max="100"
:min="7"
width="100px"
></vue-slider>
</div>
</label>
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["Before/After"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="scope"
:max="31"
:min="0"
width="100px"
></vue-slider>
</div>
</label>
<label class="gantt-elastic__header-label" :style="{ ...style['header-label'] }">
{{ opts.locale["Task list width"] }}
<div
class="gantt-elastic__header-slider-wrapper"
:style="{ ...style['header-slider-wrapper'] }"
>
<vue-slider
class="gantt-elastic__header-slider"
tooltip="none"
:style="{ ...style['header-slider'] }"
:process-style="{ ...style['header-slider--process'] }"
:slider-style="{ ...style['header-slider--slider'] }"
v-model="divider"
:max="100"
:min="0"
width="100px"
></vue-slider>
</div>
</label>
<label
class="gantt-elastic__header-task-list-switch--wrapper"
:style="{ ...style['header-task-list-switch--label'] }"
>
<switches
class="gantt-elastic__header-task-list-switch"
:style="{ ...style['header-task-list-switch'] }"
v-model="root.state.options.taskList.display"
></switches>
{{ opts.locale["Display task list"] }}
</label>
</div>
</div>
</template>
<script>
import vueSlider from "vue-slider-component";
import "vue-slider-component/theme/default.css";
import Switches from "vue-switches";
const defaultStyle = {
header: {
margin: "0px auto",
background: "#f3f5f747",
padding: "10px",
overflow: "hidden",
clear: "both",
display: "flex",
"justify-content": "space-between"
},
"header-title": { float: "left" },
"header-options": { float: "right" },
"header-title--text": {
"font-size": "20px",
"vertical-align": "middle",
"font-weight": "400",
"line-height": "35px",
"padding-left": "22px",
"letter-spacing": "1px"
},
"header-title--html": {
"font-size": "20px",
"vertical-align": "middle",
"font-weight": "400",
"line-height": "35px",
"padding-left": "22px",
"letter-spacing": "1px"
},
"header-btn-recenter": {
background: "#95A5A6",
border: "none",
outline: "none",
cursor: "pointer",
color: "white",
"border-radius": "3px",
"margin-right": "27px",
"font-size": "16px",
padding: "8px 12px"
},
"header-slider": {
"box-sizing": "content-box"
},
"header-slider-wrapper": {
display: "inline-block",
"vertical-align": "middle"
},
"header-slider--slider": { "box-sizing": "content-box" },
"header-slider--process": { "box-sizing": "content-box" },
"header-task-list-switch--label": { "box-sizing": "content-box" },
"header-task-list-switch": {
margin: "0px 15px",
"vertical-align": "middle"
},
"header-label": {}
};
const defaultOptions = {
title: {
// label: "任务甘特图",
html: false
},
locale: {
Now: "Now",
"X-Scale": "缩放-X",
"Y-Scale": "缩放-Y",
"Task list width": "任务列表",
"Before/After": "展开日期",
"Display task list": "是否展开任务列表"
}
};
export default {
name: "GanttHeader",
components: {
vueSlider,
Switches
},
props: ["options", "dynamicStyle"],
inject: ["root"],
data() {
return {
scaleTimeoutId: null,
firstScale: false,
localScale: 0,
localHeight: 0,
localBefore: 0,
localPercent: 0,
sliderOptions: {
xScale: {
value: 0
}
},
style: {},
opts: {}
};
},
created() {
this.localScale = this.root.state.options.times.timeZoom;
this.localHeight = this.root.state.options.row.height;
this.localBefore = this.root.state.options.scope.before;
this.localPercent = this.root.state.options.taskList.percent;
this.sliderOptions.xScale.value = this.root.state.options.times.timeZoom;
this.style = this.root.mergeDeep({}, defaultStyle, this.dynamicStyle);
this.opts = this.root.mergeDeep({}, defaultOptions, this.options);
},
methods: {
getImage() {
this.root.getImage("image/png").then(imgB64 => {
const link = document.createElement("a");
link.href = imgB64;
link.download = "gantt-elastic.png";
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
});
},
recenterPosition() {
this.root.$emit("recenterPosition");
},
setScale(value) {
if (this.scaleTimeoutId !== null) {
clearTimeout(this.scaleTimeoutId);
this.scaleTimeoutId = null;
}
// debouncing
if (this.firstScale) {
this.scaleTimeoutId = setTimeout(() => {
this.root.$emit("times-timeZoom-change", value);
this.scaleTimeoutId = null;
}, 50);
} else {
this.root.$emit("times-timeZoom-change", value);
this.firstScale = true;
}
}
},
computed: {
/**
* If there is a component slot specified for header
* @returns {bool}
*/
beforeOptionsIsComponent() {
const headerSlot = this.options.slots.header;
if (
typeof headerSlot.beforeOptions === "object" &&
!Array.isArray(headerSlot.beforeOptions)
) {
return true;
}
return false;
},
/**
* If there is a slot with beforeOptions html content
* @returns {bool}
*/
beforeOptionsIsHtml() {
if (typeof this.options.slots.header.beforeOptions === "string") {
return true;
}
return false;
},
scale: {
get() {
return this.localScale;
},
set(value) {
this.localScale = Number(value);
this.setScale(this.localScale);
}
},
height: {
get() {
return this.localHeight;
},
set(value) {
this.localHeight = Number(value);
this.root.$emit("row-height-change", Number(value));
}
},
scope: {
get() {
return this.localBefore;
},
set(value) {
this.localBefore = Number(value);
this.root.$emit("scope-change", Number(value));
}
},
divider: {
get() {
return this.localPercent;
},
set(value) {
this.localPercent = Number(value);
this.root.$emit("taskList-width-change", Number(value));
}
}
}
};
</script>
<template>
<div class="q-pa-sm">
<div class="pr mt50" v-if="tasks.length == 0">
<Spin size="large" fix></Spin>
</div>
<gantt-elastic
v-else
:options="options"
:tasks="tasks"
@tasks-changed="tasksUpdate"
@options-changed="optionsUpdate"
@dynamic-style-changed="styleUpdate"
>
<gantt-header slot="header"></gantt-header>
</gantt-elastic>
<div class="q-mt-md" />
</div>
</template>
<style>
</style>
<script>
import GanttElastic from "gantt-elastic";
import GanttHeader from "./components/gantt-header";
import dayjs from "dayjs";
import Api from "./api";
function GetTimeByTimeStr(dateString) {
if(dateString){
var timeArr = dateString.split(" ");
var d = timeArr[0].split("-");
var t = timeArr[1].split(":");
return new Date(d[0], d[1] - 1, d[2], t[0], t[1], t[2]).getTime();
}else{
return 0;
}
}
let that;
export default {
name: "Gantt",
components: {
GanttElastic,
GanttHeader,
},
props: {
eid: String,
},
data() {
return {
tasks: [],
options: {
taskMapping: {
progress: "percent",
},
maxRows: 100,
maxHeight: 500,
title: {
label: "Your project title as html (link or whatever...)",
html: false,
},
row: {
height: 24,
},
calendar: {
hour: {
display: true,
},
},
chart: {
progress: {
bar: false,
},
expander: {
display: true,
},
},
taskList: {
expander: {
straight: false,
},
columns: [
// {
// id: 1,
// label: "ID",
// value: "id",
// width: 40,
// },
{
id: 2,
label: "名称",
value: v=>{
return `<a>${v.name}</a>`
},
width: 200,
expander: true,
html: true,
events: {
click({ data, column }) {
alert(data.name);
console.log(this)
that.$Message.info(data.name)
},
},
},
{
id: 3,
label: "状态",
value: "status",
width: 100,
html: true,
events: {
click(e) {
console.log(e)
that.$Message.info(e.data.name)
},
},
},
{
id: 4,
label: "计划开始时间",
// value: 'startDate',
value: (task) => dayjs(task.startDate).format("YYYY-MM-DD"),
width: 160,
},
{
id: 5,
label: "计划结束时间",
// value:'endDate',
value: (task) => dayjs(task.endDate).format("YYYY-MM-DD"),
width: 180,
},
{
id: 6,
label: "计划类型",
value: "type",
width: 80,
}
],
},
locale: {
weekdays: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
months: [
"一月",
"二月",
"三月",
"四月",
"五月",
"六月",
"七月",
"八月",
"九月",
"十月",
"十一月",
"十二月",
],
},
},
dynamicStyle: {},
lastId: 16,
};
},
created() {
that=this;
this.gantData();
},
methods: {
gantData() {
var params = {
conditions: [
{
fieldName: "projectId",
conditionalType: "Equal",
fieldValue: this.eid,
},
],
};
Api.list(params).then((r) => {
let tasks = r.result;
var types=["project","milestone","task"]
tasks=tasks.map(u=>{
var obj = {
id: u.id,
parentId:u.upId,
name: u.title,
startDate:u.startDate,
endDate:u.endDate,
start: GetTimeByTimeStr(u.startDate),
duration:GetTimeByTimeStr(u.endDate)- GetTimeByTimeStr(u.startDate) ,
percent: 85,
status: u.status,
type: types[u.type],
};
return obj;
})
this.tasks = tasks;
});
},
tasksUpdate(tasks) {
this.tasks = tasks;
},
optionsUpdate(options) {
this.options = options;
},
styleUpdate(style) {
this.dynamicStyle = style;
},
},
};
</script>
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
<template slot="batch"> <template slot="batch">
<span v-width="300" style="color:#333"> <span v-width="300" style="color:#333">
<DateRange v-model="dateEntity" edit v-width="260"></DateRange> <DateRange v-model="dateEntity" edit v-width="260"></DateRange>
<Button type="primary">设置2计划日期</Button> <Button type="primary" @click="setDate()">设置日期</Button>
</span> </span>
<span> <span>
<UserGroup <UserGroup
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
:projectId="eid" :projectId="eid"
v-width="300" v-width="300"
></UserGroup> ></UserGroup>
<Button type="primary">设置执行人</Button> <Button type="primary" @click="setExecutor()">设置执行人</Button>
</span> </span>
<Button type="primary" @click="bacthRemove()">批量删除</Button> <Button type="primary" @click="bacthRemove()">批量删除</Button>
</template> </template>
...@@ -361,6 +361,33 @@ export default { ...@@ -361,6 +361,33 @@ export default {
this.list = data; this.list = data;
}); });
}, },
setDate(){
var items=this.batchItems.map(u=>{
return {
id:u.id,
startDate:this.dateEntity.startDate,
endDate:this.dateEntity.endDate,
}
})
Api.batchUpdate(items).then(r=>{
if(r.success){
this.search();
}
});
},
setExecutor(){
var items=this.batchItems.map(u=>{
return {
id:u.id,
executor:this.executors
}
})
Api.batchUpdate(items).then(r=>{
if(r.success){
this.search();
}
});
},
add(row) { add(row) {
if (row) { if (row) {
this.curId = row.id; this.curId = row.id;
......
...@@ -12,8 +12,14 @@ ...@@ -12,8 +12,14 @@
<DateRange v-model="entity" /> <DateRange v-model="entity" />
</Filed> </Filed>
<Filed :span="24" :name="l('users') + ':'"> <Filed :span="24" :name="l('users') + ':'">
<User v-for="(u,i) in users" :value="u.userId" :key="u.userId" mode="text" class="mr10" /> <User
<a @click="group"><Avatar icon="md-add" /></a> v-for="(u, i) in users"
:value="u.userId"
:key="u.userId"
mode="text"
class="mr10"
/>
<a @click="group"><Avatar icon="md-add" /></a>
</Filed> </Filed>
</Row> </Row>
</div> </div>
...@@ -35,10 +41,15 @@ ...@@ -35,10 +41,15 @@
<span>|</span> <span>|</span>
</li> </li>
<li> <li>
<a @click="task"> <Icon type="ios-list-box" size="18" />任务监控 </a> <a @click="gant"> <Icon type="ios-list-box" size="18" />任务监控 </a>
&nbsp; &nbsp;
<span>|</span> <span>|</span>
</li> </li>
<!-- <li>
<a @click="task"> <Icon type="ios-list-box" size="18" />任务监控 </a>
&nbsp;
<span>|</span>
</li> -->
<li> <li>
<a @click="group"> <Icon type="ios-people" size="18" />成员 </a> <a @click="group"> <Icon type="ios-people" size="18" />成员 </a>
&nbsp; &nbsp;
...@@ -75,7 +86,7 @@ export default { ...@@ -75,7 +86,7 @@ export default {
curId: this.eid, curId: this.eid,
avatorPath: "", avatorPath: "",
entity: {}, entity: {},
users:[], users: [],
rules: { rules: {
name: [ name: [
{ {
...@@ -129,15 +140,12 @@ export default { ...@@ -129,15 +140,12 @@ export default {
this.detail = () => import("../plan"); this.detail = () => import("../plan");
}, },
task() { task() {
//this.curId = this.eid;
this.title = "任务"; this.title = "任务";
this.detail = () => import("../task/index"); this.detail = () => import("../task/index");
// this.$router.push({ },
// name: "project-task", gant() {
// params: { this.title = "任务监控";
// id: this.curId this.detail = () => import("../plan/gant");
// }
// });
}, },
group() { group() {
this.title = "项目成员"; this.title = "项目成员";
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('userId')" prop="userId"> <FormItem :label="l('userId')" prop="userId">
<UserGroup v-model="entity.userId" :projectId="eid" /> <UserGroup v-model="entity.userId" :projectId="projectId" />
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12"> <Col :span="12">
...@@ -75,8 +75,9 @@ export default { ...@@ -75,8 +75,9 @@ export default {
}, },
props: { props: {
v: Object, v: Object,
eid: String, eid: String,//当前id
pid: String, pid: String,//计划id
projectId:String,//项目id
}, },
mounted() { mounted() {
// if (this.eid != '' && this.eid != null) { // if (this.eid != '' && this.eid != null) {
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" :fullscreen="fullScreen" footer-hide> <Modal v-model="modal" :title="title" width="1200" :fullscreen="fullScreen" footer-hide>
<component :is="detail" :eid="curId" :pid="planId" :row="rowObj" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :pid="planId" :projectId="projectId" :row="rowObj" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</Content> </Content>
</Layout> </Layout>
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
rowObj: null, rowObj: null,
curId: '', curId: '',
fullScreen: false, fullScreen: false,
projectId: '', projectId: this.eid,
columns: [ columns: [
// { // {
// key: "selection", // key: "selection",
...@@ -407,6 +407,7 @@ export default { ...@@ -407,6 +407,7 @@ export default {
}, },
productSearch(id, item, planIds) { productSearch(id, item, planIds) {
this.planId = item.selected ? id : ''; this.planId = item.selected ? id : '';
this.projectId=item.projectId;
this.planIdsCur = item.selected ? planIds : [] this.planIdsCur = item.selected ? planIds : []
let where = { let where = {
planId: { planId: {
...@@ -415,9 +416,10 @@ export default { ...@@ -415,9 +416,10 @@ export default {
}, },
projectId: { projectId: {
op: "Equal", op: "Equal",
value: this.eid value: item.projectId
}, },
}; };
this.curId=
this.$refs.grid.reload(where); this.$refs.grid.reload(where);
}, },
updatepart(valId, valStatus) { updatepart(valId, valStatus) {
......
<template> <template>
<div class="orderDetail"> <div class="orderDetail">
<Row> <Row>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('mesCode')}}</span> <span class="fwBold">{{ l("mesCode") }}</span>
<p>{{baseData.mesCode}}</p> <p>{{ baseData.mesCode }}</p>
</Col> </Col>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('taskType')}}</span> <span class="fwBold">{{ l("taskType") }}</span>
<p> <p>
<state code="plan.order.taskType" :value="baseData.taskType" type="text"></state> <state
code="plan.order.taskType"
:value="baseData.taskType"
type="text"
></state>
</p> </p>
</Col> </Col>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('quantity')}}</span> <span class="fwBold">{{ l("quantity") }}</span>
<p>{{baseData.quantity}}</p> <p>{{ baseData.quantity }}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('status')}}</span> <span class="fwBold">{{ l("status") }}</span>
<p> <p>
<state code="plan.order.status" :value="baseData.status" type="text"></state> <state
code="plan.order.status"
:value="baseData.status"
type="text"
></state>
</p> </p>
</Col> </Col>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('productName')}}</span> <span class="fwBold">{{ l("productName") }}</span>
<p>{{baseData.productName}}</p> <p>{{ baseData.productName }}</p>
</Col> </Col>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('drawnNumber')}}</span> <span class="fwBold">{{ l("drawnNumber") }}</span>
<p>{{baseData.drawnNumber}}</p> <p>{{ baseData.drawnNumber }}</p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('batchNumber')}}</span> <span class="fwBold">{{ l("batchNumber") }}</span>
<p>{{baseData.batchNumber}}</p> <p>{{ baseData.batchNumber }}</p>
</Col> </Col>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('projectNumber')}}</span> <span class="fwBold">{{ l("projectNumber") }}</span>
<p>{{baseData.projectNumber}}</p> <p>{{ baseData.projectNumber }}</p>
</Col> </Col>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('urgencyLevel')}}</span> <span class="fwBold">{{ l("urgencyLevel") }}</span>
<p> <p>
<state code="plan.order.urgencyLevel" :value="baseData.urgencyLevel" type="text"></state> <state
code="plan.order.urgencyLevel"
:value="baseData.urgencyLevel"
type="text"
></state>
</p> </p>
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('demandStartDate')}}</span> <span class="fwBold">{{ l("demandStartDate") }}</span>
<p> <p>
<DTSpan type="date" v-model="baseData.demandStartDate"></DTSpan> <DTSpan type="date" v-model="baseData.demandStartDate"></DTSpan>
</p> </p>
</Col> </Col>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('demandFinishDate')}}</span> <span class="fwBold">{{ l("demandFinishDate") }}</span>
<p> <p>
<DTSpan type="date" v-model="baseData.demandFinishDate"></DTSpan> <DTSpan type="date" v-model="baseData.demandFinishDate"></DTSpan>
</p> </p>
</Col> </Col>
<Col span="8"> <Col span="8">
<span class="fwBold">{{l('taskRequire')}}</span> <span class="fwBold">{{ l("taskRequire") }}</span>
<p>{{baseData.taskRequire}}</p> <p>{{ baseData.taskRequire }}</p>
</Col> </Col>
</Row> </Row>
<Row class="lastRow"> <Row class="lastRow">
<Col span="24"> <Col span="24">
<span class="fwBold">{{l('remark')}}</span> <span class="fwBold">{{ l("remark") }}</span>
<p>{{baseData.remark}}</p> <p>{{ baseData.remark }}</p>
</Col> </Col>
</Row> </Row>
</div>
</div>
</template> </template>
<script> <script>
export default { export default {
props: ['baseData'], props: ["baseData"],
data() { data() {
return { return {
themeBg: 'light', themeBg: "light",
basicData: {}, basicData: {},
} };
}, },
methods: { methods: {
l(key) { l(key) {
key = "mes_plan" + "." + key; key = "mes_plan" + "." + key;
return this.$t(key); return this.$t(key);
}
}, },
} },
};
</script> </script>
<style lang="less"> <style lang="less">
.orderDetail { .orderDetail {
line-height: 30px; line-height: 30px;
width: 90%; width: 100%;
margin: 0 auto; margin: 0 auto;
.ivu-row { .ivu-row {
padding-top: 20px; padding-top: 20px;
padding-bottom: 20px; padding-bottom: 20px;
border-bottom: #ccc solid 1px; margin-right: 25px;
} border-bottom: #ccc solid 1px;
}
.lastRow { .lastRow {
border-bottom: none; border-bottom: none;
} }
} }
</style> </style>
<template> <template>
<div class> <div class>
<Tabs :animated="false" @on-click="tabChange" value="1"> <Tabs :animated="false" @on-click="tabChange" value='1'>
<TabPane label="工艺信息" name="1"> <TabPane label="工艺信息" name="1">
<Form :model="craftData" :label-width="130" inline> <Form :model="craftData" :label-width="130" inline>
<Row> <Row>
...@@ -74,25 +74,27 @@ ...@@ -74,25 +74,27 @@
</Form> </Form>
</TabPane> --> </TabPane> -->
<TabPane label="质量信息" name="3"> <TabPane label="质量信息" name="3">
<orderqcrecord ref="orderqcrecord1" :items="items"/> <Orderqcrecord ref="orderqcrecord1" :items="items" />
</TabPane> </TabPane>
<TabPane label="配套数据" name="4"> <TabPane label="配套数据" name="4">
<!-- <orderqcrecord ref="orderqcrecord1" /> --> <Matching ref="matching" :items="items" />
</TabPane> </TabPane>
</Tabs> </Tabs>
</div> </div>
</template> </template>
<script> <script>
import service from "@/plugins/request"; import service from "@/plugins/request";
import orderqcrecord from "./orderqcrecord.vue"; import Orderqcrecord from "./orderqcrecord.vue";
import Matching from "./matching.vue";
export default { export default {
components: { orderqcrecord }, components: { Orderqcrecord, Matching },
props: { props: {
baseData: { baseData: {
type: [String, Number, Array, Object], type: [String, Number, Array, Object],
}, },
items: { items: {
mesCodeId: { orderId: {
type: Number, type: Number,
}, },
headerid: { headerid: {
...@@ -108,8 +110,9 @@ export default { ...@@ -108,8 +110,9 @@ export default {
}, },
data() { data() {
return { return {
selectName: "1",
themeBg: "light", themeBg: "light",
craftData:this.items.craftData, //工艺信息 craftData: this.items.craftData, //工艺信息
equipmentData: {}, //设备信息 equipmentData: {}, //设备信息
headerid: "", //暂存传字段 headerid: "", //暂存传字段
routingType: "", //工艺类型(主/专业) routingType: "", //工艺类型(主/专业)
...@@ -121,22 +124,22 @@ export default { ...@@ -121,22 +124,22 @@ export default {
}, },
methods: { methods: {
// 获取设备信息 10020 /equipinfo/getlistall // 获取设备信息 10020 /equipinfo/getlistall
getlistall(equipids) { // getlistall(equipids) {
let url02 = `${systemUrl}/equipinfo/getlistall?equipids=` + equipids; // let url02 = `${systemUrl}/equipinfo/getlistall?equipids=` + equipids;
service.get(`${url02}`).then((res) => { // service.get(`${url02}`).then((res) => {
if (res.success) { // if (res.success) {
if (res.result.length != 0) { // if (res.result.length != 0) {
this.equipmentData = res.result[0]; // this.equipmentData = res.result[0];
} else { // } else {
this.equipmentData = []; // this.equipmentData = [];
console.log("获取主工艺设备信息为空."); // console.log("获取主工艺设备信息为空.");
} // }
} else { // } else {
this.equipmentData = []; // this.equipmentData = [];
console.log("获取主工艺设备数据失败."); // console.log("获取主工艺设备数据失败.");
} // }
}); // });
}, // },
getqc(executeid) { getqc(executeid) {
this.$refs.orderqcrecord1.qcdatasearch.execute_id = executeid; this.$refs.orderqcrecord1.qcdatasearch.execute_id = executeid;
}, },
...@@ -146,22 +149,22 @@ export default { ...@@ -146,22 +149,22 @@ export default {
this.$refs.orderqcrecord1.qcdatasearch.SkipCount = 0; this.$refs.orderqcrecord1.qcdatasearch.SkipCount = 0;
this.$refs.orderqcrecord1.onqcpage(); this.$refs.orderqcrecord1.onqcpage();
}, },
tabChange() { tabChange(name) {
// console.log("切换tab") console.log(name)
}, },
}, },
mounted() {}, mounted() {},
watch: { // watch: {
baseData: { // baseData: {
handler(v, o) { // handler(v, o) {
// this.pamasId = v.id // // this.pamasId = v.id
// console.log(v.id) // // console.log(v.id)
// this.loaddata(v.id) // // this.loaddata(v.id)
// console.info(o.id) // // console.info(o.id)
}, // },
deep: true, // deep: true,
}, // },
}, // },
}; };
</script> </script>
<style scoped> <style scoped>
......
<template>
<div>
<Table border :columns="cols" :data="datas" class="tableCommon"> </Table>
</div>
</template>
<script>
import service from "@/plugins/request";
export default {
data() {
return {
datas: [],
cols: [
{
key: "routingDetailNo",
title: this.l("routingDetailNo"),
align: "left",
width: 80,
},
{
key: "routingDetailName",
title: this.l("routingDetailName"),
align: "left",
},
{
key: "nameMaterial",
title: this.l("nameMaterial"),
align: "left",
},
{
key: "materialNumber",
title: this.l("materialNumber"),
align: "left",
width: 150,
},
{
key: "totalCount",
title: this.l("totalCount"),
align: "left",
},
{
key: "applicationNumber",
title: this.l("applicationNumber"),
align: "right",
},
{
key: "",
title: this.l("count3"),
align: "right",
width: 150,
width: 150,
render: (h, params) => {
return h(
"div",
{},
params.row.receiveNumber + "/" + params.row.outStockNumber
);
},
},
{
key: "creatorUserId",
title: "领用人",
align: "center",
width: 150,
render: (h, params) => {
if (params.row.creatorUserId) {
return h("User", {
props: {
value: params.row.creatorUserId,
},
});
}
},
},
// {
// key: "remark",
// title: this.l("remark"),
// align: "left",
// },
],
};
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
props: {
items: {
orderId: {
type: Number,
},
headerid: {
type: Number,
},
routingType: {
type: Number,
},
craftData: {
type: Object,
},
},
},
mounted() {
this.matchdetail();
},
methods: {
matchdetail() {
//配套审核单列表
let orderId = this.items.orderId;
let url = `${technologyUrl}materiallist/matchdetaillist?id=` + orderId;
service.get(`${url}`).then((res) => {
if (res.result) {
this.datas = [];
let suport = [];
res.result.forEach((e, index) => {
// console.log(e);
if (this.items.headerid == e.routingHeaderId) {
suport = e.suport;
this.datas = suport;
}
});
}
// console.log(this.datas);
});
},
l(key) {
let vkey = "support_item" + "." + key;
return this.$t(vkey) || key;
},
},
};
</script>
\ No newline at end of file
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
components: { entryrecordfiles, entryrecordMovie, entryrecorddata }, components: { entryrecordfiles, entryrecordMovie, entryrecorddata },
props: { props: {
items: { items: {
mesCodeId: { orderId: {
type: Number, type: Number,
}, },
headerid: { headerid: {
...@@ -258,6 +258,7 @@ export default { ...@@ -258,6 +258,7 @@ export default {
}, },
mounted() { mounted() {
this.getmainorder(); this.getmainorder();
}, },
watch: {}, watch: {},
methods: { methods: {
...@@ -269,12 +270,12 @@ export default { ...@@ -269,12 +270,12 @@ export default {
// this.$refs.orderqcrecord1.onqcpage() // this.$refs.orderqcrecord1.onqcpage()
}, },
getmainorder() { getmainorder() {
let mesCodeId = this.items.mesCodeId; let orderId = this.items.orderId;
let headerid = this.items.headerid; let headerid = this.items.headerid;
let routingType = this.items.routingType; let routingType = this.items.routingType;
let url01 = let url01 =
`${PlanUrl}/orderexecute/getorderproductandequip?orderId=` + `${PlanUrl}/orderexecute/getorderproductandequip?orderId=` +
mesCodeId + orderId +
`&headerid=` + `&headerid=` +
headerid + headerid +
`&routingType=` + `&routingType=` +
...@@ -311,6 +312,7 @@ export default { ...@@ -311,6 +312,7 @@ export default {
console.log(err); console.log(err);
}); });
}, },
onPageChanged(page_index) { onPageChanged(page_index) {
this.pageindex = page_index; this.pageindex = page_index;
this.onqcpage(); this.onqcpage();
......
<template> <template>
<div class="reve_cont"> <div class="reve_cont">
<Row> <Row>
<Col span="4"> <Col span="5">
<Menu <ul>
:active-name="actNum" <li :class="isactive == -1 ? 'addclass' : ''" @click="listData1">
ref="actNum" 基本信息
class="menuBg" </li>
@on-select="openView" <li
:theme="themeBg"
>
<MenuItem name="1" replace> 基本信息 </MenuItem>
<MenuItem
v-for="(li, index) in nameList" v-for="(li, index) in nameList"
:key="index" :key="index"
:name="index + 2" @click="listData2(li, index)"
replace :class="isactive == index ? 'addclass' : ''"
> >
{{ li.name }} {{ li.name }}
</MenuItem> </li>
</Menu> </ul>
</Col> </Col>
<Col span="20" class="revieweBox"> <Col span="19" class="revieweBox">
<component <component
:is="detail" :is="detail"
:baseData="basicData" :baseData="basicData"
...@@ -29,8 +25,6 @@ ...@@ -29,8 +25,6 @@
@on-ok="ok" @on-ok="ok"
/> />
<!-- <basicView ref="basicView" :baseData="basicData" v-show="basicmodal" />
<mainView ref="mainView" :baseData="basicData" v-show="mainmodal" /> -->
<!-- <dispatched ref="dispatched" :baseData="basicData" v-show="dispatchedmodal"/> --> <!-- <dispatched ref="dispatched" :baseData="basicData" v-show="dispatchedmodal"/> -->
</Col> </Col>
</Row> </Row>
...@@ -39,15 +33,12 @@ ...@@ -39,15 +33,12 @@
<script> <script>
import service from "@/plugins/request"; import service from "@/plugins/request";
import basicView from "./basicView.vue";
import mainView from "./mainView.vue"; //import dispatched from "./dispatched.vue";
import dispatched from "./dispatched.vue";
export default { export default {
components: { // components: {
basicView, // dispatched,
mainView, // },
dispatched,
},
props: { props: {
basicData: null, basicData: null,
actValue: { actValue: {
...@@ -55,18 +46,16 @@ export default { ...@@ -55,18 +46,16 @@ export default {
default: 1, default: 1,
}, },
}, },
created() {
this.detail = () => import("./basicView");
this.openView(this.actNum);
},
data() { data() {
return { return {
items: { items: {
mesCodeId: this.basicData.id, orderId: this.basicData.id,
headerid: 0, headerid: 0,
routingType: 0, routingType: 0,
craftData: {}, craftData: {},
}, },
isactive: -1,
nameList: [], nameList: [],
detail: null, detail: null,
actNum: "1", actNum: "1",
...@@ -82,35 +71,43 @@ export default { ...@@ -82,35 +71,43 @@ export default {
mainexecuteid: 0, mainexecuteid: 0,
}; };
}, },
created() {
this.isactive = -1;
this.detail = () => import("./basicView");
},
mounted() { mounted() {
this.actNum = "1"; // this.actNum = "1";
this.loaddata(this.basicData.id); this.loaddata(this.basicData.id);
}, },
methods: { methods: {
listData1() {
this.items.orderId = this.basicData.id;
this.isactive = -1;
this.detail = () => import("./basicView");
},
listData2(e, index) {
// console.log(e)
this.items.orderId = this.basicData.id;
this.items.craftData = e;
this.items.headerid = e.id;
this.items.routingType = e.routingType;
this.isactive = index;
this.detail = () => import("./mainView");
},
loaddata(pamasId) { loaddata(pamasId) {
this.basicmodal = true;
this.mainmodal = false;
// this.dispatchedmodal= false;
// console.warn(pamasId) 获取主工艺信息 10030
let url = let url =
`${technologyUrl}orderrouting/getordersheaderinfo?orderId=` + pamasId; `${technologyUrl}orderrouting/getordersheaderinfo?orderId=` + pamasId;
if (pamasId) { if (pamasId) {
service.get(`${url}`).then((response) => { service.get(`${url}`).then((response) => {
console.log(response);
if (response.result.length > 0) { if (response.result.length > 0) {
this.nameList = response.result; this.nameList = response.result;
if (response.result[0]) { if (response.result[0]) {
this.$refs.mainView.craftData = response.result[0]; //工艺信息 this.$refs.mainView.craftData = response.result[0]; //工艺信息
// this.headerid = response.result[0].id;
// this.routingType = response.result[0].routingType;
this.getmainorder(pamasId);
} }
if (response.result[1]) { if (response.result[1]) {
this.$refs.dispatched.craftData = response.result[1]; this.$refs.dispatched.craftData = response.result[1];
// this.diHeaderid = response.result[1].id;
// this.diRoutingType = response.result[1].routingType;
this.getdisorder(pamasId);
} }
} else { } else {
console.log("获取工艺信息为空."); console.log("获取工艺信息为空.");
...@@ -120,114 +117,20 @@ export default { ...@@ -120,114 +117,20 @@ export default {
}); });
} }
}, },
// 获取产品号和设备id orderexecute/getorderproductandequip 10050
// getmainorder(pamasId) {
// let headerid = this.headerid;
// let routingType = this.routingType;
// let url01 =
// `${PlanUrl}/orderexecute/getorderproductandequip?orderId=` +
// pamasId +
// `&headerid=` +
// headerid +
// `&routingType=` +
// routingType;
// service
// .get(`${url01}`)
// .then((res) => {
// if (res.success) {
// if (res.result.equipids) {
// let equipids = res.result.equipids;
// this.mainexecuteid = res.result.executeid;
// this.$refs.mainView.getlistall(equipids);
// this.$refs.mainView.getqc(this.mainexecuteid);
// let bandleList = res.result.productCode;
// let codeList = []; // 编号List
// bandleList.map((item, index) => {
// codeList.push(item.productcodes);
// });
// // this.$refs.mainView.mainCodeList = codeList;
// console.warn(codeList);
// } else {
// console.log("获取主工艺设备信息数据为空.");
// }
// } else {
// console.log("获取主工艺设备信息数据失败.");
// }
// })
// .catch((err) => {
// console.log(err);
// });
// },
// getdisorder(pamasId) {
// let diHeaderid = this.diHeaderid;
// let diRoutingType = this.diRoutingType;
// let url02 =
// `${PlanUrl}/orderexecute/getorderproductandequip?orderId=` +
// pamasId +
// `&headerid=` +
// diHeaderid +
// `&routingType=` +
// diRoutingType;
// service
// .get(`${url02}`)
// .then((res) => {
// if (res.success) {
// if (res.result.equipids) {
// let equipids = res.result.equipids;
// this.disexecuteid = res.result.executeid;
// this.$refs.dispatched.getlistall(equipids);
// this.$refs.dispatched.getqc(this.disexecuteid);
// let bandleList = res.result.productCode;
// let boardList = []; // 板次List
// bandleList.map((item, index) => {
// boardList.push(item.boardNumber);
// });
// this.$refs.dispatched.disCodeList = boardList;
// console.warn(boardList); cancel() {
// } else { this.detail = null;
// console.log("获取专业工艺信息数据为空."); },
// } ok() {
// } else { this.detail = null;
// console.log("获取专业工艺信息数据失败.");
// }
// })
// .catch((err) => {
// console.log(err);
// });
// },
// 更换左侧
openView(v) {
console.log(v);
if (v == 1) {
this.detail = () => import("./basicView");
// this.this.basicmodal = true;
// this.mainmodal = false;
} else {
let i = v - 2;
this.nameList.forEach((e, index) => {
if (i == index) {
this.items.craftData = e;
this.items.headerid = e.id;
this.items.routingType = e.routingType;
}
});
this.detail = () => import("./mainView");
// this.$refs.mainView.getqc(this.mainexecuteid);
}
}, },
cancel() {},
ok() {},
}, },
watch: { watch: {
basicData: { basicData: {
handler(v, o) { handler(v, o) {
this.loaddata(v.id); this.loaddata(v.id);
if (v) { if (v) {
this.actNum == "1"; this.items.orderId = v;
this.openView(this.actNum);
} }
}, },
deep: true, deep: true,
...@@ -236,7 +139,27 @@ export default { ...@@ -236,7 +139,27 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped lang="less">
.reve_cont {
ul {
height: 630px;
border-right: 1px solid #eee;
overflow: auto;
li {
height: 35px;
line-height: 35px;
padding: 0 15px;
cursor: pointer;
}
}
.addclass {
height: 35px;
line-height: 35px;
background-color: #f0faff;
color: #2d8cf0;
border-right: 2px solid #2d8cf0;
}
}
.menuBg { .menuBg {
background: none; background: none;
height: 630px; height: 630px;
......
<template> <template>
<div class="content"> <div class="content">
<!-- 搜索+按钮 --> <!-- 搜索+按钮 -->
<div class="title_box mb10"> <div class="title_box mb10">
<div class="table_title"> <div class="table_title">
<Input search enter-button style="width:300px;" v-model="orderSearchForm.SimpleSearch" placeholder="请输入查询条件" @on-search="tableSearch"></Input> <Input
</div> search
<Button type="primary" class="title_btn" @click="searchModel">高级查询</Button> enter-button
style="width: 300px"
v-model="orderSearchForm.SimpleSearch"
placeholder="请输入查询条件"
@on-search="tableSearch"
></Input>
</div>
<Button type="primary" class="title_btn" @click="searchModel"
>高级查询</Button
>
</div> </div>
<div class="tableBox mb10" :style="{height:tbHeight}"> <div class="tableBox mb10" :style="{ height: tbHeight }">
<div> <div>
<div v-if="listTask.length==0" class="wu_data">暂无数据</div> <div v-if="listTask.length == 0" class="wu_data">暂无数据</div>
<Row :gutter="16" :style="{width:rowWidth}"> <Row :gutter="16" :style="{ width: rowWidth }">
<Col :span="6" v-for="(item,index) in listTask" :key="index"> <Col :span="6" v-for="(item, index) in listTask" :key="index">
<Card class="card"> <Card class="card">
<h3 slot="title"> <h3 slot="title">订单编号:{{ item.mesCode }}</h3>
订单编号:{{item.mesCode}} <ul class="card_body01">
</h3> <li class="card_line">产品名称:{{ item.productName }}</li>
<ul class="card_body01"> <li class="card_line">任务类型:{{ item.equipment }}</li>
<li class="card_line"> </ul>
产品名称:{{item.productName}} <p class="footer01">
</li> <a class="footer_btn" href="#" @click.event="reviewFn(item)">
<li class="card_line"> 追 溯
任务类型:{{item.equipment}} </a>
</li> </p>
</ul> </Card>
<p class="footer01"> </Col>
<a class="footer_btn" href="#" @click.event="reviewFn(item)"> </Row>
追 溯 </div>
</a> <div v-show="noData" class="no_data">
</p> <h3>暂无数据</h3>
</Card> </div>
</Col>
</Row>
</div>
<div v-show="noData" class="no_data">
<h3>暂无数据</h3>
</div>
</div> </div>
<Page class="mr10 fr" id="pageComent" show-total size="small" show-elevator show-sizer :total="search.total" :current="search.pageIndex" :page-size="search.pageSize" :page-size-opts="showPagesize" @on-change="pageChange" @on-page-size-change="pageSizeChange" /> <Page
class="mr10 fr"
id="pageComent"
show-total
size="small"
show-elevator
show-sizer
:total="search.total"
:current="search.pageIndex"
:page-size="search.pageSize"
:page-size-opts="showPagesize"
@on-change="pageChange"
@on-page-size-change="pageSizeChange"
/>
<!-- 高级搜索弹框 --> <!-- 高级搜索弹框 -->
<Modal v-model="showModel" title="高级搜索" :width="800" :mask-closable="false"> <Modal
<Form :model="orderSearchForm" ref="orderSearchForm" :label-width="100" inline> v-model="showModel"
<Row> title="高级搜索"
<Col span="12"> :width="800"
<FormItem label="产品名称" style="width:100%"> :mask-closable="false"
<Select v-model="orderSearchForm.productName" placeholder="请选择" style="width:240px;"> >
<Option v-for="(item,index) in list" :key="index" :value="item.value" style="display:none">{{item.label}}</Option> <Form
<Tree key="mytree" :data="data1" ref="mytree" :render="renderContent"></Tree> :model="orderSearchForm"
</Select> ref="orderSearchForm"
</FormItem> :label-width="100"
</Col> inline
<Col span="12"> >
<FormItem label="状态" style="width:100%"> <Row>
<dictionary code="plan.order.status" v-model="orderSearchForm.status" style="width:240px"></dictionary> <Col span="12">
<Input v-model="orderSearchForm.productId" style="width:240px" v-if="false" /> <FormItem label="产品名称" style="width: 100%">
</FormItem> <Select
</Col> v-model="orderSearchForm.productName"
</Row> placeholder="请选择"
<Row> style="width: 240px"
<Col span="12"> >
<FormItem label="工艺编号" style="width:100%"> <Option
<Input v-model="orderSearchForm.processcode" placeholder="请输入工艺编号" style="width: 240px" /> v-for="(item, index) in list"
</FormItem> :key="index"
</Col> :value="item.value"
<Col span="12"> style="display: none"
<FormItem label="工艺名称" style="width:100%"> >{{ item.label }}</Option
<Input v-model="orderSearchForm.processname" placeholder="请输入工艺名称" style="width: 240px" /> >
</FormItem> <Tree
</Col> key="mytree"
</Row> :data="data1"
ref="mytree"
:render="renderContent"
></Tree>
</Select>
</FormItem>
</Col>
<Col span="12">
<FormItem label="状态" style="width: 100%">
<dictionary
code="plan.order.status"
v-model="orderSearchForm.status"
style="width: 240px"
></dictionary>
<Input
v-model="orderSearchForm.productId"
style="width: 240px"
v-if="false"
/>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="工艺编号" style="width: 100%">
<Input
v-model="orderSearchForm.processcode"
placeholder="请输入工艺编号"
style="width: 240px"
/>
</FormItem>
</Col>
<Col span="12">
<FormItem label="工艺名称" style="width: 100%">
<Input
v-model="orderSearchForm.processname"
placeholder="请输入工艺名称"
style="width: 240px"
/>
</FormItem>
</Col>
</Row>
<Row> <Row>
<Col span="12"> <Col span="12">
<FormItem label="项目号" style="width:100%"> <FormItem label="项目号" style="width: 100%">
<Input v-model="orderSearchForm.projectNumber" placeholder style="width:240px" /> <Input
</FormItem> v-model="orderSearchForm.projectNumber"
</Col> placeholder
<Col span="12"> style="width: 240px"
<FormItem label="批次号" style="width:100%"> />
<Input v-model="orderSearchForm.batchNumber" placeholder style="width:240px" /> </FormItem>
</FormItem> </Col>
</Col> <Col span="12">
</Row> <FormItem label="批次号" style="width: 100%">
<Row> <Input
<Col span="12"> v-model="orderSearchForm.batchNumber"
<FormItem label="紧急程度" style="width:100%"> placeholder
<dictionary code="plan.order.urgencyLevel" v-model="orderSearchForm.urgencyLevel" style="width:240px"></dictionary> style="width: 240px"
</FormItem> />
</Col> </FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="紧急程度" style="width: 100%">
<dictionary
code="plan.order.urgencyLevel"
v-model="orderSearchForm.urgencyLevel"
style="width: 240px"
></dictionary>
</FormItem>
</Col>
<Col span="12"> <Col span="12">
<FormItem label="任务类型" style="width:100%"> <FormItem label="任务类型" style="width: 100%">
<dictionary code="plan.order.taskType" v-model="orderSearchForm.taskType" style="width:240px"></dictionary> <dictionary
</FormItem> code="plan.order.taskType"
</Col> v-model="orderSearchForm.taskType"
</Row> style="width: 240px"
<Row> ></dictionary>
<Col span="12"> </FormItem>
<FormItem label="阶段" style="width:100%"> </Col>
<dictionary code="plan.order.stage" v-model="orderSearchForm.stage" style="width:240px"></dictionary> </Row>
</FormItem> <Row>
</Col> <Col span="12">
<Col span="12"> <FormItem label="阶段" style="width: 100%">
<FormItem label="材料" style="width:100%"> <dictionary
<dictionary code="plan.order.material" v-model="orderSearchForm.materialId" style="width:240px"></dictionary> code="plan.order.stage"
</FormItem> v-model="orderSearchForm.stage"
</Col> style="width: 240px"
</Row> ></dictionary>
<Row> </FormItem>
<Col span="12"> </Col>
<FormItem label="数量" style="width:100%"> <Col span="12">
<InputNumber :min="0" v-model="orderSearchForm.quantity" style="width:240px"></InputNumber> <FormItem label="材料" style="width: 100%">
</FormItem> <dictionary
</Col> code="plan.order.material"
<Col span="12"> v-model="orderSearchForm.materialId"
<FormItem label="甲方客户" style="width:100%"> style="width: 240px"
<dictionary code="plan.order.guestName" v-model="orderSearchForm.guestName" style="width:240px"></dictionary> ></dictionary>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span="12"> <Col span="12">
<FormItem label="厂内责任机关" style="width:100%"> <FormItem label="数量" style="width: 100%">
<Input v-model="orderSearchForm.functionaryOffice" placeholder style="width:240px" /> <InputNumber
</FormItem> :min="0"
</Col> v-model="orderSearchForm.quantity"
<Col span="12"> style="width: 240px"
<FormItem label="厂内责任主体部门" style="width:100%"> ></InputNumber>
<dictionary code="plan.order.mainDepartment" v-model="orderSearchForm.mainDepartmentId" style="width:240px"></dictionary> </FormItem>
</FormItem> </Col>
</Col> <Col span="12">
</Row> <FormItem label="甲方客户" style="width: 100%">
<Row> <dictionary
<Col span="12"> code="plan.order.guestName"
<FormItem label="任务节点要求" style="width:100%"> v-model="orderSearchForm.guestName"
<Input v-model="orderSearchForm.taskRequire" placeholder style="width:240px" /> style="width: 240px"
</FormItem> ></dictionary>
</Col> </FormItem>
<Col span="12"> </Col>
<FormItem label="甲方投产输入文件(编号)" style="width:100%"> </Row>
<Input v-model="orderSearchForm.putintDocmentCode" placeholder style="width:240px" /> <Row>
</FormItem> <Col span="12">
</Col> <FormItem label="厂内责任机关" style="width: 100%">
</Row> <Input
<Row> v-model="orderSearchForm.functionaryOffice"
<Col span="12"> placeholder
<FormItem label="甲方技术输入文件(编号)" style="width:100%"> style="width: 240px"
<Input v-model="orderSearchForm.technologyDocmentCode" placeholder style="width:240px" /> />
</FormItem> </FormItem>
</Col> </Col>
<Col span="12"> <Col span="12">
<FormItem label="外部图号/模型号" style="width:100%"> <FormItem label="厂内责任主体部门" style="width: 100%">
<Input v-model="orderSearchForm.outerDrawnNumber" placeholder style="width:240px" /> <dictionary
</FormItem> code="plan.order.mainDepartment"
</Col> v-model="orderSearchForm.mainDepartmentId"
</Row> style="width: 240px"
<Row> ></dictionary>
<Col span="12"> </FormItem>
<FormItem label="模型版本" style="width:100%"> </Col>
<Input v-model="orderSearchForm.modelVersion" placeholder style="width:240px" /> </Row>
</FormItem> <Row>
</Col> <Col span="12">
<Col span="12"> <FormItem label="任务节点要求" style="width: 100%">
<FormItem label="甲方任务号" style="width:100%"> <Input
<Input v-model="orderSearchForm.taskCode" placeholder style="width:240px" /> v-model="orderSearchForm.taskRequire"
</FormItem> placeholder
</Col> style="width: 240px"
</Row> />
</Form> </FormItem>
<div slot="footer"> </Col>
<Button @click="close" style="margin-left:20px;">取消</Button> <Col span="12">
<Button @click="complexSearch" type="primary" class="ml10">查询</Button> <FormItem label="甲方投产输入文件(编号)" style="width: 100%">
</div> <Input
v-model="orderSearchForm.putintDocmentCode"
placeholder
style="width: 240px"
/>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="甲方技术输入文件(编号)" style="width: 100%">
<Input
v-model="orderSearchForm.technologyDocmentCode"
placeholder
style="width: 240px"
/>
</FormItem>
</Col>
<Col span="12">
<FormItem label="外部图号/模型号" style="width: 100%">
<Input
v-model="orderSearchForm.outerDrawnNumber"
placeholder
style="width: 240px"
/>
</FormItem>
</Col>
</Row>
<Row>
<Col span="12">
<FormItem label="模型版本" style="width: 100%">
<Input
v-model="orderSearchForm.modelVersion"
placeholder
style="width: 240px"
/>
</FormItem>
</Col>
<Col span="12">
<FormItem label="甲方任务号" style="width: 100%">
<Input
v-model="orderSearchForm.taskCode"
placeholder
style="width: 240px"
/>
</FormItem>
</Col>
</Row>
</Form>
<div slot="footer">
<Button @click="close" style="margin-left: 20px">取消</Button>
<Button @click="complexSearch" type="primary" class="ml10">查询</Button>
</div>
</Modal> </Modal>
<!-- 数据包追溯 --> <!-- 数据包追溯 -->
<Modal v-model="reviewModal" title="数据包追溯" :width="1280" :mask-closable="false"> <Modal
<reviewCount ref="reviewCount" :basicData="itemData" :actValue="actValue" /> v-model="reviewModal"
<div slot="footer"> title="数据包追溯"
<!-- <Button @click="close" style="margin-left:20px;">取消</Button> --> :width="1280"
<Button @click="reviewOk" type="primary" style="margin-left:10px;">确定</Button> :mask-closable="false"
</div> @on-close="cancel"
footer-hide
>
<component
:is="detail"
ref="reviewCount"
:basicData="itemData"
:actValue="actValue"
@on-close="cancel"
/>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import service from "@/plugins/request"; import service from "@/plugins/request";
import reviewCount from "./components/reviewCount.vue";
export default { export default {
components: { async fetch({ store, params }) {
reviewCount await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {
detail: null,
search: {
pageIndex: 1, //当前页数
pageSize: 20, //分页数
total: 0, //总数
conditions: [],
},
rowWidth: "",
showPagesize: [20, 50, 100],
showModel: false,
list: [],
data1: [],
noData: false,
selectdata: [],
tbHeight: "550px",
itemData: {}, //追溯传的数据
actValue: 1, //追溯传的选中meniu
orderSearchForm: {
//高级搜索字段内容
MaxResultCount: 20,
SkipCount: 0,
SimpleSearch: "", //搜索框内容
productId: null, //产品id
productName: "", //产品名称
taskType: "", //任务类型
stage: "", //阶段
materialId: "", //材料
quantity: 0, //数量
guestName: "", //甲方客户
printSupply: "", //3D打印承制单位
functionaryOffice: "", //厂内责任机关
mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: "", //任务接点要求
putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: "", //外部图号/模型号
modelVersion: "", //模型版本
taskCode: "", //甲方任务号
designer: "", //甲方设计人员
officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: "", //厂内主工艺人员
routing_Method: "", //工艺方法
outer_Envelope_Size: "", //包装尺寸
demandStartDate: "", //开始时间
demandFinishDate: "", //完成时间
remark: "", //备注
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null, //紧急程度
},
listTask: [], //card数据
reviewModal: false, //追溯弹框
};
},
created() {
this.laode();
this.tbHeight = window.innerHeight - 208 + "px";
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
// 加载数据
laode() {
let url = `${PlanUrl}/orderexecute/pageddatamesorders`;
service
.post(`${url}`, {
MaxResultCount: 20,
SkipCount: 0,
})
.then((res) => {
// console.log(res)
this.listTask = res.result.items;
this.search.total = res.result.totalCount;
});
}, },
async fetch({ reviewFn(item) {
store, //追溯
params this.reviewModal = true;
}) { this.itemData = item;
await store.dispatch("loadDictionary"); // 加载数据字典 this.detail = () => import("./components/reviewCount");
}, },
data() { cancel() {
return { this.detail = null;
search: {
pageIndex: 1, //当前页数
pageSize: 20, //分页数
total: 0, //总数
conditions: []
},
rowWidth: '',
showPagesize: [20, 50, 100],
showModel: false,
list: [],
data1: [],
noData: false,
selectdata: [],
tbHeight: "550px",
itemData: {}, //追溯传的数据
actValue: 1, //追溯传的选中meniu
orderSearchForm: {
//高级搜索字段内容
MaxResultCount: 20,
SkipCount: 0,
SimpleSearch: "", //搜索框内容
productId: null, //产品id
productName: "", //产品名称
taskType: "", //任务类型
stage: "", //阶段
materialId: "", //材料
quantity: 0, //数量
guestName: "", //甲方客户
printSupply: "", //3D打印承制单位
functionaryOffice: "", //厂内责任机关
mainDepartmentId: "", //厂内责任主体部门ID
taskRequire: "", //任务接点要求
putintDocmentCode: "", //甲方投产输入文件编号
technologyDocmentCode: "", //甲方技术输入文件编号
outerDrawnNumber: "", //外部图号/模型号
modelVersion: "", //模型版本
taskCode: "", //甲方任务号
designer: "", //甲方设计人员
officeFunctionary: "", //厂内机关负责人
mainRoutingPeople: "", //厂内主工艺人员
routing_Method: "", //工艺方法
outer_Envelope_Size: "", //包装尺寸
demandStartDate: "", //开始时间
demandFinishDate: "", //完成时间
remark: "", //备注
projectNumber: "", //项目号
batchNumber: "", //批次号
urgencyLevel: null //紧急程度
},
listTask: [], //card数据
reviewModal: false //追溯弹框
};
}, },
created() { reviewOk() {
this.laode(); this.reviewModal = false;
this.tbHeight = window.innerHeight - 208 + "px"; this.detail = null;
}, },
async fetch({ // 分页
store, pageChange(pageNum) {
params this.orderSearchForm.SkipCount =
}) { (pageNum - 1) * this.orderSearchForm.MaxResultCount;
await store.dispatch("loadDictionary"); // 加载数据字典 this.laodePage(this.orderSearchForm);
},
pageSizeChange(val) {
this.orderSearchForm.SkipCount = 0;
this.orderSearchForm.MaxResultCount = val;
this.laodePage(this.orderSearchForm);
},
laodePage(pageData) {
let url = `${PlanUrl}/orderexecute/pageddatamesorders`;
service.post(`${url}`, pageData).then((res) => {
this.listTask = res.result.items;
this.search.total = res.result.totalCount;
});
}, },
methods: {
// 加载数据
laode() {
let url = `${PlanUrl}/orderexecute/pageddatamesorders`;
service
.post(`${url}`, {
MaxResultCount: 20,
SkipCount: 0
})
.then(res => {
// console.log(res)
this.listTask = res.result.items;
this.search.total = res.result.totalCount;
});
},
reviewFn(item) {
//追溯
this.reviewModal = true;
this.itemData = item;
// this.$refs.reviewCount.actNum = "1";
},
reviewOk() {
this.reviewModal = false;
// 手动更新选中的菜单
// menuChange(){
// this.$refs.reviewCount.actNum = "";
// this.$nextTick(()=>{
// this.$refs.reviewCount.$refs.menus.updateActiveName();
// })
// }
// this.$refs.reviewCount.actNum = "1";
},
// 分页
pageChange(pageNum) {
this.orderSearchForm.SkipCount =
(pageNum - 1) * this.orderSearchForm.MaxResultCount;
this.laodePage(this.orderSearchForm);
},
pageSizeChange(val) {
this.orderSearchForm.SkipCount = 0;
this.orderSearchForm.MaxResultCount = val;
this.laodePage(this.orderSearchForm);
},
laodePage(pageData) {
let url = `${PlanUrl}/orderexecute/pageddatamesorders`;
service.post(`${url}`, pageData).then(res => {
this.listTask = res.result.items;
this.search.total = res.result.totalCount;
});
},
// 搜索 // 搜索
tableSearch(searchData) { tableSearch(searchData) {
let MaxResultCount = this.orderSearchForm.MaxResultCount; let MaxResultCount = this.orderSearchForm.MaxResultCount;
let url = `${PlanUrl}/orderexecute/pageddatamesorders`; let url = `${PlanUrl}/orderexecute/pageddatamesorders`;
service service
.post(`${url}`, { .post(`${url}`, {
MaxResultCount: MaxResultCount, MaxResultCount: MaxResultCount,
SkipCount: 0, SkipCount: 0,
SimpleSearch: searchData SimpleSearch: searchData,
}) })
.then(res => { .then((res) => {
this.listTask = res.result.items; this.listTask = res.result.items;
this.search.total = res.result.totalCount; this.search.total = res.result.totalCount;
if (this.listTask.length < 4) { if (this.listTask.length < 4) {
this.rowWidth = "100%" this.rowWidth = "100%";
} }
}); });
}, },
searchModel() { searchModel() {
this.showModel = true; this.showModel = true;
}, },
async openDetails(lemData) { async openDetails(lemData) {
this.$router.push({ this.$router.push({
name: "qcimplement", name: "qcimplement",
params: { params: {
transmitData: lemData transmitData: lemData,
}
});
},
renderContent(h, {
root,
node,
data
}) {
//渲染树的样式
return h(
"span", {
style: {
color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
cursor: "pointer"
},
on: {
click: () => {
let arrTree = [];
arrTree.push(data);
this.handleSelect(arrTree); //手动选择树节点
}
}
},
data.title
);
},
handleSelect(data) {
if (data.length > 0) {
this.selectdata = [];
this.selectdata = data;
this.list = [];
this.list.push({
label: data[0].title,
value: data[0].id
});
if (data[0].isProduct == "1") {
this.orderSearchForm.productName = data[0].id;
this.orderSearchForm.productId = data[0].productId;
} else {
this.$Message.error("此节点不是产品,请选择产品节点!");
}
}
},
close() {
this.showModel = false;
}, },
complexSearch() { });
// this.$emit('easySearch',this.orderSearchForm); },
let parmes = this.orderSearchForm; renderContent(h, { root, node, data }) {
parmes.SimpleSearch = ""; //渲染树的样式
let url = `${PlanUrl}/orderexecute/pageddatamesorders`; return h(
// console.log(parmes) "span",
service.post(`${url}`, parmes).then(res => { {
// console.log(res) style: {
this.listTask = res.result.items; color: data.isProduct != "1" ? "#249E91" : "#333", //根据选中状态设置样式
this.search.total = res.result.totalCount; cursor: "pointer",
if (this.search.total == 0) { },
this.noData = true; on: {
} else { click: () => {
this.noData = false; let arrTree = [];
} arrTree.push(data);
}); this.handleSelect(arrTree); //手动选择树节点
this.close(); },
},
}, },
//得到数据字典对应的label和value,用于table排序、筛选 data.title
getArry(arryList) { );
let arry = []; },
arryList.forEach(data => { handleSelect(data) {
var that = this; if (data.length > 0) {
let arryObj = {}; this.selectdata = [];
arryObj["label"] = data.name; this.selectdata = data;
arryObj["value"] = data.code; this.list = [];
arry.push(arryObj); this.list.push({
}); label: data[0].title,
return arry; value: data[0].id,
});
if (data[0].isProduct == "1") {
this.orderSearchForm.productName = data[0].id;
this.orderSearchForm.productId = data[0].productId;
} else {
this.$Message.error("此节点不是产品,请选择产品节点!");
}
}
},
close() {
this.showModel = false;
},
complexSearch() {
// this.$emit('easySearch',this.orderSearchForm);
let parmes = this.orderSearchForm;
parmes.SimpleSearch = "";
let url = `${PlanUrl}/orderexecute/pageddatamesorders`;
// console.log(parmes)
service.post(`${url}`, parmes).then((res) => {
// console.log(res)
this.listTask = res.result.items;
this.search.total = res.result.totalCount;
if (this.search.total == 0) {
this.noData = true;
} else {
this.noData = false;
} }
});
this.close();
},
//得到数据字典对应的label和value,用于table排序、筛选
getArry(arryList) {
let arry = [];
arryList.forEach((data) => {
var that = this;
let arryObj = {};
arryObj["label"] = data.name;
arryObj["value"] = data.code;
arry.push(arryObj);
});
return arry;
}, },
mounted() { },
window.onresize = () => { mounted() {
///浏览器窗口大小变化 window.onresize = () => {
return (() => { ///浏览器窗口大小变化
this.tbHeight = window.innerHeight - 208 + "px"; return (() => {
})(); this.tbHeight = window.innerHeight - 208 + "px";
}; })();
} };
},
}; };
</script> </script>
<style scoped> <style scoped>
#pageComent .ivu-select-dropdown { #pageComent .ivu-select-dropdown {
top: 0 !important; top: 0 !important;
bottom: 36px; bottom: 36px;
} }
ul, ul,
li { li {
list-style: none; list-style: none;
} }
.table_title { .table_title {
width: 320px; width: 320px;
float: left; float: left;
} }
.title_btn { .title_btn {
margin-top: 1px; margin-top: 1px;
} }
.tableBox { .tableBox {
/* height: 582px; 笔记本高度*/ /* height: 582px; 笔记本高度*/
/* height: 778px; */ /* height: 778px; */
border: #ddd solid 1px; border: #ddd solid 1px;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
} }
.table { .table {
margin: 10px 0 0 0; margin: 10px 0 0 0;
display: -webkit-flex; display: -webkit-flex;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.no_data { .no_data {
height: 800px; height: 800px;
text-align: center; text-align: center;
line-height: 800px; line-height: 800px;
} }
.card { .card {
margin: 10px 0 10px 20px; margin: 10px 0 10px 20px;
} }
.wu_data { .wu_data {
margin: 200px auto; margin: 200px auto;
font-size: 18px; font-size: 18px;
} }
.card_line { .card_line {
height: 30px; height: 30px;
line-height: 30px; line-height: 30px;
} }
.footer01 { .footer01 {
text-align: center; text-align: center;
} }
.footer_btn { .footer_btn {
border-top: 1px solid #ccc; border-top: 1px solid #ccc;
display: block; display: block;
padding: 10px 0 0 0; padding: 10px 0 0 0;
color: #0099ff; color: #0099ff;
} }
</style> </style>
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