zouyu
2023-12-12 a41cd450e4b6afe11f9d1c6f09f19f1fbf86edca
	modified:   src/api/quality/packageInspect.js
modified: src/views/quality/packageinspect/packageInspect-form.vue
已修改2个文件
30 ■■■■■ 文件已修改
src/api/quality/packageInspect.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/packageinspect/packageInspect-form.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/quality/packageInspect.js
@@ -36,4 +36,10 @@
    params: data
  })
}
export function getCustomer(id) {
  return request({
    url: '/mes/packageInspect/getcustomer/'+id,
    method: 'get',
  })
}
src/views/quality/packageinspect/packageInspect-form.vue
@@ -168,6 +168,7 @@
  fetchListById,
  updatePackageInsProduct,
  updatePackageInspectById,
  getCustomer,
} from '@/api/quality/packageInspect'
export default {
    computed:{},
@@ -249,9 +250,27 @@
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          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){
@@ -262,7 +281,10 @@
            _than.$message.error("上报失败",res.data.data);
          }
        })
        }).catch(() => {})
            }).catch(() => {
            })
          })
        }
      },
      // 添加行
      clickAddLine() {