Commit 2018928a authored by renjintao's avatar renjintao

料单配套

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