Commit 73a97e6c authored by renjintao's avatar renjintao

resource cart

parent 0e993ca7
<template> <template>
<Layout class="full"> <Layout class="full">
<Sider hide-trigger v-if="showMenu" class="menu_side" width="300"> <Sider hide-trigger v-if="showMenu" class="menu_side" width="300">
<StoreTree @on-hide="onHide" @on-select="productSearch" /> <StoreTree @on-hide="onHide" @on-select="productSearch" />
</Sider> </Sider>
...@@ -11,26 +11,11 @@ ...@@ -11,26 +11,11 @@
</div> </div>
<Content class="content" :class="!showMenu?'con_bord':''"> <Content class="content" :class="!showMenu?'con_bord':''">
<DataGrid <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :batch="true" :format="checkData" @all-change="allchange" @on-selection-change="onSelect" exportTitle="制造资源">
:columns="columns"
ref="grid"
:action="action"
:conditions="easySearch"
:batch="true"
:format="checkData"
@all-change="allchange"
@on-selection-change="onSelect"
exportTitle="制造资源"
>
<template slot="easySearch"> <template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline> <Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys"> <FormItem prop="keys">
<Input <Input clearable placeholder="请输入资源名称/资源编码/编码" v-model.trim="easySearch.keys.value" v-width="260" />
clearable
placeholder="请输入资源名称/资源编码/编码"
v-model.trim="easySearch.keys.value"
v-width="260"
/>
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button type="primary" @click="search">查询</Button> <Button type="primary" @click="search">查询</Button>
...@@ -43,7 +28,7 @@ ...@@ -43,7 +28,7 @@
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">入库</Button> <Button type="primary" @click="add">入库</Button>
<!-- <Button type="primary" @click="returnModel=true">归还</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> <Button icon="md-cart" @click="showCart">借出车</Button>
</Badge> </Badge>
<Button @click="openModalIm">导入</Button> <Button @click="openModalIm">导入</Button>
...@@ -53,32 +38,11 @@ ...@@ -53,32 +38,11 @@
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" width="1200" footer-hide :fullscreen="fscreeen"> <Modal v-model="modal" :title="title" width="1200" footer-hide :fullscreen="fscreeen">
<component <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" />
: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> </Modal>
<ImportExcel <ImportExcel ref="importExcel" @on-get-data="getData" modalTitle="制造资源" :columns="columns" :open="ModalIm" @on-cancel="ModalImCancel" @on-ok="ok" />
ref="importExcel"
@on-get-data="getData"
modalTitle="制造资源"
:columns="columns"
:open="ModalIm"
@on-cancel="ModalImCancel"
@on-ok="ok"
/>
</Content> </Content>
</Layout> </Layout>
</template> </template>
<script> <script>
...@@ -104,6 +68,7 @@ export default { ...@@ -104,6 +68,7 @@ export default {
value: null, value: null,
}, },
}, },
postion: [10, 10],
fscreeen: false, fscreeen: false,
modal: false, modal: false,
title: "新增", title: "新增",
...@@ -114,8 +79,7 @@ export default { ...@@ -114,8 +79,7 @@ export default {
storeTitle: "", storeTitle: "",
materialType: "", materialType: "",
mCode: "", mCode: "",
columns: [ columns: [{
{
key: "selection", key: "selection",
type: "selection", type: "selection",
width: 50, width: 50,
...@@ -137,8 +101,7 @@ export default { ...@@ -137,8 +101,7 @@ export default {
width: 60, width: 60,
render: (h, params) => { render: (h, params) => {
return h( return h(
"div", "div", {
{
class: "action", class: "action",
}, },
[ [
...@@ -294,22 +257,18 @@ export default { ...@@ -294,22 +257,18 @@ export default {
hide: false, hide: false,
render: (h, params) => { render: (h, params) => {
return h( return h(
"div", "div", {
{
class: "action", class: "action",
}, },
[ [
h( h(
"op", "op", {
{
attrs: { attrs: {
oprate: "delete", oprate: "delete",
title: "删除", title: "删除",
}, },
class: class: params.row.totalNum === params.row.numberAvailable ?
params.row.totalNum === params.row.numberAvailable "remove" : "disable",
? "remove"
: "disable",
on: { on: {
click: () => this.remove(params.row), click: () => this.remove(params.row),
}, },
...@@ -317,8 +276,7 @@ export default { ...@@ -317,8 +276,7 @@ export default {
"删除" "删除"
), ),
h( h(
"op", "op", {
{
attrs: { attrs: {
oprate: "detail", oprate: "detail",
title: "查看日志", title: "查看日志",
...@@ -359,7 +317,10 @@ export default { ...@@ -359,7 +317,10 @@ export default {
})(); })();
}; };
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
computed: {}, 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