Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
| | |
| | | params: data |
| | | }) |
| | | } |
| | | export function getCustomer(id) { |
| | | return request({ |
| | | url: '/mes/packageInspect/getcustomer/'+id, |
| | | method: 'get', |
| | | }) |
| | | } |
| | | |
| | |
| | | fetchListById, |
| | | updatePackageInsProduct, |
| | | updatePackageInspectById, |
| | | getCustomer, |
| | | } from '@/api/quality/packageInspect' |
| | | export default { |
| | | computed:{}, |
| | |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let data = { |
| | | id: _than.dataForm.id, |
| | | result: _than.conclusionTable[0].result, |
| | | } |
| | | updatePackageInspectById(data).then(res => { |
| | | if(res.data.code === 0){ |
| | | _than.resultVal = res.data.data |
| | | sessionStorage.setItem("packIns-resultVal-"+_than.dataForm.id,res.data.data) |
| | | _than.$message.success("上报成功"); |
| | | }else{ |
| | | _than.$message.error("上报失败",res.data.data); |
| | | } |
| | | }) |
| | | this.checkCustomer(_than.dataForm.id) |
| | | }).catch(() => {}) |
| | | }, |
| | | checkCustomer(id){ |
| | | const _than = this |
| | | if(id){ |
| | | getCustomer(id).then(res=>{ |
| | | if(res.status===200){ |
| | | console.log(res.data); |
| | | } |
| | | }).catch(error=>{ |
| | | this.$prompt('请输入行号', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | inputPattern: /\S/, |
| | | inputErrorMessage: '行号不能为空' |
| | | }).then(({ value }) => { |
| | | let data = { |
| | | id: _than.dataForm.id, |
| | | result: _than.conclusionTable[0].result, |
| | | lineNo: value |
| | | } |
| | | updatePackageInspectById(data).then(res => { |
| | | if(res.data.code === 0){ |
| | | _than.resultVal = res.data.data |
| | | sessionStorage.setItem("packIns-resultVal-"+_than.dataForm.id,res.data.data) |
| | | _than.$message.success("上报成功"); |
| | | }else{ |
| | | _than.$message.error("上报失败",res.data.data); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | // 添加行 |
| | | clickAddLine() { |
| | | this.list.push({ |