master
xiezuo003 2 years ago
parent 172a957b3d
commit 593f41cb41

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

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

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

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

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

@ -2,59 +2,66 @@
<!-- 订货清单维护 -->
<el-container>
<el-header style="width: 100%">
<el-row>
<el-col :span="18">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row>
<el-col :span="4">
<el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option
v-for="item in ShipNoList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<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>
<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-select v-model="request.Zt" placeholder="状态" clearable>
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
<el-form-item label="状态:">
<el-select
v-model="request.Zt"
placeholder="状态"
clearable
disabled
>
</el-option>
</el-select>
<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>
<el-col :span="6" style="text-align: right">
<div class="upload-demo">
<el-upload
action="#"
accept=".xls,.xlsx"
:multiple="false"
:file-list="fileList"
:http-request="actionUpload"
<el-col :span="16" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('submit')"
>提交</el-button
>
<el-button size="mini" type="primary">导入</el-button>
</el-upload>
</div>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<div class="upload-demo">
<el-upload
action="#"
accept=".xls,.xlsx"
:multiple="false"
:file-list="fileList"
:http-request="actionUpload"
>
<el-button size="mini" type="primary">导入</el-button>
</el-upload>
</div>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
</el-form>
</el-header>
<el-container style="padding-top: 10px">
<el-container>
@ -76,9 +83,6 @@
@checkbox-change="selectChangeEvent"
highlight-hover-row
>
<template #dcCh_default="{ row }">
{{ row.dcCh }}
</template>
<template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div>
@ -94,6 +98,7 @@
<script>
import { getList, tj, save, upload } from "@/api/jhzx/dhqdWH";
import { getCzxx } from "@/api/jhzx/qfxq";
export default {
name: "dhqdWH",
data() {
@ -105,96 +110,369 @@ export default {
list: [],
height: "500px",
tableColumn: [
{ type: "checkbox", width: 50, fixed: "left" },
{ type: "seq", width: 60, title: "序号", fixed: "left" },
{ type: "checkbox", width: "50", align: "center", fixed: "left" },
{
type: "seq",
width: "50",
title: "序号",
fixed: "left",
align: "center",
},
{
field: "dcCh",
title: "船号",
slots: { default: "dcCh_default" },
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "qdh",
title: "订货清单号",
minWidth: "80",
align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "qc",
title: "期次",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "wpxh",
title: " 材质",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "thickness",
title: "厚度mm",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "width",
title: "宽度mm",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "length",
title: "长度mm",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "weight",
title: "重量吨/张",
minWidth: "70",
align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "sjsl",
title: "设计数量",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "yl",
title: "裕量",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "zsl",
title: "总数量",
minWidth: "70",
align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "zzl",
title: "总重量",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "lksl",
title: "利库数量",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "lkzl",
title: "利库重量",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "sdzs",
title: "实订数量",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "sdzl",
title: "实订重量",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "Zt",
title: "状态",
slots: { default: "Zt_default" },
minWidth: "50",
fixed: "right",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
],
statusOptions: [
@ -219,36 +497,26 @@ export default {
created() {
window.addEventListener("resize", this.getHeight);
this.getHeight();
this.getCzxx();
this.initList();
},
methods: {
// ()
//
getCzxx() {
getCzxx().then((res) => {
if (res.success) {
this.ShipNoList = res.data;
}
});
},
//
initList() {
let params = {
Zt: this.request.Zt,
dcCh: "",
};
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,
});
});
});
getList({
...this.request,
}).then((res) => {
if (res.success) {
this.list = res.data;
this.checkedList = [];
}
});
},
@ -259,22 +527,8 @@ export default {
upload(formData).then((res) => {
if (res.success) {
this.list = res.data;
this.$message.success("导入成功!");
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,
});
});
});
}
this.$message.success("导入成功!");
}
});
},
@ -391,4 +645,7 @@ export default {
::v-deep .el-upload-list {
display: none !important;
}
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
</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,58 +2,61 @@
<!-- 集团三月滚动计划维护 -->
<el-container>
<el-header style="width: 100%">
<el-row>
<el-col :span="18">
<el-form ref="requestForm" :model="request" label-width="60px">
<el-row>
<el-col :span="4">
<el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option
v-for="item in ShipNoList"
:key="item.value"
:label="item.label"
:value="item.value"
<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-option>
</el-select>
</el-date-picker>
</el-form-item>
</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-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 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>
<el-col :span="6" style="text-align: right">
<div class="upload-demo">
<el-upload
action="#"
accept=".xls,.xlsx"
:multiple="false"
:file-list="fileList"
:http-request="actionUpload"
<el-col :span="16" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('submit')"
>审核</el-button
>
<el-button size="mini" type="primary">导入</el-button>
</el-upload>
</div>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<div class="upload-demo">
<el-upload
action="#"
accept=".xls,.xlsx"
:multiple="false"
:file-list="fileList"
:http-request="actionUpload"
>
<el-button size="mini" type="primary">导入</el-button>
</el-upload>
</div>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
</el-form>
</el-header>
<el-container style="padding-top: 10px">
<el-container>
@ -75,6 +78,11 @@
@checkbox-all="selectAllEvent"
@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>
</div>
</el-main>
@ -90,46 +98,192 @@ export default {
data() {
return {
request: {
dcCh: "",
zt: "",
date: "",
Zt: "",
},
list: [],
height: "500px",
tableColumn: [
{ type: "checkbox", width: 50 },
{ type: "seq", width: 60, title: "序号" },
{ type: "checkbox", width: "50", align: "center", fixed: "left" },
{
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: "dcPl", title: "批量" },
{ field: "dcFd", title: "分段" },
{ field: "jhrq", title: "计划期" },
{ field: "bz", title: "备注" },
{
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: "未提交",
label: "未审核",
},
{
value: "1",
label: "已提交",
label: "已审核",
},
],
ShipNoList: [], //
fileList: [], //
checkedList: [],
};
@ -140,33 +294,24 @@ export default {
this.initList();
},
methods: {
// ()
//
initList() {
let params = {
zt: this.request.zt,
dcCh: "",
Zt: this.request.Zt,
jhrq: "",
};
if (this.ShipNoList.length > 0 && this.request.dcCh) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label;
if (this.request.date && this.request.date.length > 0) {
params.jhrq =
this.request.date[0].toLocaleDateString() +
"~" +
this.request.date[1].toLocaleDateString();
} else {
params.dcCh = "";
params.jhrq = "";
}
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,
});
});
});
if (res.success) {
this.list = res.data;
this.checkedList = [];
}
});
},
@ -178,20 +323,7 @@ export default {
if (res.success) {
this.$message.success("上传成功!");
this.list = res.data;
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,
});
});
});
}
this.checkedList = [];
}
});
},
@ -310,4 +442,10 @@ export default {
::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>

@ -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,58 +1,82 @@
<template>
<!-- 线表计划维护 -->
<div class="container-chart">
<el-header style="width: 100%">
<el-row>
<el-col :span="18">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row>
<el-col :span="4">
<el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option
v-for="item in ShipNoList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<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>
<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-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 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>
<el-col :span="6" style="text-align: right">
<div class="upload-demo">
<el-upload
action="#"
accept=".xls,.xlsx"
:multiple="false"
:file-list="fileList"
:http-request="actionUpload"
<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 size="mini" type="primary">导入</el-button>
</el-upload>
</div>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<div class="upload-demo">
<el-upload
action="#"
accept=".xls,.xlsx"
:multiple="false"
:file-list="fileList"
:http-request="actionUpload"
>
<el-button size="mini" type="primary">导入</el-button>
</el-upload>
</div>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
</el-form>
</el-header>
<el-container>
<el-main>
@ -67,81 +91,35 @@
:cell-class-name="cellClassName"
:footer-method="footerMethod"
:footer-cell-class-name="footerCellClassName"
:data="tableData"
:data="arrList"
@checkbox-all="selectAllEvent"
@checkbox-change="selectChangeEvent"
>
<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>
<div class="first-col">
<div class="first-col-top">年份</div>
<div class="first-col-bottom">产品</div>
</div>
</template>
<template #default="{ row }">
{{ row.dcCh }}
<template #default="{ row, rowIndex }">
{{ leftColumn[rowIndex].column }}
</template>
</vxe-column>
<vxe-colgroup field="2013" title="2023年">
<vxe-column field="cl202301" title="1月" width="60"></vxe-column>
<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"
:field="item"
:title="index < 12 ? index + 1 + '月' : '合计'"
:width="70"
>
<template #default="{ row, rowIndex }">
<div v-if="item == 'total1'">
{{ tableData[rowIndex].total1 }}
</div>
<div v-else>{{ row[item] }}</div>
</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 + '月' : '合计'"
<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"
>
<template #default="{ row, rowIndex }">
<div v-if="item == 'total2'">
{{ tableData[rowIndex].total2 }}
</div>
<div v-else>{{ row[item] }}</div>
</template>
</vxe-column> -->
</vxe-column>
</vxe-colgroup>
</vxe-table>
</el-main>
@ -151,6 +129,7 @@
<script>
import { getList, tj, save, upload } from "@/api/jhzx/xbjhWH";
import { getCzxx } from "@/api/jhzx/qfxq";
export default {
name: "xbjhWH",
data() {
@ -158,11 +137,14 @@ export default {
request: {
dcCh: "",
Zt: "",
nf: "",
},
nrStart: "",
nrEnd: "",
height: "500px",
tableData: [],
fileList: [],
checkedList: [],
checkedList: {},
statusOptions: [
{
value: "0",
@ -177,168 +159,170 @@ export default {
label: "审核",
},
],
ShipNoList: [],
arrList: [], //key--
copyList: [],
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.tableData = res.data;
this.checkedList = {};
this.getTableList(res.data);
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() {
const records = this.$refs.tableRef.getCheckboxRecords();
this.checkedList = records;
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() {
const records = this.$refs.tableRef.getCheckboxRecords();
this.checkedList = records;
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,
dcCh: "",
nf: "",
};
if (this.ShipNoList.length > 0 && this.request.dcCh) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label;
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 {
params.dcCh = "";
this.request.nf = "";
}
// if()
getList(params).then((res) => {
if (res.success) {
this.tableData = res.data;
this.checkedList = [];
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();
// }
this.checkedList = {};
this.getTableList(res.data);
}
});
},
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) {
let count = 0;
@ -392,7 +376,9 @@ export default {
async toolbarButtonClickEvent(code) {
switch (code) {
case "submit":
if (this.checkedList.length > 0) {
if (JSON.stringify(this.checkedList) == "{}") {
this.$message.warning("请选择数据!");
} else {
this.$confirm("是否确认提交选择的数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -408,12 +394,12 @@ export default {
});
})
.catch(() => {});
} else {
this.$message.warning("请选择数据!");
}
break;
case "save":
if (this.checkedList.length > 0) {
if (JSON.stringify(this.checkedList) == "{}") {
this.$message.warning("请选择数据!");
} else {
this.$confirm("是否确认保存选择的数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -429,8 +415,6 @@ export default {
});
})
.catch(() => {});
} else {
this.$message.warning("请选择数据!");
}
break;
default:
@ -452,11 +436,12 @@ export default {
.first-col:before {
content: "";
position: absolute;
left: -21px !important;
top: 16px !important;
width: 106px;
left: -18px !important;
top: 9px !important;
width: 95px;
height: 1px;
transform: rotate(37deg);
-webkit-transform: rotate(37deg);
transform: rotate(34deg);
background-color: #000;
}
.first-col .first-col-top {
@ -566,4 +551,11 @@ export default {
.el-row {
margin-bottom: 5px;
}
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
.distance {
margin-left: 5px;
margin-right: 5px;
}
</style>

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

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

@ -2,58 +2,66 @@
<!-- 中日程计划维护 -->
<el-container>
<el-header style="width: 100%">
<el-row>
<el-col :span="18">
<el-form ref="requestForm" :model="request" label-width="75px">
<el-row>
<el-col :span="4">
<el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option
v-for="item in ShipNoList"
:key="item.value"
:label="item.label"
:value="item.value"
<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-option>
</el-select>
</el-date-picker>
</el-form-item>
</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-select v-model="request.Zt" placeholder="状态" clearable>
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.label"
:value="item.value"
<el-form-item label="状态:">
<el-select
v-model="request.Zt"
placeholder="状态"
clearable
disabled
>
</el-option>
</el-select>
<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>
<el-col :span="6" style="text-align: right">
<div class="upload-demo">
<el-upload
action="#"
accept=".xls,.xlsx"
:multiple="false"
:file-list="fileList"
:http-request="actionUpload"
<el-col :span="16" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('submit')"
>提交</el-button
>
<el-button size="mini" type="primary">导入</el-button>
</el-upload>
</div>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
<el-button type="primary" @click="initList()"></el-button>
</el-col>
</el-row>
<el-row>
<el-col :span="24" style="text-align: right">
<div class="upload-demo">
<el-upload
action="#"
accept=".xls,.xlsx"
:multiple="false"
:file-list="fileList"
:http-request="actionUpload"
>
<el-button size="mini" type="primary">导入</el-button>
</el-upload>
</div>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
</el-form>
</el-header>
<el-container style="padding-top: 10px">
<el-container>
@ -75,9 +83,6 @@
@checkbox-change="selectChangeEvent"
highlight-hover-row
>
<template #dcCh_default="{ row }">
{{ row.dcCh }}
</template>
<template #Zt_default="{ row }">
<div v-for="(item, index) in statusOptions" :key="index">
<div v-if="row.zt === item.value">{{ item.label }}</div>
@ -98,177 +103,692 @@ export default {
data() {
return {
request: {
dcCh: "",
date: "",
Zt: "0",
},
list: [],
height: "500px",
tableColumn: [
{ type: "checkbox", width: 50, fixed: "left" },
{ type: "seq", width: 60, title: "序号", fixed: "left" },
{ type: "checkbox", width: "50", align: "center", fixed: "left" },
{
type: "seq",
width: "50",
title: "序号",
align: "center",
fixed: "left",
},
{
field: "dcCh",
title: "船号",
slots: { default: "dcCh_default" },
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "qy",
title: "区域",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "zdh",
title: "总段号",
minWidth: "70",
align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "yzd",
title: "预组段",
minWidth: "70",
align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dcFD",
title: "分段号",
minWidth: "70",
align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "ZL",
title: "重量",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dcPL",
title: "批量号",
minWidth: "70",
align: "center",
minWidth: "80",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "kssjDz",
title: "大组开始",
minWidth: "70",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "gjjsDz",
title: "钢加大组结束",
align: "center",
minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jssjXz",
title: "小组结束",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "xzzq",
title: "小组周期",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "kssjXz",
title: "小组开始",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "xbzl",
title: "线表重量",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "gjjsDzPl",
title: "批量表(钢加大组结束)",
minWidth: "120",
align: "center",
minWidth: "170",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "LP",
title: "时间差L-P",
align: "center",
minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "gjjsXz",
title: "钢加小组结束",
align: "center",
minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "gjjsXzPl",
title: "批量表(钢加小组结束)",
minWidth: "120",
align: "center",
minWidth: "170",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "RS",
title: "时间差R-S",
align: "center",
minWidth: "120",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "gjks",
title: "钢加开始",
minWidth: "70",
align: "center",
minWidth: "90",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "gjksPl",
title: "批量表(钢加开始)",
minWidth: "120",
align: "center",
minWidth: "150",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "UV",
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",
title: "套料图下发",
minWidth: "90",
align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jsqTlt",
title: "套料图接收",
minWidth: "90",
align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "xfqLqb",
title: "板材领取表下发",
minWidth: "120",
align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jsqLqb",
title: "板材领取表接收",
minWidth: "90",
align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "xfqPtb",
title: "零件配套表下发",
minWidth: "120",
align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jsqPtb",
title: "零件配套表接收",
minWidth: "90",
align: "center",
minWidth: "130",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "dhqd",
title: "订货清单号",
minWidth: "90",
align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "xfqDhqd",
title: "订货清单下发",
minWidth: "90",
align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "sjdhq",
title: "实际订货日期",
minWidth: "90",
align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "bcdq",
title: "板材计划到齐",
minWidth: "90",
align: "center",
minWidth: "110",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "Zt",
title: "状态",
align: "center",
slots: { default: "Zt_default" },
minWidth: "50",
fixed: "right",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
],
statusOptions: [
@ -286,7 +806,6 @@ export default {
},
],
fileList: [],
ShipNoList: [],
checkedList: [],
};
},
@ -296,33 +815,24 @@ export default {
this.initList();
},
methods: {
// ()
//
initList() {
let params = {
Zt: this.request.Zt,
dcCh: "",
gjks: "",
};
if (this.ShipNoList.length > 0 && this.request.dcCh) {
params.dcCh = this.ShipNoList[this.request.dcCh - 1].label;
if (this.request.date && this.request.date.length > 0) {
params.gjks =
this.request.date[0].toLocaleDateString() +
"~" +
this.request.date[1].toLocaleDateString();
} else {
params.dcCh = "";
params.gjks = "";
}
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,
});
});
});
if (res.success) {
this.list = res.data;
this.checkedList = [];
}
});
},
@ -333,22 +843,8 @@ export default {
upload(formData).then((res) => {
if (res.success) {
this.list = res.data;
this.$message.success("导入成功!");
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,
});
});
});
}
this.$message.success("导入成功!");
}
});
},
@ -467,4 +963,10 @@ export default {
::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,26 +2,30 @@
<!-- 工厂日历维护 -->
<el-container>
<el-header style="width: 100%">
<el-row>
<el-col :span="18">
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row>
<el-col :span="4">
<el-input v-model="request.nf" placeholder="年份" clearable />
<el-form-item label="年份:">
<el-input v-model="request.nf" placeholder="年份" clearable />
</el-form-item>
</el-col>
</el-col>
<el-col :span="6" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('insert')"
>添加</el-button
>
<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="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
<el-col :span="20" style="text-align: right">
<el-button
type="success"
@click="toolbarButtonClickEvent('generate')"
>一键生成</el-button
>
<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="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
</el-form>
</el-header>
<el-container style="padding-top: 10px">
<el-container>
@ -38,7 +42,7 @@
:columns="tableColumn"
:data="list"
:custom-config="{ storage: true }"
:edit-rules="validRules"
:scroll-y="{ enabled: true }"
:edit-config="{
trigger: 'click',
mode: 'row',
@ -67,27 +71,54 @@ export default {
list: [],
height: "500px",
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",
title: "年份",
editRender: { name: "input" },
align: "center",
},
{ field: "gl", title: "公历", editRender: { name: "input" } },
{
field: "xxr",
title: "类型",
align: "center",
editRender: {
name: "$select",
options: [],
props: { clearable: true },
},
},
{ field: "bz", title: "备注", editRender: { name: "input" } },
{
field: "bz",
title: "备注",
align: "center",
editRender: { name: "input" },
},
],
validRules: {
sbbh: [{ required: true, message: "设备编号不可为空" }],
},
typeOption: [
{
value: "0",
@ -127,12 +158,12 @@ export default {
async toolbarButtonClickEvent(code) {
const { updateRecords } = this.$refs.tableRef.getRecordset();
switch (code) {
case "insert":
case "generate":
generate().then((res) => {
if (res.success) {
const xTable = this.$refs.tableRef;
xTable.loadData(this.initList());
this.$message({ message: "保存成功!", type: "success" });
this.$message({ message: "生成成功!", type: "success" });
}
});
break;
@ -218,4 +249,10 @@ export default {
::v-deep .mytable .vxe-input {
display: flex !important;
}
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-input {
width: auto !important;
}
</style>

@ -2,29 +2,47 @@
<!-- 设备产能维护 -->
<el-container>
<el-header style="width: 100%">
<el-row>
<el-col :span="18">
<el-form ref="requestForm" :model="request" label-width="80px">
<el-row>
<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="6" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('insert')"
>添加</el-button
>
<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="danger" @click="toolbarButtonClickEvent('delete')"
>删除</el-button
>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
<el-col :span="4">
<el-form-item label="设备名称:">
<el-input
v-model="request.sbmc"
placeholder="设备名称"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="16" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('insert')"
>添加</el-button
>
<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="danger" @click="toolbarButtonClickEvent('delete')"
>删除</el-button
>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
</el-form>
</el-header>
<el-container style="padding-top: 10px">
<el-container>
@ -54,9 +72,21 @@
<template #sbbh_edit="{ row }">
<vxe-input
v-model="row.sbbh"
:disabled="row.sbbhDisabled"
placeholder=""
disabled
></vxe-input>
</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>
</div>
</el-main>
@ -66,47 +96,250 @@
</template>
<script>
import { getList, save, update, delete1 } from "@/api/sjzx/sbcnWH";
import {
getList,
emSbjbbZM,
getBMMCBM,
save,
update,
delete1,
} from "@/api/sjzx/sbcnWH";
export default {
name: "sbcnWH",
data() {
return {
request: {
kw: "",
sbmc: "",
},
list: [],
height: "500px",
tableColumn: [
{ type: "checkbox", width: 50 },
{ type: "seq", width: 60, title: "序号" },
{ type: "checkbox", width: "50", align: "center" },
{ 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",
title: "设备编号",
align: "center",
minWidth: "90",
editRender: { name: "input" },
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",
title: "产能单位时间(天 或小时)",
title: "产能系数",
align: "center",
minWidth: "90",
editRender: { name: "input" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
],
validRules: {
sbbh: [{ required: true, message: "设备编号不可为空" }],
},
kwOptions: [],
departmentOptions: [],
options: [],
sbmcOptions: [],
checkedList: [],
sbbhDisabled: true,
};
},
created() {
window.addEventListener("resize", this.getHeight);
this.getHeight();
this.emSbjbbZM("QGKW");
this.emSbjbbZM("bmbm");
this.getBMMCBM();
this.initList();
},
methods: {
//
getBMMCBM() {
getBMMCBM().then((res) => {
if (res.success) {
this.options = res.data;
}
});
},
//
initList() {
getList(this.request).then((res) => {
@ -114,11 +347,86 @@ export default {
this.checkedList = [];
if (this.list.length > 0) {
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() {
const records = this.$refs.tableRef.getCheckboxRecords();
@ -135,12 +443,7 @@ export default {
this.$refs.tableRef.getRecordset();
switch (code) {
case "insert":
this.$refs.tableRef.insertAt(
{
sbbhDisabled: false,
},
-1
);
this.$refs.tableRef.insertAt({ sbmcDisabled: true }, -1);
break;
case "delete":
if (this.checkedList.length > 0) {
@ -285,4 +588,10 @@ export default {
::v-deep .mytable .vxe-input {
display: flex !important;
}
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-input {
width: auto !important;
}
</style>

@ -2,29 +2,35 @@
<!-- 设备人员信息维护 -->
<el-container>
<el-header style="width: 100%">
<el-row>
<el-col :span="18">
<el-form ref="requestForm" :model="request" label-width="75px">
<el-row>
<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 :span="6" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('insert')"
>添加</el-button
>
<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="danger" @click="toolbarButtonClickEvent('delete')"
>删除</el-button
>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
<el-col :span="20" style="text-align: right">
<el-button type="success" @click="toolbarButtonClickEvent('insert')"
>添加</el-button
>
<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="danger" @click="toolbarButtonClickEvent('delete')"
>删除</el-button
>
<el-button type="primary" @click="toolbarButtonClickEvent('save')"
>保存</el-button
>
</el-col>
</el-row>
</el-form>
</el-header>
<el-container style="padding-top: 10px">
<el-container>
@ -55,8 +61,20 @@
<vxe-input
v-model="row.sbbh"
:disabled="row.sbbhDisabled"
placeholder=""
></vxe-input>
</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>
</div>
</el-main>
@ -66,7 +84,15 @@
</template>
<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 {
name: "sbryWH",
data() {
@ -77,37 +103,151 @@ export default {
list: [],
height: "500px",
tableColumn: [
{ type: "checkbox", width: 50 },
{ type: "seq", width: 60, title: "序号" },
{ type: "checkbox", width: "50", align: "center" },
{ 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",
title: "设备编号",
align: "center",
editRender: { name: "input" },
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",
title: "人员名称",
align: "center",
editRender: {
name: "$select",
options: [],
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: {
sbbh: [{ required: true, message: "设备编号不可为空" }],
},
checkedList: [],
sbbhDisabled: true,
departmentOptions: [],
options: [],
sbmcOptions: [],
checkedList: []
};
},
created() {
window.addEventListener("resize", this.getHeight);
this.getHeight();
this.getRYList();
this.getBMMCBM();
this.emSbjbbZM("bmbm");
this.initList();
},
methods: {
@ -118,12 +258,13 @@ export default {
this.checkedList = [];
if (this.list.length > 0) {
this.list.forEach((item) => {
item.sbbhDisabled = this.sbbhDisabled;
item.sbbhDisabled = true;
item.sbmcDisabled = true;
});
}
});
},
//
//
getRYList() {
getRYList().then((res) => {
this.personnelInfoList = res.data;
@ -140,6 +281,77 @@ export default {
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() {
const records = this.$refs.tableRef.getCheckboxRecords();
@ -158,7 +370,8 @@ export default {
case "insert":
this.$refs.tableRef.insertAt(
{
sbbhDisabled: false,
sbbhDisabled: true,
sbmcDisabled: true,
},
-1
);
@ -306,4 +519,10 @@ export default {
::v-deep .mytable .vxe-input {
display: flex !important;
}
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-input {
width: auto !important;
}
</style>

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

File diff suppressed because it is too large Load Diff

@ -2,44 +2,45 @@
<!-- 图纸查询 样式-->
<el-container>
<el-header style="width: 100%">
<el-row>
<el-col :span="18">
<el-col :span="4">
<el-select v-model="request.dcCh" placeholder="船号" clearable>
<el-option
v-for="item in ShipNoList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-form ref="requestForm" :model="request" label-width="45px">
<el-row>
<el-col :span="6">
<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>
<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-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 :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-button type="success" @click="toolbarButtonClickEvent('insert')"-->
<!-- >审核</el-button-->
<!-- >-->
</el-col>
</el-row>
<el-col :span="6">
<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="6" 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>
@ -56,11 +57,17 @@
:columns="tableColumn"
:data="list"
:custom-config="{ storage: true }"
:scroll-y="{ enabled: true }"
highlight-hover-row
:checkbox-config="{checkMethod: CheckboxkMethod}"
:checkbox-config="{ checkMethod: CheckboxkMethod }"
@checkbox-all="selectAllEvent"
@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>
</div>
</el-main>
@ -71,60 +78,236 @@
<script>
import { getList, sh } from "@/api/jhzx/tzCX";
import { getCzxx } from "@/api/jhzx/qfxq";
export default {
name: "tzCX",
name: "TzjhGL",
data() {
return {
request: {
dcCh: "",
dcPl: "",
Zt: "",
},
list: [],
height: "500px",
tableColumn: [
{ type: "checkbox", width: 50 },
{ type: "seq", width: 60, title: "序号" },
{ field: "dcPl", title: "批量", editRender: { name: "input" } },
{ field: "dcFd", title: "图名", editRender: { name: "input" } },
{
type: "seq",
width: "50",
title: "序号",
align: "center",
fixed: "left",
},
{
field: "dcCh",
title: "船名",
editRender: {
name: "$select",
options: [],
props: { clearable: true },
},
title: "船号",
align: "center",
minWidth: "70",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
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: "xfqTlt", title: "套料图下发", editRender: { name: "input" } },
{ field: "jsqTlt", title: "套料图接收", editRender: { name: "input" } },
{
field: "xfqLqb",
title: "板材领取表下发",
editRender: { name: "input" },
align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jsqLqb",
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",
title: "零件配套表下发",
editRender: { name: "input" },
align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "jsqPtb",
title: "零件配套表接收",
editRender: { name: "input" },
align: "center",
minWidth: "100",
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
{
field: "zt",
title: "状态",
editRender: {
name: "$select",
options: [],
props: { clearable: true },
},
align: "center",
minWidth: "70",
slots: { default: "Zt_default" },
filters: [
{
data: {
checks: [],
sVal: "",
sMenu: "",
fType1: "",
fVal1: "",
fMode: "and",
fType2: "",
fVal2: "",
},
},
],
filterRender: { name: "FilterCombination" },
},
],
statusOptions: [
@ -144,80 +327,29 @@ export default {
created() {
window.addEventListener("resize", this.getHeight);
this.getHeight();
this.statusList();
this.getCzxx();
this.initList();
},
methods: {
statusList() {
this.$nextTick(() => {
const tableRef = this.$refs.tableRef;
const statusText = tableRef.getColumnByField("zt");
statusText.editRender.options = this.statusOptions;
//
getCzxx() {
getCzxx().then((res) => {
if (res.success) {
this.ShipNoList = res.data;
}
});
},
// ()
//
initList() {
let params = {
Zt: this.request.Zt,
dcCh: "",
};
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 = [];
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,
});
});
});
getList({
...this.request,
}).then((res) => {
if (res.success) {
this.list = res.data;
this.checkedList = [];
}
});
},
//
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() {
this.height = window.innerHeight - 160;
},
@ -267,4 +399,11 @@ export default {
::v-deep .mytable .vxe-input {
display: flex !important;
}
::v-deep .el-form-item {
margin-bottom: 0px !important;
}
::v-deep .el-input {
width: auto !important;
}
</style>

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

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

Loading…
Cancel
Save