|
@@ -136,6 +136,12 @@
|
|
|
prop="materialsTypeName"
|
|
prop="materialsTypeName"
|
|
|
/>
|
|
/>
|
|
|
<el-table-column label="所属柜" align="center" prop="cabinetName" />
|
|
<el-table-column label="所属柜" align="center" prop="cabinetName" />
|
|
|
|
|
+ <el-table-column label="可用寿命" align="center" prop="serviceLife" >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ {{formatDateserviceLife(scope.row.serviceLife)}}
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="物资状态" align="center" prop="loanState">
|
|
<el-table-column label="物资状态" align="center" prop="loanState">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<span>{{ scope.row.loanState == 0 ? "借出" : "柜中" }}</span>
|
|
<span>{{ scope.row.loanState == 0 ? "借出" : "柜中" }}</span>
|
|
@@ -208,7 +214,7 @@
|
|
|
v-model="form.materialsTypeId"
|
|
v-model="form.materialsTypeId"
|
|
|
:options="machinerytypeOptions"
|
|
:options="machinerytypeOptions"
|
|
|
:normalizer="normalizer"
|
|
:normalizer="normalizer"
|
|
|
- placeholder="选择上级作业区域"
|
|
|
|
|
|
|
+ placeholder="选择物资类型"
|
|
|
/>
|
|
/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -262,10 +268,15 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
|
<el-form-item label="可用寿命" prop="serviceLife">
|
|
<el-form-item label="可用寿命" prop="serviceLife">
|
|
|
- <el-input
|
|
|
|
|
|
|
+<!-- <el-input-->
|
|
|
|
|
+<!-- v-model="form.serviceLife"-->
|
|
|
|
|
+<!-- placeholder="请输入可用寿命"-->
|
|
|
|
|
+<!-- />-->
|
|
|
|
|
+ <el-date-picker
|
|
|
v-model="form.serviceLife"
|
|
v-model="form.serviceLife"
|
|
|
- placeholder="请输入可用寿命"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ type="date"
|
|
|
|
|
+ placeholder="选择日期">
|
|
|
|
|
+ </el-date-picker>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
@@ -301,10 +312,12 @@ import { listType } from "@/api/mes/material/typeindex";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import { genCode } from "@/api/system/autocode/rule";
|
|
import { genCode } from "@/api/system/autocode/rule";
|
|
|
|
|
+import Template from '@/views/print/printtemplate/list.vue'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "Team",
|
|
name: "Team",
|
|
|
components: {
|
|
components: {
|
|
|
|
|
+ Template,
|
|
|
Treeselect,
|
|
Treeselect,
|
|
|
},
|
|
},
|
|
|
dicts: ["material_status"],
|
|
dicts: ["material_status"],
|
|
@@ -408,6 +421,13 @@ export default {
|
|
|
this.materialsCabinets();
|
|
this.materialsCabinets();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ formatDateserviceLife(dateString) {
|
|
|
|
|
+ const date = new Date(dateString);
|
|
|
|
|
+ const year = date.getFullYear();
|
|
|
|
|
+ const month = String(date.getMonth() + 1).padStart(2, '0');
|
|
|
|
|
+ const day = String(date.getDate()).padStart(2, '0');
|
|
|
|
|
+ return `${year}-${month}-${day}`;
|
|
|
|
|
+ },
|
|
|
/** 转换数据结构 */
|
|
/** 转换数据结构 */
|
|
|
normalizer(node) {
|
|
normalizer(node) {
|
|
|
if (node.children && !node.children.length) {
|
|
if (node.children && !node.children.length) {
|