Commit 2ab2fbcc authored by renjintao's avatar renjintao

bom

parent be2de13a
<template>
<div>
<DataGrid
:columns="columns"
ref="grid"
:conditions="easySearch"
:action="action"
exportTitle="工艺Bom"
>
<div>
<DataGrid :columns="columns" ref="grid" :conditions="easySearch" :action="action" exportTitle="工艺Bom">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
......@@ -26,26 +20,10 @@
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="850" footer-hide>
<component
:is="detail"
:eid="curId"
:headid="hid"
:productBomId="productBomId"
:materialId="materialId"
@on-close="cancel"
@on-ok="ok"
/>
<component :is="detail" :eid="curId" :headid="hid" :productBomId="productBomId" :materialId="materialId" @on-close="cancel" @on-ok="ok" />
</Modal>
<ImportExcel
ref="importExcel"
@on-get-data="getData"
:modalTitle="temTitle"
:columns="columns"
:open="ModalIm"
@on-cancel="ModalImCancel"
@on-ok="ok"
/>
</div>
<ImportExcel ref="importExcel" @on-get-data="getData" :modalTitle="temTitle" :columns="columns" :open="ModalIm" @on-cancel="ModalImCancel" @on-ok="ok" />
</div>
</template>
<script>
......@@ -82,8 +60,7 @@ export default {
detail: null,
curId: 0,
hid: 0,
columns: [
{
columns: [{
key: "routingDetailNo",
title: this.l("routingDetailNo"),
align: "left",
......@@ -91,42 +68,41 @@ export default {
width: 100,
sortable: true,
},
// {
// key: "routingHeaderId",
// title: this.l("routingHeaderName"),
// hide: true,
// import: true,
// techKey: "1",
// render: (h, params) => {
// return h(
// "span",
// {},
// this.getRoutingHeaderName(params.row.routingHeaderId)
// );
// },
// },
{
key: "routingHeaderId",
title: this.l("routingHeaderName"),
hide: true,
import: true,
techKey: "1",
render: (h, params) => {
return h(
"span", {},
this.getRoutingHeaderName(params.row.routingHeaderId)
);
},
},
{
key: "routingDetailName",
title: this.l("routingDetailName"),
align: "left",
high: true,
},
// {
// key: "routingDetailId",
// title: this.l("routingDetailId"),
// hide: true,
// import: true,
// },
{
key: "routingDetailId",
title: this.l("routingDetailId"),
hide: true,
import: true,
},
// {
// key: "materialType",
// title: this.l("materialType"),
// align: "center",
// easy: true,
// high: true,
// code: "mes_xingchi_resource.material.materialReType",
// width: 100,
// },
{
key: "materialType",
title: this.l("materialType"),
align: "center",
easy: true,
high: true,
code: "mes_xingchi_resource.material.materialReType",
width: 100,
},
{
key: "materialNumber",
title: this.l("materialNumber"),
......@@ -134,13 +110,13 @@ export default {
easy: true,
high: true,
},
// {
// key: "materialId",
// title: this.l("materialId"),
// align: "left",
// hide: true,
// import: true,
// },
{
key: "materialId",
title: this.l("materialId"),
align: "left",
hide: true,
import: true,
},
{
key: "nameMaterial",
title: this.l("nameMaterial"),
......@@ -166,71 +142,71 @@ export default {
high: true,
width: 80,
},
// {
// key: "brand",
// title: this.l("brand"),
// align: "left",
// easy: true,
// high: true,
// },
// {
// key: "specifications",
// title: this.l("specifications"),
// align: "left",
// easy: true,
// high: true,
// },
// {
// key: "xhgg",
// title: this.l("xhgg"),
// align: "left",
// easy: true,
// high: true,
// hide: true,
// },
// {
// key: "texture",
// title: this.l("texture"),
// align: "left",
// easy: true,
// high: true,
// },
// {
// key: "procurementStandards",
// title: this.l("procurementStandards"),
// align: "left",
// easy: true,
// high: true,
// },
// {
// key: "qualityGrade",
// title: this.l("qualityGrade"),
// align: "left",
// easy: true,
// high: true,
// },
// {
// key: "drawNum",
// title: this.l("drawNum"),
// align: "left",
// easy: true,
// high: true,
// },
// {
// key: "creationTime",
// title: this.l("creationTime"),
// hide: true,
// align: "left",
// hide: true,
// },
// {
// key: "creatorUserId",
// title: this.l("creatorUserId"),
// hide: true,
// align: "left",
// hide: true,
// type: "user",
// },
{
key: "brand",
title: this.l("brand"),
align: "left",
easy: true,
high: true,
},
{
key: "specifications",
title: this.l("specifications"),
align: "left",
easy: true,
high: true,
},
{
key: "xhgg",
title: this.l("xhgg"),
align: "left",
easy: true,
high: true,
hide: true,
},
{
key: "texture",
title: this.l("texture"),
align: "left",
easy: true,
high: true,
},
{
key: "procurementStandards",
title: this.l("procurementStandards"),
align: "left",
easy: true,
high: true,
},
{
key: "qualityGrade",
title: this.l("qualityGrade"),
align: "left",
easy: true,
high: true,
},
{
key: "drawNum",
title: this.l("drawNum"),
align: "left",
easy: true,
high: true,
},
{
key: "creationTime",
title: this.l("creationTime"),
hide: true,
align: "left",
hide: true,
},
{
key: "creatorUserId",
title: this.l("creatorUserId"),
hide: true,
align: "left",
hide: true,
type: "user",
},
// {
// key: "lastModificationTime",
// title: this.l("lastModificationTime"),
......@@ -253,14 +229,12 @@ export default {
align: "center",
render: (h, params) => {
return h(
"div",
{
"div", {
class: "action",
},
[
h(
"op",
{
"op", {
attrs: {
oprate: "detail",
},
......@@ -272,8 +246,7 @@ export default {
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
h(
"op",
{
"op", {
attrs: {
oprate: "edit",
},
......@@ -284,8 +257,7 @@ export default {
this.headerStatus == 4 || this.headerStatus == 0 ? "编辑" : ""
),
h(
"op",
{
"op", {
attrs: {
oprate: "delete",
},
......@@ -322,7 +294,10 @@ export default {
this.getRoutingHeaderData();
this.search();
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -393,12 +368,10 @@ export default {
tempData.forEach((ele) => {
let obj = {
routingHeaderId: Number(this.headerid),
routingDetailId: ele.routingDetailId
? Number(ele.routingDetailId)
: null,
routingDetailNo: ele.routingDetailNo
? Number(ele.routingDetailNo)
: null,
routingDetailId: ele.routingDetailId ?
Number(ele.routingDetailId) : null,
routingDetailNo: ele.routingDetailNo ?
Number(ele.routingDetailNo) : null,
routingDetailName: ele.routingDetailName ? ele.routingDetailName : "",
routingStepId: 0,
quantity: ele.quantity ? Number(ele.quantity) : 0,
......@@ -410,9 +383,8 @@ export default {
specifications: ele.specifications ? ele.specifications : "",
xhgg: ele.xhgg ? ele.xhgg : "",
texture: ele.texture ? ele.texture : "",
procurementStandards: ele.procurementStandards
? ele.procurementStandards
: "",
procurementStandards: ele.procurementStandards ?
ele.procurementStandards : "",
qualityGrade: ele.qualityGrade ? ele.qualityGrade : "",
state: null,
extend: "",
......
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