Compare commits

...

2 Commits

@ -18,7 +18,7 @@
"axios": "0.18.1", "axios": "0.18.1",
"clipboard": "2.0.4", "clipboard": "2.0.4",
"codemirror": "5.45.0", "codemirror": "5.45.0",
"core-js": "3.6.5", "core-js": "^3.32.2",
"docxtemplater": "^3.26.4", "docxtemplater": "^3.26.4",
"driver.js": "0.9.5", "driver.js": "0.9.5",
"dropzone": "5.5.1", "dropzone": "5.5.1",
@ -41,7 +41,6 @@
"script-loader": "0.7.2", "script-loader": "0.7.2",
"sortablejs": "1.8.4", "sortablejs": "1.8.4",
"svg-baker-runtime": "^1.4.7", "svg-baker-runtime": "^1.4.7",
"tui-editor": "1.3.3",
"vue": "2.6.10", "vue": "2.6.10",
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",
"vue-print-nb": "^1.7.5", "vue-print-nb": "^1.7.5",
@ -69,7 +68,6 @@
"eslint": "6.7.2", "eslint": "6.7.2",
"eslint-plugin-vue": "6.2.2", "eslint-plugin-vue": "6.2.2",
"html-webpack-plugin": "3.2.0", "html-webpack-plugin": "3.2.0",
"husky": "1.3.1",
"lint-staged": "8.1.5", "lint-staged": "8.1.5",
"mockjs": "1.0.1-beta3", "mockjs": "1.0.1-beta3",
"plop": "2.3.0", "plop": "2.3.0",

