| | |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button @click="requestOperate('put')" type="primary">更新</el-button> |
| | | <el-button @click="requestOperate('update')" type="primary">更新</el-button> |
| | | <el-button @click="requestOperate('out')" type="warning">取货完成</el-button> |
| | | <el-button @click="requestOperate('in')" type="warning">放货完成</el-button> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | |
| | | } |
| | | }); |
| | | }, |
| | | requestOperate() { |
| | | requestOperate(method) { |
| | | let that = this |
| | | $.ajax({ |
| | | url: baseUrl + "/site/detl/update", |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: this.formParam, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | that.$confirm('此操作存在风险,是否继续','提示',{ |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(()=>{ |
| | | $.ajax({ |
| | | url: baseUrl + "/site/detl/"+method, |
| | | headers: { |
| | | 'token': localStorage.getItem('token') |
| | | }, |
| | | data: this.formParam, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (res.code == 200) { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'success' |
| | | }); |
| | | } else { |
| | | that.$message({ |
| | | message: res.msg, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | }) |
| | | |
| | | } |
| | | } |
| | | }) |