| | |
| | | return this.$error("æå·ä¸è½ä¸ºç©º"); |
| | | } |
| | | }) |
| | | if (formData.detailData.length > 3) return this.$error("å
¥åºåæç»ä¸è½è¶
è¿3个"); |
| | | // if (formData.detailData.length > 3) return this.$error("å
¥åºåæç»ä¸è½è¶
è¿3个"); |
| | | return req; |
| | | }, |
| | | updateBefore(formData) { |
| | | //ç¼è¾ä¿ååformData为对象ï¼å
æ¬æç»è¡¨ãå é¤è¡çId |
| | | // this.$error(formData.detailData.length) |
| | | if (formData.detailData.length > 3) return this.$error("å
¥åºåæç»ä¸è½è¶
è¿3个"); |
| | | // if (formData.detailData.length > 3) return this.$error("å
¥åºåæç»ä¸è½è¶
è¿3个"); |
| | | return true; |
| | | }, |
| | | rowClick({ row, column, event }) { |
| | |
| | | //妿éè¦ç»ä¸ææ¡è®¾ç½®é»è®¤å¼ï¼è¯·éåthis.editFormOptionsæ¾å°å段é
置对åºdata屿§çkeyå¼ |
| | | //ç䏿就æè¾åºçï¼console.log(this.editFormOptions) |
| | | if (this.currentAction == 'Add') { |
| | | let locationCodes=this.getOption("locationCode"); |
| | | locationCodes.bind.data.splice(0); |
| | | this.http.post("/api/LocationInfo/GetLocationCodes", null, true).then( |
| | | source => { |
| | | if (!source.status) return this.$error(source.message); |
| | | for (let i = 0; i < source.data.length; i++) { |
| | | locationCodes.bind.data.push({ key: source.data[i], value: source.data[i] }); |
| | | } |
| | | this.refresh(); |
| | | }) |
| | | let locationCodes = this.getOption("locationCode"); |
| | | locationCodes.bind.data.splice(0); |
| | | this.http.post("/api/LocationInfo/GetLocationCodes", null, true).then( |
| | | source => { |
| | | if (!source.status) return this.$error(source.message); |
| | | for (let i = 0; i < source.data.length; i++) { |
| | | locationCodes.bind.data.push({ key: source.data[i], value: source.data[i] }); |
| | | } |
| | | this.refresh(); |
| | | }) |
| | | this.editFormOptions.forEach(x => { |
| | | x.forEach(option => { |
| | | if (option.field == 'orderNo' || option.field == 'orderType') { |
| | | option.readonly = false |
| | | } |
| | | }) |
| | | }) |
| | | this.detailOptions.columns.forEach(x => { |
| | | if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') { |
| | | x.readonly = false |
| | | } |
| | | }); |
| | | } else { |
| | | this.detailOptions.columns.forEach(x => { |
| | | if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') { |
| | | x.readonly = true// row.orderStatus > 0 |
| | | } |
| | | }); |
| | | this.editFormOptions.forEach(x => { |
| | | x.forEach(option => { |
| | | if (option.field == 'orderNo' || option.field == 'orderType') { |
| | | option.readonly = true |
| | | } |
| | | }) |
| | | }) |
| | | // this.detailOptions.columns.forEach(x => { |
| | | // if (x.field == 'materielCode' || x.field == 'batchNo' || x.field == 'orderQuantity' || x.field == 'locationCode') { |
| | | // x.readonly = true// row.orderStatus > 0 |
| | | // } |
| | | // }); |
| | | } |
| | | // if (row.orderStatus != '0') { |
| | | // this.detailOptions.columns.forEach(x => { |