| | |
| | | <span>å·²éä¸ {{ selection.length }} 项</span> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <!-- <el-link |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | | style="float: right; height: 20px" |
| | | @click="lockstocks" |
| | | >éå®åºå</el-link |
| | | > --> |
| | | style="float: left; height: 20px;" |
| | | @click="cancelOutFeedbackERP" |
| | | >åºåºæç»åæ¶æ¨éERP</el-link |
| | | > |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | |
| | | align="center" |
| | | > |
| | | <template #default="scoped"> |
| | | <!-- 徿 å --> |
| | | <div v-if="item.type == 'icon'"> |
| | | <el-tooltip |
| | | class="item" |
| | |
| | | ></el-tooltip> |
| | | </div> |
| | | |
| | | <!-- æ ç¾å --> |
| | | <div v-else-if="item.type == 'tag'"> |
| | | <el-tag size="small"> |
| | | {{ getDictionary(scoped.row, item) }} |
| | | </el-tag> |
| | | </div> |
| | | |
| | | <!-- æ®éææ¬å - 带溢åºéèåTooltip --> |
| | | <div v-else> |
| | | <el-tooltip |
| | | class="item" |
| | | effect="dark" |
| | | :content="formatCellContent(scoped.row[item.prop])" |
| | | placement="top" |
| | | :disabled="!shouldShowTooltip(scoped.row[item.prop], item)" |
| | | > |
| | | <span |
| | | class="ellipsis-cell" |
| | | :style="{ width: calculateCellWidth(item) }" |
| | | > |
| | | {{ formatCellContent(scoped.row[item.prop]) }} |
| | | </span> |
| | | </el-tooltip> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | prop: "viewDetail", |
| | | title: "åºåºè¯¦ç»", |
| | | type: "icon", |
| | | width: 90, |
| | | icon: "el-icon-s-operation", |
| | | }, |
| | | { |
| | | prop: "materielName", |
| | | title: "ç©æåç§°", |
| | | prop: "materielCode", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | |
| | | prop: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | type: "string", |
| | | width: 90, |
| | | width: 180, |
| | | }, |
| | | { |
| | | prop: "supplierBatch", |
| | | title: "ä¾åºåæ¹æ¬¡å·", |
| | | type: "string", |
| | | width: 180, |
| | | }, |
| | | { |
| | | prop: "orderQuantity", |
| | | title: "åæ®æ°é", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "lockQuantity", |
| | | title: "é宿°é", |
| | | type: "int", |
| | | width: 90, |
| | | }, |
| | | { |
| | |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "unit", |
| | | title: "åä½", |
| | | prop: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 90, |
| | | width: 180, |
| | | }, |
| | | { |
| | | prop: "orderDetailStatus", |
| | |
| | | bindKey: "orderDetailStatusEnum", |
| | | }, |
| | | { |
| | | prop: "assignStock", |
| | | title: "æå®åºå", |
| | | type: "icon", |
| | | width: 90, |
| | | icon: "el-icon-s-grid", |
| | | prop: "materielName", |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | }, |
| | | { |
| | | prop: "viewDetail", |
| | | title: "åºåºè¯¦ç»", |
| | | type: "icon", |
| | | width: 90, |
| | | icon: "el-icon-s-operation", |
| | | prop: "locationName", |
| | | title: "åºåºè´§ä½", |
| | | type: "string", |
| | | width: 200, |
| | | }, |
| | | { |
| | | prop: "creater", |
| | |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | prop: "lockQuantity", |
| | | title: "é宿°é", |
| | | type: "int", |
| | | width: 90, |
| | | }, |
| | | ], |
| | | paginations: { |
| | |
| | | order: "desc", |
| | | Foots: "", |
| | | total: 0, |
| | | // 2020.08.29å¢å èªå®ä¹å页æ¡å¤§å° |
| | | sizes: [60, 100, 120], |
| | | size: 60, // é»è®¤åé¡µå¤§å° |
| | | size: 60, |
| | | Wheres: [], |
| | | page: 1, |
| | | rows: 60, |
| | |
| | | return |
| | | } |
| | | |
| | | // ä»
对æ°å¼åæ±å |
| | | // ä»
对æä¸åæ±å |
| | | if (column.property === 'lockQuantity' || column.property === 'overOutQuantity' || column.property === 'orderQuantity') { |
| | | // ä»
对æå®æ°å¼åæ±åå¹¶ä¿ç两ä½å°æ° |
| | | if (['lockQuantity', 'overOutQuantity', 'orderQuantity'].includes(column.property)) { |
| | | const values = data.map(item => Number(item[column.property])) |
| | | console.log(values); |
| | | if (!values.every(value => isNaN(value))) { |
| | | sums[index] = values.reduce((prev, curr) => { |
| | | return prev + (isNaN(curr) ? 0 : curr) |
| | | }, 0) |
| | | |
| | | if (!values.every(value => isNaN(value))) { |
| | | // è®¡ç®æ»å |
| | | const total = values.reduce((prev, curr) => { |
| | | return prev + (isNaN(curr) ? 0 : curr) |
| | | }, 0) |
| | | |
| | | // ä¿ç两ä½å°æ° |
| | | sums[index] = total.toFixed(2) |
| | | } else { |
| | | sums[index] = '-' |
| | | } |
| | | } else { |
| | | sums[index] = '-' |
| | | sums[index] = '' |
| | | } |
| | | } |
| | | |
| | | }) |
| | | |
| | | return sums |
| | |
| | | rows: this.paginations.rows, |
| | | sort: this.paginations.sort, |
| | | order: this.paginations.order, |
| | | wheres: JSON.stringify(wheres), // æ¥è¯¢æ¡ä»¶ï¼æ ¼å¼ä¸º[{ name: "åæ®µ", value: "xx" }] |
| | | wheres: JSON.stringify(wheres), |
| | | }; |
| | | this.http |
| | | .post("api/OutboundOrderDetail/GetPageData", param, "æ¥è¯¢ä¸") |
| | |
| | | if (column.prop == "assignStock") { |
| | | this.$refs.child.open(row); |
| | | } else { |
| | | //ç¹å»æå¼åºåºè¯¦æ
|
| | | this.$refs.selectedStock.open(row); |
| | | } |
| | | }, |
| | |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | var keys = this.selection.map((item) => item.id); |
| | | this.http |
| | | .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | console.log(keys); |
| | | var keys = this.selection.map((item) => item.id); |
| | | this.http |
| | | .post("api/Task/WMSGenerateOutboundTask", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | cancelOutFeedbackERP() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); |
| | | this.$confirm("æ¯å¦åæ¶è¯¥åºåºåæç»","忮忶è¦å",{ |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | center: true, |
| | | }).then(() => { |
| | | this.http |
| | | .post("api/OutboundOrderDetail/CancelOutFeedbackERP", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | setCurrent(row) { |
| | | this.$refs.singleTable.setCurrentRow(row); |
| | | }, |
| | |
| | | var item = this.dictionaryList.find((x) => x.dicNo == column.bindKey); |
| | | if (item) { |
| | | var dicItem = item.data.find((x) => x.key == row[column.prop]); |
| | | console.log(dicItem); |
| | | if (dicItem) { |
| | | return dicItem.value; |
| | | } else { |
| | |
| | | } |
| | | } |
| | | }, |
| | | // æ ¼å¼ååå
æ ¼å
容ï¼å¤çnull/undefined |
| | | formatCellContent(content) { |
| | | if (content === null || content === undefined) { |
| | | return "æ æ°æ®"; |
| | | } |
| | | // å¯¹æ¥æç±»åè¿è¡ç¹æ®å¤çï¼å¦æéè¦ï¼ |
| | | return content.toString(); |
| | | }, |
| | | // 计ç®åå
æ ¼å®½åº¦ï¼é¢çè¾¹è· |
| | | calculateCellWidth(column) { |
| | | // 妿åå®ä¹äºå®½åº¦ï¼åå»20pxä½ä¸ºå
è¾¹è· |
| | | if (column.width) { |
| | | return `${column.width - 20}px`; |
| | | } |
| | | // æªå®ä¹å®½åº¦å使ç¨100% |
| | | return "100%"; |
| | | }, |
| | | // 夿æ¯å¦éè¦æ¾ç¤ºTooltip |
| | | shouldShowTooltip(content, column) { |
| | | // æ 记为ä¸éè¦æº¢åºå¤ççå䏿¾ç¤ºTooltip |
| | | if (column.noEllipsis) { |
| | | return false; |
| | | } |
| | | |
| | | // 空å
容䏿¾ç¤ºTooltip |
| | | const cellContent = this.formatCellContent(content); |
| | | if (cellContent === "æ æ°æ®") { |
| | | return false; |
| | | } |
| | | |
| | | // å
容è¾çæ¶ä¹ä¸æ¾ç¤ºTooltipï¼æ ¹æ®å®é
éæ±è°æ´é¿åº¦éå¼ï¼ |
| | | return cellContent.length > 8; |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .text-button { |
| | | border: 0px; |
| | | } |
| | | |
| | | /* ææ¬æº¢åºéèæ ·å¼ */ |
| | | .ellipsis-cell { |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | position: relative; |
| | | z-index: 1; |
| | | display: inline-block; |
| | | max-width: 100%; |
| | | } |
| | | </style> |
| | | |
| | |
| | | |
| | | .box-table .el-table tbody tr:hover > td { |
| | | background-color: #d8e0d4 !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .box-table .el-table tbody tr.current-row > td { |
| | | background-color: #f0f9eb !important; |
| | | /* color: #ffffff; */ |
| | | } |
| | | |
| | | .el-table .success-row { |
| | |
| | | .box-table .el-table { |
| | | border: 1px solid #ebeef5; |
| | | } |
| | | |
| | | /* åè®¡è¡ææ¬æº¢åºå¤ç */ |
| | | .el-table__footer-wrapper .el-table__cell { |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | position: relative; |
| | | z-index: 1; |
| | | } |
| | | </style> |