Commit 2018928a authored by renjintao's avatar renjintao

料单配套

parent a72385df
<template> <template>
<div class="h100"> <div class="h100">
<DataGrid :columns="columns" ref="grid" :action="action"> <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch">
<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="240" />
</FormItem> </FormItem>
<FormItem>
<Dictionary code="accessory.status" placeholder="请选择配套状态" :multiple="true" v-model="easySearch.status.value"></Dictionary>
</FormItem>
<FormItem> <FormItem>
<Button type="primary" @click="search">查询</Button> <Button type="primary" @click="search">查询</Button>
</FormItem> </FormItem>
...@@ -15,8 +18,9 @@ ...@@ -15,8 +18,9 @@
<Modal v-model="modal" :title="title" width="1200" fullscreen footer-hide @on-cancel="ok"> <Modal v-model="modal" :title="title" width="1200" fullscreen footer-hide @on-cancel="ok">
<component :is="detail" :eid="curId" :row="entity" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" :row="entity" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
export default { export default {
...@@ -31,7 +35,14 @@ export default { ...@@ -31,7 +35,14 @@ export default {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { op: "orderCode,code", value: null }, keys: {
op: "orderCode,code",
value: null
},
status: {
op: "In",
value: [0, 1]
}
}, },
statuList: this.$store.getters.dictionaryByKey("accessory.status") || [], statuList: this.$store.getters.dictionaryByKey("accessory.status") || [],
statuList1: this.$store.getters.dictionaryByKey("outstore.status") || [], statuList1: this.$store.getters.dictionaryByKey("outstore.status") || [],
...@@ -40,8 +51,7 @@ export default { ...@@ -40,8 +51,7 @@ export default {
detail: null, detail: null,
curId: 0, curId: 0,
entity: {}, entity: {},
columns: [ columns: [{
{
key: "code", key: "code",
title: this.l("code"), title: this.l("code"),
align: "left", align: "left",
...@@ -52,7 +62,7 @@ export default { ...@@ -52,7 +62,7 @@ export default {
title: this.l("finishDate"), title: this.l("finishDate"),
align: "center", align: "center",
type: "date", type: "date",
width:200, width: 200,
}, },
{ {
key: "orderCode", key: "orderCode",
...@@ -65,25 +75,19 @@ export default { ...@@ -65,25 +75,19 @@ export default {
title: this.l("creationTime"), title: this.l("creationTime"),
align: "center", align: "center",
type: "date", type: "date",
width:200, width: 200,
},
{
key: "creator",
title: this.l("creator"),
align: "left"
}, },
{ key: "creator", title: this.l("creator"), align: "left" },
{ {
key: "status", key: "status",
title: this.l("status"), title: this.l("status"),
align: "center", align: "center",
width:150, width: 150,
render: (h, params) => { code: 'accessory.status'
return h(
"span",
{
style: {
color: this.setName(this.statuList,params.row.status).color,
},
},
this.setName(this.statuList,params.row.status).name
);
},
}, },
{ {
title: "操作", title: "操作",
...@@ -91,21 +95,31 @@ export default { ...@@ -91,21 +95,31 @@ export default {
width: 140, width: 140,
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.getAccessory(params.row) }, },
on: {
click: () => this.getAccessory(params.row)
},
}, },
"配套" "配套"
), ),
h( h(
"op", "op", {
{ attrs: {
attrs: { oprate: "edit" }, oprate: "edit"
style:{color:params.row.status==0?"#bebebe":""}, },
on: { click: () => params.row.status!=0?this.getOutBound(params.row):null }, style: {
color: params.row.status == 0 ? "#bebebe" : ""
},
on: {
click: () => params.row.status != 0 ? this.getOutBound(params.row) : null
},
}, },
"出库单" "出库单"
), ),
...@@ -118,7 +132,10 @@ export default { ...@@ -118,7 +132,10 @@ export default {
mounted() { mounted() {
this.search(); this.search();
}, },
async fetch({ store, params }) { async fetch({
store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典 await store.dispatch("loadDictionary"); // 加载数据字典
}, },
methods: { methods: {
...@@ -179,5 +196,6 @@ export default { ...@@ -179,5 +196,6 @@ export default {
}, },
}; };
</script> </script>
<style lang="less"> <style lang="less">
</style> </style>
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