Commit d463c700 authored by 仇晓婷's avatar 仇晓婷

资源bug

parent 6dadb572
<template>
<Layout class="full">
<Layout class="full">
<Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<StoreTree @on-hide="onHide" @on-select="productSearch" />
</Sider>
......@@ -9,11 +9,26 @@
</a>
</div>
<Content class="content" :class="!showMenu?'con_bord':''">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :batch="true" :format="checkData" @all-change="allchange" @on-selection-change="onSelect" exportTitle="制造资源">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
:batch="true"
:format="checkData"
@all-change="allchange"
@on-selection-change="onSelect"
exportTitle="制造资源"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input clearable placeholder="请输入资源名称/资源编码/编码" v-model.trim="easySearch.keys.value" v-width="260" />
<Input
clearable
placeholder="请输入资源名称/资源编码/编码"
v-model.trim="easySearch.keys.value"
v-width="260"
/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
......@@ -36,11 +51,32 @@
</template>
</DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide :fullscreen="fscreeen">
<component :is="detail" :eid="curId" :rootName="rootName" :storeTitle="storeTitle" :materialType="materialType" :codeRuleType="codeRuleType" :storeId="storeId" :mcode="mCode" :cartList="this.$u.clone(this.$store.state.cart)" @on-close="cancel" @on-ok="ok" @substr="substr" />
<component
:is="detail"
:eid="curId"
:rootName="rootName"
:storeTitle="storeTitle"
:materialType="materialType"
:codeRuleType="codeRuleType"
:storeId="storeId"
:mcode="mCode"
:cartList="this.$u.clone(this.$store.state.cart)"
@on-close="cancel"
@on-ok="ok"
@substr="substr"
/>
</Modal>
<ImportExcel ref="importExcel" @on-get-data="getData" modalTitle="制造资源" :columns="columns" :open="ModalIm" @on-cancel="ModalImCancel" @on-ok="ok" />
<ImportExcel
ref="importExcel"
@on-get-data="getData"
modalTitle="制造资源"
:columns="columns"
:open="ModalIm"
@on-cancel="ModalImCancel"
@on-ok="ok"
/>
</Content>
</Layout>
</Layout>
</template>
<script>
......@@ -76,7 +112,8 @@ export default {
storeTitle: "",
materialType: "",
mCode: "",
columns: [{
columns: [
{
key: "selection",
type: "selection",
width: 50,
......@@ -98,7 +135,8 @@ export default {
width: 60,
render: (h, params) => {
return h(
"div", {
"div",
{
class: "action",
},
[
......@@ -254,18 +292,22 @@ export default {
hide: false,
render: (h, params) => {
return h(
"div", {
"div",
{
class: "action",
},
[
h(
"op", {
"op",
{
attrs: {
oprate: "delete",
title: "删除",
},
class: params.row.totalNum === params.row.numberAvailable ?
"remove" : "disable",
class:
params.row.totalNum === params.row.numberAvailable
? "remove"
: "disable",
on: {
click: () => this.remove(params.row),
},
......@@ -273,7 +315,8 @@ export default {
"删除"
),
h(
"op", {
"op",
{
attrs: {
oprate: "detail",
title: "查看日志",
......@@ -314,10 +357,7 @@ export default {
})();
};
},
async fetch({
store,
params
}) {
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
computed: {},
......@@ -488,11 +528,12 @@ export default {
},
productSearch(item, ids, rootName) {
// console.log(item);
this.codeRuleType = null;
this.curId = item.id;
let type = [];
type = item.codeRuleType.split(",");
if (type) {
type.forEach((e) => {
this.type = [];
this.type = item.codeRuleType.split(",");
if (this.type) {
this.type.forEach((e) => {
if (e == 3) {
this.codeRuleType = 3;
}
......
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