From acf83c45ef4f342380d1ef1f146a1d575de7c9eb Mon Sep 17 00:00:00 2001
From: xiazhengtongxue <133085197+xiazhengtongxue@users.noreply.github.com>
Date: 星期一, 16 三月 2026 15:10:21 +0800
Subject: [PATCH] fix: 修复前端页面
---
项目代码/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue | 34 ++-
项目代码/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue | 67 +++-----
项目代码/WMS/WIDESEA_WMSClient/src/views/Index.vue | 4
项目代码/WMS/WIDESEA_WMSClient/src/views/Login.vue | 2
项目代码/WMS/WIDESEA_WMSClient/src/views/system/txt_log.vue | 251 +++++++++++++++++++++++++++++-
项目代码/WMS/WIDESEA_WMSClient/src/views/basic/warehouse.vue | 2
项目代码/WMS/WIDESEA_WMSClient/config/buttons.js | 4
项目代码/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue | 109 +++++--------
8 files changed, 330 insertions(+), 143 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/config/buttons.js" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/config/buttons.js"
index 058c2fc..db7fccd 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/config/buttons.js"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/config/buttons.js"
@@ -110,7 +110,7 @@
}
},
{
- name: "鎵� 鍔� 瀹� 鎴�",
+ name: "鎵嬪姩瀹屾垚",
icon: '',
class: '',
value: 'TaskHandCompleted',
@@ -118,7 +118,7 @@
}
},
{
- name: "鍙� 娑� 浠� 鍔�",
+ name: "鎵嬪姩鍙栨秷",
icon: '',
class: '',
value: 'TaskHandCancel',
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Index.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Index.vue"
index a087196..7a72da7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Index.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Index.vue"
@@ -326,7 +326,7 @@
const createSocket = (url) => {
// 鍒涘缓WebSocket杩炴帴
- //"ws://127.0.0.1:9295/admin"
+ // url = "ws://127.0.0.1:9296";
client = new WebSocket(url);
client.onopen = function () {
@@ -606,7 +606,7 @@
}
}
- createSocket("ws://127.0.0.1:9296/" + _userInfo.userName);
+ // createSocket("ws://172.18.195.201:9296/" + _userInfo.userName);
Object.assign(_config.$tabs, { open: open, close: close });
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Login.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Login.vue"
index d303005..ed40497 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Login.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/Login.vue"
@@ -117,7 +117,7 @@
const loading = ref(false);
const codeImgSrc = ref("");
const userInfo = reactive({
- userName: "admin",
+ userName: "sanyang",
password: "123456",
verificationCode: "1234",
UUID: undefined,
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/basic/warehouse.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/basic/warehouse.vue"
index f8daef8..365835c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/basic/warehouse.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/basic/warehouse.vue"
@@ -69,7 +69,7 @@
title: "浠撳簱鐘舵��",
field: "warehouseStatus",
type: "select",
- dataKey: "enableEnum",
+ dataKey: "enableStatusEnum",
data: [],
},
],
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
index fef8c19..8ab357a 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/stock/stockInfo.vue"
@@ -27,31 +27,33 @@
sortName: "id",
});
const editFormFields = ref({
- deviceCode: "",
- deviceName: "",
- deviceType: "",
- deviceStatus: "",
- deviceIp: "",
- devicePort: "",
- devicePlcType: "",
- deviceRemark: "",
+ palletCode: "",
+ locationCode: "",
+ stockStatus: "",
+ palletType: "",
+ warehouseId: "",
+ roadway: "",
+
});
const editFormOptions = ref([
[
{field:'palletCode',title:'鎵樼洏缂栧彿',type:'string'},
{field:'locationCode',title:'璐т綅缂栧彿',type:'string'},
+ {field: "stockStatus",title:'搴撳瓨鐘舵��',type:'select',dataKey:'stockStatusEmun',data:[]}
]
]);
const searchFormFields = ref({
palletCode: "",
locationCode: "",
- roadway:""
+ roadway: "",
+ warehouseId: "",
});
const searchFormOptions = ref([
[
- { title: "鎵樼洏缂栧彿", field: "palletCode" ,type:'string'},
- { title: "璐т綅缂栧彿", field: "locationCode",type:'string' },
+ { title: "鎵樼洏缂栧彿", field: "palletCode" ,type:'like'},
+ { title: "璐т綅缂栧彿", field: "locationCode",type:'like' },
{ title: "宸烽亾缂栧彿", field: "roadway",type:'string' },
+ { title: "浠撳簱", field: "warehouseId",type:'select', dataKey: "warehousetype", data: [] }
],
]);
const columns = ref([
@@ -97,9 +99,15 @@
title: "鎵樼洏绫诲瀷",
type: "string",
width: 150,
- align: "left",
+ align: "center",
sort:true,
- bind: { key: "palltype", data: [] },
+ formatter: (row) => {
+ if (row.warehouseId === 2) {
+ return "鎴愬搧";
+ } else {
+ return row.palletType == 1 ? "甯冩枡" : "鏉惧竷鏂�";
+ }
+ }
},{
field: "stockStatus",
title: "搴撳瓨鐘舵��",
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/system/txt_log.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/system/txt_log.vue"
index 0c2ccba..14ae389 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/system/txt_log.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/system/txt_log.vue"
@@ -2,16 +2,21 @@
<div class="mian_log">
<div class="log_tree">
<div class="log_search">
- <el-input v-model.lazy="filterText" placeholder="璇疯緭鍏ユ煡璇㈠叧閿瓧" clearable />
+ <el-input v-model.lazy="filterText" placeholder="璇疯緭鍏ョ洰褰曞悕绉�" clearable />
<el-button type="success" @click="ReloadTree()">鍒� 鏂�</el-button>
</div>
- <el-tree class="log_el_tree" ref="treeRef" :data="treeData" :props="treeProps" :filter-node-method="treeFilter">
+ <!-- 娣诲姞鏍戣妭鐐规悳绱㈢粨鏋滄彁绀� -->
+ <div class="search-tip" v-if="filterText && filteredCount !== null">
+ 鎵惧埌 {{ filteredCount }} 涓尮閰嶇殑鐩綍
+ </div>
+ <el-tree class="log_el_tree" ref="treeRef" :data="treeData" :props="treeProps"
+ :filter-node-method="treeFilter" node-key="dirPath" highlight-current>
<template #default="{ node, data }">
<div class="treeItem">
- <div>{{ node.label }}</div>
+ <!-- 楂樹寒鍖归厤鐨勫叧閿瓧 -->
+ <div v-html="highlightText(node.label)"></div>
<div style="padding-left: 10px;" v-if="isFile(data)">
<a href="javascript:;" @click="GetContent(data)"> 鎵撳紑 </a>
- <!-- ||<a href="javascript:;" @click="DonwLog(data)"> 涓嬭浇 </a> -->
</div>
</div>
</template>
@@ -27,11 +32,26 @@
<el-checkbox v-model="keepRead">淇濇寔璇诲彇</el-checkbox>
</div>
+ <!-- 娣诲姞鍐呭鎼滅储鏍� -->
+ <div class="content-search" v-if="content">
+ <el-input v-model="contentSearchText" placeholder="鍦ㄦ棩蹇椾腑鎼滅储..." size="small" clearable
+ @keyup.enter="searchInContent" />
+ <el-button type="primary" size="small" @click="searchInContent">鎼滅储</el-button>
+ <span v-if="searchResults.length > 0" class="search-info">
+ {{ currentMatchIndex + 1 }}/{{ searchResults.length }}
+ </span>
+ <el-button v-if="searchResults.length > 0" type="info" size="small"
+ @click="prevMatch">涓婁竴澶�</el-button>
+ <el-button v-if="searchResults.length > 0" type="info" size="small"
+ @click="nextMatch">涓嬩竴澶�</el-button>
+ </div>
+
<div ref="pre" v-if="content">
<el-progress :percentage="percentage" @click="ChangePercent($event)" color="#f56c6c" />
</div>
- <div ref="showdata" @scroll="handleScroll($event)" style="white-space: pre-wrap;word-break: break-all">{{
- content }}</div>
+ <!-- 淇敼鍐呭鏄剧ず鍖哄煙锛屾敮鎸侀珮浜� -->
+ <div ref="showdata" @scroll="handleScroll($event)" class="content-display"
+ v-html="highlightContent"></div>
</div>
</div>
</template>
@@ -56,12 +76,21 @@
content: "",
isClick: false,
- keepReadTimer: null
+ keepReadTimer: null,
+
+ // 鏂板鎼滅储鐩稿叧灞炴��
+ contentSearchText: "",
+ searchResults: [],
+ currentMatchIndex: -1,
+ searchHighlights: [],
+ filteredCount: null,
+ originalContent: "", // 淇濆瓨鍘熷鍐呭鐢ㄤ簬鎼滅储
}
},
watch: {
filterText(val) {
this.$refs.treeRef.filter(val)
+ this.updateFilteredCount()
},
keepRead(val) {
if (val) {
@@ -75,9 +104,14 @@
this.percentage = 100;
this.http.post('/api/Sys_Log/GetLogData', parm).then((res) => {
this.content = res.data.content;
+ this.originalContent = res.data.content;
this.topStartPos = res.data.startIndex;
this.$nextTick(function () {
this.$refs.showdata.scrollTo(0, this.$refs.showdata.scrollHeight)
+ // 閲嶆柊搴旂敤鎼滅储楂樹寒
+ if (this.contentSearchText) {
+ this.searchInContent();
+ }
})
})
}
@@ -85,13 +119,159 @@
} else {
clearInterval(this.keepReadTimer);
}
+ },
+ content(newVal) {
+ this.originalContent = newVal;
+ if (this.contentSearchText) {
+ this.searchInContent();
+ } else {
+ this.clearHighlights();
+ }
+ }
+ },
+ computed: {
+ // 璁$畻楂樹寒鍚庣殑鍐呭
+ highlightContent() {
+ if (!this.content || !this.contentSearchText || this.searchResults.length === 0) {
+ return this.content;
+ }
+
+ let highlightedContent = this.content;
+ const searchText = this.contentSearchText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
+ const regex = new RegExp(`(${searchText})`, 'gi');
+
+ // 浣跨敤鍏ㄥ眬鏇挎崲娣诲姞楂樹寒鏍囪
+ highlightedContent = highlightedContent.replace(regex, (match, p1, offset) => {
+ // 妫�鏌ユ槸鍚﹀綋鍓嶅尮閰嶉」
+ const isCurrentMatch = this.searchResults.some((result, index) =>
+ result.index === offset && index === this.currentMatchIndex
+ );
+
+ if (isCurrentMatch) {
+ return `<span class="highlight-current">${match}</span>`;
+ } else {
+ return `<span class="highlight">${match}</span>`;
+ }
+ });
+
+ return highlightedContent;
}
},
methods: {
+ // 鏍戣妭鐐硅繃婊ゆ柟娉�
treeFilter(value, data) {
if (!value) return true
- return data.dirName.includes(value)
+ return data.dirName.toLowerCase().includes(value.toLowerCase())
},
+
+ // 鏇存柊杩囨护璁℃暟
+ updateFilteredCount() {
+ if (!this.filterText) {
+ this.filteredCount = null;
+ return;
+ }
+
+ // 閫掑綊璁$畻鍖归厤鐨勮妭鐐规暟
+ const countMatches = (nodes) => {
+ let count = 0;
+ for (const node of nodes) {
+ if (node.dirName.toLowerCase().includes(this.filterText.toLowerCase())) {
+ count++;
+ }
+ if (node.dirs && node.dirs.length) {
+ count += countMatches(node.dirs);
+ }
+ }
+ return count;
+ };
+
+ this.filteredCount = countMatches(this.treeData);
+ },
+
+ // 楂樹寒鏍戣妭鐐逛腑鐨勬枃鏈�
+ highlightText(text) {
+ if (!this.filterText || !text) return text;
+
+ const index = text.toLowerCase().indexOf(this.filterText.toLowerCase());
+ if (index === -1) return text;
+
+ const before = text.substring(0, index);
+ const match = text.substring(index, index + this.filterText.length);
+ const after = text.substring(index + this.filterText.length);
+
+ return `${before}<span class="highlight">${match}</span>${after}`;
+ },
+
+ // 鍦ㄥ唴瀹逛腑鎼滅储
+ searchInContent() {
+ if (!this.contentSearchText || !this.content) {
+ this.clearHighlights();
+ return;
+ }
+
+ const searchText = this.contentSearchText.toLowerCase();
+ const content = this.content;
+
+ // 鏌ユ壘鎵�鏈夊尮閰嶉」鐨勪綅缃�
+ const results = [];
+ let index = content.toLowerCase().indexOf(searchText);
+
+ while (index !== -1) {
+ results.push({
+ index: index,
+ length: this.contentSearchText.length
+ });
+ index = content.toLowerCase().indexOf(searchText, index + 1);
+ }
+
+ this.searchResults = results;
+
+ if (results.length > 0) {
+ this.currentMatchIndex = 0;
+ this.scrollToMatch(this.currentMatchIndex);
+ } else {
+ this.currentMatchIndex = -1;
+ this.$message.info('鏈壘鍒板尮閰嶅唴瀹�');
+ }
+ },
+
+ // 婊氬姩鍒版寚瀹氬尮閰嶉」
+ scrollToMatch(matchIndex) {
+ if (matchIndex < 0 || matchIndex >= this.searchResults.length) return;
+
+ const match = this.searchResults[matchIndex];
+ const preContent = this.content.substring(0, match.index);
+ const lines = preContent.split('\n');
+
+ // 浼拌婊氬姩浣嶇疆锛堢畝鍖栫増锛�
+ const lineHeight = 20; // 鍋囪姣忚楂樺害
+ const estimatedScrollTop = lines.length * lineHeight;
+
+ this.$nextTick(() => {
+ this.$refs.showdata.scrollTop = estimatedScrollTop - 100;
+ });
+ },
+
+ // 涓婁竴澶勫尮閰�
+ prevMatch() {
+ if (this.searchResults.length === 0) return;
+ this.currentMatchIndex = (this.currentMatchIndex - 1 + this.searchResults.length) % this.searchResults.length;
+ this.scrollToMatch(this.currentMatchIndex);
+ },
+
+ // 涓嬩竴澶勫尮閰�
+ nextMatch() {
+ if (this.searchResults.length === 0) return;
+ this.currentMatchIndex = (this.currentMatchIndex + 1) % this.searchResults.length;
+ this.scrollToMatch(this.currentMatchIndex);
+ },
+
+ // 娓呴櫎楂樹寒
+ clearHighlights() {
+ this.searchResults = [];
+ this.currentMatchIndex = -1;
+ },
+
isFile(data) {
if (data.dirPath) {
return data.dirPath.indexOf(".log") != -1 || data.dirPath.indexOf(".txt") != -1;
@@ -118,6 +298,7 @@
this.http.post('/api/Sys_Log/GetLogData', parm).then((res) => {
this.isClick = true;
this.content = res.data.content;
+ this.originalContent = res.data.content;
this.topStartPos = res.data.startIndex;
this.$nextTick(function () {
if (percent == 100) {
@@ -140,8 +321,12 @@
this.filePath = data.dirPath;
this.fileName = data.dirName;
this.percentage = parm.percent;
+ this.contentSearchText = ""; // 娓呯┖鎼滅储
+ this.clearHighlights();
+
this.http.post('/api/Sys_Log/GetLogData', parm).then((res) => {
this.content = res.data.content;
+ this.originalContent = res.data.content;
this.topStartPos = res.data.startIndex;
this.fileSize = res.data.len;
this.$nextTick(function () {
@@ -170,8 +355,13 @@
this.percentage = 0.1;
}
this.content = res.data.content + this.content;
+ this.originalContent = res.data.content + this.originalContent;
this.$nextTick(function () {
this.$refs.showdata.scrollTo(0, 1)
+ // 閲嶆柊鎼滅储
+ if (this.contentSearchText) {
+ this.searchInContent();
+ }
})
})
}
@@ -185,6 +375,7 @@
this.http.post("/api/Sys_Log/GetLogList", {}, "鍔犺浇鐩綍涓�︹��")
.then(res => {
this.treeData = res.data.dirs;
+ this.updateFilteredCount();
})
},
GetSize(size) {
@@ -233,12 +424,17 @@
margin-left: 5px;
}
+.search-tip {
+ font-size: 12px;
+ color: #909399;
+ padding: 5px 0;
+}
+
.log_el_tree {
width: 100%;
overflow-x: auto;
flex: 1;
}
-
.treeItem {
overflow-x: auto;
@@ -252,12 +448,10 @@
}
.treeItem::-webkit-scrollbar-thumb {
- /* 瀹氫箟婊氬姩鏉℃粦鍧楅鑹� */
background: #ccc;
}
.treeItem::-webkit-scrollbar-thumb:hover {
- /* 瀹氫箟婊氬姩鏉℃粦鍧楁偓鍋滈鑹� */
background: orange;
}
@@ -283,15 +477,46 @@
color: #bbb;
}
-.log_content>div:last-child {
+.content-search {
+ display: flex;
+ gap: 5px;
+ align-items: center;
+ padding: 10px 0;
+ border-bottom: 1px solid #eee;
+}
+
+.search-info {
+ font-size: 12px;
+ color: #666;
+ margin: 0 5px;
+}
+
+.content-display {
flex: 1;
overflow-y: scroll;
margin-top: 5px;
padding-top: 5px;
border-top: 1px solid black;
+ white-space: pre-wrap;
+ word-break: break-all;
}
a {
color: blue;
}
-</style>
+
+:deep(.highlight) {
+ background-color: #ffeb3b;
+ color: #000;
+ padding: 0;
+ border-radius: 2px;
+}
+
+:deep(.highlight-current) {
+ background-color: #ff9800;
+ color: #000;
+ padding: 0;
+ border-radius: 2px;
+ font-weight: bold;
+}
+</style>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
index e0109d2..16fdd2b 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/taskinfo/task.vue"
@@ -1,19 +1,10 @@
-
<template>
- <view-grid
- ref="grid"
- :columns="columns"
- :detail="detail"
- :editFormFields="editFormFields"
- :editFormOptions="editFormOptions"
- :searchFormFields="searchFormFields"
- :searchFormOptions="searchFormOptions"
- :table="table"
- :extend="extend"
- >
+ <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
+ :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
+ :table="table" :extend="extend">
</view-grid>
</template>
- <script>
+<script>
import extend from "@/extension/taskinfo/task.js";
import { ref, defineComponent } from "vue";
export default defineComponent({
@@ -38,12 +29,12 @@
nextAddress: "",
creater: "",
createDate: "",
- palletType:"",
- WarehouseId:"",
+ palletType: "",
+ WarehouseId: "",
});
const editFormOptions = ref([
[
- { title: "浠诲姟鐘舵��",field: "taskStatus",type: "select",dataKey: "taskStatusEnum",data: [],},
+ { title: "浠诲姟鐘舵��", field: "taskStatus", type: "select", dataKey: "taskStatusEnum", data: [], },
],
[
{ title: "璧峰鍦板潃", field: "sourceAddress", type: "string" },
@@ -55,6 +46,7 @@
]
]);
const searchFormFields = ref({
+ taskId: "",
taskNum: "",
palletCode: "",
roadway: "",
@@ -64,24 +56,23 @@
targetAddress: "",
currentAddress: "",
nextAddress: "",
- creater: "",
createDate: "",
});
const searchFormOptions = ref([
[
- { title: "浠诲姟鍙�", field: "taskNum", type: "int" },
+ { title: "浠诲姟鍙�", field: "taskId", type: "int" },
+ { title: "MES鍙�", field: "taskNum", type: "like" },
{ title: "鎵樼洏缂栧彿", field: "palletCode", type: "like" },
- { title: "鍒涘缓浜�", field: "creater", type: "like" },
],
[
- { title: "浠诲姟绫诲瀷",field: "taskType",type: "selectList",dataKey: "taskType",data: [],},
- { title: "浠诲姟鐘舵��",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],},
+ { title: "浠诲姟绫诲瀷", field: "taskType", type: "selectList", dataKey: "taskTypeEnum", data: [], },
+ { title: "浠诲姟鐘舵��", field: "taskStatus", type: "selectList", dataKey: "taskStatusEnum", data: [], },
{ title: "宸烽亾鍙�", field: "roadway", type: "like" },
],
[
{ title: "璧峰鍦板潃", field: "sourceAddress", type: "like" },
{ title: "鐩爣鍦板潃", field: "targetAddress", type: "like" },
- { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
+ { title: "浠撳簱", field: "warehouseId", type: "selectList", dataKey: "warehouseEnum", data: [], },
],
]);
const columns = ref([
@@ -111,8 +102,14 @@
title: "鎵樼洏绫诲瀷",
type: "string",
width: 80,
- align: "left",
- bind: { key: "taskpalltype", data: [] },
+ align: "center",
+ formatter: (row) => {
+ if (row.warehouseId === 2) {
+ return "鎴愬搧";
+ } else {
+ return row.palletType == 1 ? "甯冩枡" : "鏉惧竷鏂�";
+ }
+ }
},
{
field: "roadway",
@@ -120,7 +117,7 @@
type: "string",
width: 70,
align: "left",
- },{
+ }, {
field: "warehouseId",
title: "浠撳簱缂栧彿",
type: "int",
@@ -173,13 +170,6 @@
align: "left",
},
{
- field: "numberSsuances",
- title: "寮傚父娆℃暟",
- type: "string",
- width: 100,
- align: "left",
- },
- {
field: "remark",
title: "澶囨敞",
type: "string",
@@ -198,14 +188,6 @@
title: "浠诲姟涓嬪彂鏃堕棿",
type: "datetime",
width: 160,
- align: "left",
- hidden:true,
- },
- {
- field: "wMSId",
- title: "WMS浠诲姟涓婚敭",
- type: "int",
- width: 120,
align: "left",
hidden: true,
},
@@ -237,7 +219,7 @@
width: 160,
align: "left",
},
-
+
]);
const detail = ref({
cnName: "#detailCnName",
@@ -257,5 +239,4 @@
};
},
});
-</script>
-
\ No newline at end of file
+</script>
\ No newline at end of file
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
index c7ccdd7..29b59d7 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSClient/src/views/taskinfo/task_hty.vue"
@@ -1,23 +1,22 @@
-
<template>
- <view-grid
- ref="grid"
- :columns="columns"
- :detail="detail"
- :editFormFields="editFormFields"
- :editFormOptions="editFormOptions"
- :searchFormFields="searchFormFields"
- :searchFormOptions="searchFormOptions"
- :table="table"
- :extend="extend"
- >
+ <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields"
+ :editFormOptions="editFormOptions" :searchFormFields="searchFormFields" :searchFormOptions="searchFormOptions"
+ :table="table" :extend="extend">
</view-grid>
</template>
- <script>
+<script>
import extend from "@/extension/taskinfo/task_hty.js";
-import { ref, defineComponent } from "vue";
+import { ref, defineComponent, computed } from "vue";
export default defineComponent({
setup() {
+ const getPalletTypeLabel = (warehouseId, palletType) => {
+ if (warehouseId === 2) {
+ return "鎴愬搧";
+ } else {
+ return palletType === 1 ? "甯冩枡" : "鏉惧竷鏂�";
+ }
+ };
+
const table = ref({
key: "taskId",
footer: "Foots",
@@ -26,9 +25,12 @@
url: "/Task_Hty/",
sortName: "taskId",
});
+
const editFormFields = ref({});
const editFormOptions = ref([]);
+
const searchFormFields = ref({
+ sourceId: "",
taskNum: "",
palletCode: "",
roadway: "",
@@ -38,26 +40,34 @@
targetAddress: "",
currentAddress: "",
nextAddress: "",
+ createDate: "",
+ warehouseId: "",
creater: "",
createDate: "",
});
+
const searchFormOptions = ref([
- [
- { title: "浠诲姟鍙�", field: "taskNum", type: "int" },
+ [
+ { title: "浠诲姟鍙�", field: "sourceId", type: "int" },
+ { title: "MES鍙�", field: "taskNum", type: "like" },
{ title: "鎵樼洏缂栧彿", field: "palletCode", type: "like" },
- { title: "鍒涘缓浜�", field: "creater", type: "like" },
],
[
- { title: "浠诲姟绫诲瀷",field: "taskType",type: "selectList",dataKey: "taskType",data: [],},
- { title: "浠诲姟鐘舵��",field: "taskStatus",type: "selectList",dataKey: "taskStatusEnum",data: [],},
+ { title: "浠诲姟绫诲瀷", field: "taskType", type: "selectList", dataKey: "taskTypeEnum", data: [], },
+ { title: "浠诲姟鐘舵��", field: "taskStatus", type: "selectList", dataKey: "taskStatusEnum", data: [], },
{ title: "宸烽亾鍙�", field: "roadway", type: "like" },
],
[
{ title: "璧峰鍦板潃", field: "sourceAddress", type: "like" },
{ title: "鐩爣鍦板潃", field: "targetAddress", type: "like" },
- { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
+ { title: "浠撳簱", field: "warehouseId", type: "selectList", dataKey: "warehouseEnum", data: [], },
],
+ [
+ { title: "鍒涘缓浜�", field: "creater", type: "like" },
+ { title: "鍒涘缓鏃堕棿", field: "createDate", type: "datetime" },
+ ]
]);
+
const columns = ref([
{
field: "taskId",
@@ -93,8 +103,14 @@
title: "鎵樼洏绫诲瀷",
type: "string",
width: 80,
- align: "left",
- bind: { key: "taskhtypalltype", data: [] },
+ align: "center",
+ formatter: (row) => {
+ if (row.warehouseId === 2) {
+ return "鎴愬搧";
+ } else {
+ return row.palletType == 1 ? "甯冩枡" : "鏉惧竷鏂�";
+ }
+ }
},
{
field: "warehouseId",
@@ -156,49 +172,20 @@
align: "left",
},
{
- field: "numberSsuances",
- title: "寮傚父娆℃暟",
- type: "string",
- width: 100,
- align: "left",
- },
- {
field: "remark",
title: "澶囨敞",
type: "string",
width: 100,
align: "left",
},
- // {
- // field: "grade",
- // title: "浼樺厛绾�",
- // type: "int",
- // width: 80,
- // align: "left",
- // },
{
field: "dispatchertime",
title: "浠诲姟涓嬪彂鏃堕棿",
type: "datetime",
width: 160,
align: "left",
- hidden:true,
- },
- {
- field: "wMSId",
- title: "WMS浠诲姟涓婚敭",
- type: "int",
- width: 120,
- align: "left",
hidden: true,
},
- // {
- // field: "creater",
- // title: "鍒涘缓浜�",
- // type: "string",
- // width: 90,
- // align: "left",
- // },
{
field: "createDate",
title: "鍒涘缓鏃堕棿",
@@ -206,28 +193,15 @@
width: 160,
align: "left",
},
- // {
- // field: "modifier",
- // title: "淇敼浜�",
- // type: "string",
- // width: 100,
- // align: "left",
- // },
- // {
- // field: "modifyDate",
- // title: "淇敼鏃堕棿",
- // type: "datetime",
- // width: 160,
- // align: "left",
- // },
-
]);
+
const detail = ref({
cnName: "#detailCnName",
table: "",
columns: [],
sortName: "",
});
+
return {
table,
extend,
@@ -240,5 +214,4 @@
};
},
});
-</script>
-
\ No newline at end of file
+</script>
\ No newline at end of file
--
Gitblit v1.9.3