From 28f1259ec675a191d2a852f74566400e6cc40b50 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期三, 11 九月 2024 17:03:11 +0800
Subject: [PATCH] 前端问题改动,与代码优化
---
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskRepository/Task/ITaskExecuteDetailRepository.cs | 7
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs | 24
Code Management/WMS/WIDESEA_WMSClient/src/views/system/UserInfo.vue | 8
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/Location/ILocationStatusChangeRecordRepository.cs | 10
Code Management/WMS/WIDESEA_WMSClient/src/views/Login.vue | 18
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/Dt_LocationInfo.vue | 26
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/StatusChangeType/StatusChangeTypeEnum.cs | 25 +
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs | 24
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskRepository/Task/TaskExecuteDetailRepository.cs | 7
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Location/LocationChangeRecordDto.cs | 35 +
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/LocationStatusChange.vue | 4
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Location/LocationStatusChangeRecordRepository.cs | 24
Code Management/WMS/WIDESEA_WMSClient/src/components/basic/VolTable.vue | 851 +++++++++++++----------------------
Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs | 26
Code Management/WMS/WIDESEA_WMSClient/src/views/Index.vue | 175 ++-----
Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/Dt_LocationInfo.jsx | 31 +
Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/demo_Product/LocationChange.vue | 137 +++++
17 files changed, 718 insertions(+), 714 deletions(-)
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/components/basic/VolTable.vue b/Code Management/WMS/WIDESEA_WMSClient/src/components/basic/VolTable.vue
index 8c89b91..72dc314 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/components/basic/VolTable.vue
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/components/basic/VolTable.vue
@@ -1,333 +1,171 @@
<template>
<!-- 2021.11.18绉婚櫎voltable鏂规硶@cell-mouse-leave="rowEndEdit" -->
- <div
- class="vol-table"
- :class="[
- textInline ? 'text-inline' : '',
- fxRight ? 'fx-right' : '',
- isChrome ? 'chrome' : '',
- smallCell?'small-table':''
- ]"
- >
+ <div class="vol-table" :class="[
+ textInline ? 'text-inline' : '',
+ fxRight ? 'fx-right' : '',
+ isChrome ? 'chrome' : '',
+ smallCell ? 'small-table' : ''
+ ]">
<div class="mask" v-show="loading"></div>
<div class="message" v-show="loading">鍔犺浇涓�.....</div>
- <el-table
- :show-summary="summary"
- :summary-method="getSummaryData"
- :row-key="rowKey"
- :key="randomTableKey"
- :lazy="lazy"
- :defaultExpandAll="defaultExpandAll"
- :expand-row-keys="rowKey ? expandRowKeys : undefined"
- stripe
- :load="loadTreeChildren"
- @select="userSelect"
- @select-all="userSelect"
- @selection-change="selectionChange"
- @row-dblclick="rowDbClick"
- @row-click="rowClick"
- @header-click="headerClick"
- :highlight-current-row="highlightCurrentRow"
- ref="table"
- class="v-table"
- @sort-change="sortChange"
- tooltip-effect="dark"
- :height="realHeight"
- :max-height="realMaxHeight"
- :data="url ? rowData : tableData"
- border
- :row-class-name="initIndex"
- :cell-style="getCellStyle"
- style="width: 100%"
- :scrollbar-always-on="true"
- :span-method="cellSpanMethod"
- @expand-change="expandChange"
- >
- <el-table-column
- v-if="columnIndex"
- type="index"
- :fixed="fixed"
- width="55"
- ></el-table-column>
- <el-table-column
- v-if="ck"
- type="selection"
- :fixed="fixed"
- :selectable="selectable"
- width="55"
- ></el-table-column>
+ <el-table :show-summary="summary" :summary-method="getSummaryData" :row-key="rowKey" :key="randomTableKey"
+ :lazy="lazy" :defaultExpandAll="defaultExpandAll" :expand-row-keys="rowKey ? expandRowKeys : undefined" stripe
+ :load="loadTreeChildren" @select="userSelect" @select-all="userSelect" @selection-change="selectionChange"
+ @row-dblclick="rowDbClick" @row-click="rowClick" @header-click="headerClick"
+ :highlight-current-row="highlightCurrentRow" ref="table" class="v-table" @sort-change="sortChange"
+ tooltip-effect="dark" :height="realHeight" :max-height="realMaxHeight" :data="url ? rowData : tableData" border
+ :row-class-name="initIndex" :cell-style="getCellStyle" style="width: 100%" :scrollbar-always-on="true"
+ :span-method="cellSpanMethod" @expand-change="expandChange">
+ <el-table-column v-if="columnIndex" type="index" :fixed="fixed" width="55"></el-table-column>
+ <el-table-column v-if="ck" type="selection" :fixed="fixed" :selectable="selectable" width="55"></el-table-column>
<!-- 2020.10.10绉婚櫎table绗竴琛屽己鍒舵帓搴� -->
- <el-table-column
- v-for="(column, cindex) in filterColumns"
- :prop="column.field"
- :label="column.title"
- :min-width="column.width"
- :formatter="formatter"
- :fixed="column.fixed"
- :key="column.field + cindex"
- :align="column.align"
- :sortable="column.sort ? 'custom' : false"
- :show-overflow-tooltip="column.showOverflowTooltip"
- >
+ <el-table-column v-for="(column, cindex) in filterColumns" :prop="column.field" :label="column.title"
+ :min-width="column.width" :formatter="formatter" :fixed="column.fixed" :key="column.field + cindex"
+ :align="column.align" :sortable="column.sort ? 'custom' : false"
+ :show-overflow-tooltip="column.showOverflowTooltip">
<template #header>
- <span
- v-if="(column.require || column.required) && column.edit"
- class="column-required"
- >*</span
- >{{ column.title }}
+ <span v-if="(column.require || column.required) && column.edit" class="column-required">*</span>{{
+ column.title }}
</template>
<template #default="scope">
<!-- 2022.01.08澧炲姞澶氳〃澶达紝鐜板湪鍙敮鎸佸父鐢ㄥ姛鑳芥覆鏌擄紝涓嶆敮鎸佺紪杈戝姛鑳�(娑夊強鍒扮粍浠堕噸鍐�) -->
- <el-table-column
- style="border: none"
- v-for="columnChildren in filterChildrenColumn(column.children)"
- :key="columnChildren.field"
- :min-width="columnChildren.width"
- :class-name="columnChildren.class"
- :prop="columnChildren.field"
- :align="columnChildren.align"
- :label="columnChildren.title"
- >
+ <el-table-column style="border: none" v-for="columnChildren in filterChildrenColumn(column.children)"
+ :key="columnChildren.field" :min-width="columnChildren.width" :class-name="columnChildren.class"
+ :prop="columnChildren.field" :align="columnChildren.align" :label="columnChildren.title">
<template #default="scopeChildren">
- <a
- href="javascript:void(0);"
- style="text-decoration: none"
- @click="link(scopeChildren.row, columnChildren, $event)"
- v-if="columnChildren.link"
- v-text="scopeChildren.row[columnChildren.field]"
- ></a>
- <table-render
- v-else-if="columnChildren.render && typeof columnChildren.render == 'function'"
- :row="scopeChildren.row"
- key="rd-01"
- :index="scope.$index"
- :column="columnChildren"
- :render="columnChildren.render"
- ></table-render>
- <div
- v-else-if="columnChildren.formatter"
- @click="
- columnChildren.click &&
- columnChildren.click(
- scopeChildren.row,
- columnChildren,
- scopeChildren.$index
- )
- "
- v-html="
- columnChildren.formatter(
- scopeChildren.row,
- columnChildren,
- scopeChildren.$index
- )
- "
- ></div>
+ <a href="javascript:void(0);" style="text-decoration: none"
+ @click="link(scopeChildren.row, columnChildren, $event)" v-if="columnChildren.link"
+ v-text="scopeChildren.row[columnChildren.field]"></a>
+ <table-render v-else-if="columnChildren.render && typeof columnChildren.render == 'function'"
+ :row="scopeChildren.row" key="rd-01" :index="scope.$index" :column="columnChildren"
+ :render="columnChildren.render"></table-render>
+ <div v-else-if="columnChildren.formatter" @click="
+ columnChildren.click &&
+ columnChildren.click(
+ scopeChildren.row,
+ columnChildren,
+ scopeChildren.$index
+ )
+ " v-html="columnChildren.formatter(
+ scopeChildren.row,
+ columnChildren,
+ scopeChildren.$index
+ )
+ "></div>
<div v-else-if="columnChildren.bind">
{{ formatter(scopeChildren.row, columnChildren, true) }}
</div>
<span v-else-if="columnChildren.type == 'date'">{{
formatterDate(scopeChildren.row, columnChildren)
- }}</span>
+ }}</span>
<template v-else>
{{ scopeChildren.row[columnChildren.field] }}
</template>
</template>
</el-table-column>
<!-- 2020.06.18澧炲姞render娓叉煋鑷畾涔夊唴瀹� -->
- <table-render
- v-if="column.render && typeof column.render == 'function'"
- :row="scope.row"
- key="rd-01"
- :index="scope.$index"
- :column="column"
- :render="column.render"
- ></table-render>
+ <table-render v-if="column.render && typeof column.render == 'function'" :row="scope.row" key="rd-01"
+ :index="scope.$index" :column="column" :render="column.render"></table-render>
<!-- 鍚敤鍙屽嚮缂栬緫鍔熻兘锛屽甫缂栬緫鍔熻兘鐨勪笉浼氭覆鏌撲笅鎷夋鏂囨湰鑳屾櫙棰滆壊 -->
<!-- @click="rowBeginEdit(scope.$index,cindex)" -->
<!-- 2021.09.21澧炲姞缂栬緫鏃跺readonly灞炴�у垽鏂� -->
- <template v-else-if="column.edit&&!column.readonly&&['file', 'img','excel'].indexOf(column.edit.type) != -1" >
- <div style="display:flex;align-items: center;" @click.stop>
- <i v-if="!column.showUpload||column.showUpload(scope.row, column)"
- style="padding: 3px;margin-right: 10px;color:#8f9293;cursor: pointer;"
- @click="showUpload(scope.row, column)" class="el-icon-upload"></i>
- <template v-if="column.edit.type == 'img'">
- <img
- v-for="(file, imgIndex) in getFilePath(
- scope.row[column.field],
- column
- )"
- :key="imgIndex"
- @error="handleImageError"
- @click="viewImg(scope.row, column, file.path, $event,imgIndex)"
- class="table-img"
- :src="file.path"
- />
- </template>
- <a
- style="margin-right: 8px"
- v-else
- class="t-file"
- v-for="(file, fIndex) in getFilePath(
- scope.row[column.field],
- column
- )"
- :key="fIndex"
- @click="dowloadFile(file)"
- >{{ file.name }}</a
- >
- </div>
+ <template v-else-if="column.edit && !column.readonly && ['file', 'img', 'excel'].indexOf(column.edit.type) != -1">
+ <div style="display:flex;align-items: center;" @click.stop>
+ <i v-if="!column.showUpload || column.showUpload(scope.row, column)"
+ style="padding: 3px;margin-right: 10px;color:#8f9293;cursor: pointer;"
+ @click="showUpload(scope.row, column)" class="el-icon-upload"></i>
+ <template v-if="column.edit.type == 'img'">
+ <img v-for="(file, imgIndex) in getFilePath(
+ scope.row[column.field],
+ column
+ )" :key="imgIndex" @error="handleImageError"
+ @click="viewImg(scope.row, column, file.path, $event, imgIndex)" class="table-img" :src="file.path" />
+ </template>
+ <a style="margin-right: 8px" v-else class="t-file" v-for="(file, fIndex) in getFilePath(
+ scope.row[column.field],
+ column
+ )" :key="fIndex" @click="dowloadFile(file)">{{ file.name }}</a>
+ </div>
</template>
- <div
- v-else-if="
- column.edit &&
- !column.readonly &&
- (column.edit.keep || edit.rowIndex == scope.$index)
- "
- class="edit-el"
- >
+ <div v-else-if="
+ column.edit &&
+ !column.readonly &&
+ (column.edit.keep || edit.rowIndex == scope.$index)
+ " class="edit-el">
<div @click.stop class="e-item">
<div>
<!-- 2020.07.24澧炲姞鏃ユ湡onChange浜嬩欢 -->
- <el-date-picker
- clearable
- size="default"
- style="width: 100%"
- v-if="['date', 'datetime'].indexOf(column.edit.type) != -1"
- v-model="scope.row[column.field]"
- @change="
- (val) => {
+ <el-date-picker clearable size="default" style="width: 100%"
+ v-if="['date', 'datetime'].indexOf(column.edit.type) != -1" v-model="scope.row[column.field]" @change="(val) => {
column.onChange &&
column.onChange(scope.row, column, val);
}
- "
- :type="column.edit.type"
- :placeholder="column.placeholder || column.title"
- :disabledDate="(val) => getDateOptions(val, column)"
- :value-format="getDateFormat(column)"
- :disabled="initColumnDisabled(scope.row, column)"
- >
+ " :type="column.edit.type" :placeholder="column.placeholder || column.title"
+ :disabledDate="(val) => getDateOptions(val, column)" :value-format="getDateFormat(column)"
+ :disabled="initColumnDisabled(scope.row, column)">
</el-date-picker>
- <el-time-picker
- clearable
- size="default"
- style="width: 100%"
- v-else-if="column.edit.type == 'time'"
- v-model="scope.row[column.field]"
- @change="
- (val) => {
+ <el-time-picker clearable size="default" style="width: 100%" v-else-if="column.edit.type == 'time'"
+ v-model="scope.row[column.field]" @change="(val) => {
column.onChange &&
column.onChange(scope.row, column, val);
}
- "
- :placeholder="column.placeholder || column.title"
- :value-format="column.format || 'HH:mm:ss'"
- :disabled="initColumnDisabled(scope.row, column)"
- >
+ " :placeholder="column.placeholder || column.title" :value-format="column.format || 'HH:mm:ss'"
+ :disabled="initColumnDisabled(scope.row, column)">
</el-time-picker>
- <el-switch
- v-else-if="column.edit.type == 'switch'"
- v-model="scope.row[column.field]"
- active-color="#0f84ff"
- inactive-color="rgb(194 194 194)"
- active-text="鏄�"
- inactive-text="鍚�"
- inline-prompt
-
- @change="
- (val) => {
+ <el-switch v-else-if="column.edit.type == 'switch'" v-model="scope.row[column.field]"
+ active-color="#0f84ff" inactive-color="rgb(194 194 194)" active-text="鏄�" inactive-text="鍚�"
+ inline-prompt @change="(val) => {
switchChange(val, scope.row, column);
}
- "
- :active-value="
- typeof scope.row[column.field] == 'boolean'
+ " :active-value="typeof scope.row[column.field] == 'boolean'
? true
: typeof scope.row[column.field] == 'string'
- ? '1'
- : 1
- "
- :inactive-value="
- typeof scope.row[column.field] == 'boolean'
+ ? '1'
+ : 1
+ " :inactive-value="typeof scope.row[column.field] == 'boolean'
? false
: typeof scope.row[column.field] == 'string'
- ? '0'
- : 0
- "
- :disabled="initColumnDisabled(scope.row, column)"
- >
+ ? '0'
+ : 0
+ " :disabled="initColumnDisabled(scope.row, column)">
</el-switch>
- <template
- v-else-if="
- ['select', 'selectList'].indexOf(column.edit.type) != -1
- "
- >
- <el-select-v2
- style="width: 100%"
- :size="size"
- v-if="column.bind.data.length >= select2Count"
- v-model="scope.row[column.field]"
- filterable
- :multiple="column.edit.type == 'select' ? false : true"
- :placeholder="column.placeholder || column.title"
- :autocomplete="column.autocomplete"
- :options="column.bind.data"
- @change="
+ <template v-else-if="
+ ['select', 'selectList'].indexOf(column.edit.type) != -1
+ ">
+ <el-select-v2 style="width: 100%" :size="size" v-if="column.bind.data.length >= select2Count"
+ v-model="scope.row[column.field]" filterable :multiple="column.edit.type == 'select' ? false : true"
+ :placeholder="column.placeholder || column.title" :autocomplete="column.autocomplete"
+ :options="column.bind.data" @change="
column.onChange && column.onChange(scope.row, column)
- "
- clearable
- :disabled="initColumnDisabled(scope.row, column)"
- >
+ " clearable :disabled="initColumnDisabled(scope.row, column)">
<template #default="{ item }">
{{ item.label }}
</template>
</el-select-v2>
- <el-select
- size="default"
- style="width: 100%"
- v-else
- v-model="scope.row[column.field]"
- :filterable="
- column.filter || column.bind.data.length > 10
- ? true
- : false
- "
- :multiple="column.edit.type == 'select' ? false : true"
- :placeholder="column.placeholder || column.title"
- :allow-create="column.autocomplete"
- @change="
+ <el-select size="default" style="width: 100%" v-else v-model="scope.row[column.field]" :filterable="column.filter || column.bind.data.length > 10
+ ? true
+ : false
+ " :multiple="column.edit.type == 'select' ? false : true"
+ :placeholder="column.placeholder || column.title" :allow-create="column.autocomplete" @change="
column.onChange && column.onChange(scope.row, column)
- "
- clearable
- :disabled="initColumnDisabled(scope.row, column)"
- >
- <el-option
- v-for="item in column.bind.data"
- :key="item.key"
- v-show="!item.hidden"
- :disabled="item.disabled"
- :label="item.value"
- :value="item.key"
- >{{ item.value }}
+ " clearable :disabled="initColumnDisabled(scope.row, column)">
+ <el-option v-for="item in column.bind.data" :key="item.key" v-show="!item.hidden"
+ :disabled="item.disabled" :label="item.value" :value="item.key">{{ item.value }}
</el-option>
</el-select>
</template>
- <el-tree-select
- style="width: 100%"
- v-else-if="column.edit.type == 'treeSelect'||column.edit.type == 'cascader'"
- v-model="scope.row[column.field]"
- :data="column.bind.data"
- :multiple="column.multiple===undefined?true:column.multiple"
- :render-after-expand="false"
- :show-checkbox="true"
- :check-strictly="column.checkStrictly===undefined?true:column.checkStrictly"
- check-on-click-node
- node-key="key"
- @change="column.onChange && column.onChange(scope.row, column)"
+ <el-tree-select style="width: 100%"
+ v-else-if="column.edit.type == 'treeSelect' || column.edit.type == 'cascader'"
+ v-model="scope.row[column.field]" :data="column.bind.data"
+ :multiple="column.multiple === undefined ? true : column.multiple" :render-after-expand="false"
+ :show-checkbox="true" :check-strictly="column.checkStrictly === undefined ? true : column.checkStrictly"
+ check-on-click-node node-key="key" @change="column.onChange && column.onChange(scope.row, column)"
:props="{ label: 'label' }">
- <template #default="{ data, node }">
- {{data.label}}</template>
+ <template #default="{ data, node }">
+ {{ data.label }}</template>
</el-tree-select>
<!-- <div v-else-if="column.edit.type == 'cascader'">4444444</div> -->
<!-- <el-cascader
@@ -342,41 +180,21 @@
@change="column.onChange && column.onChange(scope.row, column)"
>
</el-cascader> -->
- <el-input
- v-else-if="column.edit.type == 'textarea'"
- type="textarea"
- :placeholder="column.placeholder || column.title"
- v-model="scope.row[column.field]"
- :disabled="initColumnDisabled(scope.row, column)"
- >
+ <el-input v-else-if="column.edit.type == 'textarea'" type="textarea"
+ :placeholder="column.placeholder || column.title" v-model="scope.row[column.field]"
+ :disabled="initColumnDisabled(scope.row, column)">
</el-input>
- <input
- class="table-input"
- v-else-if="!column.summary && !column.onKeyPress"
- v-model.lazy="scope.row[column.field]"
- :placeholder="column.placeholder || column.title"
- :disabled="initColumnDisabled(scope.row, column)"
- />
- <el-input
- v-else
- @change="inputKeyPress(scope.row, column, $event)"
+ <input class="table-input" v-else-if="!column.summary && !column.onKeyPress"
+ v-model.lazy="scope.row[column.field]" :placeholder="column.placeholder || column.title"
+ :disabled="initColumnDisabled(scope.row, column)" />
+ <el-input v-else @change="inputKeyPress(scope.row, column, $event)"
@input="inputKeyPress(scope.row, column, $event)"
- @keyup.enter="inputKeyPress(scope.row, column, $event)"
- size="default"
- v-model="scope.row[column.field]"
- :placeholder="column.placeholder || column.title"
- :disabled="initColumnDisabled(scope.row, column)"
- ></el-input>
+ @keyup.enter="inputKeyPress(scope.row, column, $event)" size="default"
+ v-model="scope.row[column.field]" :placeholder="column.placeholder || column.title"
+ :disabled="initColumnDisabled(scope.row, column)"></el-input>
</div>
- <div
- class="extra"
- v-if="column.extra && edit.rowIndex == scope.$index"
- >
- <a
- :style="column.extra.style"
- style="text-decoration: none"
- @click="extraClick(scope.row, column)"
- >
+ <div class="extra" v-if="column.extra && edit.rowIndex == scope.$index">
+ <a :style="column.extra.style" style="text-decoration: none" @click="extraClick(scope.row, column)">
<i v-if="column.extra.icon" :class="[column.extra.icon]" />
{{ column.extra.text }}
</a>
@@ -385,78 +203,42 @@
</div>
<!--娌℃湁缂栬緫鍔熻兘鐨勭洿鎺ユ覆鏌撴爣绛�-->
<template v-else>
- <a
- href="javascript:void(0)"
- style="text-decoration: none;line-height: 1.3;"
- @click="link(scope.row, column, $event)"
- v-if="column.link"
- v-text="scope.row[column.field]"
- ></a>
- <img
- v-else-if="column.type == 'img'"
- v-for="(file, imgIndex) in getFilePath(
- scope.row[column.field],
- column
- )"
- :key="imgIndex"
- @error="handleImageError"
- @click="viewImg(scope.row, column, file.path, $event, imgIndex)"
- class="table-img"
- :src="file.path"
- />
- <a
- style="margin-right: 8px"
- v-else-if="column.type == 'file' || column.type == 'excel'"
- class="t-file"
+ <a href="javascript:void(0)" style="text-decoration: none;line-height: 1.3;"
+ @click="link(scope.row, column, $event)" v-if="column.link" v-text="scope.row[column.field]"></a>
+ <img v-else-if="column.type == 'img'" v-for="(file, imgIndex) in getFilePath(
+ scope.row[column.field],
+ column
+ )" :key="imgIndex" @error="handleImageError"
+ @click="viewImg(scope.row, column, file.path, $event, imgIndex)" class="table-img" :src="file.path" />
+ <a style="margin-right: 8px" v-else-if="column.type == 'file' || column.type == 'excel'" class="t-file"
v-for="(file, fIndex) in getFilePath(
scope.row[column.field],
column
- )"
- :key="fIndex"
- @click="dowloadFile(file)"
- >{{ file.name }}</a
- >
+ )" :key="fIndex" @click="dowloadFile(file)">{{ file.name }}</a>
<span v-else-if="column.type == 'date'">{{
formatterDate(scope.row, column)
- }}</span>
- <div
- v-else-if="column.formatter"
- @click="formatterClick(scope.row, column, $event)"
- v-html="column.formatter(scope.row, column)"
- ></div>
+ }}</span>
+ <div v-else-if="column.formatter" @click="formatterClick(scope.row, column, $event)"
+ v-html="column.formatter(scope.row, column)"></div>
<!-- 2021.11.18淇table鏁版嵁婧愯缃负normal鍚庣偣鍑昏$event缂哄け鐨勯棶棰� -->
- <div
- v-else-if="column.bind && (column.normal || column.edit)"
+ <div v-else-if="column.bind && (column.normal || column.edit)"
@click="formatterClick(scope.row, column, $event)"
- :style="column.getStyle && column.getStyle(scope.row, column)"
- >
+ :style="column.getStyle && column.getStyle(scope.row, column)">
{{ formatter(scope.row, column, true) }}
</div>
- <div
- v-else-if="column.click && !column.bind"
- @click="formatterClick(scope.row, column)"
- >
+ <div v-else-if="column.click && !column.bind" @click="formatterClick(scope.row, column)">
{{ scope.row[column.field] }}
</div>
- <div
- @click="
- () => {
- column.click && formatterClick(scope.row, column);
- }
- "
- v-else-if="column.bind"
- >
- <el-tag
- v-if="useTag"
- class="cell-tag"
- :class="[isEmptyTag(scope.row, column)]"
- :type="getColor(scope.row, column)"
- :effect="column.effect"
- >{{ formatter(scope.row, column, true) }}</el-tag
- >
+ <div @click="() => {
+ column.click && formatterClick(scope.row, column);
+ }
+ " v-else-if="column.bind">
+ <el-tag v-if="useTag" class="cell-tag" :class="[isEmptyTag(scope.row, column)]"
+ :type="getColor(scope.row, column)" :effect="column.effect">{{ formatter(scope.row, column, true)
+ }}</el-tag>
<template v-else>{{
formatter(scope.row, column, true)
- }}</template>
+ }}</template>
</div>
<span v-else>{{ formatter(scope.row, column, true) }}</span>
@@ -467,53 +249,29 @@
<template v-if="!paginationHide">
<div class="block pagination" key="pagination-01" style="display: flex">
<div style="flex: 1"></div>
- <el-pagination
- key="pagination-02"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="paginations.page"
- :page-sizes="paginations.sizes"
- :page-size="paginations.size"
- layout="total, sizes, prev, pager, next, jumper"
- :total="paginations.total"
- ></el-pagination>
+ <el-pagination key="pagination-02" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+ :current-page="paginations.page" :page-sizes="paginations.sizes" :page-size="paginations.size"
+ layout="total, sizes, prev, pager, next, jumper" :total="paginations.total"></el-pagination>
</div>
</template>
</div>
- <VolBox
- v-model="uploadModel"
- title="涓婁紶"
- :height="228"
- :width="500"
- :padding="15"
- lazy
- >
+ <VolBox v-model="uploadModel" title="涓婁紶" :height="228" :width="500" :padding="15" lazy>
<!-- 涓婁紶鍥剧墖銆乪xcel鎴栧叾浠栨枃浠躲�佹枃浠舵暟閲忋�佸ぇ灏忛檺鍒堕兘鍙互锛屽弬鐓olupload缁勪欢api -->
<div style="height: 200px;display: flex;align-items: center;">
- <VolUpload
- style="text-align: center; "
- :autoUpload="currentColumn.edit.autoUpload"
-
- :multiple="currentColumn.edit.multiple"
- :url="uploadUrl"
- :max-file="currentColumn.edit.maxFile"
- :img="currentColumn.edit.type == 'img'"
- :excel="currentColumn.edit.type == 'excel'"
- :fileTypes="currentColumn.edit.fileTypes ? currentColumn.edit.fileTypes : []"
- :fileInfo="fileInfo"
- :upload-after="uploadAfter"
- :upload-before="uploadBefore"
- :append="currentColumn.edit.accept"
- >
- <div>{{ currentColumn.message}}</div>
- </VolUpload>
+ <VolUpload style="text-align: center; " :autoUpload="currentColumn.edit.autoUpload"
+ :multiple="currentColumn.edit.multiple" :url="uploadUrl" :max-file="currentColumn.edit.maxFile"
+ :img="currentColumn.edit.type == 'img'" :excel="currentColumn.edit.type == 'excel'"
+ :fileTypes="currentColumn.edit.fileTypes ? currentColumn.edit.fileTypes : []" :fileInfo="fileInfo"
+ :upload-after="uploadAfter" :upload-before="uploadBefore" :append="currentColumn.edit.accept">
+ <div>{{ currentColumn.message }}</div>
+ </VolUpload>
</div>
<template #footer>
- <div style="text-align: center; ">
- <el-button type="default" size="small" @click="uploadModel=false">鍏抽棴</el-button >
- <el-button type="primary" size="small" @click="saveUpload" >淇濆瓨</el-button >
- </div>
+ <div style="text-align: center; ">
+ <el-button type="default" size="small" @click="uploadModel = false">鍏抽棴</el-button>
+ <el-button type="primary" size="small" @click="saveUpload">淇濆瓨</el-button>
+ </div>
</template>
</VolBox>
<vol-image-viewer ref="viewer"></vol-image-viewer>
@@ -521,9 +279,9 @@
<script>
import VolTableRender from './VolTable/VolTableRender';
let _errMsg;
-import { defineComponent,defineAsyncComponent } from 'vue';
+import { defineComponent, defineAsyncComponent } from 'vue';
export default defineComponent({
- emits:['loadBefore','loadAfter','rowChange', 'rowClick', 'rowDbClick', 'selectionChange'],
+ emits: ['loadBefore', 'loadAfter', 'rowChange', 'rowClick', 'rowDbClick', 'selectionChange'],
//https://github.com/element-plus/element-plus/issues/1483
//娌℃湁鍘熷厛鐨剆election灞炴�т簡锛岀湅issue涓婁娇鐢╯elect/selectall鑾峰彇
//鐩戝惉鏁扮粍闀垮害锛屽鏋滃垹闄や簡鏁版嵁锛岀幇鍦ㄥ彧鑳借杩竻闄ゆ墍鏈夐�変腑鐨勮
@@ -540,9 +298,9 @@
}
},
components: {
- 'vol-image-viewer':defineAsyncComponent(() => import("./VolImageViewer.vue")),
+ 'vol-image-viewer': defineAsyncComponent(() => import("./VolImageViewer.vue")),
'table-render': VolTableRender,
- VolUpload: defineAsyncComponent(() =>import("./VolUpload.vue") ),
+ VolUpload: defineAsyncComponent(() => import("./VolUpload.vue")),
VolBox: defineAsyncComponent(() => import("./VolBox.vue")),
},
props: {
@@ -555,9 +313,9 @@
// 鏍戝舰缁撴瀯鍔犺浇瀛愯妭鐐�
type: Function,
default: (tree, treeNode, resolve) => {
- if(resolve){
+ if (resolve) {
return resolve([]);
- }
+ }
}
},
textInline: {
@@ -586,13 +344,13 @@
},
linkView: {
type: Function,
- default: function() {
+ default: function () {
return 1;
}
},
pagination: {
type: Object,
- default: function() {
+ default: function () {
return { total: 0, size: 30, sortName: '' };
}
},
@@ -639,21 +397,21 @@
beginEdit: {
// 缂栬緫寮�濮�
type: Function,
- default: function(row, column, index) {
+ default: function (row, column, index) {
return true;
}
},
endEditBefore: {
// 缁撴潫缂栬緫鍓�
type: Function,
- default: function(row, column, index) {
+ default: function (row, column, index) {
return true;
}
},
endEditAfter: {
// 缁撴潫缂栬緫鍓�
type: Function,
- default: function(row, column, index) {
+ default: function (row, column, index) {
return true;
}
},
@@ -683,9 +441,9 @@
return true;
}
},
- spanMethod:{
+ spanMethod: {
type: Function,
- default: ({row,column,rowIndex, columnIndex}) => {
+ default: ({ row, column, rowIndex, columnIndex }) => {
}
},
lazy: { //鏍戝舰琛ㄦ牸鏄惁榛樿寤惰繜鍔犺浇
@@ -696,15 +454,15 @@
type: Boolean,
default: false
},
- expandRowKeys:{ //榛樿灞曞紑琛�
- type:Array,
- default:()=>{
+ expandRowKeys: { //榛樿灞曞紑琛�
+ type: Array,
+ default: () => {
return []
}
},
- rowParentField:{ //鏍戝舰琛ㄦ牸鐖剁骇id
- type:String,
- default:""
+ rowParentField: { //鏍戝舰琛ㄦ牸鐖剁骇id
+ type: String,
+ default: ""
}
},
data() {
@@ -718,14 +476,14 @@
realMaxHeight: 0,
enableEdit: false, // 鏄惁鍚〃鏍肩敤缂栬緫鍔熻兘
empty: this.allowEmpty ? '' : '--',
- defaultImg:new URL('@/assets/imgs/error-img.png', import.meta.url).href,
+ defaultImg: new URL('@/assets/imgs/error-img.png', import.meta.url).href,
loading: false,
footer: {},
total: 0,
formatConfig: {},
// defaultColor: "",
// 2020.09.06璋冩暣table鍒楁暟鎹簮鐨勮儗鏅鑹�
- colors:["primary", "success", "info", "warning", "danger"],// ["warning", "success", "danger", "info"],
+ colors: ["primary", "success", "info", "warning", "danger"],// ["warning", "success", "danger", "info"],
rule: {
phone: /^[1][3,4,5,6,7,8,9][0-9]{9}$/,
decimal: /(^[\-0-9][0-9]*(.[0-9]+)?)$/,
@@ -760,18 +518,18 @@
//vol-table甯︽暟鎹簮鐨勫崟鍏冩牸鏄惁鍚敤tag鏍囩(涓嬫媺妗嗙瓑鍗曞厓鏍间互tag鏍囩鏄剧ず)
//2023.04.02鏇存柊voltable涓巑ain.js
useTag: true,
- currentRow:{},
- currentColumn:[],
- fileInfo:[],
- uploadUrl:"",
- uploadModel:false,
- smallCell:true
+ currentRow: {},
+ currentColumn: [],
+ fileInfo: [],
+ uploadUrl: "",
+ uploadModel: false,
+ smallCell: true
};
},
created() {
try {
- this.useTag = this.$global.table&&this.$global.table.useTag;
- this.smallCell=this.$global.table&&this.$global.table.smallCell;
+ this.useTag = this.$global.table && this.$global.table.useTag;
+ this.smallCell = this.$global.table && this.$global.table.smallCell;
} catch (error) {
console.log(error.message);
}
@@ -812,7 +570,7 @@
}
this.initCellStyleColumns();
this.columns.forEach((x, _index) => {
-
+
if (!x.hidden) {
// this.summaryIndex[x.field] = _index;
// 2020.10.11淇姹傚拰鍒楅敊浣嶇殑闂
@@ -823,15 +581,15 @@
if (x.summary && !this.summary) {
this.summary = true;
}
- if (x.children&&Array.isArray(x.children)) {
- x.children.forEach(cl=>{
- if (cl.bind && cl.bind.key && (!cl.bind.data || cl.bind.data.length == 0)) {
- keys.push(cl.bind.key);
- cl.bind.valueType = cl.type;
- columnBind.push(cl.bind);
- }
- })
- }else if (x.bind && x.bind.key && (!x.bind.data || x.bind.data.length == 0)) {
+ if (x.children && Array.isArray(x.children)) {
+ x.children.forEach(cl => {
+ if (cl.bind && cl.bind.key && (!cl.bind.data || cl.bind.data.length == 0)) {
+ keys.push(cl.bind.key);
+ cl.bind.valueType = cl.type;
+ columnBind.push(cl.bind);
+ }
+ })
+ } else if (x.bind && x.bind.key && (!x.bind.data || x.bind.data.length == 0)) {
// 鍐欏叆杩滅▼
if (!x.bind.data) x.bind.data = [];
if (x.bind.remote) {
@@ -839,8 +597,8 @@
} else if (this.loadKey) {
keys.push(x.bind.key);
x.bind.valueType = x.type;
- if (x.edit&&x.edit.type) {
- x.bind.editType=x.edit.type
+ if (x.edit && x.edit.type) {
+ x.bind.editType = x.edit.type
}
columnBind.push(x.bind);
}
@@ -857,24 +615,24 @@
item.value = item.key;
});
}
- const arrType=['cascader','treeSelect'];
+ const arrType = ['cascader', 'treeSelect'];
columnBind.forEach((c) => {
- if ((arrType.indexOf(c.valueType)!=-1||arrType.indexOf(c.editType)!=-1)) {
- this.columns.forEach(col=>{
- if (col.bind&&col.bind.key==c.key) {
- col.bind.orginData=JSON.parse(JSON.stringify(x.data));
- }
+ if ((arrType.indexOf(c.valueType) != -1 || arrType.indexOf(c.editType) != -1)) {
+ this.columns.forEach(col => {
+ if (col.bind && col.bind.key == c.key) {
+ col.bind.orginData = JSON.parse(JSON.stringify(x.data));
+ }
})
x.data = this.base.convertTree(x.data, (node, data, isRoot) => {
- if (!node.inited) {
- node.inited = true;
- node.label = node.value;
- node.value = node.key+'';
- }
+ if (!node.inited) {
+ node.inited = true;
+ node.label = node.value;
+ node.value = node.key + '';
+ }
});
}
// 杞崲鏁版嵁婧愮殑绫诲瀷涓庡垪鐨勭被鍨嬩竴鑷�(2020.04.04)
- else if (c.key == x.dicNo && (c.valueType == "int" || c.valueType == "sbyte")) {
+ else if (c.key == x.dicNo && (c.valueType == "int" || c.valueType == "sbyte")) {
x.data.forEach((d) => {
// 2020.09.01澧炲姞瀵规暟瀛楃被鍨嬬殑浜屾鍒ゆ柇
if (!isNaN(d.key)) {
@@ -916,11 +674,11 @@
}
},
methods: {
- initCellStyleColumns(){
- this.columns.forEach(x=>{
+ initCellStyleColumns() {
+ this.columns.forEach(x => {
if (x.cellStyle) {
this.cellStyleColumns[x.field] = x.cellStyle;
- }
+ }
})
},
watchRowSelectChange(newLen, oldLen) {
@@ -1130,7 +888,7 @@
// }
return;
},
- toggleEdit(event) {},
+ toggleEdit(event) { },
setEditStatus(status) {
// this.columns.forEach((x) => {
// if (x.hasOwnProperty("edit")) {
@@ -1175,13 +933,13 @@
}
} else {
//澶氶�夋垨鑰呯骇鑱旂紪杈戝洖鍐�,2023.01.06
- if (Array.isArray(val)) {
- val = val.map(v=>{
- return v*1
+ if (Array.isArray(val)) {
+ val = val.map(v => {
+ return v * 1
});
row[column.field] = val;
}
- else if (typeof val == 'string' && val) {
+ else if (typeof val == 'string' && val) {
let _val = val * 1;
if (_val + '' === val) {
row[column.field] = _val;
@@ -1376,10 +1134,10 @@
}
this.rowData.push(row);
},
- viewImg(row, column, url, $event,index) {
- $event.stopPropagation();
- const imgs= this.getFilePath(row[column.field], column).map(x=>{return x.path});
- this.$refs.viewer.show(imgs,index);
+ viewImg(row, column, url, $event, index) {
+ $event.stopPropagation();
+ const imgs = this.getFilePath(row[column.field], column).map(x => { return x.path });
+ this.$refs.viewer.show(imgs, index);
//this.base.previewImg(url);
// window.open(row[column.field]);
},
@@ -1444,7 +1202,7 @@
}
let param = {
page: this.paginations.page,
- rows:this.paginationHide ? 1000: this.paginations.rows,
+ rows: this.paginationHide ? 1000 : this.paginations.rows,
sort: this.paginations.sort,
order: this.paginations.order,
wheres: [] // 鏌ヨ鏉′欢锛屾牸寮忎负[{ name: "瀛楁", value: "xx" }]
@@ -1469,8 +1227,8 @@
param.wheres = JSON.stringify(param.wheres);
}
this.loading = true;
- let url=param.url||this.url;
- param.url=undefined;
+ let url = param.url || this.url;
+ param.url = undefined;
this.http.post(url, param).then(
(data) => {
//2021.06.04淇tree涓嶅埛鏂扮殑闂
@@ -1479,7 +1237,7 @@
this.rowData.splice(0);
}
this.loading = false;
- let rows=data.rows||[];
+ let rows = data.rows || [];
// 鏌ヨ杩斿洖缁撴灉鍚庡鐞�
// 2020.10.30澧炲姞鏌ヨ鍚庤繑鍥炴墍鏈夌殑鏌ヨ淇℃伅
this.$emit(
@@ -1492,9 +1250,9 @@
);
if (!status) return;
this.GetTableDictionary(data.rows);
-
+
if (this.rowParentField) {
- rows= this.base.convertTree(rows,null,this.rowKey,this.rowParentField);
+ rows = this.base.convertTree(rows, null, this.rowKey, this.rowParentField);
}
this.rowData = rows;
this.paginations.total = data.total;
@@ -1541,8 +1299,8 @@
let sum = data.summary[col.field];
//2024.01.07澧炲姞鑷畾涔夊悎璁℃牸寮忓寲
if (col.summaryFormatter) {
- sum = col.summaryFormatter(sum,col,data,this.summaryData)
- }else if (sum) {
+ sum = col.summaryFormatter(sum, col, data, this.summaryData)
+ } else if (sum) {
sum =
(sum * 1.0).toFixed(col.numberLength || 2).replace('.00', '') *
1.0;
@@ -1553,7 +1311,7 @@
}
}
},
- getInputChangeSummaries() {},
+ getInputChangeSummaries() { },
handleSizeChange(val) {
this.paginations.size = val;
this.paginations.rows = val;
@@ -1617,7 +1375,7 @@
this.formatConfig[column.field].push(val);
index = this.formatConfig[column.field].length - 1;
}
- return this.colors[index]||'info';
+ return this.colors[index] || 'info';
},
formatterDate(row, column) {
return (row[column.field] || '').substr(0, 10);
@@ -1635,26 +1393,26 @@
}
if (column.edit && (column.edit.type == 'selectList'
- ||column.edit.type=='treeSelect'
- ||column.bind.type == "cascader"
- ||column.bind.type == "treeSelect")) {
+ || column.edit.type == 'treeSelect'
+ || column.bind.type == "cascader"
+ || column.bind.type == "treeSelect")) {
if (!Array.isArray(val)) {
- row[column.field] = (val+'').split(',');
+ row[column.field] = (val + '').split(',');
} else {
val = val.join(',');
}
return this.getSelectFormatter(column, val);
}
- // 缂栬緫澶氶�塼able鏄剧ず
+ // 缂栬緫澶氶�塼able鏄剧ず
// if (
// column.bind.type == "selectList" ||
// column.bind.type == "checkbox" ||
// column.bind.type == "cascader" ||
// column.bind.type == "treeSelect"
// ) {
- if (typeof val === 'string' && val.indexOf(',') != -1) {
- return this.getSelectFormatter(column, val);
- }
+ if (typeof val === 'string' && val.indexOf(',') != -1) {
+ return this.getSelectFormatter(column, val);
+ }
//}
let source = column.bind.data.filter((x) => {
// return x.key != "" && x.key == val;
@@ -1666,17 +1424,17 @@
},
getSelectFormatter(column, val) {
// 缂栬緫澶氶�塼able鏄剧ず
- let valArr = (val+"").split(",");
+ let valArr = (val + "").split(",");
for (let index = 0; index < valArr.length; index++) {
- ( column.bind.orginData&&column.bind.orginData.length
- ?column.bind.orginData
- :column.bind.data)
- .forEach((x) => {
- // 2020.06.06淇鏁版嵁婧愪负selectList鏃�,key涓烘暟瀛�0鏃朵笉鑳借浆鎹㈡枃鏈殑闂
- if (x.key !== "" && x.key !== undefined && x.key + "" == valArr[index] + "") {
- valArr[index] = x.label || x.value;
- }
- });
+ (column.bind.orginData && column.bind.orginData.length
+ ? column.bind.orginData
+ : column.bind.data)
+ .forEach((x) => {
+ // 2020.06.06淇鏁版嵁婧愪负selectList鏃�,key涓烘暟瀛�0鏃朵笉鑳借浆鎹㈡枃鏈殑闂
+ if (x.key !== "" && x.key !== undefined && x.key + "" == valArr[index] + "") {
+ valArr[index] = x.label || x.value;
+ }
+ });
}
return valArr.join(",");
},
@@ -1750,7 +1508,7 @@
);
},
getDateFormat(column) {
- if(column.format){
+ if (column.format) {
return column.format;
}
if (column.edit.type == "month") {
@@ -1782,37 +1540,37 @@
initColumnDisabled(row, column) {
return column.getDisabled && column.getDisabled(row, column);
},
- showUpload(row,column){
- this.fileInfo = (row[column.field] || '').split(",")
- .filter(x => { return x })
- .map(item => {
- return { path: item, name: "" };
- })
- this.currentRow=row;
- this.currentColumn=column;
- if (this.currentColumn.edit.autoUpload===undefined) {
- this.currentColumn.edit.autoUpload=true;
+ showUpload(row, column) {
+ this.fileInfo = (row[column.field] || '').split(",")
+ .filter(x => { return x })
+ .map(item => {
+ return { path: item, name: "" };
+ })
+ this.currentRow = row;
+ this.currentColumn = column;
+ if (this.currentColumn.edit.autoUpload === undefined) {
+ this.currentColumn.edit.autoUpload = true;
}
- if (this.currentColumn.edit.multiple===undefined) {
- this.currentColumn.edit.multiple=false;
+ if (this.currentColumn.edit.multiple === undefined) {
+ this.currentColumn.edit.multiple = false;
}
- if (this.currentColumn.edit.url===undefined) {
- this.uploadUrl='api/'+(this.url||'').replace('/api','api').split('/')[1]+'/upload'
- }else{
- this.uploadUrl=this.currentColumn.edit.url;
+ if (this.currentColumn.edit.url === undefined) {
+ this.uploadUrl = 'api/' + (this.url || '').replace('/api', 'api').split('/')[1] + '/upload'
+ } else {
+ this.uploadUrl = this.currentColumn.edit.url;
}
- this.uploadModel=true;
+ this.uploadModel = true;
},
uploadAfter(result, files) {
- this.currentColumn.uploadAfter&&this.currentColumn.uploadAfter(result,files);
+ this.currentColumn.uploadAfter && this.currentColumn.uploadAfter(result, files);
return true;
},
- uploadBefore(files,params){
- this.currentColumn.uploadBefore&&this.currentColumn.uploadBefore(files,this.currentRow,params);
+ uploadBefore(files, params) {
+ this.currentColumn.uploadBefore && this.currentColumn.uploadBefore(files, this.currentRow, params);
return true;
},
- saveUpload(){
+ saveUpload() {
//鐢熸垚淇濆瓨鍚庤繑鍥炵殑璺緞
let arr = this.fileInfo.map((x) => {
if (x.path) {
@@ -1825,25 +1583,25 @@
this.uploadModel = false;
return true;
},
- expandChange(row,expandedRows){ // 褰撶敤鎴峰鏌愪竴琛屽睍寮�鎴栬�呭叧闂殑鏃�
- if (!this.defaultExpandAll&&!this.lazy) {
- if (expandedRows) {
- if(this.expandRowKeys.indexOf(row[this.rowKey])==-1){
- this.expandRowKeys.push(row[this.rowKey])
- }
- }else{
- let _index= this.expandRowKeys.findIndex(x=>{return x==row[this.rowKey]});
- if (_index!=-1) {
- this.expandRowKeys.splice(_index,1);
- }
+ expandChange(row, expandedRows) { // 褰撶敤鎴峰鏌愪竴琛屽睍寮�鎴栬�呭叧闂殑鏃�
+ if (!this.defaultExpandAll && !this.lazy) {
+ if (expandedRows) {
+ if (this.expandRowKeys.indexOf(row[this.rowKey]) == -1) {
+ this.expandRowKeys.push(row[this.rowKey])
}
- }
+ } else {
+ let _index = this.expandRowKeys.findIndex(x => { return x == row[this.rowKey] });
+ if (_index != -1) {
+ this.expandRowKeys.splice(_index, 1);
+ }
+ }
+ }
},
- handleImageError($e){
- $e.target.src= this.defaultImg;
+ handleImageError($e) {
+ $e.target.src = this.defaultImg;
},
- cellSpanMethod({row,column,rowIndex, columnIndex}){
- return this.spanMethod({row,column,rowIndex, columnIndex},this.url?this.rowData:this.tableData)
+ cellSpanMethod({ row, column, rowIndex, columnIndex }) {
+ return this.spanMethod({ row, column, rowIndex, columnIndex }, this.url ? this.rowData : this.tableData)
}
}
});
@@ -1851,6 +1609,7 @@
<style lang="less" scoped>
.vol-table {
position: relative;
+
.mask {
opacity: 0.2;
position: absolute;
@@ -1859,6 +1618,7 @@
background: #d0d0d0;
z-index: 100;
}
+
.message {
text-align: center;
color: #635c5c;
@@ -1878,12 +1638,15 @@
border: 1px solid #a09e9e;
}
}
+
.e-item {
display: flex;
- > div:first-child {
+
+ >div:first-child {
flex: 1;
}
}
+
.vol-table ::v-deep(.el-pager .number) {
padding: 0 7px;
border-radius: 5px;
@@ -1893,10 +1656,12 @@
min-width: 28px;
height: 27px;
}
+
.vol-table ::v-deep(.el-pager .number.active) {
background: #ed4014;
color: #fff;
}
+
.vol-table ::v-deep(.el-pagination .el-input__wrapper) {
height: 27px;
}
@@ -1907,10 +1672,12 @@
border-bottom: 1px solid;
padding-bottom: 2px;
}
+
.vol-table .empty-tag {
border: none;
background: none;
}
+
.v-table ::v-deep(.el-date-editor .el-icon-date),
.v-table ::v-deep(.el-date-editor .el-icon-time) {
width: 10px;
@@ -1935,6 +1702,7 @@
border: 1px solid #eee;
border-top: 0px;
}
+
/* .v-table ::v-deep(.el-input .el-input__inner) {
padding: 0 7px;
} */
@@ -1949,11 +1717,13 @@
.v-table ::v-deep(.el-table__header th.is-sortable) {
padding: 3px !important;
}
+
.vol-table.text-inline ::v-deep(.el-table__body .cell),
.vol-table.text-inline ::v-deep(.el-table__header-wrapper .cell) {
word-break: inherit !important;
white-space: nowrap !important;
}
+
/* .v-table ::v-deep(.el-table__body td) {
padding: 9px 0 !important;
} */
@@ -1965,6 +1735,7 @@
.vol-table ::v-deep(.el-table-column--selection .cell) {
display: inline;
}
+
.vol-table.text-inline ::v-deep(.el-table th > .cell) {
white-space: nowrap !important;
}
@@ -1976,6 +1747,7 @@
width: 40px;
object-fit: cover;
}
+
.vol-table .table-img:hover {
cursor: pointer;
}
@@ -1983,9 +1755,11 @@
.vol-table ::v-deep(.cell) {
padding: 2px 10px;
}
+
.vol-table ::v-deep(.cell .el-tag) {
padding: 5px 9px;
}
+
.table-input {
color: rgb(104, 103, 103);
padding: 3px 10px;
@@ -1995,6 +1769,7 @@
border-radius: 4px;
border: 1px solid #dcdcdc;
}
+
.table-input:focus {
outline: 1px solid #49a3fd;
}
@@ -2002,13 +1777,15 @@
.small-table ::v-deep(.el-pagination .el-input__wrapper) {
height: 27px;
}
+
.small-table ::v-deep(.el-table__cell) {
padding: 6px 0;
font-size: 13px;
}
+
.small-table ::v-deep(.cell-tag) {
- padding: 0 5px !important;
+ padding: 0 5px !important;
height: 19px;
}
</style>
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/Dt_LocationInfo.js b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/Dt_LocationInfo.jsx
similarity index 85%
rename from Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/Dt_LocationInfo.js
rename to Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/Dt_LocationInfo.jsx
index ef599f4..763722f 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/Dt_LocationInfo.js
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/Dt_LocationInfo.jsx
@@ -6,11 +6,12 @@
**鍚庡彴鎿嶄綔瑙侊細http://v2.volcore.xyz/document/netCoreDev
*****************************************************************************************/
//姝s鏂囦欢鏄敤鏉ヨ嚜瀹氫箟鎵╁睍涓氬姟浠g爜锛屽彲浠ユ墿灞曚竴浜涜嚜瀹氫箟椤甸潰鎴栬�呴噸鏂伴厤缃敓鎴愮殑浠g爜
-
+import { defineAsyncComponent } from "vue";
let extension = {
components: {
//鏌ヨ鐣岄潰鎵╁睍缁勪欢
- gridHeader: '',
+ gridHeader: defineAsyncComponent(() =>
+ import("./demo_Product/LocationChange.vue")),
gridBody: '',
gridFooter: '',
//鏂板缓銆佺紪杈戝脊鍑烘鎵╁睍缁勪欢
@@ -83,6 +84,32 @@
}
//绀轰緥锛氳缃慨鏀规柊寤恒�佺紪杈戝脊鍑烘瀛楁鏍囩鐨勯暱搴�
this.boxOptions.labelWidth = 150;
+
+ //琛ㄦ牸涓婃坊鍔犺嚜瀹氫箟鎸夐挳
+ this.columns.push({
+ title: "鎿嶄綔",
+ field: "鎿嶄綔",
+ width: 150,
+ align: "left", // 'center',
+ render: (h, { row, column, index }) => {
+ return (
+ <div>
+ <el-button
+ onClick={($e) => {
+ // this.$refs.table.load();
+ // console.log(this.$refs.table);
+ this.$refs.gridHeader.customOpen(row);
+ }}
+ type="primary"
+ plain
+ style="height:26px; padding: 10px !important;"
+ >
+ 鐘舵�佸彉鍔ㄨ褰�
+ </el-button>
+ </div>
+ );
+ },
+ });
},
onInited() {
//妗嗘灦鍒濆鍖栭厤缃悗
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/demo_Product/LocationChange.vue b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/demo_Product/LocationChange.vue
new file mode 100644
index 0000000..052810c
--- /dev/null
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/extension/widesea_wms/basicinfo/demo_Product/LocationChange.vue
@@ -0,0 +1,137 @@
+<template>
+ <vol-box :lazy="true" v-model="model" title="璐т綅鐘舵�佸彉鍔ㄨ褰�" :width="1820" :padding="5">
+ <div class="table-item">
+ <div class="table-item-header">
+ <div class="table-item-border"></div> <span class="table-item-text">璐т綅鐘舵�佸彉鍔ㄨ褰�</span>
+ <div class="table-item-buttons">
+ <div>
+ <el-button type="primary" @click="reload" color="#95d475" plain>鍒锋柊</el-button>
+ </div>
+ </div>
+ </div>
+ <!-- <el-alert type="success" title="" style="line-height: 12px;">
+ 鍔熻兘锛氳〃灏惧悎璁°�佹枃浠朵笂浼犮�佺紪杈戙�乤pi鍔犺浇鏁版嵁銆佽嚜鍔ㄥ垎椤点�佽嚜瀹氫箟鎸夐挳銆佽鐐瑰嚮浜嬩欢銆佸姞杞絣oadBefore鑷畾涔夌瓑銆傘�傘��
+ </el-alert> -->
+ <vol-table @loadBefore="loadBefore" @loadAfter="loadAfter" ref="table" :url="url" index
+ :tableData="tableData" :columns="columns" :height="700" :pagination-hide="false" :load-key="true"
+ :column-index="true"></vol-table>
+ </div>
+ <template #footer>
+ <div>
+ <el-button type="primary" size="small" @click="model = false">纭</el-button>
+ <el-button type="default" size="small" @click="model = false">鍏抽棴</el-button>
+ </div>
+ </template>
+ </vol-box>
+</template>
+<script lang="jsx">
+//濡傛灉鏄嚜瀹氫箟vue椤甸潰浣跨敤鐨勯厤缃紝鍦╲ue椤甸潰鐨剆cript鍚庝竴瀹氳鍔犱笂lang="jsx"
+import VolTable from "@/components/basic/VolTable.vue";
+import VolBox from "@/components/basic/VolBox.vue";
+export default {
+ components: {
+ 'vol-table': VolTable,
+ 'vol-box': VolBox
+ },
+ data() {
+ return {
+ model: false,
+ locationCode: '',
+ //鎺ュ彛杩斿洖鏁版嵁锛屽彲浠ユ鏋剁敓鎴愮殑鎺ュ彛getPageData
+ //濡傛灉鏄嚜瀹氫箟鐨勬帴鍙o紝闇�瑕佽繑鍥炵殑鏁版嵁鏍煎紡锛歿total:100,rows:[]}
+ url: "api/LocationStatusChangeRecord/getPageData",
+ columns: [{ field: 'Id', title: '涓婚敭', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
+ { field: 'locationId', title: '璐т綅ID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
+ { field: 'locationCode', title: '璐т綅缂栧彿', type: 'string', width: 110, require: true, align: 'left' },
+ { field: 'beforeStatus', title: '鍙樺姩鍓嶈揣浣嶇姸鎬�', type: 'int', width: 120, align: 'left', bind: { key: "LocationState", data: [] } },
+ { field: 'afterStatus', title: '鍙樺姩鍚庤揣浣嶇姸鎬�', type: 'int', width: 110, require: true, align: 'left', sort: true, bind: { key: "LocationState", data: [] } },
+ { field: 'changeType', title: '鍙樺姩绫诲瀷锛堝嚭搴撱�佸叆搴撱�佹墜鍔ㄨ皟鏁达級', type: 'string', width: 70, align: 'left', bind: { key: "StatusChangeType", data: [] } },
+ { field: 'orderId', title: '鍗曟嵁涓婚敭', type: 'string', width: 70, align: 'left', hidden: true },
+ { field: 'orderNo', title: '鍗曟嵁缂栧彿', type: 'string', width: 110, align: 'left', hidden: true },
+ { field: 'orderDetailId', title: '鍗曟嵁鏄庣粏涓婚敭', type: 'string', width: 110, align: 'left', hidden: true },
+ { field: 'taskNum', title: '浠诲姟鍙�', type: 'string', width: 110, align: 'left' },
+ { field: 'remark', title: '澶囨敞', type: 'int', width: 110, align: 'left', hidden: true },
+ { field: 'creater', title: '鍒涘缓浜�', type: 'string', sort: true, width: 110, align: 'left', hidden: true },
+ { field: 'createDate', title: '鍒涘缓鏃堕棿', type: 'datetime', sort: true, width: 150, align: 'left', sort: true },
+ { field: 'modifier', title: '淇敼浜�', type: 'string', sort: true, width: 100, align: 'left', hidden: true },
+ { field: 'modifyDate', title: '淇敼鏃堕棿', type: 'datetime', sort: true, width: 150, hidden: true, align: 'left', sort: true }
+ ]
+ }
+ },
+ methods: {
+ //鑷畾涔夋寜閽�
+ customOpen(row) {
+ this.locationCode = row.locationCode;
+ this.model = true;
+ this.$nextTick(() => {
+ this.$refs.table.load(null, true);
+ })
+ },
+
+ loadBefore(params, callBack) {//璋冪敤鍚庡彴鎺ュ彛鍓嶅鐞�
+ //璁剧疆鏌ヨ鏉′欢鍙傛暟
+ params.wheres.push({
+ name: "locationCode",
+ value: this.locationCode,
+ displayType: "like"//妯$硦鏌ヨ
+ })
+
+ //涔熷彲浠ョ粰value璁剧疆鍊硷紝鍚庡彴鑷繁瑙f瀽
+ // params.value=this.OrderNo
+
+ //鏌ヨ鍓嶆柟娉曚篃鍙互鍔ㄦ�佽缃畊rl鍙傛暟
+ //params.url='api/xxx/xx?鍙傛暟1='+this.xx鍙傛暟
+
+ callBack(true)//false涓嶄細璋冪敤鍚庡彴鎺ュ彛
+ },
+ //鏌ヨ鍚庢柟娉�
+ loadAfter(rows, callBack, result) {
+ //濡傛灉鏈夊悎璁★細鍚庡彴杩斿洖鍚堣鏍煎紡
+ // var data = new {
+ // rows: [],//杩斿洖鐨勮鏁版嵁
+ // total: 200,//杩斿洖鐨勬�昏鏁�
+ // //鍚堣
+ // summary: { TotalPrice: 100, TotalQty: 200 }
+ // }
+ // callBack(true)
+ },
+ reload() {
+ this.$refs.table.load(null, true);
+ this.$message.success('鏌ヨ鎴愬姛')
+ }
+ }
+}
+</script>
+<style lang="less" scoped>
+.table-item-header {
+ display: flex;
+ align-items: center;
+ padding: 6px;
+
+ .table-item-border {
+ height: 15px;
+ background: rgb(33, 150, 243);
+ width: 5px;
+ border-radius: 10px;
+ position: relative;
+ margin-right: 5px;
+ }
+
+ .table-item-text {
+ font-weight: bolder;
+ }
+
+ .table-item-buttons {
+ flex: 1;
+ text-align: right;
+ }
+
+ .small-text {
+ font-size: 12px;
+ color: #2196F3;
+ margin-left: 10px;
+ position: relative;
+ top: 2px;
+ }
+}
+</style>
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/Index.vue b/Code Management/WMS/WIDESEA_WMSClient/src/views/Index.vue
index 8aea11b..d551172 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/views/Index.vue
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/Index.vue
@@ -3,34 +3,23 @@
<div class="vol-aside" :style="{ width: menuWidth + 'px' }">
<div class="header" :style="{ width: menuWidth - 1 + 'px' }">
<img v-show="!isCollapse" src="@/assets/imgs/logo.png" />
- <i @click="toggleLeft" class=" collapse-menu" :class="isCollapse?'el-icon-s-unfold':'el-icon-s-fold'" />
+ <i @click="toggleLeft" class=" collapse-menu" :class="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'" />
</div>
<div class="vol-menu">
<el-scrollbar style="height: 100%">
- <VolMenu
- :currentMenuId="currentMenuId"
- :on-select="onSelect"
- :enable="true"
- :open-select="false"
- :isCollapse="isCollapse"
- :list="menuOptions"
- ></VolMenu>
+ <VolMenu :currentMenuId="currentMenuId" :on-select="onSelect" :enable="true" :open-select="false"
+ :isCollapse="isCollapse" :list="menuOptions"></VolMenu>
</el-scrollbar>
</div>
</div>
<div class="vol-container" :style="{ left: menuWidth - 1 + 'px' }">
<div class="vol-header">
- <div class="project-name">Vol寮�鍙戞鏋禫ue3鐗堟湰</div>
+ <div class="project-name">WIDESEA_WMS</div>
<div class="header-text">
<div class="h-link">
- <a
- href="javascript:void(0)"
- @click="to(item)"
- v-for="(item, index) in links.filter((c) => {
- return !c.icon;
- })"
- :key="index"
- >
+ <a href="javascript:void(0)" @click="to(item)" v-for="(item, index) in links.filter((c) => {
+ return !c.icon;
+ })" :key="index">
<span v-if="!item.icon"> {{ item.text }}</span>
<i v-else :class="item.icon"></i>
</a>
@@ -38,14 +27,9 @@
</div>
<div class="header-info">
<div class="h-link">
- <a
- href="javascript:void(0)"
- @click="to(item)"
- v-for="(item, index) in links.filter((c) => {
- return c.icon;
- })"
- :key="index"
- >
+ <a href="javascript:void(0)" @click="to(item)" v-for="(item, index) in links.filter((c) => {
+ return c.icon;
+ })" :key="index">
<span v-if="!item.icon"> {{ item.text }}</span>
<i v-else :class="item.icon"></i>
</a>
@@ -55,72 +39,44 @@
<a><i class="el-icon-message-solid"></i></a>
</div>
<div>
- <img class="user-header" :src="userImg" @error="($e) => { $e.target.src = errorImg; }"/>
+ <img class="user-header" :src="userImg" @error="($e) => { $e.target.src = errorImg; }" />
</div>
<div class="user">
<span>{{ userName }}</span>
<span id="index-date"></span>
</div>
<div class="settings">
- <i
- style="font-size: 20px"
- class="el-icon-s-tools"
- @click="drawer_model = true"
- />
+ <i style="font-size: 20px" class="el-icon-s-tools" @click="drawer_model = true" />
</div>
</div>
</div>
<div class="vol-path">
- <el-tabs
- @tab-click="selectNav"
- @tab-remove="removeNav"
- @contextmenu.prevent="bindRightClickMenu(false)"
- type="border-card"
- class="header-navigation"
- v-model="selectId"
- :strtch="false"
- >
- <el-tab-pane
- v-for="(item, navIndex) in navigation"
- type="card"
- :name="navIndex + ''"
- :closable="navIndex > 0"
- :key="navIndex"
- :label="item.name"
- >
+ <el-tabs @tab-click="selectNav" @tab-remove="removeNav" @contextmenu.prevent="bindRightClickMenu(false)"
+ type="border-card" class="header-navigation" v-model="selectId" :strtch="false">
+ <el-tab-pane v-for="(item, navIndex) in navigation" type="card" :name="navIndex + ''" :closable="navIndex > 0"
+ :key="navIndex" :label="item.name">
<span style="display: none">{{ navIndex }}</span>
</el-tab-pane>
</el-tabs>
<!-- 鍙抽敭鑿滃崟 -->
<div v-show="contextMenuVisible">
- <ul
- :style="{ left: menuLeft + 'px', top: menuTop + 'px' }"
- class="contextMenu"
- >
+ <ul :style="{ left: menuLeft + 'px', top: menuTop + 'px' }" class="contextMenu">
<li v-show="visibleItem.all">
<el-button link @click="closeTabs()">
<i class="el-icon-close"></i>
{{
navigation.length == 2 ? "鍏抽棴鑿滃崟" : "鍏抽棴鎵�鏈�"
- }}</el-button
- >
+ }}</el-button>
</li>
<li v-show="visibleItem.left">
- <el-button link @click="closeTabs('left')"
- ><i class="el-icon-back"></i>鍏抽棴宸﹁竟</el-button
- >
+ <el-button link @click="closeTabs('left')"><i class="el-icon-back"></i>鍏抽棴宸﹁竟</el-button>
</li>
<li v-show="visibleItem.right">
- <el-button link @click="closeTabs('right')" >
- <i class="el-icon-right"></i>鍏抽棴鍙宠竟</el-button
- >
+ <el-button link @click="closeTabs('right')">
+ <i class="el-icon-right"></i>鍏抽棴鍙宠竟</el-button>
</li>
<li v-show="visibleItem.other">
- <el-button
- link
- @click="closeTabs('other')"
-
- ><i class="el-icon-right"></i>鍏抽棴鍏朵粬
+ <el-button link @click="closeTabs('other')"><i class="el-icon-right"></i>鍏抽棴鍏朵粬
</el-button>
</li>
</ul>
@@ -131,52 +87,27 @@
<loading v-show="$store.getters.isLoading()"></loading>
<router-view v-slot="{ Component }">
<keep-alive>
- <component
- :is="Component"
- :key="$route.name"
- v-if="!$route.meta ||($route.meta && !$route.meta.hasOwnProperty('keepAlive'))"
- />
+ <component :is="Component" :key="$route.name"
+ v-if="!$route.meta || ($route.meta && !$route.meta.hasOwnProperty('keepAlive'))" />
</keep-alive>
- <component
- :is="Component"
- :key="$route.name"
- v-if="$route.meta && $route.meta.hasOwnProperty('keepAlive')"
- />
+ <component :is="Component" :key="$route.name"
+ v-if="$route.meta && $route.meta.hasOwnProperty('keepAlive')" />
</router-view>
</el-scrollbar>
</div>
</div>
- <el-drawer
- title="閫夋嫨涓婚"
- v-model="drawer_model"
- direction="rtl"
- destroy-on-close
- >
+ <el-drawer title="閫夋嫨涓婚" v-model="drawer_model" direction="rtl" destroy-on-close>
<div class="theme-selector">
- <div
- @click="changeTheme(item.name)"
- class="item"
- v-for="(item, index) in theme_color"
- :key="index"
- :style="{ background: item.color }"
- >
- <div
- v-show="item.leftColor"
- :style="{ background: item.leftColor }"
- style="height: 100%; width: 20px"
- class="t-left"
- ></div>
+ <div @click="changeTheme(item.name)" class="item" v-for="(item, index) in theme_color" :key="index"
+ :style="{ background: item.color }">
+ <div v-show="item.leftColor" :style="{ background: item.leftColor }" style="height: 100%; width: 20px"
+ class="t-left"></div>
<div class="t-right"></div>
</div>
</div>
</el-drawer>
- <el-drawer
- title="娑堟伅鍒楄〃"
- v-model="messageModel"
- direction="rtl"
- destroy-on-close
- >
+ <el-drawer title="娑堟伅鍒楄〃" v-model="messageModel" direction="rtl" destroy-on-close>
<Message :list="messageList"></Message>
</el-drawer>
</div>
@@ -245,21 +176,21 @@
{ name: "white", color: "#fff" },
]);
const links = ref([
- {
- text: "妗嗘灦瑙嗛",
- path: "https://www.cctalk.com/m/group/90268531",
- id: -3,
- },
- { text: "澶у睆鏁版嵁", path: "/bigdata", id: -3 },
- {
- text: "妗嗘灦鏂囨。",
- path: "http://v2.volcore.xyz/document/guide",
- id: -2,
- }, {
- text: "妗嗘灦浼佷笟鐗�",
- path: "http://pro.volcore.xyz/",
- id: 10,
- },
+ //{
+ // text: "妗嗘灦瑙嗛",
+ // path: "https://www.cctalk.com/m/group/90268531",
+ // id: -3,
+ //},
+ //{ text: "澶у睆鏁版嵁", path: "/bigdata", id: -3 },
+ //{
+ // text: "妗嗘灦鏂囨。",
+ // path: "http://v2.volcore.xyz/document/guide",
+ // id: -2,
+ //}, {
+ // text: "妗嗘灦浼佷笟鐗�",
+ // path: "http://pro.volcore.xyz/",
+ // id: 10,
+ //},
{ text: "涓汉涓績", path: "/UserInfo", id: -1, icon: "el-icon-s-custom" },
{
text: "瀹夊叏閫�鍑�",
@@ -746,7 +677,9 @@
font-size: 14px;
color: #333;
box-shadow: 2px 2px 3px 0 rgb(182 182 182 / 20%);
- i,button{
+
+ i,
+ button {
font-size: 14px !important;
}
}
@@ -767,12 +700,8 @@
letter-spacing: 1px;
}
-.el-tabs.el-tabs--top.el-tabs--border-card.header-navigation
- > .el-tabs__header
- .el-tabs__item:last-child,
-.el-tabs--top.el-tabs--border-card.header-navigation
- > .el-tabs__header
- .el-tabs__item:nth-child(2) {
+.el-tabs.el-tabs--top.el-tabs--border-card.header-navigation>.el-tabs__header .el-tabs__item:last-child,
+.el-tabs--top.el-tabs--border-card.header-navigation>.el-tabs__header .el-tabs__item:nth-child(2) {
padding: 0;
}
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/Login.vue b/Code Management/WMS/WIDESEA_WMSClient/src/views/Login.vue
index 4f27c70..1b78b3f 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/views/Login.vue
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/Login.vue
@@ -1,6 +1,6 @@
<template>
<div class="login-container">
- <div class="project-name">VOL寮�鍙戞鏋�,Vue3鐗堟湰</div>
+ <div class="project-name">WIDESEA_WMS</div>
<div class="login-form">
<div class="form-user" @keypress="loginPress">
<div class="login-text">
@@ -41,18 +41,18 @@
</div>
<!-- 璐﹀彿淇℃伅 -->
- <div class="account-info">
+ <!-- <div class="account-info">
<p>婕旂ず璐﹀彿锛歛dmin666 瀵嗙爜:123456</p>
<p>鏈湴璐﹀彿锛歛dmin 瀵嗙爜:123456</p>
<p><a href="https://jq.qq.com/?_wv=1027&k=Sqstuy0M" style="text-decoration: none"
target="_blank">QQ3缇�:743852316(婊�)</a>
- <a href="https://qm.qq.com/cgi-bin/qm/qr?k=YRZBbf64qsUeEmh24I65u2aIZFn2C-Ha&jump_from=webapi&qr=1" style="text-decoration: none" target="_blank">QQ4缇わ細959924606</a>
+ <a href="https://qm.qq.com/cgi-bin/qm/qr?k=YRZBbf64qsUeEmh24I65u2aIZFn2C-Ha&jump_from=webapi&qr=1" style="text-decoration: none" target="_blank">QQ4缇わ細959924606</a> -->
<!-- <a href="http://v2.volcore.xyz/document/guide" style="text-decoration: none" target="_blank">妗嗘灦鏂囨。</a> -->
- </p>
- </div>
+ <!-- </p>
+ </div> -->
<!-- 閾炬帴浣嶇疆 -->
- <div class="app-link" >
+ <!-- <div class="app-link" >
<a href="#" style="text-decoration: none">绉诲姩绔壂鐮�</a>
<a>
<i class="el-icon-chat-dot-round"></i> 灏忕▼搴�
@@ -65,11 +65,11 @@
<i class="el-icon-document"></i>
H5
<img src="https://app-1256993465.cos.ap-nanjing.myqcloud.com/H5.png" /></a>
- </div>
+ </div> -->
</div>
<!-- 椤甸潰搴曢儴 -->
- <div class="login-footer">
+ <!-- <div class="login-footer">
<a style="text-decoration: none" href="https://beian.miit.gov.cn/" target="_blank">浜琁CP澶�19056538鍙�-1</a>
@@ -77,7 +77,7 @@
<a href="https://space.bilibili.com/525836469" style="text-decoration: none" target="blank">NET瑙嗛鏁欑▼(寰蒋MVP-ACE褰曞埗)</a>
<a href="https://www.cctalk.com/m/group/90268531" style="text-decoration: none" target="blank">VOL妗嗘灦瑙嗛</a>
<a href="http://demo.volcore.xyz" style="text-decoration: none" target="blank">瑙嗛婕旂ず鍦板潃</a>
- </div>
+ </div> -->
<img class="login-bg" src="/static/login_bg.png" />
</div>
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/system/UserInfo.vue b/Code Management/WMS/WIDESEA_WMSClient/src/views/system/UserInfo.vue
index 2bd0f13..5faa0ed 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/views/system/UserInfo.vue
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/system/UserInfo.vue
@@ -62,7 +62,7 @@
return this.$message.error("涓ゆ瀵嗙爜涓嶄竴鑷�");
}
let url =
- "/api/user/modifyPwd?oldPwd=" +
+ "/api/Sys_User/modifyPwd?oldPwd=" +
this.modifyOptions.fields.oldPwd +
"&newPwd=" +
this.modifyOptions.fields.newPwd;
@@ -77,7 +77,7 @@
},
modifyInfo() {
this.$refs.form.validate(() => {
- this.http.post('api/user/updateUserInfo', this.userInfo).then(result => {
+ this.http.post('api/Sys_User/updateUserInfo', this.userInfo).then(result => {
this.$message.success(result);
let userInfo = this.$store.getters.getUserInfo();
userInfo.img = this.userInfo.headImageUrl;
@@ -94,7 +94,7 @@
var forms = new FormData();
let file = e.target.files[0]
forms.append('fileInput', file, file.name);
- const url = 'api/sys_user/upload'
+ const url = 'api/Sys_User/upload'
this.http
.post(url, forms, true, {
headers:{'Content-Type':'multipart/form-data'}
@@ -108,7 +108,7 @@
}
},
created() {
- this.http.post("/api/user/getCurrentUserInfo", {}, true).then((x) => {
+ this.http.post("/api/Sys_User/getCurrentUserInfo", {}, true).then((x) => {
if (!x.status) {
return this.$message(x.message);
}
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/Dt_LocationInfo.vue b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/Dt_LocationInfo.vue
index 53091df..3b04ada 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/Dt_LocationInfo.vue
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/Dt_LocationInfo.vue
@@ -11,28 +11,22 @@
</view-grid>
</template>
<script>
-import extend from "@/extension/widesea_wms/basicinfo/Dt_LocationInfo.js";
+import extend from "@/extension/widesea_wms/basicinfo/Dt_LocationInfo.jsx";
import { ref, defineComponent } from "vue";
export default defineComponent({
setup() {
const table = ref({
- key: 'locationID',
+ key: 'id',
footer: "Foots",
cnName: '璐т綅淇℃伅',
name: 'basicinfo/Dt_LocationInfo',
url: "/LocationInfo/",
- sortName: "LocationID"
+ sortName: "id"
});
- const editFormFields = ref({ "status": "", "scNo": "", "roadWayNO": "", "locationCode": "", "wareAreaCode": "" });
+ const editFormFields = ref({ "locationStatus": "" });
const editFormOptions = ref([
[
- { "title": "璐т綅缂栧彿", "field": "locationCode", type: "text" },
- { "title": "璐т綅鐘舵��", "field": "status", "type": "select", dataKey: "LocationState", data: [] },
- { "title": "瀵瑰簲鍫嗗灈鏈哄彿", "field": "scNo", type: "text" },
- { "title": "宸烽亾缂栧彿", "field": "roadWayNO", type: "text" },
-
- ], [
- { "title": "搴撳尯缂栧彿", "field": "wareAreaCode", type: "text" },
+ { "title": "璐т綅鐘舵��", "field": "locationStatus", "type": "select", dataKey: "LocationState", data: [] },
]
]);
const searchFormFields = ref({ "LocationID": "" });
@@ -47,16 +41,16 @@
const columns = ref([{ field: 'locationID', title: '璐т綅ID', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
{ field: 'locationCode', title: '璐т綅缂栧彿', type: 'string', width: 110, require: true, align: 'left' },
{ field: 'locationName', title: '璐т綅鍚嶇О', type: 'string', width: 120, align: 'left' },
- { field: 'roadWayNO', title: '宸烽亾鍙�', type: 'string', width: 110, require: true, align: 'left', sort: true },
+ { field: 'roadwayNo', title: '宸烽亾鍙�', type: 'string', width: 110, require: true, align: 'left', sort: true },
{ field: 'row', title: '琛�', type: 'string', width: 70, align: 'left' },
{ field: 'column', title: '鍒�', type: 'string', width: 70, align: 'left' },
{ field: 'layer', title: '灞�', type: 'string', width: 110, align: 'left' },
{ field: 'depth', title: '娣卞害', type: 'string', width: 110, align: 'left' },
- { field: 'scNo', title: '瀵瑰簲鍫嗗灈鏈哄彿', type: 'string', width: 110, align: 'left' },
- { field: 'locationType', title: '璐т綅绫诲瀷', type: 'int', width: 110, align: 'left' },
+ { field: 'scNo', title: '瀵瑰簲鍫嗗灈鏈哄彿', type: 'string', width: 110, align: 'left', hidden: true },
+ { field: 'locationType', title: '璐т綅绫诲瀷', type: 'int', width: 110, align: 'left', bind: { key: "locationType", data: [] } },
{ field: 'locationStatus', title: '璐т綅鐘舵��', type: 'int', width: 110, align: 'left', bind: { key: "LocationState", data: [] } },
- { field: 'isLocked', title: '鏄惁閿佸畾', type: 'bool', width: 110, align: 'left' , bind: { key: "IsLocked", data: [] } },
- { field: 'locationDesc', title: '璐т綅鎻忚堪', type: 'string', width: 110, align: 'left' },
+ { field: 'isLocked', title: '鏄惁閿佸畾', type: 'bool', width: 110, align: 'left', hidden: true, bind: { key: "IsLocked", data: [] } },
+ { field: 'locationDesc', title: '璐т綅鎻忚堪', type: 'string', width: 110, align: 'left', hidden: true },
{ field: 'remark', title: '澶囨敞', type: 'string', width: 110, align: 'left' },
{ field: 'wareAreaCode', title: '搴撳尯缂栧彿', type: 'string', width: 110, align: 'left', hidden: true },
{ field: 'roadway', title: '宸烽亾', type: 'string', width: 110, align: 'left', hidden: true },
diff --git a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/LocationStatusChange.vue b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/LocationStatusChange.vue
index 5659700..7325de3 100644
--- a/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/LocationStatusChange.vue
+++ b/Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/basicinfo/LocationStatusChange.vue
@@ -31,7 +31,7 @@
{ "title": "璐т綅缂栧彿", "field": "locationCode", type: "text" },
{ "title": "鍙樺姩鍓嶈揣浣嶇姸鎬�", "field": "BeforeStatus", "type": "select", dataKey: "LocationState", data: [] },
{ "title": "鍙樺姩鍚庤揣浣嶇姸鎬�", "field": "AfterStatus", "type": "select", dataKey: "LocationState", data: [] },
- { "title": "鍙樺姩绫诲瀷", "field": "changeType", type: "text" },
+ { "title": "鍙樺姩绫诲瀷", "field": "changeType", type: "select", dataKey: "StatusChangeType", data: [] },
]
]);
const columns = ref([{ field: 'Id', title: '涓婚敭', type: 'int', width: 110, hidden: true, readonly: true, require: true, align: 'left' },
@@ -39,7 +39,7 @@
{ field: 'locationCode', title: '璐т綅缂栧彿', type: 'string', width: 110, require: true, align: 'left' },
{ field: 'beforeStatus', title: '鍙樺姩鍓嶈揣浣嶇姸鎬�', type: 'int', width: 120, align: 'left', bind: { key: "LocationState", data: [] } },
{ field: 'afterStatus', title: '鍙樺姩鍚庤揣浣嶇姸鎬�', type: 'int', width: 110, require: true, align: 'left', sort: true, bind: { key: "LocationState", data: [] } },
- { field: 'changeType', title: '鍙樺姩绫诲瀷锛堝嚭搴撱�佸叆搴撱�佹墜鍔ㄨ皟鏁�...锛�', type: 'string', width: 70, align: 'left' },
+ { field: 'changeType', title: '鍙樺姩绫诲瀷锛堝嚭搴撱�佸叆搴撱�佹墜鍔ㄨ皟鏁�...锛�', type: 'string', width: 70, align: 'left', bind: { key: "StatusChangeType", data: [] } },
{ field: 'orderId', title: '鍗曟嵁涓婚敭', type: 'string', width: 70, align: 'left' },
{ field: 'orderNo', title: '鍗曟嵁缂栧彿', type: 'string', width: 110, align: 'left' },
{ field: 'orderDetailId', title: '鍗曟嵁鏄庣粏涓婚敭', type: 'string', width: 110, align: 'left' },
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/StatusChangeType/StatusChangeTypeEnum.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/StatusChangeType/StatusChangeTypeEnum.cs
new file mode 100644
index 0000000..8bfdf7a
--- /dev/null
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Common/StatusChangeType/StatusChangeTypeEnum.cs
@@ -0,0 +1,25 @@
+锘縰sing System.ComponentModel;
+
+namespace WIDESEA_Common
+{
+ public enum StatusChangeTypeEnum
+ {
+ /// <summary>
+ /// 鑷姩鍏ュ簱
+ /// </summary>
+ [Description("鑷姩鍏ュ簱")]
+ AutomaticStorage = 1,
+
+ /// <summary>
+ /// 鑷姩鍑哄簱
+ /// </summary>
+ [Description("鑷姩鍑哄簱")]
+ AutomaticDelivery = 2,
+
+ /// <summary>
+ /// 浜哄伐鎿嶄綔
+ /// </summary>
+ [Description("浜哄伐鎿嶄綔")]
+ ManualOperation = 3
+ }
+}
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs
index ab77042..367eda1 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_Core/Utilities/EntityProperties.cs
@@ -58,7 +58,6 @@
}
else if (dbType == SqlDbTypeName.Float || dbType == SqlDbTypeName.Decimal || dbType == SqlDbTypeName.Double)
{
-
if (!val.IsNumber(null))
{
reslutMsg = "涓嶆槸鏈夋晥鏁板瓧";
@@ -78,7 +77,6 @@
|| dbType == SqlDbTypeName.Char
|| dbType == SqlDbTypeName.Text))
{
-
//榛樿nvarchar(max) 銆乼ext 闀垮害涓嶈兘瓒呰繃20000
if (val.Length > 200000)
{
@@ -86,7 +84,6 @@
}
else
{
-
int length = sugarColumn.Length;
if (length == 0) { return (true, null, null); }
//鍒ゆ柇鍙屽瓧鑺備笌鍗曞瓧娈�
@@ -118,6 +115,7 @@
{ typeof(byte),SqlDbTypeName.Int },//绫诲瀷寰呭畬
{ typeof(Guid),SqlDbTypeName.UniqueIdentifier}
};
+
public static string GetProperWithDbType(this PropertyInfo propertyInfo)
{
bool result = ProperWithDbType.TryGetValue(propertyInfo.PropertyType, out string value);
@@ -189,12 +187,28 @@
}
continue;
}
- string str = dic[property.Name.FirstLetterToLower()].ToString();
+ string str = dic.GetValueOrDefault(property.Name.FirstLetterToLower(), "").ToString();
//灏嗘墍鏈夌┖鍊艰缃负null
if (dic[property.Name.FirstLetterToLower()] != null && str == string.Empty)
dic[property.Name.FirstLetterToLower()] = null;
}
return string.Empty;
+ }
+
+ /// <summary>
+ /// 瀹夊叏鑾峰彇瀛楀吀鍊硷紝濡傛灉閿笉瀛樺湪鎴栧�间负null鍒欒繑鍥為粯璁ゅ��
+ /// </summary>
+ /// <typeparam name="TKey">瀛楀吀閿殑绫诲瀷</typeparam>
+ /// <typeparam name="TValue">瀛楀吀鍊肩殑绫诲瀷</typeparam>
+ /// <param name="dictionary">瀛楀吀瀹炰緥</param>
+ /// <param name="key">閿�</param>
+ /// <param name="defaultValue">榛樿鍊�</param>
+ /// <returns>瀛楀吀鍊兼垨榛樿鍊�</returns>
+ public static TValue GetValueOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue = default)
+ {
+ if (dictionary == null) throw new ArgumentNullException(nameof(dictionary));
+
+ return dictionary.TryGetValue(key, out TValue value) && value != null ? value : defaultValue;
}
public static string GetKeyName(this Type typeinfo)
@@ -294,4 +308,4 @@
return null;
}
}
-}
+}
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Location/LocationChangeRecordDto.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Location/LocationChangeRecordDto.cs
new file mode 100644
index 0000000..9797c58
--- /dev/null
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_DTO/Location/LocationChangeRecordDto.cs
@@ -0,0 +1,35 @@
+锘縩amespace WIDESEA_DTO
+{
+ public class LocationChangeRecordDto
+ {
+ /// <summary>
+ /// 璐т綅缂栫爜
+ /// </summary>
+ public string LocationCode { get; set; }
+
+ /// <summary>
+ /// 璐т綅ID
+ /// </summary>
+ public int LocationId { get; set; }
+
+ /// <summary>
+ /// 鍙樻洿鍓嶇姸鎬�
+ /// </summary>
+ public int BeforeStatus { get; set; }
+
+ /// <summary>
+ /// 鍙樻洿鍚庣姸鎬�
+ /// </summary>
+ public int AfterStatus { get; set; }
+
+ /// <summary>
+ /// 鍙樻洿绫诲瀷
+ /// </summary>
+ public int ChangeType { get; set; }
+
+ /// <summary>
+ /// 璐т綅缂栫爜
+ /// </summary>
+ public int TaskNum { get; set; } = 0;
+ }
+}
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/Location/ILocationStatusChangeRecordRepository.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/Location/ILocationStatusChangeRecordRepository.cs
index f07e6a7..70da6b7 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/Location/ILocationStatusChangeRecordRepository.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageBasicRepository/Location/ILocationStatusChangeRecordRepository.cs
@@ -1,5 +1,13 @@
-锘縩amespace WIDESEA_IStorageBasicRepository;
+锘縰sing WIDESEA_DTO;
+
+namespace WIDESEA_IStorageBasicRepository;
public interface ILocationStatusChangeRecordRepository : IRepository<DtLocationStatusChangeRecord>
{
+ /// <summary>
+ /// 娣诲姞璐т綅鍙樺姩璁板綍
+ /// </summary>
+ /// <param name="changeRecordDto">鏁版嵁妯″瀷</param>
+ /// <returns></returns>
+ bool AddStatusChangeRecord(LocationChangeRecordDto changeRecordDto);
}
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskRepository/Task/ITaskExecuteDetailRepository.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskRepository/Task/ITaskExecuteDetailRepository.cs
index 8a33b50..e7c46df 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskRepository/Task/ITaskExecuteDetailRepository.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_IStorageTaskRepository/Task/ITaskExecuteDetailRepository.cs
@@ -2,5 +2,12 @@
public interface ITaskExecuteDetailRepository : IRepository<Dt_TaskExecuteDetail>
{
+ /// <summary>
+ /// 娣诲姞浠诲姟鏄庣粏
+ /// </summary>
+ /// <param name="dt_Task">浠诲姟鏁版嵁</param>
+ /// <param name="isManual">鏄惁浜哄伐鎿嶄綔</param>
+ /// <param name="message">鎵ц淇℃伅</param>
+ /// <returns></returns>
Task<bool> AddDetailAsync(Dt_Task dt_Task, bool isManual, string message);
}
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Location/LocationStatusChangeRecordRepository.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Location/LocationStatusChangeRecordRepository.cs
index ec5bbe8..3221528 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Location/LocationStatusChangeRecordRepository.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicRepository/Location/LocationStatusChangeRecordRepository.cs
@@ -1,9 +1,31 @@
-锘縩amespace WIDESEA_StorageBasicRepository
+锘縰sing WIDESEA_DTO;
+
+namespace WIDESEA_StorageBasicRepository
{
public class LocationStatusChangeRecordRepository : RepositoryBase<DtLocationStatusChangeRecord>, ILocationStatusChangeRecordRepository
{
public LocationStatusChangeRecordRepository(IUnitOfWorkManage unitOfWorkManage) : base(unitOfWorkManage)
{
}
+
+ /// <summary>
+ /// 娣诲姞璐т綅鍙樺姩璁板綍
+ /// </summary>
+ /// <param name="changeRecordDto">鏁版嵁妯″瀷</param>
+ /// <returns></returns>
+ public bool AddStatusChangeRecord(LocationChangeRecordDto changeRecordDto)
+ {
+ DtLocationStatusChangeRecord dtLocationStatusChangeRecord = new DtLocationStatusChangeRecord()
+ {
+ ChangeType = changeRecordDto.ChangeType,
+ LocationCode = changeRecordDto.LocationCode,
+ LocationId = changeRecordDto.LocationId,
+ Creater = "System",
+ TaskNum = changeRecordDto.TaskNum,
+ AfterStatus = changeRecordDto.AfterStatus,
+ BeforeStatus = changeRecordDto.BeforeStatus,
+ };
+ return AddData(dtLocationStatusChangeRecord) > 0;
+ }
}
}
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
index 5ccc088..38ca635 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageBasicServices/Location/LocationInfoService.cs
@@ -1,4 +1,5 @@
-锘縰sing WIDESEA_DTO;
+锘縰sing WIDESEA_Common;
+using WIDESEA_DTO;
namespace WIDESEA_StorageBasicService;
@@ -82,7 +83,26 @@
}
}
-
+ public override WebResponseContent UpdateData(SaveModel saveModel)
+ {
+ int id = saveModel.MainData["id"].ObjToInt();
+ int status = saveModel.MainData["locationStatus"].ObjToInt();
+ var location = BaseDal.QueryFirst(x => x.Id == id);
+
+ LocationChangeRecordDto changeRecordDto = new LocationChangeRecordDto()
+ {
+ AfterStatus = status,
+ BeforeStatus = location.LocationStatus,
+ TaskNum = 0,
+ LocationId = id,
+ LocationCode = location.LocationCode,
+ ChangeType = (int)StatusChangeTypeEnum.ManualOperation
+ };
+
+ _locationStatusChangeRecordRepository.AddStatusChangeRecord(changeRecordDto);
+
+ return base.UpdateData(saveModel);
+ }
#region 鍒涘缓鍘熷璐т綅鏁版嵁
@@ -304,8 +324,6 @@
}
#endregion 鍒涘缓鍒濆璐т綅鏂规硶
-
-
#endregion 鍐呴儴鏂规硶
}
\ No newline at end of file
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskRepository/Task/TaskExecuteDetailRepository.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskRepository/Task/TaskExecuteDetailRepository.cs
index d90f3f4..c5dc491 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskRepository/Task/TaskExecuteDetailRepository.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskRepository/Task/TaskExecuteDetailRepository.cs
@@ -6,6 +6,13 @@
{
}
+ /// <summary>
+ /// 娣诲姞浠诲姟鏄庣粏
+ /// </summary>
+ /// <param name="dt_Task">浠诲姟鏁版嵁</param>
+ /// <param name="isManual">鏄惁浜哄伐鎿嶄綔</param>
+ /// <param name="message">鎵ц淇℃伅</param>
+ /// <returns></returns>
public async Task<bool> AddDetailAsync(Dt_Task dt_Task,bool isManual,string message)
{
Dt_TaskExecuteDetail dt_TaskExecuteDetail = new Dt_TaskExecuteDetail()
diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index 845ece9..0ef476a 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -250,6 +250,7 @@
if (task != null)
{
+
// 鏇存柊鐜版湁浠诲姟
content = await UpdateExistingTask(input, areaInfo.AreaID, task);
}
@@ -665,6 +666,7 @@
int taskState;
string original = task.CurrentAddress;
DtLocationInfo location = new DtLocationInfo();
+ int beforeStatus = 0;
if (input.Type == (int)TaskTypeEnum.Outbound)
{
@@ -678,6 +680,7 @@
location = await GetLocationDistributeAsync(areaId, task.Roadway);
toAddress = location.LocationCode;
taskState = (int)InTaskStatusEnum.Line_InFinish;
+ beforeStatus = location.LocationStatus;
// 鏇存柊璐т綅淇℃伅
location.LocationStatus = (int)LocationEnum.Lock;
@@ -693,24 +696,25 @@
_unitOfWorkManage.BeginTran();
bool isUpdateLo = true;
bool isUpdateChange = true;
+
// 灏濊瘯鏇存柊浠诲姟
bool isResult = await BaseDal.UpdateDataAsync(task);
- bool isTaskDetail = await _taskExecuteDetailRepository.AddDetailAsync(task, true, TaskDescription.GetTaskUpdateDescription(task.PalletCode, original, input.Position, InTaskStatusEnum.Line_InFinish.GetIntegralRuleTypeEnumDesc()));
+ bool isTaskDetail = await _taskExecuteDetailRepository.AddDetailAsync(task, false, TaskDescription.GetTaskUpdateDescription(task.PalletCode, original, input.Position, InTaskStatusEnum.Line_InFinish.GetIntegralRuleTypeEnumDesc()));
if (input.Type != (int)TaskTypeEnum.Outbound)
{
- DtLocationStatusChangeRecord dtLocationStatusChangeRecord = new DtLocationStatusChangeRecord()
+ LocationChangeRecordDto changeRecordDto = new LocationChangeRecordDto()
{
- ChangeType = task.TaskType,
- LocationCode = location.LocationCode,
- LocationId = location.Id,
- Creater = "System",
- TaskNum = task.TaskNum,
AfterStatus = location.LocationStatus,
- BeforeStatus = (int)LocationEnum.Free,
+ BeforeStatus = beforeStatus,
+ TaskNum = task.TaskNum.Value,
+ LocationId = location.Id,
+ LocationCode = location.LocationCode,
+ ChangeType = (int)StatusChangeTypeEnum.AutomaticStorage,
};
- isUpdateChange = await _locationStatusChangeRecordRepository.AddDataAsync(dtLocationStatusChangeRecord) > 0;
+ isUpdateChange = _locationStatusChangeRecordRepository.AddStatusChangeRecord(changeRecordDto);
isUpdateLo = await _locationRepository.UpdateDataAsync(location);
}
+
if (isResult && isUpdateLo && isTaskDetail)
{
_unitOfWorkManage.CommitTran();
@@ -752,7 +756,7 @@
SourceAddress = input.Position,
TaskState = (int)InTaskStatusEnum.InNew,
TaskType = (int)TaskTypeEnum.Inbound,
- TaskNum = await BaseDal.GetTaskNo(),
+ TaskNum = await BaseDal.GetTaskNo(),
Creater = "Systeam"
};
// 灏濊瘯娣诲姞鏂颁换鍔�
--
Gitblit v1.9.3