Commit 0ad3cee5 authored by renjintao's avatar renjintao

supporting

parent 6f7b2dfd
<template>
<div class="product-m">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
:type="typeInfo"
:high="false"
:span="6"
:lazy="true"
>
<div class="product-m">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :type="typeInfo" :high="false" :span="6" :lazy="true" exportTitle="产品管理">
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
......@@ -68,18 +59,12 @@
</div>
</template>
</DataGrid>
<Modal
v-model="modal"
:title="title"
width="1200"
footer-hide
:fullscreen="fullscreen"
:mask-closable="false"
>
<Modal v-model="modal" :title="title" width="1200" footer-hide :fullscreen="fullscreen" :mask-closable="false">
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" :parents="parent" />
</Modal>
</div>
</div>
</template>
<script>
import Api from "./api";
import Search from "./search";
......@@ -106,17 +91,25 @@ export default {
action: Api.index,
fullscreen: false,
easySearch: {
keys: { op: "mmcode,name", value: null },
levelId: { op: "In", value: this.id },
upId: { op: "In", value: 0 },
keys: {
op: "mmcode,name",
value: null
},
levelId: {
op: "In",
value: this.id
},
upId: {
op: "In",
value: 0
},
},
modal: false,
title: "新增",
detail: null,
downUrl: fileUrlDown,
curId: 0,
columns: [
{
columns: [{
key: "id",
title: this.$t("id"),
hide: true,
......@@ -141,10 +134,11 @@ export default {
align: "left",
high: true,
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h(
"a",
{
"a", {
attrs: {
oprate: "detail",
// href: this.fileUrlPath,
......@@ -186,11 +180,14 @@ export default {
width: 200,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
return h("div", {
class: "action"
}, [
h(
"op",
{
attrs: { oprate: "edit" },
"op", {
attrs: {
oprate: "edit"
},
on: {
click: () => this.bom(params.row),
},
......@@ -198,9 +195,10 @@ export default {
"BOM"
),
h(
"op",
{
attrs: { oprate: "edit" },
"op", {
attrs: {
oprate: "edit"
},
on: {
click: () => this.edit(params.row),
},
......@@ -208,17 +206,21 @@ export default {
"编辑"
),
h(
"op",
{
attrs: { oprate: "delete" },
on: { click: () => this.remove(params.row) },
"op", {
attrs: {
oprate: "delete"
},
on: {
click: () => this.remove(params.row)
},
},
"删除"
),
h(
"op",
{
attrs: { oprate: "view" },
"op", {
attrs: {
oprate: "view"
},
on: {
click: () => this.view(params.row),
},
......@@ -237,7 +239,10 @@ export default {
mounted() {
this.$refs.grid.reload(this.easySearch);
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
......@@ -336,8 +341,14 @@ export default {
"parent.id"(v) {
if (v) {
let data = {
levelId: { op: "In", value: this.parent.ids },
upId: { op: "In", value: 0 },
levelId: {
op: "In",
value: this.parent.ids
},
upId: {
op: "In",
value: 0
},
};
this.$refs.grid.reload(data);
}
......@@ -345,12 +356,14 @@ export default {
},
};
</script>
<style lang="less">
.product-m {
.body-card {
border: 1px solid rgba(38, 128, 235, 1);
margin: 10px;
border-radius: 4px;
.title-i {
border-bottom: 1px solid #2680eb;
padding: 0 10px;
......@@ -358,26 +371,32 @@ export default {
line-height: 35px;
background: rgba(38, 128, 235, 0.2);
color: #2680eb;
.btn-click {
text-align: right;
}
}
.row-down {
padding: 10px;
.img-i {
width: 90px;
background: #eee;
height: 90px;
margin-right: 15px;
// overflow: hidden;
img {
width: 90px;
height: 90px;
}
}
.c div {
margin-bottom: 8px;
}
.a-icon {
text-align: right;
margin-bottom: -5px;
......
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