Commit 7dbc480f authored by renjintao's avatar renjintao

scroll

parent 5f32a654
<template> <template>
<div class="end-issued"> <div class="end-issued">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :high="false"></DataGrid> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :high="false" :height="tdHeight"></DataGrid>
<Modal v-model="detailModal" title="查看合格证" footer-hide width="1000" :mask-closable="false"> <Modal v-model="detailModal" title="查看合格证" footer-hide width="1000" :mask-closable="false">
<Detail @on-close="cancel" @on-ok="addOk" :eid="curId" /> <Detail @on-close="cancel" @on-ok="addOk" :eid="curId" />
</Modal> </Modal>
...@@ -21,6 +21,7 @@ export default { ...@@ -21,6 +21,7 @@ export default {
detailModal: false, detailModal: false,
curId: 0, curId: 0,
modalInfo: false, modalInfo: false,
tdHeight:'',
rules: { rules: {
approveUser: [{ required: true, message: '必填', trigger: 'blur' }] approveUser: [{ required: true, message: '必填', trigger: 'blur' }]
}, },
...@@ -130,8 +131,9 @@ export default { ...@@ -130,8 +131,9 @@ export default {
} }
} }
}, },
mounted() { mounted() {},
console.log(this) created() {
this.tdHeight = window.innerHeight - 260
}, },
methods: { methods: {
addOk() { addOk() {
......
<template> <template>
<div class="wait-opened"> <div class="wait-opened">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :high="false"></DataGrid> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :high="false" :height="tdHeight" ></DataGrid>
<Modal v-model="addModal" title="开合格证" fullscreen footer-hide :mask-closable="false"> <Modal v-model="addModal" title="开合格证" fullscreen footer-hide :mask-closable="false">
<Add @on-close="cancel" @on-ok="addOk" :eid="curId" ref="addFile" /> <Add @on-close="cancel" @on-ok="addOk" :eid="curId" ref="addFile" />
</Modal> </Modal>
...@@ -21,6 +21,7 @@ export default { ...@@ -21,6 +21,7 @@ export default {
checkLists: [], checkLists: [],
addModal: false, addModal: false,
curId: null, curId: null,
tdHeight:'',
columns: [ columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' }, { key: 'id', title: this.l('id'), hide: true, align: 'left' },
{ {
...@@ -127,8 +128,9 @@ export default { ...@@ -127,8 +128,9 @@ export default {
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch('loadDictionary') // 加载数据字典
}, },
mounted() { mounted() {},
console.log(this) created() {
this.tdHeight = window.innerHeight - 260
}, },
methods: { methods: {
addOk() { addOk() {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<StoreHouseLeft @storeIds="storeIds" :type='1'></StoreHouseLeft> <StoreHouseLeft @storeIds="storeIds" :type='1'></StoreHouseLeft>
</Sider> </Sider>
<Content class="content"> <Content class="content">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :height="tdHeight">
<template slot="searchForm"> <template slot="searchForm">
<Search /> <Search />
</template> </template>
...@@ -82,6 +82,7 @@ export default { ...@@ -82,6 +82,7 @@ export default {
deletelModal: false, deletelModal: false,
setNumModal: false, setNumModal: false,
inventoryModal: false, inventoryModal: false,
tdHeight: "",
curId: 0, curId: 0,
easySearch: { easySearch: {
keys: { op: 'code,name', value: '', default: true }, keys: { op: 'code,name', value: '', default: true },
...@@ -256,7 +257,7 @@ export default { ...@@ -256,7 +257,7 @@ export default {
}, },
mounted() {}, mounted() {},
created() { created() {
this.tdHeight = window.innerHeight - 260
}, },
methods: { methods: {
addOk() { addOk() {
......
<template> <template>
<Layout class="full"> <Layout class="full">
<Sider <Sider hide-trigger :style="{ background: '#fff' }" class="menu" width="240" style=" flex:0;">
hide-trigger
:style="{ background: '#fff' }"
class="menu"
width="240"
style=" flex:0;"
>
<StoreHouseLeft @storeIds="storeIds" :type="1"></StoreHouseLeft> <StoreHouseLeft @storeIds="storeIds" :type="1"></StoreHouseLeft>
</Sider> </Sider>
<Content class="content"> <Content class="content">
...@@ -15,6 +9,7 @@ ...@@ -15,6 +9,7 @@
ref="grid" ref="grid"
:action="action" :action="action"
:conditions="easySearch" :conditions="easySearch"
:height="tdHeight"
> >
<template slot="searchForm"> <template slot="searchForm">
<Search /> <Search />
...@@ -33,12 +28,7 @@ ...@@ -33,12 +28,7 @@
<Modal v-model="detailModal" title="详情" width="800"> <Modal v-model="detailModal" title="详情" width="800">
<Detail :eid="curId" /> <Detail :eid="curId" />
</Modal> </Modal>
<Modal <Modal v-model="deletelModal" title="删除" @on-ok="removeOk" @on-cancel="cancel">
v-model="deletelModal"
title="删除"
@on-ok="removeOk"
@on-cancel="cancel"
>
<p>确定删除?</p> <p>确定删除?</p>
</Modal> </Modal>
<Modal v-model="inventoryModal" title="盘库" footer-hide width="800"> <Modal v-model="inventoryModal" title="盘库" footer-hide width="800">
...@@ -76,15 +66,15 @@ ...@@ -76,15 +66,15 @@
</Layout> </Layout>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
import Add from './add' import Add from "./add";
import Edit from './edit' import Edit from "./edit";
import Detail from './detail' import Detail from "./detail";
import Search from './search' import Search from "./search";
import Inventory from './inventory' import Inventory from "./inventory";
import StoreHouseLeft from '@/components/modalTree/StoreHouseLeft.vue' import StoreHouseLeft from "@/components/modalTree/StoreHouseLeft.vue";
export default { export default {
name: 'list', name: "list",
components: { components: {
Add, Add,
Edit, Edit,
...@@ -102,203 +92,204 @@ export default { ...@@ -102,203 +92,204 @@ export default {
deletelModal: false, deletelModal: false,
setNumModal: false, setNumModal: false,
inventoryModal: false, inventoryModal: false,
tdHeight: "",
curId: 0, curId: 0,
easySearch: { easySearch: {
keys: { op: 'code,name', value: '', default: true }, keys: { op: "code,name", value: "", default: true },
storeId: { op: 'In', value: '' } storeId: { op: "In", value: "" }
}, },
columns: [ columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ {
key: 'code', key: "code",
title: this.l('code'), title: this.l("code"),
align: 'left', align: "left",
easy: true, easy: true,
high: true, high: true,
width: 200 width: 200
}, },
{ {
key: 'name', key: "name",
title: this.l('name'), title: this.l("name"),
align: 'left', align: "left",
easy: true, easy: true,
high: true, high: true,
tooltip: true tooltip: true
}, },
{ {
key: 'brand', key: "brand",
title: this.l('brand'), title: this.l("brand"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'specifications', key: "specifications",
title: this.l('specifications'), title: this.l("specifications"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'originalManufacturer', key: "originalManufacturer",
title: this.l('originalManufacturer'), title: this.l("originalManufacturer"),
align: 'left', align: "left",
easy: true, easy: true,
hide: true, hide: true,
high: true high: true
}, },
{ {
key: 'batch', key: "batch",
title: this.l('batch'), title: this.l("batch"),
align: 'left', align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
}, },
{ {
key: 'totalInventory', key: "totalInventory",
title: this.l('totalInventory'), title: this.l("totalInventory"),
align: 'left', align: "left",
width: 120, width: 120,
hide: true, hide: true,
high: true high: true
}, },
{ {
key: 'total', key: "total",
title: this.l('total'), title: this.l("total"),
align: 'left', align: "left",
width: 120, width: 120,
high: true, high: true,
render: (h, params) => { render: (h, params) => {
return h( return h(
'Tooltip', "Tooltip",
{ {
props: { props: {
content: '库存不足,总数小于' + params.row.minNum + 'kg', content: "库存不足,总数小于" + params.row.minNum + "kg",
placement: 'top', placement: "top",
disabled: params.row.total > params.row.minNum ? true : false disabled: params.row.total > params.row.minNum ? true : false
}, },
class: params.row.total > params.row.minNum ? '' : 'red' class: params.row.total > params.row.minNum ? "" : "red"
}, },
params.row.total params.row.total
) );
} }
}, },
{ {
key: 'minNum', key: "minNum",
title: this.l('minNum'), title: this.l("minNum"),
align: 'left', align: "left",
width: 120, width: 120,
hide: true, hide: true,
high: true high: true
}, },
{ {
key: 'unitPrice', key: "unitPrice",
title: this.l('unitPrice'), title: this.l("unitPrice"),
align: 'left', align: "left",
width: 110, width: 110,
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'certificateOfApproval', key: "certificateOfApproval",
title: this.l('certificateOfApproval'), title: this.l("certificateOfApproval"),
align: 'left', align: "left",
easy: true, easy: true,
hide: true, hide: true,
high: true high: true
}, },
{ {
key: 'storeTitle', key: "storeTitle",
title: this.l('storeTitle'), title: this.l("storeTitle"),
align: 'left', align: "left",
high: true, high: true,
width: 110, width: 110,
tooltip: true tooltip: true
}, },
{ {
key: 'location', key: "location",
title: this.l('location'), title: this.l("location"),
align: 'left', align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true hide: true
}, },
{ {
key: 'category', key: "category",
title: this.l('category'), title: this.l("category"),
align: 'left', align: "left",
high: true, high: true,
code: 'mes_xingchi_resource.material.powderType' code: "mes_xingchi_resource.material.powderType"
}, },
{ {
key: 'reinspectionStatus', key: "reinspectionStatus",
title: this.l('reinspectionStatus'), title: this.l("reinspectionStatus"),
align: 'left', align: "left",
easy: true, easy: true,
high: true, high: true,
hide: true, hide: true,
width: 120, width: 120,
code: 'mes_xingchi_resource.material.recheckState' code: "mes_xingchi_resource.material.recheckState"
}, },
{ {
key: 'creationTime', key: "creationTime",
title: this.l('creationTime'), title: this.l("creationTime"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'creatorUserId', key: "creatorUserId",
title: this.l('creatorUserId'), title: this.l("creatorUserId"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'lastModificationTime', key: "lastModificationTime",
title: this.l('lastModificationTime'), title: this.l("lastModificationTime"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'deletionTime', key: "deletionTime",
title: this.l('deletionTime'), title: this.l("deletionTime"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'deleterUserId', key: "deleterUserId",
title: this.l('deleterUserId'), title: this.l("deleterUserId"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'isDeleted', key: "isDeleted",
title: this.l('isDeleted'), title: this.l("isDeleted"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
key: 'lastModifierUserId', key: "lastModifierUserId",
title: this.l('lastModifierUserId'), title: this.l("lastModifierUserId"),
hide: true, hide: true,
align: 'left' align: "left"
}, },
{ {
title: '操作', title: "操作",
width: 170, width: 170,
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
return h('div', { class: 'action' }, [ return h("div", { class: "action" }, [
h( h(
'op', "op",
{ {
attrs: { attrs: {
oprate: 'detail' oprate: "detail"
}, },
on: { click: () => this.setNum(params.row) } on: { click: () => this.setNum(params.row) }
}, },
'设置最低库存' "设置最低库存"
) )
// h( // h(
// 'a', // 'a',
...@@ -308,98 +299,100 @@ export default { ...@@ -308,98 +299,100 @@ export default {
// }, // },
// '删除' // '删除'
// ) // )
]) ]);
} }
} }
], ],
setNumForm: { setNumForm: {
coding: '', coding: "",
name: '', name: "",
id: null, id: null,
minNum: 0 minNum: 0
} }
} };
}, },
mounted() {}, mounted() {},
created() {}, created() {
this.tdHeight = window.innerHeight - 260
},
methods: { methods: {
addOk() { addOk() {
this.$refs.grid.load() this.$refs.grid.load();
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.setNumModal = false this.setNumModal = false;
this.inventoryModal = false this.inventoryModal = false;
this.curId = 0 this.curId = 0;
}, },
detail(id) { detail(id) {
this.detailModal = true this.detailModal = true;
this.curId = id this.curId = id;
}, },
edit(id) { edit(id) {
this.editModal = true this.editModal = true;
this.curId = id this.curId = id;
}, },
remove(id) { remove(id) {
this.deletelModal = true this.deletelModal = true;
this.curId = id this.curId = id;
}, },
removeOk() { removeOk() {
Api.delete({ id: this.curId }).then((r) => { Api.delete({ id: this.curId }).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load() this.$refs.grid.load();
this.deletelModal = false this.deletelModal = false;
this.$Message.success('删除成功') this.$Message.success("删除成功");
} else { } else {
this.$Message.error('删除失败') this.$Message.error("删除失败");
} }
}) });
}, },
removeCancel() { removeCancel() {
this.deletelModal = false this.deletelModal = false;
}, },
setNum(val) { setNum(val) {
this.setNumModal = true this.setNumModal = true;
this.setNumForm = { this.setNumForm = {
coding: val.code, coding: val.code,
name: val.name, name: val.name,
id: val.id, id: val.id,
minNum: val.minNum minNum: val.minNum
} };
// this.setNumForm.coding=val.coding // this.setNumForm.coding=val.coding
// this.setNumForm.name=val.name // this.setNumForm.name=val.name
// this.setNumForm.id=val.id // this.setNumForm.id=val.id
// this.setNumForm.minNum=val.minNum // this.setNumForm.minNum=val.minNum
}, },
setNumOk() { setNumOk() {
Api.setminnum(this.setNumForm).then((r) => { Api.setminnum(this.setNumForm).then(r => {
if (r.success) { if (r.success) {
this.$refs.grid.load() this.$refs.grid.load();
this.setNumModal = false this.setNumModal = false;
this.$Message.success('设置成功') this.$Message.success("设置成功");
} else { } else {
this.$Message.error('设置失败') this.$Message.error("设置失败");
} }
}) });
}, },
cancel() { cancel() {
this.curId = 0 this.curId = 0;
this.addModal = false this.addModal = false;
this.detailModal = false this.detailModal = false;
this.editModal = false this.editModal = false;
this.deletedlModal = false this.deletedlModal = false;
this.setNumModal = false this.setNumModal = false;
this.inventoryModal = false this.inventoryModal = false;
}, },
l(key) { l(key) {
let vkey = 'MaterialPowder' + '.' + key let vkey = "MaterialPowder" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
}, },
storeIds(val) { storeIds(val) {
this.easySearch.storeId.value = val this.easySearch.storeId.value = val;
this.$refs.grid.easySearch() this.$refs.grid.easySearch();
} }
} }
} };
</script> </script>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<StoreHouseLeft @storeIds="storeIds" c></StoreHouseLeft> <StoreHouseLeft @storeIds="storeIds" c></StoreHouseLeft>
</Sider> </Sider>
<Content class="content"> <Content class="content">
<DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :height="tdHeight">
<template slot="searchForm"> <template slot="searchForm">
<Search /> <Search />
</template> </template>
...@@ -82,6 +82,7 @@ export default { ...@@ -82,6 +82,7 @@ export default {
deletelModal: false, deletelModal: false,
setNumModal: false, setNumModal: false,
inventoryModal: false, inventoryModal: false,
tdHeight: "",
curId: 0, curId: 0,
easySearch: { easySearch: {
keys: { op: 'code', value: '', default: true }, keys: { op: 'code', value: '', default: true },
...@@ -259,6 +260,7 @@ export default { ...@@ -259,6 +260,7 @@ export default {
}, },
mounted() {}, mounted() {},
created() { created() {
this.tdHeight = window.innerHeight - 260
}, },
methods: { methods: {
addOk() { addOk() {
......
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