| | |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.ruleForm, "保存内容处理", this.tableData) |
| | | let isDeliveryCount = false |
| | | this.tableData.map((item) => { |
| | | if (item.deliveryAmount == 0) { |
| | | isDeliveryCount = true |
| | | return |
| | | } |
| | | }) |
| | | if (isDeliveryCount) { |
| | | this.$message.error("发货数量必须大于0") |
| | | } else { |
| | | let deliveryList = this.tableData.map((item) => { |
| | | return { |
| | | outsourcingOrderProductID: item.id, |
| | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 全部发货完成 |
| | |
| | | */ |
| | | // 提交登录信息 |
| | | submit() { |
| | | this.$refs.loginForm.validate(async (valid) => { |
| | | this.$refs.loginForm.validate((valid) => { |
| | | if (valid) { |
| | | // 登录 |
| | | await login({ |
| | | login({ |
| | | username: this.formLogin.username, |
| | | password: this.formLogin.password, |
| | | captcha: this.formLogin.code, |
| | |
| | | localStorage.setItem("token", res.data.token) |
| | | localStorage.setItem("username", res.data.user.username) |
| | | localStorage.setItem("uuid", res.data.user.id) |
| | | setTimeout(() => { |
| | | this.$router.push({ path: "/orderManageModule/orderManage" }) |
| | | }, 1000) |
| | | // if (Object.keys(res.data).length > 0) { |
| | | // setTimeout(() => { |
| | | // this.$router.push({ path: "/orderManageModule/orderManage" }) |
| | | // }, 1000) |
| | | // } |
| | | } else { |
| | | this.$message.warning(res.msg) |
| | | if (res.msg == "验证码错误") { |