@ -11,18 +11,19 @@ export function getList(data) {
}); });
} }
// 点击新增 生成日历 // 批量修改
export function generate(data) { export function update(data) {
return request({ return request({
url: "/emGcrl/generate", url: "/emGcrl/update",
method: "post", method: "post",
data, data,
}); });
} }
// 批量修改
export function update(data) { // 一键生成
export function generate(data) {
return request({ return request({
url: "/emGcrl/update", url: "/emGcrl/generate",
method: "post", method: "post",
data, data,
}); });

@ -11,6 +11,24 @@ export function getList(data) {
}); });
} }
// 设备信息转码
export function emSbjbbZM(data) {
return request({
url: "/api/sy/emSbjbbZM",
method: "post",
data,
});
}
// 部门对应设备名称和编号
export function getBMMCBM(data) {
return request({
url: "/emSbjbb/getBMMCBM",
method: "post",
data,
});
}
// 批量新增 // 批量新增
export function save(data) { export function save(data) {
return request({ return request({

@ -11,6 +11,24 @@ export function getRYList(data) {
}); });
} }
// 设备信息转码
export function emSbjbbZM(data) {
return request({
url: "/api/sy/emSbjbbZM",
method: "post",
data,
});
}
// 部门对应设备名称和编号
export function getBMMCBM(data) {
return request({
url: "/emSbjbb/getBMMCBM",
method: "post",
data,
});
}
// 获取列表 // 获取列表
export function getList(data) { export function getList(data) {
return request({ return request({

@ -11,6 +11,24 @@ export function getList(data) {
}); });
} }
// 设备信息转码
export function emSbjbbZM(data) {
return request({
url: "/api/sy/emSbjbbZM",
method: "post",
data,
});
}
// 部门对应设备名称和编号
export function getBMMCBM(data) {
return request({
url: "/emSbjbb/getBMMCBM",
method: "post",
data,
});
}
// 批量新增 // 批量新增
export function save(data) { export function save(data) {
return request({ return request({

@ -20,10 +20,10 @@ export function getSBLX(data) {
}); });
} }
// 获取设备状态 // 设备信息转码
export function getZhbmAll(data) { export function emSbjbbZM(data) {
return request({ return request({
url: "/api/sy/getZhbmAll", url: "/api/sy/emSbjbbZM",
method: "post", method: "post",
data, data,
}); });

@ -2,27 +2,23 @@
<!-- 订货清单查询 --> <!-- 订货清单查询 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="船号:">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option <el-option
v-for="item in ShipNoList" v-for="item in ShipNoList"
:key="item.value" :key="item.cbbm"
:label="item.label" :label="item.cbbm"
:value="item.value" :value="item.cbbm"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="状态:">
<el-select v-model="request.Zt" placeholder="状态" clearable> <el-select v-model="request.Zt" placeholder="状态" clearable>
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
@ -32,9 +28,13 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="16" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -51,11 +51,9 @@
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
highlight-hover-row highlight-hover-row
> >
<template #dcCh_default="{ row }">
{{ row.dcCh }}
</template>
<template #Zt_default="{ row }"> <template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index"> <div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div> <div v-if="row.zt === item.value">{{ item.label }}</div>
@ -71,6 +69,7 @@
<script> <script>
import { getList } from "@/api/jhzx/dhqdCX"; import { getList } from "@/api/jhzx/dhqdCX";
import { getCzxx } from "@/api/jhzx/qfxq";
export default { export default {
name: "dhqdCX", name: "dhqdCX",
data() { data() {
@ -82,94 +81,370 @@ export default {
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "seq", width: 60, title: "序号" }, {
type: "seq",
width: "50",
title: "序号",
align: "center",
fixed: "left",
},
{ {
field: "dcCh", field: "dcCh",
title: "船号", title: "船号",
slots: { default: "dcCh_default" }, align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "qdh", field: "qdh",
title: "订货清单号", title: "订货清单号",
minWidth: "80", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "qc", field: "qc",
title: "期次", title: "期次",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "wpxh", field: "wpxh",
title: " 材质", title: " 材质",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "thickness", field: "thickness",
title: "厚度mm", title: "厚度mm",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "width", field: "width",
title: "宽度mm", title: "宽度mm",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "length", field: "length",
title: "长度mm", title: "长度mm",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "weight", field: "weight",
title: "重量吨/张", title: "重量吨/张",
minWidth: "70", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sjsl", field: "sjsl",
title: "设计数量", title: "设计数量",
align: "center",
minWidth: "70", minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "yl", field: "yl",
title: "裕量", title: "裕量",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zsl", field: "zsl",
title: "总数量", title: "总数量",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zzl", field: "zzl",
title: "总重量", title: "总重量",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "lksl", field: "lksl",
title: "利库数量", title: "利库数量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "lkzl", field: "lkzl",
title: "利库重量", title: "利库重量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sdzs", field: "sdzs",
title: "实订数量", title: "实订数量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sdzl", field: "sdzl",
title: "实订重量", title: "实订重量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "Zt", field: "Zt",
title: "状态", title: "状态",
align: "center",
slots: { default: "Zt_default" }, slots: { default: "Zt_default" },
minWidth: "50", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
], ],
statusOptions: [ statusOptions: [
@ -186,41 +461,31 @@ export default {
label: "审核", label: "审核",
}, },
], ],
fileList: [], ShipNoList: [],
ShipNoList: []
}; };
}, },
created() { created() {
window.addEventListener("resize", this.getHeight); window.addEventListener("resize", this.getHeight);
this.getHeight(); this.getHeight();
this.getCzxx();
this.initList(); this.initList();
}, },
methods: { methods: {
// () //
initList() { getCzxx() {
let params = { getCzxx().then((res) => {
Zt: this.request.Zt, if (res.success) {
dcCh: "", this.ShipNoList = res.data;
};
if (this.ShipNoList.length > 0 && this.request.dcCh) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label;
} else {
params.dcCh = "";
} }
getList(params).then((res) => {
this.list = res.data;
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = []
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
}); });
},
//
initList() {
getList({
...this.request,
}).then((res) => {
if (res.success) {
this.list = res.data;
} }
}); });
}, },
@ -273,11 +538,7 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
.upload-demo { ::v-deep .el-form-item{
display: inline-flex; margin-bottom: 0px !important;
margin-right: 10px;
}
::v-deep .el-upload-list {
display: none !important;
} }
</style> </style>

@ -2,28 +2,29 @@
<!-- 订货清单审核 --> <!-- 订货清单审核 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="船号:">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option <el-option
v-for="item in ShipNoList" v-for="item in ShipNoList"
:key="item.value" :key="item.cbbm"
:label="item.label" :label="item.cbbm"
:value="item.value" :value="item.cbbm"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-select v-model="request.Zt" placeholder="状态" clearable> <el-form-item label="状态:">
<el-select
v-model="request.Zt"
placeholder="状态"
clearable
disabled
>
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
:key="item.value" :key="item.value"
@ -32,9 +33,14 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="16" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> </el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<el-button type="primary" @click="toolbarButtonClickEvent('back')" <el-button type="primary" @click="toolbarButtonClickEvent('back')"
>退回</el-button >退回</el-button
> >
@ -43,6 +49,7 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -59,13 +66,11 @@
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
@checkbox-all="selectAllEvent" @checkbox-all="selectAllEvent"
@checkbox-change="selectChangeEvent" @checkbox-change="selectChangeEvent"
highlight-hover-row highlight-hover-row
> >
<template #dcCh_default="{ row }">
{{ row.dcCh }}
</template>
<template #Zt_default="{ row }"> <template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index"> <div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div> <div v-if="row.zt === item.value">{{ item.label }}</div>
@ -81,6 +86,7 @@
<script> <script>
import { getList, tj, save, sh, upload } from "@/api/jhzx/dhqdSH"; import { getList, tj, save, sh, upload } from "@/api/jhzx/dhqdSH";
import { getCzxx } from "@/api/jhzx/qfxq";
export default { export default {
name: "dhqdSH", name: "dhqdSH",
data() { data() {
@ -92,96 +98,369 @@ export default {
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50, fixed: "left" }, { type: "checkbox", width: "50", align: "center", fixed: "left" },
{ type: "seq", width: 60, title: "序号", fixed: "left" }, {
type: "seq",
width: "50",
title: "序号",
fixed: "left",
align: "center",
},
{ {
field: "dcCh", field: "dcCh",
title: "船号", title: "船号",
slots: { default: "dcCh_default" }, align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "qdh", field: "qdh",
title: "订货清单号", title: "订货清单号",
minWidth: "80", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "qc", field: "qc",
title: "期次", title: "期次",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "wpxh", field: "wpxh",
title: " 材质", title: " 材质",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "thickness", field: "thickness",
title: "厚度mm", title: "厚度mm",
minWidth: "70", minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "width", field: "width",
title: "宽度mm", title: "宽度mm",
minWidth: "70", minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "length", field: "length",
title: "长度mm", title: "长度mm",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "weight", field: "weight",
title: "重量吨/张", title: "重量吨/张",
minWidth: "70", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sjsl", field: "sjsl",
title: "设计数量", title: "设计数量",
align: "center",
minWidth: "70", minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "yl", field: "yl",
title: "裕量", title: "裕量",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zsl", field: "zsl",
title: "总数量", title: "总数量",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zzl", field: "zzl",
title: "总重量", title: "总重量",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "lksl", field: "lksl",
title: "利库数量", title: "利库数量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "lkzl", field: "lkzl",
title: "利库重量", title: "利库重量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sdzs", field: "sdzs",
title: "实订数量", title: "实订数量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sdzl", field: "sdzl",
title: "实订重量", title: "实订重量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "Zt", field: "Zt",
title: "状态", title: "状态",
slots: { default: "Zt_default" }, slots: { default: "Zt_default" },
minWidth: "50", align: "center",
fixed: "right", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
], ],
statusOptions: [ statusOptions: [
@ -198,7 +477,6 @@ export default {
label: "审核", label: "审核",
}, },
], ],
fileList: [],
ShipNoList: [], ShipNoList: [],
checkedList: [], checkedList: [],
}; };
@ -206,45 +484,26 @@ export default {
created() { created() {
window.addEventListener("resize", this.getHeight); window.addEventListener("resize", this.getHeight);
this.getHeight(); this.getHeight();
this.getCzxx();
this.initList(); this.initList();
}, },
methods: { methods: {
// () //
initList() { getCzxx() {
let params = { getCzxx().then((res) => {
Zt: this.request.Zt, if (res.success) {
dcCh: "", this.ShipNoList = res.data;
};
if (this.ShipNoList.length > 0 && this.request.dcCh) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label;
} else {
params.dcCh = "";
}
getList(params).then((res) => {
this.list = res.data;
this.checkedList = [];
this.ShipNoList = [];
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = []
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
} }
}); });
}, },
// excel //
actionUpload(file) { initList() {
const formData = new FormData(); getList({
formData.append("file", file.file); ...this.request,
upload(formData).then((res) => { }).then((res) => {
if (res.success) { if (res.success) {
this.list = res.data;
this.checkedList = [];
} }
}); });
}, },
@ -367,11 +626,7 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
.upload-demo { ::v-deep .el-form-item {
display: inline-flex; margin-bottom: 0px !important;
margin-right: 10px;
}
::v-deep .el-upload-list {
display: none !important;
} }
</style> </style>

@ -2,32 +2,29 @@
<!-- 订货清单维护 --> <!-- 订货清单维护 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="船号:">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option <el-option
v-for="item in ShipNoList" v-for="item in ShipNoList"
:key="item.value" :key="item.cbbm"
:label="item.label" :label="item.cbbm"
:value="item.value" :value="item.cbbm"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('submit')"
>提交</el-button
>
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-select v-model="request.Zt" placeholder="状态" clearable> <el-form-item label="状态:">
<el-select
v-model="request.Zt"
placeholder="状态"
clearable
disabled
>
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
:key="item.value" :key="item.value"
@ -36,9 +33,18 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="16" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('submit')"
>提交</el-button
>
<el-button type="primary" @click="initList()"></el-button>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> </el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<div class="upload-demo"> <div class="upload-demo">
<el-upload <el-upload
action="#" action="#"
@ -55,6 +61,7 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -76,9 +83,6 @@
@checkbox-change="selectChangeEvent" @checkbox-change="selectChangeEvent"
highlight-hover-row highlight-hover-row
> >
<template #dcCh_default="{ row }">
{{ row.dcCh }}
</template>
<template #Zt_default="{ row }"> <template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index"> <div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div> <div v-if="row.zt === item.value">{{ item.label }}</div>
@ -94,6 +98,7 @@
<script> <script>
import { getList, tj, save, upload } from "@/api/jhzx/dhqdWH"; import { getList, tj, save, upload } from "@/api/jhzx/dhqdWH";
import { getCzxx } from "@/api/jhzx/qfxq";
export default { export default {
name: "dhqdWH", name: "dhqdWH",
data() { data() {
@ -105,96 +110,369 @@ export default {
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50, fixed: "left" }, { type: "checkbox", width: "50", align: "center", fixed: "left" },
{ type: "seq", width: 60, title: "序号", fixed: "left" }, {
type: "seq",
width: "50",
title: "序号",
fixed: "left",
align: "center",
},
{ {
field: "dcCh", field: "dcCh",
title: "船号", title: "船号",
slots: { default: "dcCh_default" },
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "qdh", field: "qdh",
title: "订货清单号", title: "订货清单号",
minWidth: "80", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "qc", field: "qc",
title: "期次", title: "期次",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "wpxh", field: "wpxh",
title: " 材质", title: " 材质",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "thickness", field: "thickness",
title: "厚度mm", title: "厚度mm",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "width", field: "width",
title: "宽度mm", title: "宽度mm",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "length", field: "length",
title: "长度mm", title: "长度mm",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "weight", field: "weight",
title: "重量吨/张", title: "重量吨/张",
minWidth: "70", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sjsl", field: "sjsl",
title: "设计数量", title: "设计数量",
align: "center",
minWidth: "70", minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "yl", field: "yl",
title: "裕量", title: "裕量",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zsl", field: "zsl",
title: "总数量", title: "总数量",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zzl", field: "zzl",
title: "总重量", title: "总重量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "lksl", field: "lksl",
title: "利库数量", title: "利库数量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "lkzl", field: "lkzl",
title: "利库重量", title: "利库重量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sdzs", field: "sdzs",
title: "实订数量", title: "实订数量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sdzl", field: "sdzl",
title: "实订重量", title: "实订重量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "Zt", field: "Zt",
title: "状态", title: "状态",
slots: { default: "Zt_default" }, slots: { default: "Zt_default" },
minWidth: "50", minWidth: "70",
fixed: "right", filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
], ],
statusOptions: [ statusOptions: [
@ -219,36 +497,26 @@ export default {
created() { created() {
window.addEventListener("resize", this.getHeight); window.addEventListener("resize", this.getHeight);
this.getHeight(); this.getHeight();
this.getCzxx();
this.initList(); this.initList();
}, },
methods: { methods: {
// () //
initList() { getCzxx() {
let params = { getCzxx().then((res) => {
Zt: this.request.Zt, if (res.success) {
dcCh: "", this.ShipNoList = res.data;
};
if (this.ShipNoList.length > 0 && this.request.dcCh) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label;
} else {
params.dcCh = "";
} }
getList(params).then((res) => { });
},
//
initList() {
getList({
...this.request,
}).then((res) => {
if (res.success) {
this.list = res.data; this.list = res.data;
this.checkedList = []; this.checkedList = [];
this.ShipNoList = [];
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
} }
}); });
}, },
@ -259,22 +527,8 @@ export default {
upload(formData).then((res) => { upload(formData).then((res) => {
if (res.success) { if (res.success) {
this.list = res.data; this.list = res.data;
this.$message.success("导入成功!");
this.checkedList = []; this.checkedList = [];
this.ShipNoList = []; this.$message.success("导入成功!");
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
}
} }
}); });
}, },
@ -391,4 +645,7 @@ export default {
::v-deep .el-upload-list { ::v-deep .el-upload-list {
display: none !important; display: none !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
</style> </style>

@ -0,0 +1,354 @@
<template>
<!-- 集团三月滚动计划查询 -->
<el-container>
<el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="60px">
<el-row>
<el-col :span="4">
<el-form-item label="计划期:">
<el-date-picker
v-model="request.date"
type="daterange"
format="yyyy/MM/dd"
:unlink-panels="true"
range-separator="~"
start-placeholder=""
end-placeholder=""
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态:">
<el-select v-model="request.Zt" placeholder="状态" clearable>
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
</el-form>
</el-header>
<el-container style="padding-top: 10px">
<el-container>
<el-main>
<div class="mytable">
<vxe-grid
id="id"
ref="tableRef"
border
resizable
keep-source
:height="height"
:auto-resize="true"
:columns="tableColumn"
:data="list"
:custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
highlight-hover-row
>
<template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div>
</div>
</template>
</vxe-grid>
</div>
</el-main>
</el-container>
</el-container>
</el-container>
</template>
<script>
import { getList } from "@/api/jhzx/jtsyWH";
export default {
name: "jtsyCX",
data() {
return {
request: {
date: "",
Zt: "",
},
list: [],
height: "500px",
tableColumn: [
{
type: "seq",
width: "50",
title: "序号",
align: "center",
fixed: "left",
},
{
field: "dcCh",
title: "船号",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dcPl",
title: "批量",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dcFd",
title: "分段",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jhrq",
title: "计划期",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "bz",
title: "备注",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "bzy",
title: "编制人",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "bzrq",
title: "编制日期",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "zt",
title: "状态",
align: "center",
slots: { default: "Zt_default" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
],
statusOptions: [
{
value: "0",
label: "未审核",
},
{
value: "1",
label: "已审核",
},
],
};
},
created() {
window.addEventListener("resize", this.getHeight);
this.getHeight();
this.initList();
},
methods: {
//
initList() {
let params = {
Zt: this.request.Zt,
jhrq: "",
};
if (this.request.date && this.request.date.length > 0) {
params.jhrq =
this.request.date[0].toLocaleDateString() +
"~" +
this.request.date[1].toLocaleDateString();
} else {
params.jhrq = "";
}
getList(params).then((res) => {
if (res.success) {
this.list = res.data;
this.checkedList = [];
}
});
},
getHeight() {
this.height = window.innerHeight - 160;
},
},
};
</script>
<style lang="scss" scoped>
.el-header {
margin: 0;
padding: 5px 0;
height: auto;
}
.el-container {
padding: 0;
margin: 0;
}
.el-main {
padding: 0;
}
.el-col {
padding: 0;
}
.el-aside {
background: #fff;
padding: 0;
}
.el-container {
padding: 0;
}
.el-row {
margin-bottom: 5px;
}
.el-row:last-child {
margin-bottom: 0;
}
.tableStyles {
background: #0a76a4;
}
.my-dropdown {
width: 450px;
height: 250px;
background-color: #fff;
border: 1px solid #dcdfe6;
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
font-size: 12px;
}
::v-deep .mytable .vxe-input {
display: flex !important;
}
.upload-demo {
display: inline-flex;
margin-right: 10px;
}
::v-deep .el-upload-list {
display: none !important;
}
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-date-editor.el-input__inner {
width: auto !important;
}
</style>

@ -2,42 +2,44 @@
<!-- 集团三月滚动计划维护 --> <!-- 集团三月滚动计划维护 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="60px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-form-item label="计划期:">
<el-date-picker
v-model="request.date"
type="daterange"
format="yyyy/MM/dd"
:unlink-panels="true"
range-separator="~"
start-placeholder=""
end-placeholder=""
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态:">
<el-select v-model="request.Zt" placeholder="状态" clearable>
<el-option <el-option
v-for="item in ShipNoList" v-for="item in statusOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
</el-col> <el-col :span="16" style="text-align: right">
<el-col :span="6" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('submit')" <el-button type="success" @click="toolbarButtonClickEvent('submit')"
>提交</el-button >审核</el-button
> >
<el-button type="primary" @click="initList()"></el-button> <el-button type="primary" @click="initList()"></el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="18"> <el-col :span="24" style="text-align: right">
<el-col :span="4">
<el-select v-model="request.zt" placeholder="状态" clearable>
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-col>
</el-col>
<el-col :span="6" style="text-align: right">
<div class="upload-demo"> <div class="upload-demo">
<el-upload <el-upload
action="#" action="#"
@ -54,6 +56,7 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -75,6 +78,11 @@
@checkbox-all="selectAllEvent" @checkbox-all="selectAllEvent"
@checkbox-change="selectChangeEvent" @checkbox-change="selectChangeEvent"
> >
<template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div>
</div>
</template>
</vxe-grid> </vxe-grid>
</div> </div>
</el-main> </el-main>
@ -90,46 +98,192 @@ export default {
data() { data() {
return { return {
request: { request: {
dcCh: "", date: "",
zt: "", Zt: "",
}, },
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50 }, { type: "checkbox", width: "50", align: "center", fixed: "left" },
{ type: "seq", width: 60, title: "序号" }, {
type: "seq",
width: "50",
title: "序号",
align: "center",
fixed: "left",
},
{ {
field: "dcCh", field: "dcCh",
title: "船号", title: "船号",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dcPl",
title: "批量",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dcFd",
title: "分段",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jhrq",
title: "计划期",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "bz",
title: "备注",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ field: "dcPl", title: "批量" },
{ field: "dcFd", title: "分段" },
{ field: "jhrq", title: "计划期" },
{ field: "bz", title: "备注" },
{ {
field: "bzy", field: "bzy",
title: "编制人", title: "编制人",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "bzrq", field: "bzrq",
title: "编制日期", title: "编制日期",
align: "center",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zt", field: "zt",
title: "状态", title: "状态",
align: "center",
slots: { default: "Zt_default" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
], ],
statusOptions: [ statusOptions: [
{ {
value: "0", value: "0",
label: "未提交", label: "未审核",
}, },
{ {
value: "1", value: "1",
label: "已提交", label: "已审核",
}, },
], ],
ShipNoList: [], //
fileList: [], // fileList: [], //
checkedList: [], checkedList: [],
}; };
@ -140,33 +294,24 @@ export default {
this.initList(); this.initList();
}, },
methods: { methods: {
// () //
initList() { initList() {
let params = { let params = {
zt: this.request.zt, Zt: this.request.Zt,
dcCh: "", jhrq: "",
}; };
if (this.ShipNoList.length > 0 && this.request.dcCh) { if (this.request.date && this.request.date.length > 0) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label; params.jhrq =
this.request.date[0].toLocaleDateString() +
"~" +
this.request.date[1].toLocaleDateString();
} else { } else {
params.dcCh = ""; params.jhrq = "";
} }
getList(params).then((res) => { getList(params).then((res) => {
if (res.success) {
this.list = res.data; this.list = res.data;
this.checkedList = []; this.checkedList = [];
this.ShipNoList = [];
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
} }
}); });
}, },
@ -178,20 +323,7 @@ export default {
if (res.success) { if (res.success) {
this.$message.success("上传成功!"); this.$message.success("上传成功!");
this.list = res.data; this.list = res.data;
this.ShipNoList = []; this.checkedList = [];
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
}
} }
}); });
}, },
@ -310,4 +442,10 @@ export default {
::v-deep .el-upload-list { ::v-deep .el-upload-list {
display: none !important; display: none !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-date-editor.el-input__inner {
width: auto !important;
}
</style> </style>

@ -0,0 +1,539 @@
<template>
<!-- 线表计划查询 -->
<div class="container-chart">
<el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row>
<el-col :span="4">
<el-form-item label="船号:">
<el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option
v-for="item in ShipNoList"
:key="item.cbbm"
:label="item.cbbm"
:value="item.cbbm"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态:">
<el-select v-model="request.Zt" placeholder="状态" clearable>
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="年份:">
<div style="display: flex">
<el-date-picker
v-model="nrStart"
type="year"
value-format="yyyy"
placeholder=""
>
</el-date-picker>
<div class="distance">~</div>
<el-date-picker
v-model="nrEnd"
type="year"
value-format="yyyy"
placeholder=""
>
</el-date-picker>
</div>
</el-form-item>
</el-col>
<el-col :span="12" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
</el-form>
</el-header>
<el-container>
<el-main>
<vxe-table
class="mytable-style"
border
resizable
show-footer
ref="tableRef"
:max-height="height"
:header-cell-class-name="headerCellClassName"
:cell-class-name="cellClassName"
:footer-method="footerMethod"
:footer-cell-class-name="footerCellClassName"
:data="arrList"
@checkbox-all="selectAllEvent"
@checkbox-change="selectChangeEvent"
>
<vxe-column type="seq" width="80" :resizable="false" show-overflow>
<template #header>
<div class="first-col">
<div class="first-col-top">年份</div>
<div class="first-col-bottom">产品</div>
</div>
</template>
<template #default="{ row, rowIndex }">
{{ leftColumn[rowIndex].column }}
</template>
</vxe-column>
<vxe-colgroup
v-for="(item, index) in topColumn"
:key="index"
:title="item.year"
>
<vxe-column
v-for="(em, eindex) in item.months"
:key="eindex"
:field="em.field"
:title="em.title !== '合计' ? em.title + '月' : em.title"
:width="70"
>
</vxe-column>
</vxe-colgroup>
</vxe-table>
</el-main>
</el-container>
</div>
</template>
<script>
import { getList, tj, save, upload } from "@/api/jhzx/xbjhWH";
import { getCzxx } from "@/api/jhzx/qfxq";
export default {
name: "xbjhWH",
data() {
return {
request: {
dcCh: "",
Zt: "",
nf: "",
},
nrStart: "",
nrEnd: "",
height: "500px",
tableData: [],
fileList: [],
checkedList: {},
statusOptions: [
{
value: "0",
label: "编辑",
},
{
value: "1",
label: "提交",
},
{
value: "2",
label: "审核",
},
],
ShipNoList: [], //
leftColumn: [], //
topColumn: [], //
arrList: [], //data
indexes: [],
};
},
created() {
window.addEventListener("resize", this.getHeight);
this.initList(); //
this.getCzxx();
this.getHeight();
},
methods: {
//
getTableList(data) {
this.tableData = data;
this.leftColumn = []; //
this.topColumn = []; //
this.arrList = []; //data
var objeckList = {};
var sumArr = [];
var yearArr = [];
Object.keys(this.tableData).forEach((item, index) => {
objeckList[item] = {};
sumArr[item] = [];
this.indexes[index] = item;
//
this.leftColumn.push({
column: item,
});
this.tableData[item].forEach((em, eindex) => {
//
let yearIndex = yearArr.findIndex((yearEm) => {
if (yearEm instanceof Object) {
return yearEm.year == em.nf;
}
});
if (yearIndex == -1) {
yearArr.push({
year: em.nf,
months: [
{
title: em.yf,
field: "cl" + em.nf + em.yf,
zl: em.zl,
},
],
});
} else {
let monthIndex = yearArr[yearIndex].months.findIndex((monthEm) => {
if (monthEm instanceof Object) {
return monthEm.title == em.yf;
}
});
if (monthIndex == -1) {
yearArr[yearIndex].months.push({
title: em.yf,
field: "cl" + em.nf + em.yf,
zl: em.zl,
});
}
}
});
});
yearArr.forEach((item, index) => {
item.months.push({
title: "合计",
field: "cltotal" + item.year,
});
});
this.topColumn = yearArr; //
//
for (let i in this.tableData) {
for (let v in this.tableData[i]) {
if (sumArr[i][this.tableData[i][v].nf] >= 0) {
sumArr[i][this.tableData[i][v].nf] += this.tableData[i][v].zl;
} else {
sumArr[i][this.tableData[i][v].nf] = this.tableData[i][v].zl;
}
}
}
// data
for (let i in this.tableData) {
for (let v in this.tableData[i]) {
objeckList[i][
"cl" + this.tableData[i][v].nf + this.tableData[i][v].yf
] = this.tableData[i][v].zl;
objeckList[i]["cltotal" + this.tableData[i][v].nf] =
sumArr[i][this.tableData[i][v].nf];
}
}
this.arrList = Object.values(objeckList); //data
},
// excel
actionUpload(file) {
const formData = new FormData();
formData.append("file", file.file);
upload(formData).then((res) => {
if (res.success) {
this.checkedList = {};
this.getTableList(res.data);
this.$message.success("导入成功!");
}
});
},
//
selectAllEvent({ checked }) {
// const records = this.$refs.tableRef.getCheckboxRecords();
// this.checkedList = records;
if (checked) {
this.checkedList = JSON.parse(JSON.stringify(this.tableData));
} else {
this.checkedList = {};
}
},
//
selectChangeEvent({ checked, row, rowIndex }) {
// const records = this.$refs.tableRef.getCheckboxRecords();
// this.checkedList = records;
if (checked) {
this.checkedList[this.indexes[rowIndex]] =
this.tableData[this.indexes[rowIndex]];
} else {
delete this.checkedList[this.indexes[rowIndex]];
}
},
//
getCzxx() {
getCzxx().then((res) => {
if (res.success) {
this.ShipNoList = res.data;
}
});
},
//
initList() {
let params = {
dcCh: this.request.dcCh,
Zt: this.request.Zt,
nf: "",
};
if (this.nrStart && this.nrEnd) {
params.nf = this.nrStart + "~" + this.nrEnd;
} else if (
(this.nrStart && !this.nrEnd) ||
(!this.nrStart && this.nrEnd)
) {
this.$message.warning("请选择年份范围");
return;
} else {
this.request.nf = "";
}
// if()
getList(params).then((res) => {
if (res.success) {
this.checkedList = {};
this.getTableList(res.data);
}
});
},
//
total(list, field) {
let count = 0;
list.forEach((item) => {
if (item !== "dcCh" && item !== "zt") {
count += Number(item[field]);
}
});
return count;
},
footerMethod({ columns, data }) {
const totalList = []; //
columns.forEach((column) => {
if (["checkbox"].includes(column.property)) {
return "合并了";
}
var totalData = null;
totalData = this.total(data, column.property);
totalList.push(totalData);
});
totalList[0] = "合计";
return [totalList];
},
// header css
headerCellClassName({ column, $rowIndex }) {
if ($rowIndex == 0) {
return "row-gre-header";
} else {
if (column.field === "total1" || column.field === "total2") {
return "row-gre-total-header";
} else {
return "row-gre-header";
}
}
},
// css
cellClassName({ column }) {
if (column.field === "total1" || column.field === "total2") {
return "col-gre-total-col";
} else {
return "col-gre-col";
}
},
// css
footerCellClassName({ $rowIndex }) {
if ($rowIndex === 0) {
return "row-end-gre";
}
},
//
async toolbarButtonClickEvent(code) {
switch (code) {
case "submit":
if (!JSON.stringify(this.checkedList) =="{}") {
this.$confirm("是否确认提交选择的数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
tj(this.checkedList).then((res) => {
if (res.success) {
const xTable = this.$refs.tableRef;
xTable.loadData(this.initList());
this.$message.success("提交成功!");
}
});
})
.catch(() => {});
} else {
this.$message.warning("请选择数据!");
}
break;
case "save":
if (JSON.stringify(this.checkedList) =="{}") {
this.$confirm("是否确认保存选择的数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
save(this.checkedList).then((res) => {
if (res.success) {
const xTable = this.$refs.tableRef;
xTable.loadData(this.initList());
this.$message.success("保存成功!");
}
});
})
.catch(() => {});
} else {
this.$message.warning("请选择数据!");
}
break;
default:
break;
}
},
getHeight() {
this.height = window.innerHeight - 160;
},
},
};
</script>
<style scoped>
.first-col {
position: relative;
height: 20px;
}
.first-col:before {
content: "";
position: absolute;
left: -18px !important;
top: 9px !important;
width: 95px;
height: 1px;
-webkit-transform: rotate(37deg);
transform: rotate(34deg);
background-color: #000;
}
.first-col .first-col-top {
position: absolute;
right: 4px;
top: -10px;
}
.first-col .first-col-bottom {
position: absolute;
left: 4px;
bottom: -10px;
}
.my-filter {
margin: 10px;
}
.page-left {
position: absolute;
left: 10px;
top: 50%;
transform: translateY(-50%);
z-index: 10;
}
::v-deep .vxe-table--render-default .vxe-cell {
text-align: center !important;
}
/* 尾部 */
::v-deep.mytable-style .row-end-gre {
background-color: #9ed3a4;
color: #000;
font-weight: bold;
}
/* 列 */
::v-deep.mytable-style.vxe-table .vxe-body--column.col-gre-total-col {
background-color: #9ed3a4;
color: #000;
}
::v-deep.mytable-style.vxe-table .vxe-body--column.col-gre-col {
background-color: #cce8cf;
color: #000;
}
/* header */
::v-deep.mytable-style.vxe-table .vxe-header--column.row-gre-header {
background-color: #cce8cf;
color: #000;
font-weight: bold;
}
::v-deep.mytable-style.vxe-table .vxe-header--column.row-gre-total-header {
background-color: #9ed3a4;
color: #000;
font-weight: bold;
}
/* header下边框 */
::v-deep.mytable-style.vxe-table
.vxe-table--header-wrapper
.vxe-table--header-border-line {
border-bottom: 2px solid #000 !important;
}
/* border 颜色 */
::v-deep .vxe-table--render-default.border--full .vxe-body--column,
.vxe-table--render-default.border--full .vxe-footer--column,
.vxe-table--render-default.border--full .vxe-header--column {
background-image: linear-gradient(#000, #000) !important;
}
::v-deep.vxe-table--render-default.border--full .vxe-body--column,
.vxe-table--render-default.border--full .vxe-footer--column,
.vxe-table--render-default.border--full .vxe-header--column {
background-image: linear-gradient(#000, #000), linear-gradient(#000, #000) !important;
}
:v-deep.vxe-table--render-default.border--full .vxe-body--column,
.vxe-table--render-default.border--full .vxe-footer--column,
.vxe-table--render-default.border--full .vxe-header--column {
background-image: linear-gradient(#000, #000), linear-gradient(#000, #000) !important;
}
::v-deep.vxe-table--render-default.border--full .vxe-body--column,
::v-deep.vxe-table--render-default.border--full .vxe-footer--column,
::v-deep.vxe-table--render-default.border--full .vxe-header--column {
background-image: linear-gradient(#000, #000), linear-gradient(#000, #000) !important;
}
/* 尾部上边框 */
::v-deep.vxe-table--render-default .vxe-table--footer-wrapper {
border-top: 2px solid #000 !important;
}
::v-deep.vxe-table--render-default .vxe-cell--checkbox .vxe-checkbox--icon {
color: #000;
font-weight: 400 !important;
}
.upload-demo {
display: inline-flex;
margin-right: 10px;
}
::v-deep .el-upload-list {
display: none !important;
}
.el-main {
padding: 0;
}
.el-container {
padding-top: 5px;
width: 100%;
margin: 0;
}
.el-header {
margin: 0;
padding: 5px 0;
height: auto;
}
.el-row {
margin-bottom: 5px;
}
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
.distance {
margin-left: 5px;
margin-right: 5px;
}
</style>

@ -1,30 +1,24 @@
<template> <template>
<!-- 线表计划维护 -->
<div class="container-chart"> <div class="container-chart">
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="船号:">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option <el-option
v-for="item in ShipNoList" v-for="item in ShipNoList"
:key="item.value" :key="item.cbbm"
:label="item.label" :label="item.cbbm"
:value="item.value" :value="item.cbbm"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('submit')"
>提交</el-button
>
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="状态:">
<el-select v-model="request.Zt" placeholder="状态" clearable> <el-select v-model="request.Zt" placeholder="状态" clearable>
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
@ -34,9 +28,38 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-form-item label="年份:">
<div style="display: flex">
<el-date-picker
v-model="nrStart"
type="year"
value-format="yyyy"
placeholder=""
>
</el-date-picker>
<div class="distance">~</div>
<el-date-picker
v-model="nrEnd"
type="year"
value-format="yyyy"
placeholder=""
>
</el-date-picker>
</div>
</el-form-item>
</el-col>
<el-col :span="12" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('submit')"
>审核</el-button
>
<el-button type="primary" @click="initList()"></el-button>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> </el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<div class="upload-demo"> <div class="upload-demo">
<el-upload <el-upload
action="#" action="#"
@ -53,6 +76,7 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container> <el-container>
<el-main> <el-main>
@ -67,81 +91,35 @@
:cell-class-name="cellClassName" :cell-class-name="cellClassName"
:footer-method="footerMethod" :footer-method="footerMethod"
:footer-cell-class-name="footerCellClassName" :footer-cell-class-name="footerCellClassName"
:data="tableData" :data="arrList"
@checkbox-all="selectAllEvent" @checkbox-all="selectAllEvent"
@checkbox-change="selectChangeEvent" @checkbox-change="selectChangeEvent"
> >
<vxe-column type="checkbox" width="50"></vxe-column> <vxe-column type="checkbox" width="50"></vxe-column>
<vxe-column type="seq" width="70" :resizable="false" show-overflow> <vxe-column type="seq" width="80" :resizable="false" show-overflow>
<template #header> <template #header>
<div class="first-col"> <div class="first-col">
<div class="first-col-top">年份</div> <div class="first-col-top">年份</div>
<div class="first-col-bottom">产品</div> <div class="first-col-bottom">产品</div>
</div> </div>
</template> </template>
<template #default="{ row }"> <template #default="{ row, rowIndex }">
{{ row.dcCh }} {{ leftColumn[rowIndex].column }}
</template> </template>
</vxe-column> </vxe-column>
<vxe-colgroup field="2013" title="2023年"> <vxe-colgroup
<vxe-column field="cl202301" title="1月" width="60"></vxe-column> v-for="(item, index) in topColumn"
<vxe-column field="cl202302" title="2月" width="60"></vxe-column>
<vxe-column field="cl202303" title="3月" width="60"></vxe-column>
<vxe-column field="cl202304" title="4月" width="60"></vxe-column>
<vxe-column field="cl202305" title="5月" width="60"></vxe-column>
<vxe-column field="cl202306" title="6月" width="60"></vxe-column>
<vxe-column field="cl202307" title="7月" width="60"></vxe-column>
<vxe-column field="cl202308" title="8月" width="60"></vxe-column>
<vxe-column field="cl202309" title="9月" width="60"></vxe-column>
<vxe-column field="cl202310" title="10月" width="60"></vxe-column>
<vxe-column field="cl202311" title="11月" width="60"></vxe-column>
<vxe-column field="cl202312" title="12月" width="60"></vxe-column>
<vxe-column field="total1" title="合计" width="60"></vxe-column>
<!-- 动态获取列 -->
<!-- <vxe-column
v-for="(item, index) in arrList.slice(0, 13)"
:key="index" :key="index"
:field="item" :title="item.year"
:title="index < 12 ? index + 1 + '月' : '合计'"
:width="70"
> >
<template #default="{ row, rowIndex }"> <vxe-column
<div v-if="item == 'total1'"> v-for="(em, eindex) in item.months"
{{ tableData[rowIndex].total1 }} :key="eindex"
</div> :field="em.field"
<div v-else>{{ row[item] }}</div> :title="em.title !== '合计' ? em.title + '月' : em.title"
</template>
</vxe-column> -->
</vxe-colgroup>
<vxe-colgroup field="2014" title="2024年">
<vxe-column field="cl202401" title="1月" width="60"></vxe-column>
<vxe-column field="cl202402" title="2月" width="60"></vxe-column>
<vxe-column field="cl202403" title="3月" width="60"></vxe-column>
<vxe-column field="cl202404" title="4月" width="60"></vxe-column>
<vxe-column field="cl202405" title="5月" width="60"></vxe-column>
<vxe-column field="cl202406" title="6月" width="60"></vxe-column>
<vxe-column field="cl202407" title="7月" width="60"></vxe-column>
<vxe-column field="cl202408" title="8月" width="60"></vxe-column>
<vxe-column field="cl202409" title="9月" width="60"></vxe-column>
<vxe-column field="cl202410" title="10月" width="60"></vxe-column>
<vxe-column field="cl202411" title="11月" width="60"></vxe-column>
<vxe-column field="cl202412" title="12月" width="60"></vxe-column>
<vxe-column field="total2" title="合计" width="60"></vxe-column>
<!-- 动态获取列 -->
<!-- <vxe-column
v-for="(item, index) in arrList.slice(13, 26)"
:key="index"
:field="item"
:title="index < 12 ? index + 1 + '月' : '合计'"
:width="70" :width="70"
> >
<template #default="{ row, rowIndex }"> </vxe-column>
<div v-if="item == 'total2'">
{{ tableData[rowIndex].total2 }}
</div>
<div v-else>{{ row[item] }}</div>
</template>
</vxe-column> -->
</vxe-colgroup> </vxe-colgroup>
</vxe-table> </vxe-table>
</el-main> </el-main>
@ -151,6 +129,7 @@
<script> <script>
import { getList, tj, save, upload } from "@/api/jhzx/xbjhWH"; import { getList, tj, save, upload } from "@/api/jhzx/xbjhWH";
import { getCzxx } from "@/api/jhzx/qfxq";
export default { export default {
name: "xbjhWH", name: "xbjhWH",
data() { data() {
@ -158,11 +137,14 @@ export default {
request: { request: {
dcCh: "", dcCh: "",
Zt: "", Zt: "",
nf: "",
}, },
nrStart: "",
nrEnd: "",
height: "500px", height: "500px",
tableData: [], tableData: [],
fileList: [], fileList: [],
checkedList: [], checkedList: {},
statusOptions: [ statusOptions: [
{ {
value: "0", value: "0",
@ -177,168 +159,170 @@ export default {
label: "审核", label: "审核",
}, },
], ],
ShipNoList: [], ShipNoList: [], //
arrList: [], //key-- leftColumn: [], //
copyList: [], topColumn: [], //
arrList: [], //data
indexes: [],
}; };
}, },
created() { created() {
window.addEventListener("resize", this.getHeight); window.addEventListener("resize", this.getHeight);
this.initList(); // this.initList(); //
this.getCzxx();
this.getHeight(); this.getHeight();
}, },
methods: { methods: {
//
getTableList(data) {
this.tableData = data;
this.leftColumn = []; //
this.topColumn = []; //
this.arrList = []; //data
var objeckList = {};
var sumArr = [];
var yearArr = [];
Object.keys(this.tableData).forEach((item, index) => {
objeckList[item] = {};
sumArr[item] = [];
this.indexes[index] = item;
//
this.leftColumn.push({
column: item,
});
this.tableData[item].forEach((em, eindex) => {
//
let yearIndex = yearArr.findIndex((yearEm) => {
if (yearEm instanceof Object) {
return yearEm.year == em.nf;
}
});
if (yearIndex == -1) {
yearArr.push({
year: em.nf,
months: [
{
title: em.yf,
field: "cl" + em.nf + em.yf,
zl: em.zl,
},
],
});
} else {
let monthIndex = yearArr[yearIndex].months.findIndex((monthEm) => {
if (monthEm instanceof Object) {
return monthEm.title == em.yf;
}
});
if (monthIndex == -1) {
yearArr[yearIndex].months.push({
title: em.yf,
field: "cl" + em.nf + em.yf,
zl: em.zl,
});
}
}
});
});
yearArr.forEach((item, index) => {
item.months.push({
title: "合计",
field: "cltotal" + item.year,
});
});
this.topColumn = yearArr; //
//
for (let i in this.tableData) {
for (let v in this.tableData[i]) {
if (sumArr[i][this.tableData[i][v].nf] >= 0) {
sumArr[i][this.tableData[i][v].nf] += this.tableData[i][v].zl;
} else {
sumArr[i][this.tableData[i][v].nf] = this.tableData[i][v].zl;
}
}
}
// data
for (let i in this.tableData) {
for (let v in this.tableData[i]) {
objeckList[i][
"cl" + this.tableData[i][v].nf + this.tableData[i][v].yf
] = this.tableData[i][v].zl;
objeckList[i]["cltotal" + this.tableData[i][v].nf] =
sumArr[i][this.tableData[i][v].nf];
}
}
this.arrList = Object.values(objeckList); //data
},
// excel // excel
actionUpload(file) { actionUpload(file) {
const formData = new FormData(); const formData = new FormData();
formData.append("file", file.file); formData.append("file", file.file);
upload(formData).then((res) => { upload(formData).then((res) => {
if (res.success) { if (res.success) {
this.tableData = res.data; this.checkedList = {};
this.getTableList(res.data);
this.$message.success("导入成功!"); this.$message.success("导入成功!");
if (this.tableData.length > 0) {
var dcChList = [];
this.tableData.forEach((item) => {
dcChList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(dcChList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
}
//
// this.checkedList = [];
// if (this.tableData.length > 0) {
// var list = [];
// this.arrList = [];
// var dcChList = [];
// this.tableData.forEach((item) => {
// list = Object.keys(item);
// dcChList.push(item.dcCh);
// this.ShipNoList = [];
// Array.from(new Set(dcChList)).forEach((em, eindex) => {
// this.ShipNoList.push({
// label: em,
// value: eindex + 1,
// });
// });
// });
// list.forEach((item) => {
// if (item !== "dcCh" && item !== "zt") {
// this.arrList.push(item);
// this.arrList.sort();
// }
// });
// this.arrList.splice(12, 0, "total1");
// this.arrList.splice(25, 0, "total2");
// this.totalPush();
// }
} }
}); });
}, },
// //
selectAllEvent() { selectAllEvent({ checked }) {
const records = this.$refs.tableRef.getCheckboxRecords(); // const records = this.$refs.tableRef.getCheckboxRecords();
this.checkedList = records; // this.checkedList = records;
if (checked) {
this.checkedList = JSON.parse(JSON.stringify(this.tableData));
} else {
this.checkedList = {};
}
}, },
// //
selectChangeEvent() { selectChangeEvent({ checked, row, rowIndex }) {
const records = this.$refs.tableRef.getCheckboxRecords(); // const records = this.$refs.tableRef.getCheckboxRecords();
this.checkedList = records; // this.checkedList = records;
if (checked) {
this.checkedList[this.indexes[rowIndex]] =
this.tableData[this.indexes[rowIndex]];
} else {
delete this.checkedList[this.indexes[rowIndex]];
}
}, },
//
getCzxx() {
getCzxx().then((res) => {
if (res.success) {
this.ShipNoList = res.data;
}
});
},
//
initList() { initList() {
let params = { let params = {
dcCh: this.request.dcCh,
Zt: this.request.Zt, Zt: this.request.Zt,
dcCh: "", nf: "",
}; };
if (this.ShipNoList.length > 0 && this.request.dcCh) { if (this.nrStart && this.nrEnd) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label; params.nf = this.nrStart + "~" + this.nrEnd;
} else if (
(this.nrStart && !this.nrEnd) ||
(!this.nrStart && this.nrEnd)
) {
this.$message.warning("请选择年份范围");
return;
} else { } else {
params.dcCh = ""; this.request.nf = "";
} }
// if()
getList(params).then((res) => { getList(params).then((res) => {
if (res.success) { if (res.success) {
this.tableData = res.data; this.checkedList = {};
this.checkedList = []; this.getTableList(res.data);
if (this.tableData.length > 0) {
var dcChList = [];
this.tableData.forEach((item) => {
dcChList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(dcChList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
}
//
// if (this.tableData.length > 0) {
// var list = [];
// this.arrList = [];
// var dcChList = [];
// this.tableData.forEach((item) => {
// list = Object.keys(item);
// dcChList.push(item.dcCh);
// this.ShipNoList = [];
// Array.from(new Set(dcChList)).forEach((em, eindex) => {
// this.ShipNoList.push({
// label: em,
// value: eindex + 1,
// });
// });
// });
// list.forEach((item) => {
// if (item !== "dcCh" && item !== "zt") {
// this.arrList.push(item);
// this.arrList.sort();
// }
// });
// this.arrList.splice(12, 0, "total1");
// this.arrList.splice(25, 0, "total2");
// this.totalPush();
// }
} }
}); });
}, },
totalPush() {
if (this.tableData.length > 0) {
this.tableData.forEach((item, index) => {
item.total1 =
Number(item.cl202301) +
Number(item.cl202302) +
Number(item.cl202303) +
Number(item.cl202304) +
Number(item.cl202305) +
Number(item.cl202306) +
Number(item.cl202307) +
Number(item.cl202308) +
Number(item.cl202309) +
Number(item.cl202310) +
Number(item.cl202311) +
Number(item.cl202312);
item.total2 =
Number(item.cl202401) +
Number(item.cl202402) +
Number(item.cl202403) +
Number(item.cl202404) +
Number(item.cl202405) +
Number(item.cl202406) +
Number(item.cl202407) +
Number(item.cl202408) +
Number(item.cl202409) +
Number(item.cl202410) +
Number(item.cl202411) +
Number(item.cl202412);
});
return this.tableData;
}
},
// //
total(list, field) { total(list, field) {
let count = 0; let count = 0;
@ -392,7 +376,9 @@ export default {
async toolbarButtonClickEvent(code) { async toolbarButtonClickEvent(code) {
switch (code) { switch (code) {
case "submit": case "submit":
if (this.checkedList.length > 0) { if (JSON.stringify(this.checkedList) == "{}") {
this.$message.warning("请选择数据!");
} else {
this.$confirm("是否确认提交选择的数据?", "提示", { this.$confirm("是否确认提交选择的数据?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
@ -408,12 +394,12 @@ export default {
}); });
}) })
.catch(() => {}); .catch(() => {});
} else {
this.$message.warning("请选择数据!");
} }
break; break;
case "save": case "save":
if (this.checkedList.length > 0) { if (JSON.stringify(this.checkedList) == "{}") {
this.$message.warning("请选择数据!");
} else {
this.$confirm("是否确认保存选择的数据?", "提示", { this.$confirm("是否确认保存选择的数据?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
@ -429,8 +415,6 @@ export default {
}); });
}) })
.catch(() => {}); .catch(() => {});
} else {
this.$message.warning("请选择数据!");
} }
break; break;
default: default:
@ -452,11 +436,12 @@ export default {
.first-col:before { .first-col:before {
content: ""; content: "";
position: absolute; position: absolute;
left: -21px !important; left: -18px !important;
top: 16px !important; top: 9px !important;
width: 106px; width: 95px;
height: 1px; height: 1px;
transform: rotate(37deg); -webkit-transform: rotate(37deg);
transform: rotate(34deg);
background-color: #000; background-color: #000;
} }
.first-col .first-col-top { .first-col .first-col-top {
@ -566,4 +551,11 @@ export default {
.el-row { .el-row {
margin-bottom: 5px; margin-bottom: 5px;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
.distance {
margin-left: 5px;
margin-right: 5px;
}
</style> </style>

@ -2,27 +2,24 @@
<!-- 中日程计划查询 --> <!-- 中日程计划查询 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="75px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-form-item label="钢加开始:">
<el-option <el-date-picker
v-for="item in ShipNoList" v-model="request.date"
:key="item.value" type="daterange"
:label="item.label" format="yyyy/MM/dd"
:value="item.value" :unlink-panels="true"
range-separator="~"
start-placeholder=""
end-placeholder=""
> >
</el-option> </el-date-picker>
</el-select> </el-form-item>
</el-col> </el-col>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="状态:">
<el-select v-model="request.Zt" placeholder="状态" clearable> <el-select v-model="request.Zt" placeholder="状态" clearable>
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
@ -32,9 +29,13 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="16" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -51,11 +52,9 @@
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
highlight-hover-row highlight-hover-row
> >
<template #dcCh_default="{ row }">
{{ row.dcCh }}
</template>
<template #Zt_default="{ row }"> <template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index"> <div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div> <div v-if="row.zt === item.value">{{ item.label }}</div>
@ -76,175 +75,691 @@ export default {
data() { data() {
return { return {
request: { request: {
dcCh: "", date: "",
Zt: "", Zt: "",
}, },
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "seq", width: 60, title: "序号" }, {
type: "seq",
width: "50",
title: "序号",
align: "center",
fixed: "left",
},
{ {
field: "dcCh", field: "dcCh",
title: "船号", title: "船号",
slots: { default: "dcCh_default" }, align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "qy", field: "qy",
title: "区域", title: "区域",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zdh", field: "zdh",
title: "总段号", title: "总段号",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "yzd", field: "yzd",
title: "预组段", title: "预组段",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "dcFD", field: "dcFD",
title: "分段号", title: "分段号",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "ZL", field: "ZL",
title: "重量", title: "重量",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "dcPL", field: "dcPL",
title: "批量号", title: "批量号",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "kssjDz", field: "kssjDz",
title: "大组开始", title: "大组开始",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsDz", field: "gjjsDz",
title: "钢加大组结束", title: "钢加大组结束",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jssjXz", field: "jssjXz",
title: "小组结束", title: "小组结束",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xzzq", field: "xzzq",
title: "小组周期", title: "小组周期",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "kssjXz", field: "kssjXz",
title: "小组开始", title: "小组开始",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xbzl", field: "xbzl",
title: "线表重量", title: "线表重量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsDzPl", field: "gjjsDzPl",
title: "批量表(钢加大组结束)", title: "批量表(钢加大组结束)",
minWidth: "120", align: "center",
minWidth: "170",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "LP", field: "LP",
title: "时间差L-P", title: "时间差L-P",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsXz", field: "gjjsXz",
title: "钢加小组结束", title: "钢加小组结束",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsXzPl", field: "gjjsXzPl",
title: "批量表(钢加小组结束)", title: "批量表(钢加小组结束)",
minWidth: "120", align: "center",
minWidth: "170",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "RS", field: "RS",
title: "时间差R-S", title: "时间差R-S",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjks", field: "gjks",
title: "钢加开始", title: "钢加开始",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjksPl", field: "gjksPl",
title: "批量表(钢加开始)", title: "批量表(钢加开始)",
minWidth: "120", align: "center",
minWidth: "150",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "UV", field: "UV",
title: "时间差U-V", title: "时间差U-V",
minWidth: "90", align: "center",
minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqTlt", field: "xfqTlt",
title: "套料图下发", title: "套料图下发",
minWidth: "90", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqTlt", field: "jsqTlt",
title: "套料图接收", title: "套料图接收",
minWidth: "90", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqLqb", field: "xfqLqb",
title: "板材领取表下发", title: "板材领取表下发",
minWidth: "120", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqLqb", field: "jsqLqb",
title: "板材领取表接收", title: "板材领取表接收",
minWidth: "90", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqPtb", field: "xfqPtb",
title: "零件配套表下发", title: "零件配套表下发",
minWidth: "120", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqPtb", field: "jsqPtb",
title: "零件配套表接收", title: "零件配套表接收",
minWidth: "90", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "dhqd", field: "dhqd",
title: "订货清单号", title: "订货清单号",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqDhqd", field: "xfqDhqd",
title: "订货清单下发", title: "订货清单下发",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sjdhq", field: "sjdhq",
title: "实际订货日期", title: "实际订货日期",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "bcdq", field: "bcdq",
title: "板材计划到齐", title: "板材计划到齐",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "Zt", field: "Zt",
title: "状态", title: "状态",
align: "center",
slots: { default: "Zt_default" }, slots: { default: "Zt_default" },
minWidth: "50", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
], ],
statusOptions: [ statusOptions: [
@ -261,8 +776,6 @@ export default {
label: "审核", label: "审核",
}, },
], ],
ShipNoList: [],
checkedList: [],
}; };
}, },
created() { created() {
@ -271,32 +784,21 @@ export default {
this.initList(); this.initList();
}, },
methods: { methods: {
// () //
initList() { initList() {
let params = { let params = {
Zt:this.request.Zt, Zt:this.request.Zt,
dcCh: "", gjks:""
}; }
if (this.ShipNoList.length > 0 && this.request.dcCh) { if(this.request.date && this.request.date.length>0){
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label; params.gjks = this.request.date[0].toLocaleDateString()+"~"+this.request.date[1].toLocaleDateString();
}else{ }else{
params.dcCh = ""; params.gjks = "";
} }
getList(params).then((res) => { getList(params).then((res) => {
if (res.success) {
this.list = res.data; this.list = res.data;
this.ShipNoList = []; this.checkedList = [];
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
} }
}); });
}, },
@ -349,4 +851,10 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-date-editor.el-input__inner {
width: auto !important;
}
</style> </style>

@ -2,28 +2,30 @@
<!-- 中日程计划审核 --> <!-- 中日程计划审核 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="75px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-form-item label="钢加开始:">
<el-option <el-date-picker
v-for="item in ShipNoList" v-model="request.date"
:key="item.value" type="daterange"
:label="item.label" format="yyyy/MM/dd"
:value="item.value" :unlink-panels="true"
range-separator="~"
start-placeholder=""
end-placeholder=""
> >
</el-option> </el-date-picker>
</el-select> </el-form-item>
</el-col> </el-col>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-select v-model="request.Zt" placeholder="状态" clearable> <el-form-item label="状态:">
<el-select
v-model="request.Zt"
placeholder="状态"
clearable
disabled
>
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
:key="item.value" :key="item.value"
@ -32,9 +34,14 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="16" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> </el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<el-button type="primary" @click="toolbarButtonClickEvent('back')" <el-button type="primary" @click="toolbarButtonClickEvent('back')"
>退回</el-button >退回</el-button
> >
@ -43,6 +50,7 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -59,6 +67,7 @@
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
@checkbox-all="selectAllEvent" @checkbox-all="selectAllEvent"
@checkbox-change="selectChangeEvent" @checkbox-change="selectChangeEvent"
highlight-hover-row highlight-hover-row
@ -81,182 +90,698 @@
<script> <script>
import { getList, tj, sh } from "@/api/jhzx/zrcWH"; import { getList, tj, sh } from "@/api/jhzx/zrcWH";
import { param } from "@/utils";
export default { export default {
name: "zrcSH", name: "zrcSH",
data() { data() {
return { return {
request: { request: {
dcCh: "", date: "",
Zt: "1", Zt: "1",
}, },
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50, fixed: "left" }, { type: "checkbox", width: "50", align: "center", fixed: "left" },
{ type: "seq", width: 60, title: "序号", fixed: "left" }, {
type: "seq",
width: "50",
title: "序号",
align: "center",
fixed: "left",
},
{ {
field: "dcCh", field: "dcCh",
title: "船号", title: "船号",
slots: { default: "dcCh_default" }, align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "qy", field: "qy",
title: "区域", title: "区域",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zdh", field: "zdh",
title: "总段号", title: "总段号",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "yzd", field: "yzd",
title: "预组段", title: "预组段",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "dcFD", field: "dcFD",
title: "分段号", title: "分段号",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "ZL", field: "ZL",
title: "重量", title: "重量",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "dcPL", field: "dcPL",
title: "批量号", title: "批量号",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "kssjDz", field: "kssjDz",
title: "大组开始", title: "大组开始",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsDz", field: "gjjsDz",
title: "钢加大组结束", title: "钢加大组结束",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jssjXz", field: "jssjXz",
title: "小组结束", title: "小组结束",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xzzq", field: "xzzq",
title: "小组周期", title: "小组周期",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "kssjXz", field: "kssjXz",
title: "小组开始", title: "小组开始",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xbzl", field: "xbzl",
title: "线表重量", title: "线表重量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsDzPl", field: "gjjsDzPl",
title: "批量表(钢加大组结束)", title: "批量表(钢加大组结束)",
minWidth: "120", align: "center",
minWidth: "170",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "LP", field: "LP",
title: "时间差L-P", title: "时间差L-P",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsXz", field: "gjjsXz",
title: "钢加小组结束", title: "钢加小组结束",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsXzPl", field: "gjjsXzPl",
title: "批量表(钢加小组结束)", title: "批量表(钢加小组结束)",
minWidth: "120", align: "center",
minWidth: "170",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "RS", field: "RS",
title: "时间差R-S", title: "时间差R-S",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjks", field: "gjks",
title: "钢加开始", title: "钢加开始",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjksPl", field: "gjksPl",
title: "批量表(钢加开始)", title: "批量表(钢加开始)",
minWidth: "120", align: "center",
minWidth: "150",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "UV", field: "UV",
title: "时间差U-V", title: "时间差U-V",
minWidth: "90", align: "center",
minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqTlt", field: "xfqTlt",
title: "套料图下发", title: "套料图下发",
minWidth: "90", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqTlt", field: "jsqTlt",
title: "套料图接收", title: "套料图接收",
minWidth: "90", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqLqb", field: "xfqLqb",
title: "板材领取表下发", title: "板材领取表下发",
minWidth: "120", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqLqb", field: "jsqLqb",
title: "板材领取表接收", title: "板材领取表接收",
minWidth: "90", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqPtb", field: "xfqPtb",
title: "零件配套表下发", title: "零件配套表下发",
minWidth: "120", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqPtb", field: "jsqPtb",
title: "零件配套表接收", title: "零件配套表接收",
minWidth: "90", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "dhqd", field: "dhqd",
title: "订货清单号", title: "订货清单号",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqDhqd", field: "xfqDhqd",
title: "订货清单下发", title: "订货清单下发",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sjdhq", field: "sjdhq",
title: "实际订货日期", title: "实际订货日期",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "bcdq", field: "bcdq",
title: "板材计划到齐", title: "板材计划到齐",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "Zt", field: "Zt",
title: "状态", title: "状态",
align: "center",
slots: { default: "Zt_default" }, slots: { default: "Zt_default" },
minWidth: "50", minWidth: "70",
fixed: "right", filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
], ],
statusOptions: [ statusOptions: [
@ -273,7 +798,6 @@ export default {
label: "审核", label: "审核",
}, },
], ],
ShipNoList: [],
checkedList: [], checkedList: [],
}; };
}, },
@ -283,33 +807,24 @@ export default {
this.initList(); this.initList();
}, },
methods: { methods: {
// () //
initList() { initList() {
let params = { let params = {
Zt: this.request.Zt, Zt: this.request.Zt,
dcCh: "", gjks: "",
}; };
if (this.ShipNoList.length > 0 && this.request.dcCh) { if (this.request.date && this.request.date.length > 0) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label; params.gjks =
this.request.date[0].toLocaleDateString() +
"~" +
this.request.date[1].toLocaleDateString();
} else { } else {
params.dcCh = ""; params.gjks = "";
} }
getList(params).then((res) => { getList(params).then((res) => {
if (res.success) {
this.list = res.data; this.list = res.data;
this.checkedList = []; this.checkedList = [];
this.ShipNoList = [];
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
} }
}); });
}, },
@ -430,11 +945,10 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
.upload-demo { ::v-deep .el-form-item {
display: inline-flex; margin-bottom: 0px !important;
margin-right: 10px;
} }
::v-deep .el-upload-list { ::v-deep .el-date-editor.el-input__inner {
display: none !important; width: auto !important;
} }
</style> </style>

@ -2,21 +2,41 @@
<!-- 中日程计划维护 --> <!-- 中日程计划维护 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="75px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-form-item label="钢加开始:">
<el-date-picker
v-model="request.date"
type="daterange"
format="yyyy/MM/dd"
:unlink-panels="true"
range-separator="~"
start-placeholder=""
end-placeholder=""
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="状态:">
<el-select
v-model="request.Zt"
placeholder="状态"
clearable
disabled
>
<el-option <el-option
v-for="item in ShipNoList" v-for="item in statusOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
</el-col> <el-col :span="16" style="text-align: right">
<el-col :span="6" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('submit')" <el-button type="success" @click="toolbarButtonClickEvent('submit')"
>提交</el-button >提交</el-button
> >
@ -24,20 +44,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="18"> <el-col :span="24" style="text-align: right">
<el-col :span="4">
<el-select v-model="request.Zt" placeholder="状态" clearable>
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-col>
</el-col>
<el-col :span="6" style="text-align: right">
<div class="upload-demo"> <div class="upload-demo">
<el-upload <el-upload
action="#" action="#"
@ -54,6 +61,7 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -75,9 +83,6 @@
@checkbox-change="selectChangeEvent" @checkbox-change="selectChangeEvent"
highlight-hover-row highlight-hover-row
> >
<template #dcCh_default="{ row }">
{{ row.dcCh }}
</template>
<template #Zt_default="{ row }"> <template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index"> <div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div> <div v-if="row.zt === item.value">{{ item.label }}</div>
@ -98,177 +103,692 @@ export default {
data() { data() {
return { return {
request: { request: {
dcCh: "", date: "",
Zt: "0", Zt: "0",
}, },
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50, fixed: "left" }, { type: "checkbox", width: "50", align: "center", fixed: "left" },
{ type: "seq", width: 60, title: "序号", fixed: "left" }, {
type: "seq",
width: "50",
title: "序号",
align: "center",
fixed: "left",
},
{ {
field: "dcCh", field: "dcCh",
title: "船号", title: "船号",
slots: { default: "dcCh_default" }, align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "qy", field: "qy",
title: "区域", title: "区域",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zdh", field: "zdh",
title: "总段号", title: "总段号",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "yzd", field: "yzd",
title: "预组段", title: "预组段",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "dcFD", field: "dcFD",
title: "分段号", title: "分段号",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "ZL", field: "ZL",
title: "重量", title: "重量",
align: "center",
minWidth: "70", minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "dcPL", field: "dcPL",
title: "批量号", title: "批量号",
minWidth: "70", align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "kssjDz", field: "kssjDz",
title: "大组开始", title: "大组开始",
minWidth: "70", minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsDz", field: "gjjsDz",
title: "钢加大组结束", title: "钢加大组结束",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jssjXz", field: "jssjXz",
title: "小组结束", title: "小组结束",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xzzq", field: "xzzq",
title: "小组周期", title: "小组周期",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "kssjXz", field: "kssjXz",
title: "小组开始", title: "小组开始",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xbzl", field: "xbzl",
title: "线表重量", title: "线表重量",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsDzPl", field: "gjjsDzPl",
title: "批量表(钢加大组结束)", title: "批量表(钢加大组结束)",
minWidth: "120", align: "center",
minWidth: "170",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "LP", field: "LP",
title: "时间差L-P", title: "时间差L-P",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsXz", field: "gjjsXz",
title: "钢加小组结束", title: "钢加小组结束",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjjsXzPl", field: "gjjsXzPl",
title: "批量表(钢加小组结束)", title: "批量表(钢加小组结束)",
minWidth: "120", align: "center",
minWidth: "170",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "RS", field: "RS",
title: "时间差R-S", title: "时间差R-S",
align: "center",
minWidth: "120", minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjks", field: "gjks",
title: "钢加开始", title: "钢加开始",
minWidth: "70", align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "gjksPl", field: "gjksPl",
title: "批量表(钢加开始)", title: "批量表(钢加开始)",
minWidth: "120", align: "center",
minWidth: "150",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "UV", field: "UV",
title: "时间差U-V", title: "时间差U-V",
minWidth: "90", align: "center",
minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqTlt", field: "xfqTlt",
title: "套料图下发", title: "套料图下发",
minWidth: "90", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqTlt", field: "jsqTlt",
title: "套料图接收", title: "套料图接收",
minWidth: "90", align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqLqb", field: "xfqLqb",
title: "板材领取表下发", title: "板材领取表下发",
minWidth: "120", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqLqb", field: "jsqLqb",
title: "板材领取表接收", title: "板材领取表接收",
minWidth: "90", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqPtb", field: "xfqPtb",
title: "零件配套表下发", title: "零件配套表下发",
minWidth: "120", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqPtb", field: "jsqPtb",
title: "零件配套表接收", title: "零件配套表接收",
minWidth: "90", align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "dhqd", field: "dhqd",
title: "订货清单号", title: "订货清单号",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqDhqd", field: "xfqDhqd",
title: "订货清单下发", title: "订货清单下发",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sjdhq", field: "sjdhq",
title: "实际订货日期", title: "实际订货日期",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "bcdq", field: "bcdq",
title: "板材计划到齐", title: "板材计划到齐",
minWidth: "90", align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "Zt", field: "Zt",
title: "状态", title: "状态",
align: "center",
slots: { default: "Zt_default" }, slots: { default: "Zt_default" },
minWidth: "50", minWidth: "70",
fixed: "right", filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
], ],
statusOptions: [ statusOptions: [
@ -286,7 +806,6 @@ export default {
}, },
], ],
fileList: [], fileList: [],
ShipNoList: [],
checkedList: [], checkedList: [],
}; };
}, },
@ -296,33 +815,24 @@ export default {
this.initList(); this.initList();
}, },
methods: { methods: {
// () //
initList() { initList() {
let params = { let params = {
Zt: this.request.Zt, Zt: this.request.Zt,
dcCh: "", gjks: "",
}; };
if (this.ShipNoList.length > 0 && this.request.dcCh) { if (this.request.date && this.request.date.length > 0) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label; params.gjks =
this.request.date[0].toLocaleDateString() +
"~" +
this.request.date[1].toLocaleDateString();
} else { } else {
params.dcCh = ""; params.gjks = "";
} }
getList(params).then((res) => { getList(params).then((res) => {
if (res.success) {
this.list = res.data; this.list = res.data;
this.checkedList = []; this.checkedList = [];
this.ShipNoList = [];
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
} }
}); });
}, },
@ -333,22 +843,8 @@ export default {
upload(formData).then((res) => { upload(formData).then((res) => {
if (res.success) { if (res.success) {
this.list = res.data; this.list = res.data;
this.$message.success("导入成功!");
this.checkedList = []; this.checkedList = [];
this.ShipNoList = []; this.$message.success("导入成功!");
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
}
} }
}); });
}, },
@ -467,4 +963,10 @@ export default {
::v-deep .el-upload-list { ::v-deep .el-upload-list {
display: none !important; display: none !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-date-editor.el-input__inner {
width: auto !important;
}
</style> </style>

@ -2,15 +2,18 @@
<!-- 工厂日历维护 --> <!-- 工厂日历维护 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="年份:">
<el-input v-model="request.nf" placeholder="年份" clearable /> <el-input v-model="request.nf" placeholder="年份" clearable />
</el-form-item>
</el-col> </el-col>
</el-col> <el-col :span="20" style="text-align: right">
<el-col :span="6" style="text-align: right"> <el-button
<el-button type="success" @click="toolbarButtonClickEvent('insert')" type="success"
>添加</el-button @click="toolbarButtonClickEvent('generate')"
>一键生成</el-button
> >
<el-button type="primary" @click="initList()"></el-button> <el-button type="primary" @click="initList()"></el-button>
</el-col> </el-col>
@ -22,6 +25,7 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -38,7 +42,7 @@
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:edit-rules="validRules" :scroll-y="{ enabled: true }"
:edit-config="{ :edit-config="{
trigger: 'click', trigger: 'click',
mode: 'row', mode: 'row',
@ -67,27 +71,54 @@ export default {
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "seq", width: 60, title: "序号" }, { type: "seq", width: "50", title: "序号", align: "center" },
{
field: "gzlr",
title: "工作日历",
align: "center",
},
{
field: "gl",
title: "公历",
align: "center",
},
{
field: "xq",
title: "星期",
align: "center",
},
{
field: "yz",
title: "月周",
align: "center",
},
{
field: "nz",
title: "年周",
align: "center",
},
{ {
field: "nf", field: "nf",
title: "年份", title: "年份",
editRender: { name: "input" }, align: "center",
}, },
{ field: "gl", title: "公历", editRender: { name: "input" } },
{ {
field: "xxr", field: "xxr",
title: "类型", title: "类型",
align: "center",
editRender: { editRender: {
name: "$select", name: "$select",
options: [], options: [],
props: { clearable: true }, props: { clearable: true },
}, },
}, },
{ field: "bz", title: "备注", editRender: { name: "input" } }, {
], field: "bz",
validRules: { title: "备注",
sbbh: [{ required: true, message: "设备编号不可为空" }], align: "center",
editRender: { name: "input" },
}, },
],
typeOption: [ typeOption: [
{ {
value: "0", value: "0",
@ -127,12 +158,12 @@ export default {
async toolbarButtonClickEvent(code) { async toolbarButtonClickEvent(code) {
const { updateRecords } = this.$refs.tableRef.getRecordset(); const { updateRecords } = this.$refs.tableRef.getRecordset();
switch (code) { switch (code) {
case "insert": case "generate":
generate().then((res) => { generate().then((res) => {
if (res.success) { if (res.success) {
const xTable = this.$refs.tableRef; const xTable = this.$refs.tableRef;
xTable.loadData(this.initList()); xTable.loadData(this.initList());
this.$message({ message: "保存成功!", type: "success" }); this.$message({ message: "生成成功!", type: "success" });
} }
}); });
break; break;
@ -218,4 +249,10 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-input {
width: auto !important;
}
</style> </style>

@ -2,13 +2,30 @@
<!-- 设备产能维护 --> <!-- 设备产能维护 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="80px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="request.sbmc" placeholder="设备名称" clearable /> <el-form-item label="跨位:">
<el-select v-model="request.kw" placeholder="跨位" clearable>
<el-option
v-for="item in kwOptions"
:key="item.bm"
:value="item.bm"
:label="item.bmsm"
/>
</el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-form-item label="设备名称:">
<el-input
v-model="request.sbmc"
placeholder="设备名称"
clearable
/>
</el-form-item>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> <el-col :span="16" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('insert')" <el-button type="success" @click="toolbarButtonClickEvent('insert')"
>添加</el-button >添加</el-button
> >
@ -25,6 +42,7 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -54,9 +72,21 @@
<template #sbbh_edit="{ row }"> <template #sbbh_edit="{ row }">
<vxe-input <vxe-input
v-model="row.sbbh" v-model="row.sbbh"
:disabled="row.sbbhDisabled" placeholder=""
disabled
></vxe-input> ></vxe-input>
</template> </template>
<template #sbmc_edit="{ row }">
<vxe-select
v-model="row.sbmc"
:options="sbmcOptions"
:disabled="row.sbmcDisabled"
@change="changeSbmc($event, row)"
placeholder=""
clearable
transfer
></vxe-select>
</template>
</vxe-grid> </vxe-grid>
</div> </div>
</el-main> </el-main>
@ -66,47 +96,250 @@
</template> </template>
<script> <script>
import { getList, save, update, delete1 } from "@/api/sjzx/sbcnWH"; import {
getList,
emSbjbbZM,
getBMMCBM,
save,
update,
delete1,
} from "@/api/sjzx/sbcnWH";
export default { export default {
name: "sbcnWH", name: "sbcnWH",
data() { data() {
return { return {
request: { request: {
kw: "",
sbmc: "", sbmc: "",
}, },
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50 }, { type: "checkbox", width: "50", align: "center" },
{ type: "seq", width: 60, title: "序号" }, { type: "seq", width: "50", title: "序号", align: "center" },
{
field: "kw",
title: "跨位",
align: "center",
minWidth: "70",
editRender: {
name: "$select",
options: [],
props: { clearable: true },
},
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "gx",
title: "工序",
align: "center",
minWidth: "70",
editRender: { name: "input" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "szcs",
title: "所属部门",
align: "center",
minWidth: "90",
editRender: {
name: "$select",
options: [],
props: { clearable: true },
events: {
change: this.changeSzcs,
},
},
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "sbmc",
title: "设备名称",
align: "center",
minWidth: "90",
editRender: {
name: "$select",
options: [],
props: {
clearable: true,
},
},
slots: { edit: "sbmc_edit" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{ {
field: "sbbh", field: "sbbh",
title: "设备编号", title: "设备编号",
align: "center",
minWidth: "90",
editRender: { name: "input" }, editRender: { name: "input" },
slots: { edit: "sbbh_edit" }, slots: { edit: "sbbh_edit" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "sbcn",
title: "产能(每小时)",
align: "center",
minWidth: "110",
editRender: { name: "input" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dw",
title: "产能单位",
align: "center",
minWidth: "90",
editRender: { name: "input" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ field: "sbmc", title: "设备名称", editRender: { name: "input" } },
{ field: "sbcn", title: "产能", editRender: { name: "input" } },
{ field: "dw", title: "产能单位", editRender: { name: "input" } },
{ {
field: "dwsj", field: "dwsj",
title: "产能单位时间(天 或小时)", title: "产能系数",
align: "center",
minWidth: "90",
editRender: { name: "input" }, editRender: { name: "input" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
], ],
validRules: { validRules: {
sbbh: [{ required: true, message: "设备编号不可为空" }], sbbh: [{ required: true, message: "设备编号不可为空" }],
}, },
kwOptions: [],
departmentOptions: [],
options: [],
sbmcOptions: [],
checkedList: [], checkedList: [],
sbbhDisabled: true,
}; };
}, },
created() { created() {
window.addEventListener("resize", this.getHeight); window.addEventListener("resize", this.getHeight);
this.getHeight(); this.getHeight();
this.emSbjbbZM("QGKW");
this.emSbjbbZM("bmbm");
this.getBMMCBM();
this.initList(); this.initList();
}, },
methods: { methods: {
//
getBMMCBM() {
getBMMCBM().then((res) => {
if (res.success) {
this.options = res.data;
}
});
},
// //
initList() { initList() {
getList(this.request).then((res) => { getList(this.request).then((res) => {
@ -114,10 +347,85 @@ export default {
this.checkedList = []; this.checkedList = [];
if (this.list.length > 0) { if (this.list.length > 0) {
this.list.forEach((item) => { this.list.forEach((item) => {
item.sbbhDisabled = this.sbbhDisabled; item.sbmcDisabled = true;
});
}
});
},
//
emSbjbbZM(params) {
emSbjbbZM({
bmlb: params,
}).then((res) => {
const tableRef = this.$refs.tableRef;
if (params == "bmbm") {
//
this.departmentOptions = res.data;
const sbztText = tableRef.getColumnByField("szcs");
const testList = [];
for (let i = 0; i < this.departmentOptions.length; i++) {
const temp = {
label: this.departmentOptions[i].bmsm,
value: this.departmentOptions[i].bm,
};
testList.push(temp);
}
sbztText.editRender.options = testList;
} else if (params == "QGKW") {
//
this.kwOptions = res.data;
const sbztText = tableRef.getColumnByField("kw");
const testList = [];
for (let i = 0; i < this.kwOptions.length; i++) {
const temp = {
label: this.kwOptions[i].bmsm,
value: this.kwOptions[i].bm,
};
testList.push(temp);
}
sbztText.editRender.options = testList;
}
}); });
},
//
changeSzcs(row, id) {
console.log(row, id);
if (row.row.szcs) {
row.row.sbmcDisabled = false;
row.row.sbmc = "";
row.row.sbbh = "";
this.sbmcOptions = [];
const testList = [];
console.log(this.options, "======");
for (let i = 0; i < this.options[id.value].length; i++) {
const temp = {
label: this.options[id.value][i].sbmc,
value: this.options[id.value][i].sbbh,
};
testList.push(temp);
}
this.sbmcOptions = testList;
} else {
row.row.sbmcDisabled = true;
row.row.sbmc = "";
row.row.sbbh = "";
this.sbmcOptions = [];
}
},
//
changeSbmc(event, row) {
if (row.sbmc) {
row.sbbh = event.value;
let arr = this.sbmcOptions.filter((item, index) => {
if (item.value == event.value) {
return item;
} }
}); });
row.sbmc = arr[0].label;
} else {
row.sbbh = "";
}
}, },
// //
selectAllEvent() { selectAllEvent() {
@ -135,12 +443,7 @@ export default {
this.$refs.tableRef.getRecordset(); this.$refs.tableRef.getRecordset();
switch (code) { switch (code) {
case "insert": case "insert":
this.$refs.tableRef.insertAt( this.$refs.tableRef.insertAt({ sbmcDisabled: true }, -1);
{
sbbhDisabled: false,
},
-1
);
break; break;
case "delete": case "delete":
if (this.checkedList.length > 0) { if (this.checkedList.length > 0) {
@ -285,4 +588,10 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-input {
width: auto !important;
}
</style> </style>

@ -2,13 +2,18 @@
<!-- 设备人员信息维护 --> <!-- 设备人员信息维护 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="75px">
<el-row> <el-row>
<el-col :span="18">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="request.sbmc" placeholder="设备名称" clearable /> <el-form-item label="设备名称:">
<el-input
v-model="request.sbmc"
placeholder="设备名称"
clearable
/>
</el-form-item>
</el-col> </el-col>
</el-col> <el-col :span="20" style="text-align: right">
<el-col :span="6" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('insert')" <el-button type="success" @click="toolbarButtonClickEvent('insert')"
>添加</el-button >添加</el-button
> >
@ -25,6 +30,7 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -55,8 +61,20 @@
<vxe-input <vxe-input
v-model="row.sbbh" v-model="row.sbbh"
:disabled="row.sbbhDisabled" :disabled="row.sbbhDisabled"
placeholder=""
></vxe-input> ></vxe-input>
</template> </template>
<template #sbmc_edit="{ row }">
<vxe-select
v-model="row.sbmc"
:options="sbmcOptions"
:disabled="row.sbmcDisabled"
@change="changeSbmc($event, row)"
placeholder=""
clearable
transfer
></vxe-select>
</template>
</vxe-grid> </vxe-grid>
</div> </div>
</el-main> </el-main>
@ -66,7 +84,15 @@
</template> </template>
<script> <script>
import { getRYList, getList, save, update, delete1 } from "@/api/sjzx/sbryWH"; import {
getRYList,
emSbjbbZM,
getBMMCBM,
getList,
save,
update,
delete1,
} from "@/api/sjzx/sbryWH";
export default { export default {
name: "sbryWH", name: "sbryWH",
data() { data() {
@ -77,37 +103,151 @@ export default {
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50 }, { type: "checkbox", width: "50", align: "center" },
{ type: "seq", width: 60, title: "序号" }, { type: "seq", width: "50", title: "序号", align: "center" },
{
field: "szcs",
title: "所属部门",
align: "center",
editRender: {
name: "$select",
options: [],
props: { clearable: true },
events: {
change: this.changeSzcs,
},
},
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "sbmc",
title: "设备名称",
align: "center",
editRender: {
name: "$select",
options: [],
props: {
clearable: true,
},
events: {
change: this.changeSbmc,
},
},
slots: { edit: "sbmc_edit" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{ {
field: "sbbh", field: "sbbh",
title: "设备编号", title: "设备编号",
align: "center",
editRender: { name: "input" }, editRender: { name: "input" },
slots: { edit: "sbbh_edit" }, slots: { edit: "sbbh_edit" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ field: "sbmc", title: "设备名称", editRender: { name: "input" } },
{ {
field: "rymc", field: "rymc",
title: "人员名称", title: "人员名称",
align: "center",
editRender: { editRender: {
name: "$select", name: "$select",
options: [], options: [],
props: { clearable: true }, props: { clearable: true },
}, },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jlr",
title: "负责人",
align: "center",
editRender: { name: "input" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ field: "jlr", title: "负责人", editRender: { name: "input" } },
], ],
validRules: { validRules: {
sbbh: [{ required: true, message: "设备编号不可为空" }], sbbh: [{ required: true, message: "设备编号不可为空" }],
}, },
checkedList: [], departmentOptions: [],
sbbhDisabled: true, options: [],
sbmcOptions: [],
checkedList: []
}; };
}, },
created() { created() {
window.addEventListener("resize", this.getHeight); window.addEventListener("resize", this.getHeight);
this.getHeight(); this.getHeight();
this.getRYList(); this.getRYList();
this.getBMMCBM();
this.emSbjbbZM("bmbm");
this.initList(); this.initList();
}, },
methods: { methods: {
@ -118,7 +258,8 @@ export default {
this.checkedList = []; this.checkedList = [];
if (this.list.length > 0) { if (this.list.length > 0) {
this.list.forEach((item) => { this.list.forEach((item) => {
item.sbbhDisabled = this.sbbhDisabled; item.sbbhDisabled = true;
item.sbmcDisabled = true;
}); });
} }
}); });
@ -140,6 +281,77 @@ export default {
personnelInfoText.editRender.options = testList; personnelInfoText.editRender.options = testList;
}); });
}, },
//
getBMMCBM() {
getBMMCBM().then((res) => {
if (res.success) {
this.options = res.data;
}
});
},
//
emSbjbbZM(params) {
emSbjbbZM({
bmlb: params,
}).then((res) => {
const tableRef = this.$refs.tableRef;
if (params == "bmbm") {
//
this.departmentOptions = res.data;
const sbztText = tableRef.getColumnByField("szcs");
const testList = [];
Object.keys(this.options).forEach((item) => {
for (let i = 0; i < this.departmentOptions.length; i++) {
if (item == this.departmentOptions[i].bm) {
const temp = {
label: this.departmentOptions[i].bmsm,
value: this.departmentOptions[i].bm,
};
testList.push(temp);
}
}
sbztText.editRender.options = testList;
});
}
});
},
//
changeSzcs(row, id) {
if (row.row.szcs) {
row.row.sbmcDisabled = false;
row.row.sbmc = "";
row.row.sbbh = "";
this.sbmcOptions = [];
const testList = [];
for (let i = 0; i < this.options[id.value].length; i++) {
const temp = {
label: this.options[id.value][i].sbmc,
value: this.options[id.value][i].sbbh,
};
testList.push(temp);
}
this.sbmcOptions = testList;
} else {
row.row.sbmcDisabled = true;
row.row.sbmc = "";
row.row.sbbh = "";
this.sbmcOptions = [];
}
},
//
changeSbmc(event, row) {
if (row.sbmc) {
row.sbbh = event.value;
let arr = this.sbmcOptions.filter((item, index) => {
if (item.value == event.value) {
return item;
}
});
row.sbmc = arr[0].label;
} else {
row.sbbh = "";
}
},
// //
selectAllEvent() { selectAllEvent() {
const records = this.$refs.tableRef.getCheckboxRecords(); const records = this.$refs.tableRef.getCheckboxRecords();
@ -158,7 +370,8 @@ export default {
case "insert": case "insert":
this.$refs.tableRef.insertAt( this.$refs.tableRef.insertAt(
{ {
sbbhDisabled: false, sbbhDisabled: true,
sbmcDisabled: true,
}, },
-1 -1
); );
@ -306,4 +519,10 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-input {
width: auto !important;
}
</style> </style>

@ -2,13 +2,36 @@
<!-- 设备维修计划维护 --> <!-- 设备维修计划维护 -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="100px">
<el-row> <el-row>
<el-col :span="18"> <el-col :span="20">
<el-col :span="4"> <el-col :span="4">
<el-input v-model="request.sbbh" placeholder="设备编号" clearable /> <el-form-item label="设备编号:">
<el-input
v-model="request.sbbh"
placeholder="设备编号"
clearable
/>
</el-form-item>
</el-col> </el-col>
<el-col :span="4">
<el-form-item label="所属部门:">
<el-select
v-model="request.szcs"
placeholder="所属部门"
clearable
>
<el-option
v-for="item in departmentOptions"
:key="item.bm"
:value="item.bm"
:label="item.bmsm"
/>
</el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> </el-col>
<el-col :span="4" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('insert')" <el-button type="success" @click="toolbarButtonClickEvent('insert')"
>添加</el-button >添加</el-button
> >
@ -16,25 +39,30 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="18"> <el-col :span="20">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="计划开始时间:">
<el-date-picker <el-date-picker
v-model="request.beginTime" v-model="request.beginTime"
value-format="yyyy/MM/dd" value-format="yyyy/MM/dd"
type="date" type="date"
placeholder="计划开始时间" placeholder="计划开始时间"
style="width: 100%"
/> />
</el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="计划结束时间:">
<el-date-picker <el-date-picker
v-model="request.endTime" v-model="request.endTime"
type="date" type="date"
value-format="yyyy/MM/dd" value-format="yyyy/MM/dd"
placeholder="计划结束时间" placeholder="计划结束时间"
/> />
</el-form-item>
</el-col> </el-col>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> <el-col :span="4" style="text-align: right">
<el-button type="danger" @click="toolbarButtonClickEvent('delete')" <el-button type="danger" @click="toolbarButtonClickEvent('delete')"
>删除</el-button >删除</el-button
> >
@ -43,6 +71,7 @@
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -59,6 +88,7 @@
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
:edit-rules="validRules" :edit-rules="validRules"
:edit-config="{ :edit-config="{
trigger: 'click', trigger: 'click',
@ -72,21 +102,33 @@
<template #sbbh_edit="{ row }"> <template #sbbh_edit="{ row }">
<vxe-input <vxe-input
v-model="row.sbbh" v-model="row.sbbh"
:disabled="row.sbbhDisabled" disabled
placeholder="" placeholder=""
></vxe-input> ></vxe-input>
</template> </template>
<template #sbmc_edit="{ row }">
<vxe-select
v-model="row.sbmc"
:options="sbmcOptions"
:disabled="row.sbmcDisabled"
@change="changeSbmc($event, row)"
placeholder=""
clearable
transfer
></vxe-select>
</template>
<template #fzr_edit="{ row }"> <template #fzr_edit="{ row }">
<vxe-input <vxe-input
v-model="row.fzr" v-model="row.fzr"
:disabled="fzrDisabled" disabled
placeholder="" placeholder=""
></vxe-input> ></vxe-input>
</template> </template>
<template #kssjJh_edit="{ row }"> <template #kssjJh_edit="{ row }">
<vxe-input <vxe-input
v-model="row.kssjJh" v-model="row.kssjJh"
type="datetime" type="date"
value-format="yyyy/MM/dd"
placeholder="" placeholder=""
transfer transfer
></vxe-input> ></vxe-input>
@ -94,7 +136,8 @@
<template #jssjJh_edit="{ row }"> <template #jssjJh_edit="{ row }">
<vxe-input <vxe-input
v-model="row.jssjJh" v-model="row.jssjJh"
type="datetime" type="date"
value-format="yyyy/MM/dd"
placeholder="" placeholder=""
transfer transfer
></vxe-input> ></vxe-input>
@ -102,7 +145,8 @@
<template #kssjSj_edit="{ row }"> <template #kssjSj_edit="{ row }">
<vxe-input <vxe-input
v-model="row.kssjSj" v-model="row.kssjSj"
type="datetime" type="date"
value-format="yyyy/MM/dd"
placeholder="" placeholder=""
transfer transfer
></vxe-input> ></vxe-input>
@ -110,7 +154,8 @@
<template #jssjSj_edit="{ row }"> <template #jssjSj_edit="{ row }">
<vxe-input <vxe-input
v-model="row.jssjSj" v-model="row.jssjSj"
type="datetime" type="date"
value-format="yyyy/MM/dd"
placeholder="" placeholder=""
transfer transfer
></vxe-input> ></vxe-input>
@ -124,7 +169,15 @@
</template> </template>
<script> <script>
import { getList, save, update, delete1 } from "@/api/sjzx/sbwxjhWH"; import {
getList,
emSbjbbZM,
getBMMCBM,
save,
update,
delete1,
} from "@/api/sjzx/sbwxjhWH";
import { mapGetters } from "vuex";
export default { export default {
name: "sbwxjhWH", name: "sbwxjhWH",
data() { data() {
@ -137,102 +190,310 @@ export default {
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50, fixed: "left" }, { type: "checkbox", width: "50", align: "center", fixed: "left" },
{ type: "seq", width: 60, title: "序号", fixed: "left" },
{ {
field: "sbbh", type: "seq",
title: "设备编号", width: "50",
editRender: { name: "input" }, title: "序号",
slots: { edit: "sbbh_edit" },
fixed: "left", fixed: "left",
align: "center",
},
{
field: "szcs",
title: "所属部门",
align: "center",
minWidth: "110",
editRender: {
name: "$select",
options: [],
props: { clearable: true },
events: {
change: this.changeSzcs,
},
},
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "sbmc", field: "sbmc",
title: "设备名称", title: "设备名称",
editRender: { name: "input" }, align: "center",
minWidth: "110",
editRender: {
name: "$select",
options: [],
props: {
clearable: true,
}
}, },
slots: { edit: "sbmc_edit" },
filters: [
{ {
field: "sbxh", data: {
title: "设备型号", checks: [],
editRender: { name: "input" }, sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
}, },
},
{ ],
field: "sbgg", filterRender: { name: "FilterCombination" },
title: "设备规格",
editRender: { name: "input" },
}, },
{ {
field: "szcs", field: "sbbh",
title: "所属部门", title: "设备编号",
align: "center",
minWidth: "120",
editRender: { name: "input" }, editRender: { name: "input" },
slots: { edit: "sbbh_edit" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "wxnr", field: "wxnr",
title: "维修内容", title: "维修内容",
align: "center",
minWidth: "110",
editRender: { name: "input" }, editRender: { name: "input" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "kssjJh", field: "kssjJh",
title: "计划开始时间", title: "计划开始时间",
align: "center",
minWidth: "130",
editRender: { name: "input" }, editRender: { name: "input" },
slots: { edit: "kssjJh_edit" }, slots: { edit: "kssjJh_edit" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jssjJh", field: "jssjJh",
title: "计划结束时间", title: "计划结束时间",
align: "center",
minWidth: "130",
editRender: { name: "input" }, editRender: { name: "input" },
slots: { edit: "jssjJh_edit" }, slots: { edit: "jssjJh_edit" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "kssjSj", field: "kssjSj",
title: "实际开始时间", title: "实际开始时间",
align: "center",
minWidth: "130",
editRender: { name: "input" }, editRender: { name: "input" },
slots: { edit: "kssjSj_edit" }, slots: { edit: "kssjSj_edit" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jssjSj", field: "jssjSj",
title: "实际结束时间", title: "实际结束时间",
align: "center",
minWidth: "130",
editRender: { name: "input" }, editRender: { name: "input" },
slots: { edit: "jssjSj_edit" }, slots: { edit: "jssjSj_edit" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zt", field: "zt",
title: "状态", title: "状态",
align: "center",
minWidth: "90",
editRender: { editRender: {
name: "$select", name: "$select",
options: [], options: [],
props: { clearable: true }, props: { clearable: true },
}, },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "fzr", field: "fzr",
title: "负责人", title: "负责人",
align: "center",
minWidth: "90",
editRender: { name: "input" }, editRender: { name: "input" },
slots: { edit: "fzr_edit" }, slots: { edit: "fzr_edit" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "bz", field: "bz",
title: "备注", title: "备注",
align: "center",
minWidth: "90",
editRender: { name: "input" }, editRender: { name: "input" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
], ],
validRules: { validRules: {
sbbh: [{ required: true, message: "设备编号不可为空" }], sbbh: [{ required: true, message: "设备编号不可为空" }],
}, },
checkedList: [], departmentOptions: [],
sbbhDisabled: true, options: [],
fzrDisabled: true, sbmcOptions: [],
checkedList: []
}; };
}, },
created() { created() {
window.addEventListener("resize", this.getHeight); window.addEventListener("resize", this.getHeight);
this.getHeight(); this.getHeight();
this.getBMMCBM();
this.emSbjbbZM("bmbm");
this.initList(); this.initList();
}, },
computed: {
...mapGetters(["name"]),
},
methods: { methods: {
//
getBMMCBM() {
getBMMCBM().then((res) => {
if (res.success) {
this.options = res.data;
}
});
},
// //
initList() { initList() {
getList(this.request).then((res) => { getList(this.request).then((res) => {
@ -240,11 +501,73 @@ export default {
this.checkedList = []; this.checkedList = [];
if (this.list.length > 0) { if (this.list.length > 0) {
this.list.forEach((item) => { this.list.forEach((item) => {
item.sbbhDisabled = this.sbbhDisabled; item.sbmcDisabled = true;
item.fzrDisabled = this.fzrDisabled; });
}
});
},
//
emSbjbbZM(params) {
emSbjbbZM({
bmlb: params,
}).then((res) => {
const tableRef = this.$refs.tableRef;
if (params == "bmbm") {
//
this.departmentOptions = res.data;
const sbztText = tableRef.getColumnByField("szcs");
const testList = [];
Object.keys(this.options).forEach((item) => {
for (let i = 0; i < this.departmentOptions.length; i++) {
if (item == this.departmentOptions[i].bm) {
const temp = {
label: this.departmentOptions[i].bmsm,
value: this.departmentOptions[i].bm,
};
testList.push(temp);
}
}
sbztText.editRender.options = testList;
});
}
}); });
},
//
changeSzcs(row, id) {
if (row.row.szcs) {
row.row.sbmcDisabled = false;
row.row.sbmc = "";
row.row.sbbh = "";
this.sbmcOptions = [];
const testList = [];
for (let i = 0; i < this.options[id.value].length; i++) {
const temp = {
label: this.options[id.value][i].sbmc,
value: this.options[id.value][i].sbbh,
};
testList.push(temp);
}
this.sbmcOptions = testList;
} else {
row.row.sbmcDisabled = true;
row.row.sbmc = "";
row.row.sbbh = "";
this.sbmcOptions = [];
}
},
//
changeSbmc(event, row) {
if (row.sbmc) {
row.sbbh = event.value;
let arr = this.sbmcOptions.filter((item, index) => {
if (item.value == event.value) {
return item;
} }
}); });
row.sbmc = arr[0].label;
} else {
row.sbbh = "";
}
}, },
// //
selectAllEvent() { selectAllEvent() {
@ -264,8 +587,8 @@ export default {
case "insert": case "insert":
this.$refs.tableRef.insertAt( this.$refs.tableRef.insertAt(
{ {
sbbhDisabled: false, fzr: this.name,
fzrDisabled: false, sbmcDisabled: true,
}, },
-1 -1
); );
@ -418,4 +741,10 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-date-editor.el-input__inner {
width: auto !important;
}
</style> </style>

File diff suppressed because it is too large Load Diff

@ -2,27 +2,29 @@
<!-- 图纸查询 样式--> <!-- 图纸查询 样式-->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row> <el-row>
<el-col :span="18"> <el-col :span="6">
<el-col :span="4"> <el-form-item label="船号:">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option <el-option
v-for="item in ShipNoList" v-for="item in ShipNoList"
:key="item.value" :key="item.cbbm"
:label="item.label" :label="item.cbbm"
:value="item.value" :value="item.cbbm"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="批量:">
<el-input v-model="request.dcPl" placeholder="批量" clearable>
</el-input>
</el-form-item>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> <el-col :span="6">
<el-button type="primary" @click="initList()"></el-button> <el-form-item label="状态:">
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-col :span="4">
<el-select v-model="request.zt" placeholder="状态" clearable> <el-select v-model="request.zt" placeholder="状态" clearable>
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
@ -32,14 +34,13 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</el-col> </el-form-item>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> <el-col :span="6" style="text-align: right">
<!-- <el-button type="success" @click="toolbarButtonClickEvent('insert')"--> <el-button type="primary" @click="initList()"></el-button>
<!-- >审核</el-button-->
<!-- >-->
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -56,11 +57,17 @@
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
highlight-hover-row highlight-hover-row
:checkbox-config="{ checkMethod: CheckboxkMethod }" :checkbox-config="{ checkMethod: CheckboxkMethod }"
@checkbox-all="selectAllEvent" @checkbox-all="selectAllEvent"
@checkbox-change="selectChangeEvent" @checkbox-change="selectChangeEvent"
> >
<template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div>
</div>
</template>
</vxe-grid> </vxe-grid>
</div> </div>
</el-main> </el-main>
@ -71,62 +78,238 @@
<script> <script>
import { getList, sh } from "@/api/jhzx/tzCX"; import { getList, sh } from "@/api/jhzx/tzCX";
import { getCzxx } from "@/api/jhzx/qfxq";
export default { export default {
name: "tzCX", name: "TzjhGL",
data() { data() {
return { return {
request: { request: {
dcCh: "", dcCh: "",
dcPl: "",
Zt: "", Zt: "",
}, },
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50 }, {
{ type: "seq", width: 60, title: "序号" }, type: "seq",
{ field: "dcPl", title: "批量", editRender: { name: "input" } }, width: "50",
{ field: "dcFd", title: "图名", editRender: { name: "input" } }, title: "序号",
align: "center",
fixed: "left",
},
{ {
field: "dcCh", field: "dcCh",
title: "船名", title: "船号",
editRender: { align: "center",
name: "$select", minWidth: "70",
options: [], filters: [
props: { clearable: true }, {
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
}, },
}, },
{ field: "xfqTlt", title: "套料图下发", editRender: { name: "input" } }, ],
{ field: "jsqTlt", title: "套料图接收", editRender: { name: "input" } }, filterRender: { name: "FilterCombination" },
},
{
field: "dcPl",
title: "批量",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{ {
field: "xfqLqb", field: "xfqLqb",
title: "板材领取表下发", title: "板材领取表下发",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqLqb", field: "jsqLqb",
title: "板材领取表接收", title: "板材领取表接收",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "xfqTlt",
title: "套料图下发",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dcFd",
title: "图名",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jsqTlt",
title: "套料图接收",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqPtb", field: "xfqPtb",
title: "零件配套表下发", title: "零件配套表下发",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqPtb", field: "jsqPtb",
title: "零件配套表接收", title: "零件配套表接收",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zt", field: "zt",
title: "状态", title: "状态",
editRender: { align: "center",
name: "$select", minWidth: "70",
options: [], slots: { default: "Zt_default" },
props: { clearable: true }, filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
}, },
}, },
], ],
filterRender: { name: "FilterCombination" },
},
],
statusOptions: [ statusOptions: [
{ {
value: "0", value: "0",
@ -144,80 +327,29 @@ export default {
created() { created() {
window.addEventListener("resize", this.getHeight); window.addEventListener("resize", this.getHeight);
this.getHeight(); this.getHeight();
this.statusList(); this.getCzxx();
this.initList(); this.initList();
}, },
methods: { methods: {
statusList() { //
this.$nextTick(() => { getCzxx() {
const tableRef = this.$refs.tableRef; getCzxx().then((res) => {
const statusText = tableRef.getColumnByField("zt"); if (res.success) {
statusText.editRender.options = this.statusOptions; this.ShipNoList = res.data;
}
}); });
}, },
// () //
initList() { initList() {
let params = { getList({
Zt: this.request.Zt, ...this.request,
dcCh: "", }).then((res) => {
}; if (res.success) {
if (this.ShipNoList.length > 0 && this.request.dcCh) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label;
} else {
params.dcCh = "";
}
getList(params).then((res) => {
this.list = res.data; this.list = res.data;
this.checkedList = []; this.checkedList = [];
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
} }
}); });
}, },
//
selectAllEvent() {
const records = this.$refs.tableRef.getCheckboxRecords();
this.checkedList = records;
},
//
selectChangeEvent() {
const records = this.$refs.tableRef.getCheckboxRecords();
this.checkedList = records;
},
//
CheckboxkMethod({ row }){
return row.zt !== '1'
},
//
async toolbarButtonClickEvent(code) {
switch (code) {
case "insert":
if (this.checkedList.length > 0) {
sh(this.checkedList).then((res) => {
if (res.success) {
const xTable = this.$refs.tableRef;
xTable.loadData(this.initList());
this.$message.success("审核成功!");
}
});
} else {
this.$message.warning("请选择数据!");
}
break;
default:
break;
}
},
getHeight() { getHeight() {
this.height = window.innerHeight - 160; this.height = window.innerHeight - 160;
}, },
@ -267,4 +399,11 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-input {
width: auto !important;
}
</style> </style>

@ -2,27 +2,33 @@
<!-- 图纸计划管理--> <!-- 图纸计划管理-->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row> <el-row>
<el-col :span="18"> <el-col :span="6">
<el-col :span="4"> <el-form-item label="船号:">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option <el-option
v-for="item in ShipNoList" v-for="item in ShipNoList"
:key="item.value" :key="item.cbbm"
:label="item.label" :label="item.cbbm"
:value="item.value" :value="item.cbbm"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="批量:">
<el-input
v-model="request.dcPl"
placeholder="批量"
clearable
>
</el-input>
</el-form-item>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> <el-col :span="6">
<el-button type="primary" @click="initList()"></el-button> <el-form-item label="状态:">
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-col :span="4">
<el-select v-model="request.zt" placeholder="状态" clearable> <el-select v-model="request.zt" placeholder="状态" clearable>
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
@ -32,14 +38,20 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</el-col> </el-form-item>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> <el-col :span="6" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('insert')" <el-button type="success" @click="toolbarButtonClickEvent('insert')"
>审核</el-button >审核</el-button
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -56,11 +68,17 @@
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
highlight-hover-row highlight-hover-row
:checkbox-config="{ checkMethod: CheckboxkMethod }" :checkbox-config="{ checkMethod: CheckboxkMethod }"
@checkbox-all="selectAllEvent" @checkbox-all="selectAllEvent"
@checkbox-change="selectChangeEvent" @checkbox-change="selectChangeEvent"
> >
<template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div>
</div>
</template>
</vxe-grid> </vxe-grid>
</div> </div>
</el-main> </el-main>
@ -71,60 +89,237 @@
<script> <script>
import { getList, sh } from "@/api/jhzx/tzCX"; import { getList, sh } from "@/api/jhzx/tzCX";
import { getCzxx } from "@/api/jhzx/qfxq";
export default { export default {
name: "TzjhGL", name: "TzjhGL",
data() { data() {
return { return {
request: { request: {
dcCh: "", dcCh: "",
dcPl:"",
Zt: "", Zt: "",
}, },
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50 }, { type: "checkbox", width: "40", fixed: "left" },
{ type: "seq", width: 60, title: "序号" }, {
{ field: "dcPl", title: "批量", editRender: { name: "input" } }, type: "seq",
{ field: "dcFd", title: "图名", editRender: { name: "input" } }, width: "50",
title: "序号",
align: "center",
fixed: "left",
},
{ {
field: "dcCh", field: "dcCh",
title: "船名", title: "船号",
editRender: { align: "center",
name: "$select", minWidth: "70",
options: [], filters: [
props: { clearable: true }, {
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
}, },
}, },
{ field: "xfqTlt", title: "套料图下发", editRender: { name: "input" } }, ],
{ field: "jsqTlt", title: "套料图接收", editRender: { name: "input" } }, filterRender: { name: "FilterCombination" },
},
{
field: "dcPl",
title: "批量",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{ {
field: "xfqLqb", field: "xfqLqb",
title: "板材领取表下发", title: "板材领取表下发",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqLqb", field: "jsqLqb",
title: "板材领取表接收", title: "板材领取表接收",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "xfqTlt",
title: "套料图下发",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dcFd",
title: "图名",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jsqTlt",
title: "套料图接收",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqPtb", field: "xfqPtb",
title: "零件配套表下发", title: "零件配套表下发",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqPtb", field: "jsqPtb",
title: "零件配套表接收", title: "零件配套表接收",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zt", field: "zt",
title: "状态", title: "状态",
editRender: { align: "center",
name: "$select", minWidth: "70",
options: [], slots: { default: "Zt_default" },
props: { clearable: true }, filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
}, },
],
filterRender: { name: "FilterCombination" },
}, },
], ],
statusOptions: [ statusOptions: [
@ -144,43 +339,26 @@ export default {
created() { created() {
window.addEventListener("resize", this.getHeight); window.addEventListener("resize", this.getHeight);
this.getHeight(); this.getHeight();
this.statusList(); this.getCzxx();
this.initList(); this.initList();
}, },
methods: { methods: {
statusList() { //
this.$nextTick(() => { getCzxx() {
const tableRef = this.$refs.tableRef; getCzxx().then((res) => {
const statusText = tableRef.getColumnByField("zt"); if (res.success) {
statusText.editRender.options = this.statusOptions; this.ShipNoList = res.data;
}
}); });
}, },
// () //
initList() { initList() {
let params = { getList({
Zt: this.request.Zt, ...this.request,
dcCh: "", }).then((res) => {
}; if (res.success) {
if (this.ShipNoList.length > 0 && this.request.dcCh) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label;
} else {
params.dcCh = "";
}
getList(params).then((res) => {
this.list = res.data; this.list = res.data;
this.checkedList = []; this.checkedList = [];
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
} }
}); });
}, },
@ -196,7 +374,7 @@ export default {
}, },
// //
CheckboxkMethod({ row }) { CheckboxkMethod({ row }) {
return row.zt !== '1' return row.zt !== "1";
}, },
// //
async toolbarButtonClickEvent(code) { async toolbarButtonClickEvent(code) {
@ -267,4 +445,11 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-input{
width: auto !important;
}
</style> </style>

@ -2,27 +2,33 @@
<!-- 图纸计划审核(原为图纸计划查询) --> <!-- 图纸计划审核(原为图纸计划查询) -->
<el-container> <el-container>
<el-header style="width: 100%"> <el-header style="width: 100%">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row> <el-row>
<el-col :span="18"> <el-col :span="6">
<el-col :span="4"> <el-form-item label="船号:">
<el-select v-model="request.dcCh" placeholder="船号" clearable> <el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option <el-option
v-for="item in ShipNoList" v-for="item in ShipNoList"
:key="item.value" :key="item.cbbm"
:label="item.label" :label="item.cbbm"
:value="item.value" :value="item.cbbm"
> >
</el-option> </el-option>
</el-select> </el-select>
</el-form-item>
</el-col> </el-col>
<el-col :span="6">
<el-form-item label="批量:">
<el-input
v-model="request.dcPl"
placeholder="批量"
clearable
>
</el-input>
</el-form-item>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> <el-col :span="6">
<el-button type="primary" @click="initList()"></el-button> <el-form-item label="状态:">
</el-col>
</el-row>
<el-row>
<el-col :span="18">
<el-col :span="4">
<el-select v-model="request.zt" placeholder="状态" clearable> <el-select v-model="request.zt" placeholder="状态" clearable>
<el-option <el-option
v-for="item in statusOptions" v-for="item in statusOptions"
@ -32,14 +38,20 @@
> >
</el-option> </el-option>
</el-select> </el-select>
</el-col> </el-form-item>
</el-col> </el-col>
<el-col :span="6" style="text-align: right"> <el-col :span="6" style="text-align: right">
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('insert')" <el-button type="success" @click="toolbarButtonClickEvent('insert')"
>审核</el-button >审核</el-button
> >
</el-col> </el-col>
</el-row> </el-row>
</el-form>
</el-header> </el-header>
<el-container style="padding-top: 10px"> <el-container style="padding-top: 10px">
<el-container> <el-container>
@ -56,11 +68,17 @@
:columns="tableColumn" :columns="tableColumn"
:data="list" :data="list"
:custom-config="{ storage: true }" :custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
highlight-hover-row highlight-hover-row
:checkbox-config="{ checkMethod: CheckboxkMethod }" :checkbox-config="{ checkMethod: CheckboxkMethod }"
@checkbox-all="selectAllEvent" @checkbox-all="selectAllEvent"
@checkbox-change="selectChangeEvent" @checkbox-change="selectChangeEvent"
> >
<template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div>
</div>
</template>
</vxe-grid> </vxe-grid>
</div> </div>
</el-main> </el-main>
@ -71,60 +89,237 @@
<script> <script>
import { getList, sh } from "@/api/jhzx/tzCX"; import { getList, sh } from "@/api/jhzx/tzCX";
import { getCzxx } from "@/api/jhzx/qfxq";
export default { export default {
name: "TzjhSH", name: "TzjhGL",
data() { data() {
return { return {
request: { request: {
dcCh: "", dcCh: "",
dcPl:"",
Zt: "", Zt: "",
}, },
list: [], list: [],
height: "500px", height: "500px",
tableColumn: [ tableColumn: [
{ type: "checkbox", width: 50 }, { type: "checkbox", width: "40", fixed: "left" },
{ type: "seq", width: 60, title: "序号" }, {
{ field: "dcPl", title: "批量", editRender: { name: "input" } }, type: "seq",
{ field: "dcFd", title: "图名", editRender: { name: "input" } }, width: "50",
title: "序号",
align: "center",
fixed: "left",
},
{ {
field: "dcCh", field: "dcCh",
title: "船名", title: "船号",
editRender: { align: "center",
name: "$select", minWidth: "70",
options: [], filters: [
props: { clearable: true }, {
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
}, },
}, },
{ field: "xfqTlt", title: "套料图下发", editRender: { name: "input" } }, ],
{ field: "jsqTlt", title: "套料图接收", editRender: { name: "input" } }, filterRender: { name: "FilterCombination" },
},
{
field: "dcPl",
title: "批量",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{ {
field: "xfqLqb", field: "xfqLqb",
title: "板材领取表下发", title: "板材领取表下发",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqLqb", field: "jsqLqb",
title: "板材领取表接收", title: "板材领取表接收",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "xfqTlt",
title: "套料图下发",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dcFd",
title: "图名",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jsqTlt",
title: "套料图接收",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "xfqPtb", field: "xfqPtb",
title: "零件配套表下发", title: "零件配套表下发",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "jsqPtb", field: "jsqPtb",
title: "零件配套表接收", title: "零件配套表接收",
editRender: { name: "input" }, align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
}, },
{ {
field: "zt", field: "zt",
title: "状态", title: "状态",
editRender: { align: "center",
name: "$select", minWidth: "70",
options: [], slots: { default: "Zt_default" },
props: { clearable: true }, filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
}, },
],
filterRender: { name: "FilterCombination" },
}, },
], ],
statusOptions: [ statusOptions: [
@ -144,43 +339,26 @@ export default {
created() { created() {
window.addEventListener("resize", this.getHeight); window.addEventListener("resize", this.getHeight);
this.getHeight(); this.getHeight();
this.statusList(); this.getCzxx();
this.initList(); this.initList();
}, },
methods: { methods: {
statusList() { //
this.$nextTick(() => { getCzxx() {
const tableRef = this.$refs.tableRef; getCzxx().then((res) => {
const statusText = tableRef.getColumnByField("zt"); if (res.success) {
statusText.editRender.options = this.statusOptions; this.ShipNoList = res.data;
}
}); });
}, },
// () //
initList() { initList() {
let params = { getList({
Zt: this.request.Zt, ...this.request,
dcCh: "", }).then((res) => {
}; if (res.success) {
if (this.ShipNoList.length > 0 && this.request.dcCh) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label;
} else {
params.dcCh = "";
}
getList(params).then((res) => {
this.list = res.data; this.list = res.data;
this.checkedList = []; this.checkedList = [];
var arrList = [];
if (this.list.length > 0) {
this.list.forEach((item, index) => {
arrList.push(item.dcCh);
this.ShipNoList = [];
Array.from(new Set(arrList)).forEach((em, eindex) => {
this.ShipNoList.push({
label: em,
value: eindex + 1,
});
});
});
} }
}); });
}, },
@ -196,7 +374,7 @@ export default {
}, },
// //
CheckboxkMethod({ row }) { CheckboxkMethod({ row }) {
return row.zt !== '1' return row.zt !== "1";
}, },
// //
async toolbarButtonClickEvent(code) { async toolbarButtonClickEvent(code) {
@ -267,4 +445,11 @@ export default {
::v-deep .mytable .vxe-input { ::v-deep .mytable .vxe-input {
display: flex !important; display: flex !important;
} }
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-input{
width: auto !important;
}
</style> </style>

Loading…
Cancel
Save