| | |
| | | <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 |
| | | > |
| | | > --> |
| | | <el-link |
| | | type="primary" |
| | | size="small" |
| | |
| | | <el-table |
| | | ref="singleTable" |
| | | :data="tableData" |
| | | :summary-method="getSummaries" |
| | | show-summary |
| | | style="width: 100%; height: 100%" |
| | | highlight-current-row |
| | | @current-change="handleCurrentChange" |
| | |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "unit", |
| | | title: "单位", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "orderDetailStatus", |
| | | title: "订单明细状态", |
| | | type: "tag", |
| | | width: 180, |
| | | bindKey:"orderDetailStatusEnum" |
| | | bindKey: "orderDetailStatusEnum", |
| | | }, |
| | | { |
| | | prop: "assignStock", |
| | |
| | | Foots: "", |
| | | total: 0, |
| | | // 2020.08.29增加自定义分页条大小 |
| | | sizes: [30, 60, 100, 120], |
| | | size: 30, // 默认分页大小 |
| | | sizes: [60, 100, 120], |
| | | size: 60, // 默认分页大小 |
| | | Wheres: [], |
| | | page: 1, |
| | | rows: 30, |
| | | rows: 60, |
| | | }, |
| | | searchFormOptions: [ |
| | | [ |
| | |
| | | this.getDictionaryData(); |
| | | this.getData(); |
| | | }, |
| | | getSummaries(param) { |
| | | const { columns, data } = param |
| | | const sums = [] |
| | | |
| | | columns.forEach((column, index) => { |
| | | if (index === 0) { |
| | | sums[index] = '合计' |
| | | return |
| | | } |
| | | |
| | | // 仅对数值列求和 |
| | | // 仅对某一列求和 |
| | | if (column.property === 'lockQuantity' || column.property === 'overOutQuantity' || column.property === 'orderQuantity') { |
| | | 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) |
| | | } else { |
| | | sums[index] = '-' |
| | | } |
| | | } |
| | | |
| | | }) |
| | | |
| | | return sums |
| | | }, |
| | | getData() { |
| | | var wheres = [{ name: "orderId", value: this.row.id }]; |
| | | var param = { |
| | |
| | | if (column.prop == "assignStock") { |
| | | this.$refs.child.open(row); |
| | | } else { |
| | | //点击打开出库详情 |
| | | this.$refs.selectedStock.open(row); |
| | | } |
| | | }, |
| | |
| | | return this.$message.error("请选择单据明细"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // 获取选中行的id |
| | | |
| | | console.log(keys); |
| | | this.http |
| | | .post("api/Task/GenerateOutboundTasks", keys, "数据处理中") |
| | | .post("api/Task/WMSGenerateOutboundTask", keys, "数据处理中") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("操作成功"); |
| | |
| | | if ( |
| | | row.orderDetailStatus !== 0 && |
| | | row.orderDetailStatus !== 60 && |
| | | row.orderDetailStatus !== 70 |
| | | row.orderDetailStatus !== 70 && |
| | | row.orderDetailStatus !== 80 |
| | | ) { |
| | | return true; |
| | | } else { |
| | |
| | | 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 { |
| | |
| | | .text-button:hover { |
| | | background-color: #f0f9eb !important; |
| | | } |
| | | |
| | | .el-table .warning-row { |
| | | background: oldlace; |
| | | } |
| | | |
| | | .box-table .el-table tbody tr:hover > td { |
| | | background-color: #d8e0d4 !important; |
| | | /* color: #ffffff; */ |