Commit 4bd13615 authored by 仇晓婷's avatar 仇晓婷

优化

parent 6d888d95
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<template slot="buttons"> <template slot="buttons">
<Button type="primary" @click="addModal=true">新增</Button> <Button type="primary" @click="addModal=true">新增</Button>
</template> </template>
</DataGrid> </DataGrid>
<Modal v-model="addModal" title="新增" width="800" footer-hide> <Modal v-model="addModal" title="新增" width="800" footer-hide>
<Add @on-close="cancel" @on-ok="addOk" /> <Add @on-close="cancel" @on-ok="addOk" />
</Modal> </Modal>
...@@ -33,14 +33,14 @@ ...@@ -33,14 +33,14 @@
</div> </div>
</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 Set from './set' import Set from "./set";
export default { export default {
name: 'list', name: "list",
components: { components: {
Add, Add,
Edit, Edit,
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { op: 'businessName', value: null } keys: { op: "businessName", value: null }
}, },
addModal: false, addModal: false,
editModal: false, editModal: false,
...@@ -61,200 +61,204 @@ export default { ...@@ -61,200 +61,204 @@ export default {
deletelModal: false, deletelModal: false,
curId: 0, curId: 0,
columns: [ columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ {
key: 'businessName', title: "序号",
title: this.l('businessName'), type: "index",
align: 'left', width: 60,
align: "center"
},
{
key: "businessName",
title: this.l("businessName"),
align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'businessCode', key: "businessCode",
title: this.l('businessCode'), title: this.l("businessCode"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'prefix', key: "prefix",
title: this.l('prefix'), title: this.l("prefix"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: 'maxSerial', key: "maxSerial",
title: this.l('maxSerial'), title: this.l("maxSerial"),
align: 'left', align: "left",
high: true high: true
}, },
{ {
key: 'day', key: "day",
title: this.l('day'), title: this.l("day"),
align: 'left', align: "left",
high: true, high: true,
code: 'mes_xingchi_system.business_code_config.day' code: "mes_xingchi_system.business_code_config.day"
}, },
{ {
key: 'remark', key: "remark",
title: this.l('remark'), title: this.l("remark"),
align: 'left', align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
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: 'lastModifierUserId', key: "lastModifierUserId",
title: this.l('lastModifierUserId'), title: this.l("lastModifierUserId"),
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: '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"
}, },
{ {
title: '操作', title: "操作",
key: 'id', key: "id",
width: 220, width: 220,
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: 'set' oprate: "set"
}, },
on: { click: () => this.set(params.row.id) } on: { click: () => this.set(params.row.id) }
}, },
'设置' "设置"
), ),
h( h(
'op', "op",
{ {
attrs: { attrs: {
oprate: 'detail' oprate: "detail"
}, },
on: { click: () => this.detail(params.row.id) } on: { click: () => this.detail(params.row.id) }
}, },
'查看' "查看"
), ),
h( h(
'op', "op",
{ {
attrs: { attrs: {
oprate: 'detail', oprate: "detail",
class: 'edit' class: "edit"
}, },
on: { click: () => this.edit(params.row.id) } on: { click: () => this.edit(params.row.id) }
}, },
'编辑' "编辑"
), ),
h( h(
'op', "op",
{ {
attrs: { attrs: {
oprate: 'delete', oprate: "delete",
class: 'remove' class: "remove"
}, },
on: { click: () => this.remove(params.row.id) } on: { click: () => this.remove(params.row.id) }
}, },
'删除' "删除"
) )
]) ]);
} }
} }
] ]
} };
},
mounted() {
}, },
mounted() {},
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
await store.dispatch('loadDictionary') // 加载数据字典
}, },
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.setModal = false this.setModal = false;
this.curId = 0 this.curId = 0;
}, },
search() { search() {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch);
}, },
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;
}, },
set(id) { set(id) {
this.setModal = true this.setModal = 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("删除成功");
} }
}) });
}, },
removeCancel() { removeCancel() {
this.deletelModal = false this.deletelModal = false;
}, },
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.setModal = false this.setModal = false;
}, },
l(key) { l(key) {
/* /*
...@@ -278,11 +282,11 @@ export default { ...@@ -278,11 +282,11 @@ export default {
deleterUserId:'', deleterUserId:'',
} }
*/ */
let vkey = 'business_code_config' + '.' + key let vkey = "business_code_config" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
} }
} }
} };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
\ No newline at end of file
...@@ -65,6 +65,12 @@ export default { ...@@ -65,6 +65,12 @@ export default {
curId: 0, curId: 0,
columns: [ columns: [
{ key: "id", title: this.l("id"), hide: true, align: "left" }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{
title: "序号",
type: "index",
width: 40,
align: "center"
},
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
...@@ -329,14 +335,12 @@ export default { ...@@ -329,14 +335,12 @@ export default {
{ {
key: "remark", key: "remark",
title: this.l("remark"), title: this.l("remark"),
align: "left", align: "center"
easy: true,
high: true
}, },
{ {
title: "暂停记录", title: "暂停记录",
key: "id", key: "zanting",
width: 140, width: 100,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
return h("div", { class: "action" }, [ return h("div", { class: "action" }, [
...@@ -353,7 +357,7 @@ export default { ...@@ -353,7 +357,7 @@ export default {
}, },
{ {
title: "操作", title: "操作",
key: "id", key: "caozuo",
width: 100, width: 100,
align: "center", align: "center",
render: (h, params) => { render: (h, params) => {
......
...@@ -7,10 +7,10 @@ ...@@ -7,10 +7,10 @@
</div> </div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
import Detail from './detail' import Detail from "./detail";
export default { export default {
name: 'record', name: "record",
components: { components: {
Detail Detail
}, },
...@@ -19,24 +19,30 @@ export default { ...@@ -19,24 +19,30 @@ export default {
detailModal: false, detailModal: false,
action: Api.record, action: Api.record,
condition: { condition: {
orderId: { op: 'Equal', value: this.eid }, orderId: { op: "Equal", value: this.eid },
keys: { op: 'pauseCause,', value: null } keys: { op: "pauseCause,", value: null }
}, },
data: [], data: [],
curId: 0, curId: 0,
columns: [ columns: [
{ key: 'id', title: this.l('id'), hide: true, align: 'left' }, { key: "id", title: this.l("id"), hide: true, align: "left" },
{ {
key: 'mesCode', title: "序号",
title: this.l('mesCode'), type: "index",
align: 'left', width: 60,
align: "center"
},
{
key: "mesCode",
title: this.l("mesCode"),
align: "left",
render: (h, params) => render: (h, params) =>
h( h(
'a', "a",
{ {
attrs: { attrs: {
oprate: 'detail' oprate: "detail"
}, },
on: { click: () => this.detail(params.row.id) } on: { click: () => this.detail(params.row.id) }
}, },
...@@ -44,9 +50,9 @@ export default { ...@@ -44,9 +50,9 @@ export default {
) )
}, },
{ {
key: 'productName', key: "productName",
title: this.l('productName'), title: this.l("productName"),
align: 'left' align: "left"
}, },
// { // {
// key: 'orderId', // key: 'orderId',
...@@ -55,92 +61,86 @@ export default { ...@@ -55,92 +61,86 @@ export default {
// hide: false // hide: false
// }, // },
{ {
key: 'pauseCause', key: "pauseCause",
title: this.l('pauseCause'), title: this.l("pauseCause"),
align: 'left', align: "left",
code: 'mes_xingchi_plan.order_material.pauseCause' code: "mes_xingchi_plan.order_material.pauseCause"
}, },
{ {
key: 'creationTime', key: "creationTime",
title: this.l('creationTime'), title: this.l("creationTime"),
easy: true, easy: true,
high: true, high: true,
align: 'left' align: "left"
}, },
{ {
key: 'creator', key: "creator",
title: this.l('creator'), title: this.l("creator"),
easy: true, easy: true,
high: true, high: true,
align: 'left' align: "left"
}, },
{ {
key: 'laster', key: "laster",
title: this.l('laster'), title: this.l("laster"),
easy: true, easy: true,
high: true, high: true,
align: 'left' align: "left"
}, },
{ {
key: 'lastModificationTime', key: "lastModificationTime",
title: this.l('lastModificationTime'), title: this.l("lastModificationTime"),
easy: true, easy: true,
high: true, high: true,
align: 'left', align: "left",
render: (h, params) => { render: (h, params) => {
return h( return h(
'span', "span",
params.row.lastModificationTime == '0001-01-01 00:00:00' params.row.lastModificationTime == "0001-01-01 00:00:00"
? '' ? ""
: params.row.lastModificationTime : params.row.lastModificationTime
) );
} }
}, },
// {
// key: 'path',
// title: this.l('path'),
// easy: true,
// high: true,
// align: 'left'
// },
{ {
key: 'relatedPerson', key: "relatedPerson",
type: 'user', type: "user",
title: this.l('relatedPerson'), title: this.l("relatedPerson"),
align: 'left', align: "left",
high: true high: true
} }
] ]
} };
}, },
props: { props: {
eid: Number eid: Number
}, },
created() {}, created() {},
async fetch({ store, params }) { async fetch({ store, params }) {
await store.dispatch('loadDictionary') // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
search() { search() {
this.$refs.grid.reload(this.easySearch) this.$refs.grid.reload(this.easySearch);
}, },
l(key) { l(key) {
let vkey = 'order_pause' + '.' + key let vkey = "order_pause" + "." + key;
return this.$t(vkey) || key return this.$t(vkey) || key;
}, },
detail(id) { detail(id) {
this.detailModal = true this.detailModal = true;
this.curId = id this.curId = id;
} }
}, },
watch: { watch: {
eid(v) { eid(v) {
this.condition.orderId.value = v this.condition.orderId.value = v;
this.$refs.grid.reload(this.condition) this.$refs.grid.reload(this.condition);
} }
} }
} };
</script> </script>
<style lang='less'> <style lang='less'>
</style> </style>
\ No newline at end of file
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