Commit 8986812c authored by 周远喜's avatar 周远喜

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

parents 0fee44df c44f2790
<template>
<div class="flex fd tree-menu">
<h3>
任务结构
<div class="fr mr10 mt10">
<ButtonGroup class="fr" size="small">
<Button :icon="expand ? 'md-arrow-dropright' : 'md-arrow-dropdown'" @click="toggle" title="展开/合并"></Button>
<Button icon="md-refresh" title="刷新" @click="loadTree"></Button>
<Button icon="md-rewind" title="收起" @click="hide"></Button>
</ButtonGroup>
</div>
</h3>
<div class="search">
<Input search placeholder="请输入关键字" v-model="keys" clearable />
</div>
<div class="fg">
<div class="tree">
<Tree :data="data" :render="renderContent" ref="tree" @on-select-change="change"></Tree>
</div>
</div>
</div>
</template>
<script>
export default {
name: "",
data() {
return {
keys: "",
expand: true,
list: []
};
},
props: {
curId: {
type: String,
default: '',
},
},
created() {
this.loadTree();
},
methods: {
loadTree() {
let params = {
conditions: [{
fieldName: "projectId",
fieldValue: this.curId,
conditionalType: "Equal"
}]
}
this.$api.post(`${material}/projectplan/list`, params).then(r => {
var data = this.$u.toTree(
r.result,
null,
u => {
u.value = u.id;
u.expand = true;
u.selected = false;
u.checked = false;
},
"upId"
);
this.list = this.$u.clone(data);
});
},
toggle() {
this.expand = !this.expand;
},
renderContent(h, {
root,
node,
data
}) {
// let type = "md-folder";
// if (data.isProduct != 0) {
// type = "ios-image";
// }
return h("div", [
h("state", {
props: {
code: "mes.project_plan.Type",
type: "icon",
value: data.type + ""
}
}),
h(
"span", {
style: {
// color: data.isProduct == 0 ? "#000" : "rgba(38, 128, 235, 1)"
}
},
data.title
),
h("state", {
props: {
code: "mes.project_plan.Status",
type: "text",
value: data.status
}
}),
]);
},
change(v, b) {
// console.log(b);
let ids = [];
let productIds = [];
// if (b.bomId !== 0) {
// ids.push(b.bomId);
// }
var curentId = ''
curentId = b.id
productIds.push(b.value);
if (b.children) {
addId(b.children);
function addId(data) {
data.map(u => {
// if (u.bomId !== 0) {
// ids.push(u.bomId);
// }
productIds.push(u.value);
if (u.children) {
addId(u.children);
}
});
}
}
this.$emit("on-select", curentId, b, productIds);
},
hide() {
this.$emit("on-hide");
}
},
computed: {
data() {
let items = this.$u.clone(this.list);
let expand = this.expand;
let result = [];
search(this.keys, items);
function search(keys, data) {
data.map(u => {
if (keys.length < 2) {
u.expand = expand;
result.push(u);
} else {
u.expand = expand;
if (u.title.indexOf(keys) > -1) {
result.push(u);
} else if (u.children) {
search(keys, u.children);
}
}
});
}
return result;
}
},
watch: {
curId(v) {
if (v) {
this.loadTree();
}
},
},
};
</script>
<style lang="less">
@import "../../assets/css/custom.less";
.tree-menu {
h3 {
height: 50px;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: bold;
line-height: 50px;
color: @left-tree-header-color;
background: @left-tree-header-bg-color;
opacity: 1;
padding-left: 10px;
}
.search {
height: 50px;
padding: 5px 10px;
}
.fg {
flex: none;
// height:0;
overflow: auto;
padding-left: 10px;
}
.tree {
height: calc(100vh - 215px);
overflow: auto;
}
}
</style>
......@@ -373,6 +373,7 @@ export default {
showAi: false,
showAll: false,
showRun: false,
isPrescheduleStatu: 0,
};
},
mounted() {
......@@ -402,10 +403,14 @@ export default {
let statueArry = [];
let tempmesCodeList = [];
this.resultsStatusArr = [];
this.isPrescheduleStatu = 0
value.forEach((data) => {
var that = this;
statueArry.push(data.id);
this.resultsStatusArr.push(data.mainRoutingSetStatus);
if (data.isPreschedule == 2) {
this.isPrescheduleStatu = 2
}
tempmesCodeList.push(data.mesCode);
});
......@@ -463,7 +468,7 @@ export default {
this.scheduleType = null;
this.scheduleTypeName = "";
this.listBatchIds = this.listBatchIds1;
if (this.scheduleStatus == 1) {
if (this.scheduleStatus == 1 && this.isPrescheduleStatu != 2) {
this.scheduleModal = true;
} else {
this.$Message.error("所选订单里存在未派发订单!");
......
......@@ -27,7 +27,7 @@
</template>
<template slot-scope="{ row, index }" slot="note">
<span v-if="edit != index" v-text="row.note"></span>
<Input v-else type="text" v-model.trim="cur.note" />
<Input v-else type="text" v-model.trim="cur.note" :disabled="true" />
</template>
<template slot-scope="{ row, index }" slot="action">
<div v-if="edit != index" class="action">
......@@ -214,6 +214,9 @@ export default {
this.cur=this.$u.clone(row);
this.edit = index
},
changeUser(val, item) {
this.cur.note = item
},
//选择权限
changeAuthority(val) {
if (this.authorityCur != 1 && this.authorityCount == 1 && val == 1) {
......
This diff is collapsed.
<template>
<div class=".detail-document">
<div class=".detail-document">
<div class="top-title">
<div class="new-detail row-left">
<Row>
<Filed :span="12" :name="l('title') + ':'">{{ entity.title }}</Filed>
<Filed :span="12" :name="l('state') + ':'">
<state code="project.main.state" :value="entity.state"
/></Filed>
<!-- <Filed :span="12" :name="l('phase')">{{ entity.phase }}</Filed> -->
<Filed :span="12" :name="l('startDate') + ':'">{{
<div class="new-detail row-left">
<Row>
<Filed :span="12" :name="l('title') + ':'">{{ entity.title }}</Filed>
<Filed :span="12" :name="l('state') + ':'">
<state code="project.main.state" :value="entity.state" />
</Filed>
<!-- <Filed :span="12" :name="l('phase')">{{ entity.phase }}</Filed> -->
<Filed :span="12" :name="l('startDate') + ':'">{{
entity.startDate
}}</Filed>
<Filed :span="12" :name="l('endDate') + ':'">{{
<Filed :span="12" :name="l('endDate') + ':'">{{
entity.endDate
}}</Filed>
</Row>
......@@ -43,66 +43,53 @@
</ul>
</div>
<div class="body-document">
<h4 v-text="title"></h4>
<keep-alive>
<component v-bind:is="detail" :eid="eid" :data="entity"></component>
</keep-alive>
<h4 v-text="title"></h4>
<keep-alive>
<component v-bind:is="detail" :eid="eid" :data="entity"></component>
</keep-alive>
</div>
</div>
</div>
</template>
<script>
import Api from "./api";
export default {
name: "Add",
data() {
return {
modal: false,
title: "详细信息",
detail: null,
curId: this.eid,
avatorPath: "",
entity: {},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }],
},
fileds: [],
parms: {
app: "material",
eid: null,
name: "",
field: "",
},
};
},
props: ["eid"],
mounted() {
if (this.eid) {
this.load(this.eid);
}
this.detail = () => import("./details");
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
this.entity = r.result;
// this.$emit("on-load");
});
},
details() {
this.title = "详细信息";
this.detail = () => import("./details");
name: "Add",
data() {
return {
modal: false,
title: "详细信息",
detail: null,
curId: this.eid,
avatorPath: "",
entity: {},
rules: {
name: [{
required: true,
message: "必填",
trigger: "blur"
}],
code: [{
required: true,
message: "必填",
trigger: "blur"
}],
},
fileds: [],
parms: {
app: "material",
eid: null,
name: "",
field: "",
},
};
},
template() {
// this.curId = this.eid;
this.title = "项目模板";
this.detail = () => import("../plan");
},
task() {
// this.curId = this.eid;
this.title = "项目任务";
// this.detail = () => import("./add");
props: ["eid"],
mounted() {
if (this.eid) {
this.load(this.eid);
}
this.detail = () => import("./details");
},
group() {
// this.curId = this.eid;
......@@ -113,74 +100,85 @@ export default {
key = "project_main" + "." + key;
return this.$t(key);
},
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
},
},
},
};
</script>
<style lang="less">
.top-title {
// margin: 10px;
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
position: relative;
border-radius: 5px;
.row-left {
width: 1100px;
}
ul {
display: -webkit-inline-box;
display: inline-box;
position: absolute;
bottom: 5px;
right: 0px;
li {
width: 70px;
span {
color: #e0e0e0;
}
// margin: 10px;
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
position: relative;
border-radius: 5px;
.row-left {
width: 1100px;
}
ul {
display: -webkit-inline-box;
display: inline-box;
position: absolute;
bottom: 5px;
right: 0px;
li {
width: 70px;
span {
color: #e0e0e0;
}
}
}
}
}
.body-document {
margin-top: 10px;
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
border-radius: 8px;
min-height: 80vh;
h4 {
height: 50px;
line-height: 50px;
background: #515a6e;
padding: 0 10px;
color: #f5f6fa;
border-radius: 5px 5px 0 0;
}
.img-touxiang {
width: 230px;
height: 230px;
float: right;
margin-top: 10px;
margin-right: 10px;
img {
width: 100%;
height: 100%;
border-radius: 5px;
background: #fff;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.15);
border-radius: 8px;
min-height: 80vh;
h4 {
height: 50px;
line-height: 50px;
background: #515a6e;
padding: 0 10px;
color: #f5f6fa;
border-radius: 5px 5px 0 0;
}
.img-touxiang {
width: 230px;
height: 230px;
float: right;
margin-top: 10px;
margin-right: 10px;
img {
width: 100%;
height: 100%;
border-radius: 5px;
}
}
}
.detail-d {
padding-left: 20px;
.filed-d {
border-top: 1px solid #e0e0e0;
.detail-d {
padding-left: 20px;
.filed-d {
border-top: 1px solid #e0e0e0;
}
}
}
}
.detail-document {
background-color: #f5f7f9 !important;
background-color: #f5f7f9 !important;
}
</style>
\ No newline at end of file
</style>
......@@ -81,18 +81,21 @@ export default {
},
props: {
v: Object,
eid: Number
eid: String,
pid: String,
},
mounted() {
if (this.eid > 0) {
this.load(this.eid);
}
// if (this.eid != '' && this.eid != null) {
// this.load(this.eid);
// }
},
methods: {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
this.disabled = true;
this.entity.projectId = this.eid;
this.entity.planId = this.pid;
this.entity.status = 0
Api.create(this.entity).then((r) => {
this.disabled = false;
......@@ -152,9 +155,9 @@ export default {
this.entity = this.$u.clone(this.v)
},
eid(v) {
if (v > 0) {
this.load(v);
}
//if (v != '' && v != null) {
// this.load(v);
//}
}
}
}
......
This diff is collapsed.
......@@ -78,9 +78,9 @@
</div>
<div style="margin-top:20px;">本合格证无检验专用章无效 (版本:MB.FFGGHJKLL)</div>
<Row style="margin-top:5px;">
<Col :span="8">地址:北京市海淀区知春路63号</Col>
<Col :span="8" style="text-align:center;">电话:010-68378079</Col>
<Col :span="8" style="text-align:right;">邮编:100190</Col>
<Col :span="10">地址:</Col>
<Col :span="8" >电话:</Col>
<Col :span="6" >邮编:</Col>
</Row>
</div>
</div>
......
<template>
<div class="pdf-detail">
<div class="cerioficate-pdf-detail">
<div class="bian-hao">产品合格证编号:{{results.serialNumber}}</div>
<div class="bian-hao">产品合格证编号:{{ results.serialNumber }}</div>
<div class="body-d">
<Row class="row-border right-border">
<Col :span="4" class="col-border">用户单位</Col>
<Col :span="20" class="col-border">{{results.userUnit}}</Col>
<Col :span="20" class="col-border">{{ results.userUnit }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">任务依据</Col>
<Col :span="20" class="col-border">{{results.taskBased}}</Col>
<Col :span="20" class="col-border">{{ results.taskBased }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">产品名称</Col>
<Col :span="8" class="col-border">{{results.productName}}</Col>
<Col :span="8" class="col-border">{{ results.productName }}</Col>
<Col :span="4" class="col-border">产品状态</Col>
<Col :span="8" class="col-border">{{results.productStatus}}</Col>
<Col :span="8" class="col-border">{{ results.productStatus }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">产品编号</Col>
<Col :span="8" class="col-border">{{results.productSerialNumber}}</Col>
<Col :span="8" class="col-border">{{
results.productSerialNumber
}}</Col>
<Col :span="4" class="col-border">原材料批号</Col>
<Col :span="8" class="col-border">{{results.materialSerialNumber}}</Col>
<Col :span="8" class="col-border">{{
results.materialSerialNumber
}}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">原材料编号</Col>
<Col :span="8" class="col-border">{{results.materialCode}}</Col>
<Col :span="8" class="col-border">{{ results.materialCode }}</Col>
<Col :span="4" class="col-border">产品代号(图号)</Col>
<Col :span="8" class="col-border">{{results.productCode}}</Col>
<Col :span="8" class="col-border">{{ results.productCode }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">原材料合格证编号</Col>
<Col :span="8" class="col-border">{{results.materialCertificationNumber}}</Col>
<Col :span="8" class="col-border">{{
results.materialCertificationNumber
}}</Col>
<Col :span="4" class="col-border">数量</Col>
<Col :span="8" class="col-border">{{results.productQuantity}}</Col>
<Col :span="8" class="col-border">{{ results.productQuantity }}</Col>
</Row>
<!-- <Row class="row-border right-border">
<Col :span="4" class="col-border">增材制造批次号</Col>
......@@ -50,30 +56,40 @@
<Col :span="5" class="col-border">结论</Col>
<Col :span="5" class="col-border">备注</Col>
</Row>
<Row class="row-border right-border" v-for="(item,index) in results.items" :key="index">
<Col :span="1" class="col-border">{{index+1}}</Col>
<Col :span="5" class="col-border">{{item.name}}</Col>
<Col :span="5" class="col-border">{{item.require}}</Col>
<Col :span="3" class="col-border">{{item.result}}</Col>
<Col :span="5" class="col-border">{{item.conclusion}}</Col>
<Col :span="5" class="col-border">{{item.remark}}</Col>
<Row
class="row-border right-border"
v-for="(item, index) in results.items"
:key="index"
>
<Col :span="1" class="col-border">{{ index + 1 }}</Col>
<Col :span="5" class="col-border">{{ item.name }}</Col>
<Col :span="5" class="col-border">{{ item.require }}</Col>
<Col :span="3" class="col-border">{{ item.result }}</Col>
<Col :span="5" class="col-border">{{ item.conclusion }}</Col>
<Col :span="5" class="col-border">{{ item.remark }}</Col>
</Row>
<Row class="row-border right-border">
<Col :span="4" class="col-border">结论</Col>
<Col :span="20" class="col-border">{{results.conclusion}}</Col>
<Col :span="20" class="col-border">{{ results.conclusion }}</Col>
</Row>
<Row class="row-border right-border bottom-border">
<Row class="row-border right-border bottom-border">
<Col :span="4" class="col-border">检验员 / 时间</Col>
<Col :span="8" class="col-border">{{results.examUser}} {{results.examDate}}</Col>
<Col :span="8" class="col-border"
>{{ results.examUser }} {{ results.examDate }}</Col
>
<Col :span="4" class="col-border">批准人 / 时间</Col>
<Col :span="8" class="col-border">{{results.approveUser}} {{results.approveDate}}</Col>
<Col :span="8" class="col-border"
>{{ results.approveUser }} {{ results.approveDate }}</Col
>
</Row>
</div>
<div style="margin-top:20px;">本合格证无检验专用章无效 (版本:MB.FFGGHJKLL)</div>
<Row style="margin-top:5px;">
<Col :span="8">地址:北京市海淀区知春路63号</Col>
<Col :span="8" style="text-align:center;">电话:010-68378079</Col>
<Col :span="8" style="text-align:right;">邮编:100190</Col>
<div style="margin-top: 20px">
本合格证无检验专用章无效 (版本:MB.FFGGHJKLL)
</div>
<Row style="margin-top: 5px">
<Col :span="10">地址:</Col>
<Col :span="8">电话:</Col>
<Col :span="6">邮编:100190</Col>
</Row>
</div>
</div>
......@@ -81,21 +97,21 @@
<script>
export default {
name: '',
props: ['results'],
name: "",
props: ["results"],
async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典
await store.dispatch("loadDictionary"); // 加载数据字典
},
data() {
return {}
return {};
},
methods: {
l(key) {
key = 'waitOpened' + '.' + key
return this.$t(key)
}
}
}
key = "waitOpened" + "." + key;
return this.$t(key);
},
},
};
</script>
<style lang="less" scoped>
.pdf-detail {
......
......@@ -63,6 +63,7 @@ import op from '@/components/page/opration.vue'
import ProductNumberSelect from '@/components/page/productNumberSelect.vue'
import ProductSelect from '@/components/page/productSelect.vue'
import ProductSelect1 from '@/components/page/productSelect1.vue'
import ProjectTaskTree from '@/components/page/projectTaskTree.vue'
import DTSpan from '@/components/page/dtSpan.vue'
import DTSearch from '@/components/page/dtSearch.vue'
import InputTime from '@/components/page/inputTime.vue'
......@@ -141,6 +142,7 @@ Vue.component("DepartmentSelect", DepartmentSelect)
Vue.component("ProductNumberSelect", ProductNumberSelect)
Vue.component("ProductSelect", ProductSelect)
Vue.component("ProductSelect1", ProductSelect1)
Vue.component("ProjectTaskTree",ProjectTaskTree)
Vue.component("DTSpan", DTSpan)
Vue.component("DTSearch", DTSearch)
Vue.component("InputTime", InputTime)
......
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