| | |
| | | >已鿰éï¼ {{ selectionSum }} |
| | | </span> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <!-- <el-col :span="4"> |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | |
| | | @click="revokeAssign" |
| | | >æ¤éåé
</el-link |
| | | ></el-col |
| | | > |
| | | > --> |
| | | </el-row> |
| | | </el-alert> |
| | | </div> |
| | |
| | | :width="item.width" |
| | | align="center" |
| | | > |
| | | <template #default="scoped" v-if="item.type == 'icon'"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="item.title" |
| | | placement="bottom" |
| | | ><el-button |
| | | type="text" |
| | | @click="tableButtonClick(scoped.row, item)" |
| | | ><i :class="item.icon" style="font-size: 22px"></i></el-button |
| | | ></el-tooltip> |
| | | <template #default="scoped"> |
| | | <template v-if="item.type == 'icon'"> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="item.title" |
| | | placement="bottom" |
| | | ><el-button |
| | | type="text" |
| | | @click="tableButtonClick(scoped.row, item)" |
| | | ><i |
| | | :class="item.icon" |
| | | :style="{ fontSize: item.iconSize || '22px' }" |
| | | ></i></el-button |
| | | ></el-tooltip> |
| | | </template> |
| | | <template v-else> |
| | | <el-tooltip |
| | | :content="scoped.row[item.prop]" |
| | | placement="top" |
| | | :disabled=" |
| | | !isContentOverflow(scoped.row[item.prop], item.width) |
| | | " |
| | | > |
| | | <div class="cell-content"> |
| | | {{ scoped.row[item.prop] }} |
| | | </div> |
| | | </el-tooltip> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-button type="primary" size="small" @click="outbound" |
| | | >ç´æ¥åºåº</el-button |
| | | > |
| | | <el-button type="primary" size="small" @click="lockStock" |
| | | <!-- <el-button type="primary" size="small" @click="lockStock" |
| | | >éå®åºå</el-button |
| | | > |
| | | > --> |
| | | <el-button type="danger" size="small" @click="showDetialBox = false" |
| | | >å
³é</el-button |
| | | > |
| | |
| | | width: 150, |
| | | }, |
| | | { |
| | | prop: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | | { |
| | | prop: "locationCode", |
| | | title: "è´§ä½ç¼å·", |
| | | type: "string", |
| | | |
| | | width: 180, |
| | | }, |
| | | { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | isContentOverflow(content, width) { |
| | | if (!content || !width) return false; |
| | | // ä¼°ç®æ¯ä¸ªå符çå®½åº¦ï¼æ ¹æ®åä½å¤§å°è°æ´ï¼ |
| | | const charWidth = 8; // å设æ¯ä¸ªå符宽度为 8px |
| | | const maxChars = Math.floor(width / charWidth); |
| | | return content.length > maxChars; |
| | | }, |
| | | open(row) { |
| | | this.row = row; |
| | | this.showDetialBox = true; |
| | |
| | | }); |
| | | }, |
| | | outbound() { |
| | | if (this.selection.length <= 0) { |
| | | return this.$message.error("è¯·éæ©æå®åºå"); |
| | | } |
| | | this.http |
| | | .post( |
| | | "api/Task/GenerateOutboundTask?id=" + this.row.id, |
| | |
| | | .more-style { |
| | | color: red; |
| | | } |
| | | .cell-content { |
| | | white-space: nowrap; /* 鲿¢æ¢è¡ */ |
| | | overflow: hidden; /* éèè¶
åºé¨å */ |
| | | text-overflow: ellipsis; /* æ¾ç¤ºçç¥å· */ |
| | | width: 100%; /* å®½åº¦å æ»¡åå
æ ¼ */ |
| | | } |
| | | </style> |
| | | |
| | | <style> |