Commit 252a8c26 authored by renjintao's avatar renjintao

index itemindexitemindex

parent 1c79bd9e
...@@ -1568,6 +1568,7 @@ export default { ...@@ -1568,6 +1568,7 @@ export default {
unitPrice: '单价', unitPrice: '单价',
originalManufacturer: '原厂家', originalManufacturer: '原厂家',
remark: '备注', remark: '备注',
materialCode:'物料编码',
}, },
stock_item:{ stock_item:{
creationTime:'创建时间', creationTime:'创建时间',
......
...@@ -13,16 +13,13 @@ ...@@ -13,16 +13,13 @@
<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 placeholder="请输入物料名称/库位名称" v-model="easySearch.keys.value" v-width="240" /> <Input placeholder="请输入物料名称/物料编码/库位名称" v-model="easySearch.keys.value" v-width="260" />
</FormItem> </FormItem>
<FormItem> <FormItem>
<Button type="primary" @click="search">查询</Button> <Button type="primary" @click="search">查询</Button>
</FormItem> </FormItem>
</Form> </Form>
</template> </template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="add">入库</Button> <Button type="primary" @click="add">入库</Button>
</template> </template>
...@@ -51,7 +48,7 @@ export default { ...@@ -51,7 +48,7 @@ export default {
action: Api.index, action: Api.index,
showMenu: true, showMenu: true,
easySearch: { easySearch: {
keys: { op: "name,storeTitle", value: null } keys: { op: "name,storeTitle,materialCode", value: null }
}, },
fscreeen: false, fscreeen: false,
modal: false, modal: false,
...@@ -67,6 +64,13 @@ export default { ...@@ -67,6 +64,13 @@ export default {
align: "left", align: "left",
easy: true, easy: true,
high: true high: true
},
{
key: "materialCode",
title: this.l("materialCode"),
align: "left",
easy: true,
high: true
}, },
{ {
key: "total", key: "total",
......
<template> <template>
<div> <div>
<span class="mr20">物料名称:{{materialName}}</span> <span class="mr20">物料名称:{{materialName}}</span>
<span class="mr20">物料编{{mcode}}</span> <span class="mr20">物料编{{mcode}}</span>
<span class="mr20">库位:{{storeTitle}}</span> <span>库位:{{storeTitle}}</span>
<DataGrid <DataGrid
:columns="columns" :columns="columns"
ref="grid" ref="grid"
...@@ -40,7 +40,6 @@ export default { ...@@ -40,7 +40,6 @@ export default {
easy: true, easy: true,
high: true high: true
}, },
{ key: "total", title: this.l("total"), align: "right", high: true }, { key: "total", title: this.l("total"), align: "right", high: true },
{ {
key: "nowTotal", key: "nowTotal",
...@@ -80,7 +79,13 @@ export default { ...@@ -80,7 +79,13 @@ export default {
high: true, high: true,
type: "user" type: "user"
}, },
{ key: "remark", title: this.l("remark"), align: "left", high: true,tooltip:true } {
key: "remark",
title: this.l("remark"),
align: "left",
high: true,
tooltip: true
}
], ],
materialName: "", materialName: "",
storeTitle: "" storeTitle: ""
...@@ -122,7 +127,6 @@ export default { ...@@ -122,7 +127,6 @@ export default {
search() { search() {
this.$refs.grid.reload(this.easySearch); this.$refs.grid.reload(this.easySearch);
}, },
cancel() { cancel() {
this.curId = 0; this.curId = 0;
this.modal = false; this.modal = false;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</Col> </Col>
<Col :span="12"> <Col :span="12">
<FormItem :label="l('minNum')" prop="minNum"> <FormItem :label="l('minNum')" prop="minNum">
<InputNumber v-model="entity.minNum"></InputNumber> <InputNumber v-model="entity.minNum" :min="0"></InputNumber>
</FormItem> </FormItem>
</Col> </Col>
</Row> </Row>
...@@ -53,6 +53,11 @@ export default { ...@@ -53,6 +53,11 @@ export default {
}, },
methods: { methods: {
handleSubmit() { handleSubmit() {
if(this.entity.minNum==0)
{
this.$Message.error("设置最低库存不能小于1");
return
}
let params = { let params = {
id: this.entity.id, id: this.entity.id,
minNum: this.entity.minNum minNum: this.entity.minNum
...@@ -80,6 +85,9 @@ export default { ...@@ -80,6 +85,9 @@ export default {
load(v) { load(v) {
Api.get({ id: v }).then(r => { Api.get({ id: v }).then(r => {
this.entity = r.result; this.entity = r.result;
if (!r.result.minNum) {
this.entity.minNum = 0;
}
}); });
}, },
l(key) { l(key) {
......
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