Commit a72385df authored by renjintao's avatar renjintao

bug:cetificate

parent 5b927673
<template> <template>
<div class="end-issued"> <div class="end-issued">
<DataGrid <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :high="false" :height="tdHeight"></DataGrid>
:columns="columns" <Modal v-model="detailModal" title="查看合格证" @on-cancel="reload" footer-hide width="1000" :mask-closable="false">
ref="grid" <Detail @on-close="cancel" @on-ok="addOk" :eid="curId" ref="listDetail" />
:action="action"
:conditions="easySearch"
:high="false"
:height="tdHeight"
></DataGrid>
<Modal
v-model="detailModal"
title="查看合格证"
@on-cancel="reload"
footer-hide
width="1000"
:mask-closable="false"
>
<Detail @on-close="cancel" @on-ok="addOk" :eid="curId" ref="listDetail" />
</Modal> </Modal>
</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: "index", name: "index",
components: { components: {
Detail Detail
}, },
data() { data() {
return { return {
action: Api.index, // Api.indexPaged action: Api.index, // Api.indexPaged
detailModal: false, detailModal: false,
curId: 0, curId: 0,
modalInfo: false, modalInfo: false,
tdHeight: "", tdHeight: "",
rules: { rules: {
approveUser: [{ required: true, message: "必填", trigger: "blur" }] approveUser: [{
}, required: true,
columns: [ message: "必填",
{ key: "id", title: this.l("id"), hide: true, align: "left" }, trigger: "blur"
// { }]
// type: 'selection', },
// width: 60, columns: [{
// align: 'center' key: "id",
// }, title: this.l("id"),
{ hide: true,
key: "mesCode", align: "left"
title: this.l("mesCode"), },
align: "left", // {
easy: true, // type: 'selection',
high: true // width: 60,
}, // align: 'center'
{ // },
key: "productName", {
title: this.l("productName"), key: "mesCode",
align: "left", title: this.l("mesCode"),
easy: true, align: "left",
high: true easy: true,
}, high: true
{ },
key: "drawnNumber", {
title: this.l("drawnNumber"), key: "productName",
align: "left", title: this.l("productName"),
easy: true, align: "left",
high: true easy: true,
}, high: true
{ },
key: "quantity", {
title: this.l("quantity"), key: "drawnNumber",
align: "left", title: this.l("drawnNumber"),
easy: true, align: "left",
high: true easy: true,
}, high: true
},
{
key: "quantity",
title: this.l("quantity"),
align: "left",
easy: true,
high: true
},
{ {
key: "qualifiedQuantity", key: "qualifiedQuantity",
title: this.l("qualifiedQuantity"), title: this.l("qualifiedQuantity"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true
}, },
{ {
key: "uncertificateQuantity", key: "uncertificateQuantity",
title: this.l("uncertificateQuantity"), title: this.l("uncertificateQuantity"),
align: "left", align: "left",
easy: true, easy: true,
high: true high: true
},
{
key: "actualFinishDate",
title: this.l("actualFinishDate"),
align: "left",
easy: true,
high: true,
render: (h, params) => {
return h(
"span",
params.row.actualFinishDate == "0001-01-01 00:00:00" ?
"" :
params.row.actualFinishDate
);
}
},
{
key: "productingPreparationPeople",
title: this.l("productingPreparationPeople"),
align: "left",
easy: true,
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
easy: true,
high: true,
code: "plan.order.status"
},
{
title: "操作",
key: "action",
render: (h, params) => {
return h("div", {
class: "action"
}, [
h(
"op", {
attrs: {
oprate: "detail",
title: "查看合格证"
},
on: {
click: () => this.detail(params.row.id)
}
},
"查看合格证"
)
]);
}
}
],
easySearch: {
keys: {
op: "mesCode",
value: "",
default: true
},
type: {
op: "Equal",
value: 2
}
}
};
},
mounted() {},
created() {
this.tdHeight = window.innerHeight - 250;
},
methods: {
addOk() {
// this.$refs.grid.load()
this.detailModal = false;
this.curId = 0;
}, },
{ cancel() {
key: "actualFinishDate", this.curId = 0;
title: this.l("actualFinishDate"), this.detailModal = false;
align: "left",
easy: true,
high: true,
render: (h, params) => {
return h(
"span",
params.row.actualFinishDate == "0001-01-01 00:00:00"
? ""
: params.row.actualFinishDate
);
}
}, },
{ reload() {
key: "productingPreparationPeople", if (this.$refs.listDetail.checkboxList.length == 0) {
title: this.l("productingPreparationPeople"), this.$refs.grid.load();
align: "left", }
easy: true,
high: true
}, },
{ detail(id) {
key: "status", this.detailModal = true;
title: this.l("status"), this.curId = id;
align: "left",
easy: true,
high: true,
code: "plan.order.status"
}, },
{
title: "操作",
key: "id",
render: (h, params) => { // 列表title
return h("div", { class: "action" }, [ l(key) {
h( let vkey = "waitOpened" + "." + key;
"op", return this.$t(vkey) || key;
{
attrs: {
oprate: "detail",title: "查看合格证"
},
on: { click: () => this.detail(params.row.id) }
},
"查看合格证"
)
]);
}
} }
],
easySearch: {
keys: { op: "mesCode", value: "", default: true },
type: { op: "Equal", value: 2 }
}
};
},
mounted() {},
created() {
this.tdHeight = window.innerHeight - 250;
},
methods: {
addOk() {
// this.$refs.grid.load()
this.detailModal = false;
this.curId = 0;
},
cancel() {
this.curId = 0;
this.detailModal = false;
},
reload() {
if (this.$refs.listDetail.checkboxList.length == 0) {
this.$refs.grid.load();
}
},
detail(id) {
this.detailModal = true;
this.curId = id;
},
// 列表title
l(key) {
let vkey = "waitOpened" + "." + key;
return this.$t(vkey) || key;
} }
}
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</style> </style>
\ No newline at end of file
<template> <template>
<div class="wait-opened"> <div class="wait-opened">
<DataGrid <DataGrid :columns="columns" ref="grid" :action="action" :conditions="easySearch" :high="false" :height="tdHeight"></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>
</div> </div>
</template> </template>
<script> <script>
import Api from "../api"; import Api from "../api";
import Add from "./add"; import Add from "./add";
export default { export default {
name: "index", name: "index",
components: { components: {
Add Add
}, },
data() { data() {
return { return {
action: Api.index, action: Api.index,
checkLists: [], checkLists: [],
addModal: false, addModal: false,
curId: null, curId: null,
tdHeight: "", tdHeight: "",
columns: [ columns: [{
{ key: "id", title: this.l("id"), hide: true, align: "left" }, key: "id",
{ title: this.l("id"),
key: "mesCode", hide: true,
title: this.l("mesCode"), align: "left"
align: "left", },
easy: true, {
high: true key: "mesCode",
}, title: this.l("mesCode"),
{ align: "left",
key: "productName", easy: true,
title: this.l("productName"), high: true
align: "left", },
easy: true, {
high: true key: "productName",
}, title: this.l("productName"),
{ align: "left",
key: "drawnNumber", easy: true,
title: this.l("drawnNumber"), high: true
align: "left", },
easy: true, {
high: true key: "drawnNumber",
}, title: this.l("drawnNumber"),
{ align: "left",
key: "quantity", easy: true,
title: this.l("quantity"), high: true
align: "left", },
easy: true, {
high: true key: "quantity",
}, title: this.l("quantity"),
align: "left",
easy: true,
high: true
},
{
key: "qualifiedQuantity",
title: this.l("qualifiedQuantity"),
align: "left",
easy: true,
high: true
},
{
key: "uncertificateQuantity",
title: this.l("uncertificateQuantity"),
align: "left",
easy: true,
high: true
},
{
key: "actualFinishDate",
title: this.l("actualFinishDate"),
align: "left",
easy: true,
high: true,
width: 180,
render: (h, params) => {
return h(
"span",
params.row.actualFinishDate == "0001-01-01 00:00:00"
? ""
: params.row.actualFinishDate
);
}
},
{
key: "productingPreparationPeople",
title: this.l("productingPreparationPeople"),
align: "left",
easy: true,
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
easy: true,
high: true,
code: "plan.order.status"
},
{
title: "操作",
key: "id",
// width: 250,
align: "center",
render: (h, params) => {
return h("div", { class: "action" }, [
h(
"op",
{ {
attrs: { key: "qualifiedQuantity",
oprate: "add" title: this.l("qualifiedQuantity"),
}, align: "left",
on: { click: () => this.add(params.row) } easy: true,
high: true
}, },
"开合格证" {
) key: "uncertificateQuantity",
]); title: this.l("uncertificateQuantity"),
} align: "left",
} easy: true,
], high: true
easySearch: { },
keys: { op: "mesCode", value: null, default: true }, {
type: { op: "Equal", value: 1 } key: "actualFinishDate",
} title: this.l("actualFinishDate"),
}; align: "left",
}, easy: true,
async fetch({ store, params }) { high: true,
await store.dispatch("loadDictionary"); // 加载数据字典 width: 180,
}, render: (h, params) => {
mounted() {}, return h(
created() { "span",
this.tdHeight = window.innerHeight - 250; params.row.actualFinishDate == "0001-01-01 00:00:00" ?
}, "" :
methods: { params.row.actualFinishDate
addOk() { );
this.$refs.grid.load(); }
this.addModal = false; },
this.curId = 0; {
}, key: "productingPreparationPeople",
cancel() { title: this.l("productingPreparationPeople"),
this.curId = 0; align: "left",
this.addModal = false; easy: true,
high: true
},
{
key: "status",
title: this.l("status"),
align: "left",
easy: true,
high: true,
code: "plan.order.status"
},
{
title: "操作",
key: "action",
// width: 250,
align: "center",
render: (h, params) => {
return h("div", {
class: "action"
}, [
h(
"op", {
attrs: {
oprate: "add"
},
on: {
click: () => this.add(params.row)
}
},
"开合格证"
)
]);
}
}
],
easySearch: {
keys: {
op: "mesCode",
value: null,
default: true
},
type: {
op: "Equal",
value: 1
}
}
};
}, },
reload() { async fetch({
this.$refs.grid.load(); store,
params
}) {
await store.dispatch("loadDictionary"); // 加载数据字典
}, },
add(row) { mounted() {},
this.addModal = true; created() {
this.curId = row.id; this.tdHeight = window.innerHeight - 250;
this.$refs.addFile.entity.productName = row.productName;
this.$refs.addFile.entity.productStatus = row.status;
this.$refs.addFile.entity.productCode = row.drawnNumber;
}, },
// 列表title methods: {
l(key) { addOk() {
let vkey = "waitOpened" + "." + key; this.$refs.grid.load();
return this.$t(vkey) || key; this.addModal = false;
this.curId = 0;
},
cancel() {
this.curId = 0;
this.addModal = false;
},
reload() {
this.$refs.grid.load();
},
add(row) {
this.addModal = true;
this.curId = row.id;
this.$refs.addFile.entity.productName = row.productName;
this.$refs.addFile.entity.productStatus = row.status;
this.$refs.addFile.entity.productCode = row.drawnNumber;
},
// 列表title
l(key) {
let vkey = "waitOpened" + "." + key;
return this.$t(vkey) || key;
}
} }
}
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
</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