| | |
| | | <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" |
| | |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "orderId", |
| | | prop: "outBSTOrderId", |
| | | title: "åºåºå主é®", |
| | | type: "string", |
| | | width: 90, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "materielCode", |
| | | prop: "materialId", |
| | | title: "䏿¸¸ç©æID", |
| | | type: "string", |
| | | width: 120, |
| | | }, |
| | | { |
| | | prop: "materialNo", |
| | | title: "ç©æç¼å·", |
| | | type: "string", |
| | | width: 150, |
| | |
| | | title: "ç©æåç§°", |
| | | type: "string", |
| | | width: 150, |
| | | hidden: true, |
| | | }, |
| | | { |
| | | prop: "batchNo", |
| | | title: "æ¹æ¬¡å·", |
| | | prop: "width", |
| | | title: "å¹
宽", |
| | | type: "string", |
| | | width: 90, |
| | | width: 100, |
| | | }, |
| | | { |
| | | prop: "orderQuantity", |
| | | title: "åæ®æ°é", |
| | | prop: "xqLen", |
| | | title: "éæ±é¿åº¦", |
| | | type: "string", |
| | | width: 90, |
| | | width: 130, |
| | | }, |
| | | { |
| | | prop: "lockQuantity", |
| | | title: "é宿°é", |
| | | prop: "totalUsage", |
| | | title: "æ»ç¨éé", |
| | | type: "int", |
| | | width: 90, |
| | | width: 130, |
| | | }, |
| | | { |
| | | prop: "overOutQuantity", |
| | | title: "å·²åºæ°é", |
| | | prop: "assignTotalUsage", |
| | | title: "å·²åé
é¿åº¦", |
| | | type: "string", |
| | | width: 90, |
| | | width: 130, |
| | | }, |
| | | { |
| | | prop: "unit", |
| | | title: "åä½", |
| | | prop: "outTotalUsage", |
| | | title: "å·²åºé¿åº¦", |
| | | type: "string", |
| | | width: 90, |
| | | width: 130, |
| | | }, |
| | | { |
| | | prop: "orderDetailStatus", |
| | | prop: "outBSTOrderDetailStatus", |
| | | title: "订åæç»ç¶æ", |
| | | type: "tag", |
| | | width: 180, |
| | | bindKey: "orderDetailStatusEnum", |
| | | bindKey: "outboundStatusEnum", |
| | | }, |
| | | { |
| | | prop: "assignStock", |
| | | title: "æå®åºå", |
| | | type: "icon", |
| | | width: 90, |
| | | icon: "el-icon-s-grid", |
| | | }, |
| | | // { |
| | | // prop: "assignStock", |
| | | // title: "æå®åºå", |
| | | // type: "icon", |
| | | // width: 90, |
| | | // icon: "el-icon-s-grid", |
| | | // }, |
| | | { |
| | | prop: "viewDetail", |
| | | title: "åºåºè¯¦ç»", |
| | |
| | | icon: "el-icon-s-operation", |
| | | }, |
| | | { |
| | | prop: "creater", |
| | | title: "å建人", |
| | | type: "string", |
| | | width: 90, |
| | | }, |
| | | { |
| | | prop: "createDate", |
| | | title: "å建æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "modifier", |
| | | title: "ä¿®æ¹äºº", |
| | | type: "string", |
| | | width: 100, |
| | | width: 170, |
| | | }, |
| | | { |
| | | prop: "modifyDate", |
| | | title: "ä¿®æ¹æ¶é´", |
| | | type: "datetime", |
| | | width: 160, |
| | | }, |
| | | { |
| | | prop: "remark", |
| | | title: "夿³¨", |
| | | type: "string", |
| | | width: 170, |
| | | }, |
| | | ], |
| | | paginations: { |
| | |
| | | } |
| | | |
| | | // ä»
对æ°å¼åæ±å |
| | | // ä»
对æä¸åæ±å |
| | | if (column.property === 'lockQuantity' || column.property === 'overOutQuantity' || column.property === 'orderQuantity') { |
| | | if (column.property === 'xqLen' || column.property === 'assignTotalUsage' || column.property === 'outTotalUsage' || column.property === 'totalUsage') { |
| | | 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) |
| | | }, 0); |
| | | //ä¿ç两ä½å°æ° |
| | | sums[index] = sums[index].toFixed(4) |
| | | } else { |
| | | sums[index] = '-' |
| | | } |
| | |
| | | return sums |
| | | }, |
| | | getData() { |
| | | var wheres = [{ name: "orderId", value: this.row.id }]; |
| | | var wheres = [{ name: "outBSTOrderId", value: this.row.id }]; |
| | | var param = { |
| | | page: this.paginations.page, |
| | | rows: this.paginations.rows, |
| | |
| | | wheres: JSON.stringify(wheres), // æ¥è¯¢æ¡ä»¶ï¼æ ¼å¼ä¸º[{ name: "åæ®µ", value: "xx" }] |
| | | }; |
| | | this.http |
| | | .post("api/OutboundOrderDetail/GetPageData", param, "æ¥è¯¢ä¸") |
| | | .post("api/OutBSTOrderDetail/GetPageData", param, "æ¥è¯¢ä¸") |
| | | .then((x) => { |
| | | this.tableData = x.rows; |
| | | }); |
| | |
| | | this.$refs.child.open(row); |
| | | } else { |
| | | //ç¹å»æå¼åºåºè¯¦æ
|
| | | this.$refs.selectedStock.open(row); |
| | | this.$refs.selectedStock.open(row,this.row.outBSTOrderNo); |
| | | } |
| | | }, |
| | | lockstocks() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | } |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | this.http |
| | | .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |
| | | this.showDetialBox = false; |
| | | this.$emit("parentCall", ($vue) => { |
| | | $vue.getData(); |
| | | }); |
| | | }); |
| | | }, |
| | | // lockstocks() { |
| | | // if (this.selection.length === 0) { |
| | | // return this.$message.error("è¯·éæ©åæ®æç»"); |
| | | // } |
| | | // var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | // this.http |
| | | // .post("api/OutboundOrderDetail/LockOutboundStocks", keys, "æ°æ®å¤çä¸") |
| | | // .then((x) => { |
| | | // if (!x.status) return this.$message.error(x.message); |
| | | // this.$message.success("æä½æå"); |
| | | // this.showDetialBox = false; |
| | | // this.$emit("parentCall", ($vue) => { |
| | | // $vue.getData(); |
| | | // }); |
| | | // }); |
| | | // }, |
| | | outbound() { |
| | | if (this.selection.length === 0) { |
| | | return this.$message.error("è¯·éæ©åæ®æç»"); |
| | |
| | | var keys = this.selection.map((item) => item.id); // è·åéä¸è¡çid |
| | | |
| | | this.http |
| | | .post("api/Task/GenerateOutboundTasks", keys, "æ°æ®å¤çä¸") |
| | | .post("api/Task/CreateBSTOutboundTasks", keys, "æ°æ®å¤çä¸") |
| | | .then((x) => { |
| | | if (!x.status) return this.$message.error(x.message); |
| | | this.$message.success("æä½æå"); |