From 798a97899b961baf7099bc3421d3ad926b1298da Mon Sep 17 00:00:00 2001 From: wanshenmean <cathay_xy@163.com> Date: 星期一, 23 九月 2024 16:18:17 +0800 Subject: [PATCH] 添加组盘,明细数据VUE组件 --- Code Management/WMS/WIDESEA_WMSClient/src/components/basic/VolTable.vue | 42 ++++++++++++++++++++++-------------------- 1 files changed, 22 insertions(+), 20 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 72dc314..3279d39 100644 --- a/Code Management/WMS/WIDESEA_WMSClient/src/components/basic/VolTable.vue +++ b/Code Management/WMS/WIDESEA_WMSClient/src/components/basic/VolTable.vue @@ -59,7 +59,7 @@ </div> <span v-else-if="columnChildren.type == 'date'">{{ formatterDate(scopeChildren.row, columnChildren) - }}</span> + }}</span> <template v-else> {{ scopeChildren.row[columnChildren.field] }} </template> @@ -71,7 +71,8 @@ <!-- 鍚敤鍙屽嚮缂栬緫鍔熻兘锛屽甫缂栬緫鍔熻兘鐨勪笉浼氭覆鏌撲笅鎷夋鏂囨湰鑳屾櫙棰滆壊 --> <!-- @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"> + <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;" @@ -99,37 +100,37 @@ <!-- 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) => { - column.onChange && - column.onChange(scope.row, column, 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)"> </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) => { - column.onChange && - column.onChange(scope.row, column, 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)"> </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) => { - switchChange(val, scope.row, column); - } + switchChange(val, scope.row, column); + } " :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' + " :inactive-value="typeof scope.row[column.field] == 'boolean' ? false : typeof scope.row[column.field] == 'string' ? '0' : 0 - " :disabled="initColumnDisabled(scope.row, column)"> + " :disabled="initColumnDisabled(scope.row, column)"> </el-switch> <template v-else-if=" ['select', 'selectList'].indexOf(column.edit.type) != -1 @@ -146,8 +147,8 @@ </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 + ? 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) @@ -161,8 +162,9 @@ 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)" + :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> @@ -217,7 +219,7 @@ )" :key="fIndex" @click="dowloadFile(file)">{{ file.name }}</a> <span v-else-if="column.type == 'date'">{{ formatterDate(scope.row, column) - }}</span> + }}</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缂哄け鐨勯棶棰� --> @@ -230,15 +232,15 @@ {{ scope.row[column.field] }} </div> <div @click="() => { - column.click && formatterClick(scope.row, column); - } + 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> -- Gitblit v1.9.3