Commit 73a97e6c authored by renjintao's avatar renjintao

resource cart

parent 0e993ca7
<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>
......@@ -11,26 +11,11 @@
</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>
......@@ -43,7 +28,7 @@
<template slot="buttons">
<Button type="primary" @click="add">入库</Button>
<!-- <Button type="primary" @click="returnModel=true">归还</Button> -->
<Badge :count="this.$store.state.count" overflow-count="99" style="margin-right:5px;">
<Badge :count="this.$store.state.count" overflow-count="99" style="margin-right:5px;" :offset='postion'>
<Button icon="md-cart" @click="showCart">借出车</Button>
</Badge>
<Button @click="openModalIm">导入</Button>
......@@ -53,32 +38,11 @@
</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>
......@@ -104,6 +68,7 @@ export default {
value: null,
},
},
postion: [10, 10],
fscreeen: false,
modal: false,
title: "新增",
......@@ -114,8 +79,7 @@ export default {
storeTitle: "",
materialType: "",
mCode: "",
columns: [
{
columns: [{
key: "selection",
type: "selection",
width: 50,
......@@ -137,8 +101,7 @@ export default {
width: 60,
render: (h, params) => {
return h(
"div",
{
"div", {
class: "action",
},
[
......@@ -294,22 +257,18 @@ 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),
},
......@@ -317,8 +276,7 @@ export default {
"删除"
),
h(
"op",
{
"op", {
attrs: {
oprate: "detail",
title: "查看日志",
......@@ -359,7 +317,10 @@ export default {
})();
};
},
async fetch({ store, params }) {
async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
computed: {},
......
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