Commit c7f160fa authored by 仇晓婷's avatar 仇晓婷

复验ok

parent 7df5be74
This diff is collapsed.
This diff is collapsed.
import Api from '@/plugins/request' import Api from '@/plugins/request'
export default { export default {
index:`${resourceUrl}/materialpowder/itempaged`, index:`${material}/material/paged`,
paged(params){ paged(params){
return Api.post(`${resourceUrl}/materialpowder/itempaged`,params); return Api.post(`${material}/material/paged`,params);
}, },
get(params){ get(params){
return Api.get(`${resourceUrl}/materialpowder/get`,params); return Api.get(`${material}/materialpowder/get`,params);
}, },
create(params){ create(params){
return Api.post(`${resourceUrl}/materialpowder/create`,params); return Api.post(`${material}/materialpowder/create`,params);
}, },
update(params){ update(params){
return Api.post(`${resourceUrl}/materialpowder/update`,params); return Api.post(`${material}/materialpowder/update`,params);
}, },
//删除: //删除:
delete(params) { delete(params) {
return Api.delete(`${resourceUrl}/materialpowder/delete`,{params:params}); return Api.delete(`${material}/materialpowder/delete`,{params:params});
}, },
} }
\ No newline at end of file
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :high='false' :action="action" :conditions="easySearch"></DataGrid> <DataGrid
:columns="columns"
ref="grid"
:high="false"
:action="action"
:conditions="easySearch"
></DataGrid>
</div> </div>
</template> </template>
<script> <script>
import Api from '../api' import Api from "../api";
export default { export default {
// name: 'list', // name: 'list',
// components:{ // components:{
...@@ -18,145 +24,157 @@ export default { ...@@ -18,145 +24,157 @@ export default {
detailModal: false, detailModal: false,
deletelModal: false, deletelModal: false,
easySearch: { easySearch: {
keys: { op: 'brand,name', value: '',default:true }, keys: { op: "brand,name", value: "", default: true },
reinspectionStatus: { op: 'Equal', value: 3 } reinspectionStatus: { op: "Equal", value: 1 },
}, },
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: 'brand',
title: this.l('brand'),
align: 'left',
easy: true,
high: true
},
{
key: 'name',
title: this.l('name'),
align: 'left',
easy: true,
high: true
},
{ {
key: 'specifications', key: "codeRuleType",
title: this.l('specifications'), title: "类型",
align: 'left', align: "center",
easy: true, code: "material.code.type",
high: true import: true,
hide: true,
}, },
// {
// key: "codeRuleId",
// title: "编码名称",
// materialKey: "3",
// import: true,
// hide: true,
// render: (h, params) => {
// return h("span", {}, this.getType3(params.row.codeRuleId));
// },
// },
// {
// key: "rootCategoryId",
// title: "大类",
// align: "right",
// materialKey: "1",
// import: true,
// hide: true,
// render: (h, params) => {
// return h("span", {}, this.getType1(params.row.rootCategoryId));
// },
// },
// {
// key: "categoryId",
// title: "子类",
// align: "right",
// materialKey: "2",
// import: true,
// hide: true,
// render: (h, params) => {
// return h("span", {}, this.getType2(params.row.categoryId));
// },
// },
{ {
key: 'batchNo', key: "code",
title: this.l('batchNo'), title: "编码",
align: 'left', align: "left",
easy: true, render: (h, params) => {
high: true, return h(
hide:true, "div",
{
props: {},
on: {
click: () => this.details(params.row),
},
},
!params.row.code || params.row.code == 0
? "未分配"
: params.row.code
);
},
}, },
{ {
key: 'originalManufacturer', key: "name",
title: this.l('originalManufacturer'), title: "名称",
align: 'left', align: "left",
easy: true,
high: true,
hide:true,
}, },
{ {
key: 'reinspectionDate', key: "status",
title: this.l('reinspectionDate'), title: "状态",
align: 'left', align: "center",
render: (h, paras) => { code: "material.main.status",
return h('span', paras.row.reinspectionDate)
},
high: true,
width:180,
}, },
{ {
key: 'remainingAmount', key: "version",
title: this.l('remainingAmount'), title: "版本",
align: 'left', align: "left",
high: true code: "material.main.version",
}, },
{ {
key: 'storeId', key: "drawing",
title: this.l('storeId'), title: "图号",
align: 'left', align: "left",
render: (h, paras) => {
return h('span', paras.row.storeId)
},
high: true
}, },
{ {
key: 'location', key: "creationTime",
title: this.l('location'), title: "创建时间",
align: 'left', hide: true,
easy: true, align: "left",
high: true type: "date",
}, },
{ {
key: 'category', key: "creatorUserId",
title: this.l('category'), title: "创建人",
align: 'center', hide: true,
high: true, align: "left",
code: 'mes_xingchi_resource.material.powderType' type: "user",
},
{
key: 'reinspectionStatus',
title: this.l('reinspectionStatus'),
align: 'center',
code: 'mes_xingchi_resource.material.recheckState',
easy: true,
high: true
}, },
// render:(h,paras)=>{return h('span',paras.row.reinspectionStatus)} , // render:(h,paras)=>{return h('span',paras.row.reinspectionStatus)} ,
{ {
title: '操作', title: "操作",
key: 'id', key: "id",
width: 150, width: 150,
align: 'center', align: "center",
render: (h, params) => { render: (h, params) => {
// let herfurl = params.row.certificateUploadPath; // let herfurl = params.row.certificateUploadPath;
return h('div', { class: 'action' }, [ return h("div", { class: "action" }, [
h( h(
'op', "op",
{ {
attrs:{ attrs: {
oprate:'detail' oprate: "detail",
} , },
class: 'view', class: "view",
on: { click: () => { on: {
this.detail(params.row) click: () => {
} } this.detail(params.row);
}, },
'查看复验单' },
) },
]) "查看复验单"
} ),
} ]);
] },
} },
}, ],
mounted() { };
}, },
mounted() {},
methods: { methods: {
reload(){ reload() {
this.$refs.grid.load() this.$refs.grid.load();
}, },
detail(row) { detail(row) {
let ssdata = row.certificateUploadPath let ssdata = row.certificateUploadPath;
if(this.$u.isNull(ssdata)){ if (this.$u.isNull(ssdata)) {
this.$Message.warning('复验单为空!') this.$Message.warning("复验单为空!");
}else{ } else {
var item=JSON.parse(ssdata)[0]["filePath"], var item = JSON.parse(ssdata)[0]["filePath"],
url = fileUrlDown + item; url = fileUrlDown + item;
window.open(url) window.open(url);
// this.$Message.warning('文件格式不支持') // this.$Message.warning('文件格式不支持')
} }
}, },
removeCancel() { removeCancel() {
this.deletelModal = false this.deletelModal = false;
}, },
l(key) { l(key) {
/* /*
...@@ -186,11 +204,11 @@ export default { ...@@ -186,11 +204,11 @@ export default {
lastModifierUserId:'', lastModifierUserId:'',
} }
*/ */
let vkey = 'waitReview' + '.' + key let vkey = "waitReview" + "." + 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
This diff is collapsed.
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