From f9f681cea0527a8fec7624b8c68f20c586a14e37 Mon Sep 17 00:00:00 2001
From: yfy <1976974459@qq.com>
Date: Fri, 7 Apr 2023 11:41:34 +0800
Subject: [PATCH] 2
---
src/api/qc/qc.js | 26 +-
.../{qcResultEntry.vue => FAIResultEntry.vue} | 883 +++++++---
src/views/modules/qc/IPQCResultEntry.vue | 1546 +++++++++++++++++
src/views/modules/qc/qcCheckOutMethod.vue | 11 +-
src/views/modules/qc/qcFamily.vue | 621 -------
...{qcCheckOutModel.vue => qcFamilyModel.vue} | 149 +-
.../modules/qc/qcMasterInformationModel.vue | 4 +-
src/views/modules/qc/qcPartModel.vue | 1057 +++++++++++
8 files changed, 3386 insertions(+), 911 deletions(-)
rename src/views/modules/qc/{qcResultEntry.vue => FAIResultEntry.vue} (56%)
create mode 100644 src/views/modules/qc/IPQCResultEntry.vue
delete mode 100644 src/views/modules/qc/qcFamily.vue
rename src/views/modules/qc/{qcCheckOutModel.vue => qcFamilyModel.vue} (85%)
create mode 100644 src/views/modules/qc/qcPartModel.vue
diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js
index e01dbe1..2421823 100644
--- a/src/api/qc/qc.js
+++ b/src/api/qc/qc.js
@@ -19,8 +19,14 @@ export const searchItemDetails = data => createAPI(`/pms/qc/searchItemDetails`,'
export const deleteItemDetails = data => createAPI(`/pms/qc/deleteItemDetails`,'post',data)
export const saveItemDetails = data => createAPI(`/pms/qc/saveItemDetails`,'post',data)
+// ===================================== 根据物料设置检验模板 =====================================
+export const qcPartModelSearch = data => createAPI(`/pms/qc/qcPartModelSearch`,'post',data)
+export const qcPartModelSave = data => createAPI(`/pms/qc/qcPartModelSave`,'post',data)
+export const qcPartModelUpdate = data => createAPI(`/pms/qc/qcPartModelUpdate`,'post',data)
+export const qcPartModelDelete = data => createAPI(`/pms/qc/qcPartModelDelete`,'post',data)
-// ===================================== 检验模板 =====================================
+
+// ===================================== 根据分类设置检验模板 =====================================
export const qcCheckOutModelSearch = data => createAPI(`/pms/qc/qcCheckOutModelSearch`,'post',data)
export const qcCheckOutModelSave = data => createAPI(`/pms/qc/qcCheckOutModelSave`,'post',data)
export const qcCheckOutModelUpdate = data => createAPI(`/pms/qc/qcCheckOutModelUpdate`,'post',data)
@@ -30,14 +36,6 @@ export const saveModalDetails = data => createAPI(`/pms/qc/saveModalDetails`,'po
export const deleteModalDetails = data => createAPI(`/pms/qc/deleteModalDetails`,'post',data)
export const getItemLists= data => createAPI(`/pms/qc/getItemLists`,'post',data)
-// ===================================== 检验分类 =====================================
-export const qcFamilySearch = data => createAPI(`/pms/qc/qcFamilySearch`,'post',data)
-export const qcFamilySave = data => createAPI(`/pms/qc/qcFamilySave`,'post',data)
-export const qcFamilyUpdate = data => createAPI(`/pms/qc/qcFamilyUpdate`,'post',data)
-export const qcFamilyDelete = data => createAPI(`/pms/qc/qcFamilyDelete`,'post',data)
-export const saveFamilyDetails = data => createAPI(`/pms/qc/saveFamilyDetails`,'post',data)
-export const searchFamilyDetails = data => createAPI(`/pms/qc/searchFamilyDetails`,'post',data)
-export const deleteFamilyDetails = data => createAPI(`/pms/qc/deleteFamilyDetails`,'post',data)
// ===================================== 检验录入 =====================================
export const qcInspectionInformationSearch = data => createAPI(`/pms/qc/qcInspectionInformationSearch`,'post',data)
@@ -49,7 +47,15 @@ export const searchModelTree = data => createAPI(`/pms/qc/searchModelTree`,'post
export const detailInformationSearch = data => createAPI(`/pms/qc/detailInformationSearch`,'post',data)
export const saveDetailInformation = data => createAPI(`/pms/qc/saveDetailInformation`,'post',data)
export const qcInspectionInformationDelete = data => createAPI(`/pms/qc/qcInspectionInformationDelete`,'post',data)
-
+export const saveSubmitResult = data => createAPI(`/pms/qc/saveSubmitResult`,'post',data)
+export const checkCompleted = data => createAPI(`/pms/qc/checkCompleted`,'post',data)
+export const selectModelByPartNo = data => createAPI(`/pms/qc/selectModelByPartNo`,'post',data)
+export const subDetailInformationSave = data => createAPI(`/pms/qc/subDetailInformationSave`,'post',data)
+export const selectSubDetailInformation = data => createAPI(`/pms/qc/selectSubDetailInformation`,'post',data)
+export const checkOutIsSubmit = data => createAPI(`/pms/qc/checkOutIsSubmit`,'post',data)
+export const workOrderSearch = data => createAPI(`/pms/qc/workOrderSearch`,'post',data)
+export const selectInformationByWorkOrderNo = data => createAPI(`/pms/qc/selectInformationByWorkOrderNo`,'post',data)
+export const checkSubDetailValue = data => createAPI(`/pms/qc/checkSubDetailValue`,'post',data)
// ===================================== 主记录栏信息 =====================================
export const searchMasterInformation = data => createAPI(`/pms/qc/searchMasterInformation`,'post',data)
diff --git a/src/views/modules/qc/qcResultEntry.vue b/src/views/modules/qc/FAIResultEntry.vue
similarity index 56%
rename from src/views/modules/qc/qcResultEntry.vue
rename to src/views/modules/qc/FAIResultEntry.vue
index 8580547..9b7cbc1 100644
--- a/src/views/modules/qc/qcResultEntry.vue
+++ b/src/views/modules/qc/FAIResultEntry.vue
@@ -3,13 +3,16 @@
-
-
-
-
+
-
+
+
+
+
+
+
+
@@ -23,13 +26,15 @@
-
-
+
+
+
- 查询
- 新增检验记录
+ 清空
+ 查询
+ 新增检验记录
-
- 主信息
明细信息
+ 提交
删除
@@ -96,52 +100,50 @@
-
-
+
-
-
- 主记录信息模板
-
-
-
-
-
-
-
-
- 明细信息模板
-
-
-
-
+
+
+
-
- 子明细信息模板
-
+
+
+
+
+
+
-
-
+
+
-
- 检验类型
-
+
+
+
+
+
-
-
+
+
@@ -161,23 +163,23 @@
-
-
-
+
+
+
-
+
+ label="实测值">
- ;width:98%">
+ ;width:98%">
+ ;width:98%">
+ ;width:98%">
+ ;width:98%">
-
-
- 保存
- 关闭
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ scope.row[item.columnProp] }}
-
-
-
+ min-width="55"
+ label="子明细">
- ;width:98%">
- ;width:98%">
+ 点击输入
+
-
+
+
+
+
+
@@ -264,8 +237,65 @@
- 保存
- 关闭
+ 保存
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
+
+
+
+ 添加
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
@@ -279,12 +309,19 @@
qcInspectionInformationSearch, // 检验记录查询
qcInspectionInformationSave, // 新增检验记录
qcInspectionInformationDelete, // 删除检验记录
- masterInformationSearch, // 查询主信息
detailInformationSearch, // 查询明细信息
modalCodeBlur, // 模板信息
- saveMasterInformationValue, // 新增主信息
saveDetailInformation, // 新增明细信息
searchModelTree, // 明细信息的分类级联
+ saveSubmitResult, // 保存检验结果
+ checkCompleted, // 判断主信息和明细信息是否已填写
+ selectModelByPartNo, // 物料编码失去焦点事件
+ subDetailInformationSave, // 新增子明细信息
+ selectSubDetailInformation,
+ checkOutIsSubmit, // 检查是否已提交
+ workOrderSearch, // 查询工单列表
+ selectInformationByWorkOrderNo, // 工单号失去焦点事件
+ checkSubDetailValue // 检查子明细中的实测值是否在规定范围
} from "@/api/qc/qc.js"
import Chooselist from '@/views/modules/common/Chooselist_eam'
export default {
@@ -313,10 +350,30 @@
this.modalData.isQualified = this.modalData.isQualified.toUpperCase()
this.modalData.inspectionNo = this.modalData.inspectionNo.toUpperCase()
}
- }
+ },
+
},
data () {
return {
+
+ workOrderDataList: [],
+ oldWorkOrderDataList:[],
+ searchForm: {
+ workOrderNumber: '',
+ },
+
+
+
+
+ checkCompletedData:{
+ inspectionNo: ''
+ },
+ submitData:{
+ site:'',
+ inspectionNo: '',
+ isQualified: '',
+ isQualifiedChinese: '',
+ },
// 导出 start
exportData: [],
exportName: "设备分类" + this.dayjs().format('YYYYMMDDHHmmss'),
@@ -330,13 +387,20 @@
searchData: {
site: this.$store.state.user.site,
inspectionNo: '',
- inspectionTypeNo: '',
+ inspectionTypeNo:'102',
inspectorNo: '',
isQualified: '',
familyType:'D',
+ partNo:'',
+ partDesc:'',
page: 1,
limit: 10,
},
+ workOrderData: {
+ site: this.$store.state.user.site,
+ // page: 1,
+ // limit: 10,
+ },
masterInformationData:{
informationNo:'',
informationValue:'',
@@ -350,25 +414,28 @@
dataList: [],
dataListLoading: false,
dataListSelections: [],
- inspectionRecordsFlag:false,
- modalDisableFlag:false,
- isFlag: false,
- modalData:{
+ inspectionRecordsFlag: false,
+ modalDisableFlag: false,
+ submitFlag: false,
+ modalData: {
flag:'',
- functionType:'E',
+ functionType:'',
site: this.$store.state.user.site,
inspectionNo:'',
- masterCodeNo:'',
- masterCodeDesc:'',
+ workOrderNumber: '',
+ workOrderQuantity: 0,
+ reelNumber: '',
+ partNo: '',
+ rollingQuantity: 0,
+ sampleQuantity: 0,
detailCodeNo:'',
detailCodeDesc:'',
- subDetailCodeNo:'',
- subDetailCodeDesc:'',
- inspectionTypeNo:'',
- inspectionTypeName:'',
+ inspectionTypeNo:'102',
+ inspectionTypeName:'FAI',
inspectorNo:'',
inspectorName:'',
- isQualified:''
+ isQualified:'',
+ isQualifiedChinese:''
},
// 展示列集
columnList: [
@@ -388,7 +455,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 80,
+ columnWidth: 40,
},
{
userId: this.$store.state.user.name,
@@ -408,6 +475,78 @@
fixed: '',
columnWidth: 100,
},
+ {
+ userId: this.$store.state.user.name,
+ functionId: 301005,
+ serialNumber: '301005TablePlanDesc',
+ tableId: "301005Table",
+ tableName: "检验记录表",
+ columnProp: 'workOrderNumber',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '工单号',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 301005,
+ serialNumber: '301005TablePlanDesc',
+ tableId: "301005Table",
+ tableName: "检验记录表",
+ columnProp: 'reelNumber',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '取样所在卷号',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 301005,
+ serialNumber: '301005TablePlanDesc',
+ tableId: "301005Table",
+ tableName: "检验记录表",
+ columnProp: 'partNo',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '物料编码',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 100,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 301005,
+ serialNumber: '301005TablePlanDesc',
+ tableId: "301005Table",
+ tableName: "检验记录表",
+ columnProp: 'partDesc',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '物料名称',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 180,
+ },
{
userId: this.$store.state.user.name,
functionId: 301005,
@@ -424,7 +563,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 140,
+ columnWidth: 80,
},
{
userId: this.$store.state.user.name,
@@ -442,7 +581,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100,
+ columnWidth: 80,
},
{
userId: this.$store.state.user.name,
@@ -460,7 +599,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100,
+ columnWidth: 80,
},
{
userId: this.$store.state.user.name,
@@ -468,7 +607,7 @@
serialNumber: '301005TablePropertiesCode',
tableId: "301005Table",
tableName: "检验记录表",
- columnProp: 'isQualified',
+ columnProp: 'isQualifiedChinese',
headerAlign: "center",
align: "left",
columnLabel: '是否合格',
@@ -478,7 +617,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 100,
+ columnWidth: 80,
}
],
//项目清单
@@ -486,9 +625,8 @@
detailData:{
site:'',
inspectionNo:'',
- functionType:'E',
- familyType:'D',
- masterCodeNo:'',
+ functionType:'',
+ familyType:'',
detailCodeNo:'',
subDetailCodeNo:'',
inspectorNo:'',
@@ -593,7 +731,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 90,
+ columnWidth: 50,
},
{
userId: this.$store.state.user.name,
@@ -647,7 +785,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 90,
+ columnWidth: 50,
},
{
userId: this.$store.state.user.name,
@@ -665,7 +803,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 90,
+ columnWidth: 50,
},
{
userId: this.$store.state.user.name,
@@ -683,7 +821,7 @@
sortLv: 0,
status: true,
fixed: '',
- columnWidth: 90,
+ columnWidth: 50,
}
],
itemModalData:{
@@ -725,6 +863,24 @@
createdBy: this.$store.state.user.name
},
itemAddModalFlag:false,
+
+ // 子明细数据对象
+ tableData: [],
+ checkedDetail: [],
+ showEdit: [], //控制显示及隐藏
+
+ subDetailFlag: false,
+ subDetailData: {
+ inspectionNo: '',
+ itemNo: '',
+ itemDesc: '',
+ methodName: '',
+ methodRemark: '',
+ defaultValue: '',
+ maxValue: '',
+ minValue: '',
+ subDetailValues:[]
+ }
}
},
mounted () {
@@ -734,15 +890,69 @@
},
created () {
this.getDataList()
+ this.getWorkOrderList()
this.getTree()
},
methods: {
- // 级联选择器
- handleChange(value) {
- console.log(value);
+
+ // // 初始化获取所有下拉列表数据
+ // a() {
+ // apiGet('/V1/api/Common/GetDropdownList', null, 8000).then(
+ // (res) => {
+ // if (res.code == 200) {
+ // // 客户
+ // this.EntityNameList = res.data.EntityNameList;
+ // } else {
+ // Message.error(res.message)
+ // }
+ // }
+ // )
+ // },
+ // 客户
+ FilterEntityName(queryString, cb) {
+ let EntityNameList2 = this.workOrderDataList;
+ let results = queryString ? EntityNameList2.filter(this.createFilter(queryString)) : EntityNameList2;
+ // 调用 callback 返回建议列表的数据
+ cb(results);
+ },
+ // 只要该输入内容的都匹配
+ createFilter(queryString) {
+ return (res) => {
+ return (res.nodeCnName.toLowerCase().indexOf(queryString.toLowerCase()) !== -1);
+ };
+ },
+ // 最终选择的数据
+ handleSelect(val){
+ console.log(val)
+ this.searchForm.workOrderNumber = val.nodeCnName
+ },
+ // 点击clearable清空小图标按钮以后,继续重新在输入框中输入数据,querySearch会触发,但是cb函数不会触发
+ // 这样的话就会出现发请求了,也获取数据了,但是input框的输入建议下拉框不呈现在页面上的问题,所以解决方法就是
+ // 只要用户点击了clearable清空按钮以后,就让当前获取焦点的输入框失去焦点,回到最初状态,一切重新开始
+ blurForBug(){
+ document.activeElement.blur()
+ },
+
+
+
+
+
+
+ // 清空搜索栏
+ doEmpty(){
+ this.searchData = {
+ site: this.$store.state.user.site,
+ inspectionNo: '',
+ inspectionTypeNo: '102',
+ inspectorNo: '',
+ isQualified: '',
+ familyType:'D',
+ page: 1,
+ limit: 10,
+ }
},
- // 明细信息的分类级联
+ // 获取明细信息的分类级联数据
getTree(){
searchModelTree(this.searchData).then(({data}) => {
this.options = data
@@ -755,17 +965,9 @@
this.$nextTick(() => {
let strVal = ''
if (val === 1037) {
- strVal = this.modalData.masterCodeNo
- this.$refs.baseList.init(val, strVal)
- }
- if (val === 1038) {
strVal = this.modalData.detailCodeNo
this.$refs.baseList.init(val, strVal)
}
- if (val === 1039) {
- strVal = this.modalData.inspectionTypeNo
- this.$refs.baseList.init(val, strVal)
- }
if (val === 1040) {
strVal = this.modalData.inspectorNo
this.$refs.baseList.init(val, strVal)
@@ -775,16 +977,8 @@
/* 列表方法的回调 */
getBaseData (val) {
if (this.tagNo === 1037) {
- this.modalData.masterCodeNo = val.code_no
- this.modalData.masterCodeDesc = val.code_desc
- }
- if (this.tagNo === 1038) {
- this.modalData.detailCodeNo = val.FamilyID
- this.modalData.detailCodeDesc = val.FamilyDesc
- }
- if (this.tagNo === 1039) {
- this.modalData.inspectionTypeNo = val.inspection_type_no
- this.modalData.inspectionTypeName = val.inspection_type_name
+ this.modalData.detailCodeNo = val.code_no
+ this.modalData.detailCodeDesc = val.code_desc
}
if (this.tagNo === 1040) {
this.modalData.inspectorNo = val.inspector_no
@@ -840,37 +1034,22 @@
addInspectionRecords(){
this.modalData={
flag:'1',
- functionType:'E',
site: this.$store.state.user.site,
- inspectionNo:'',
- masterCodeDesc:'',
- masterCodeNo:'',
- detailCodeNo:'',
+ inspectionNo: '',
+ workOrderNumber: '',
+ workOrderQuantity: 0,
+ reel_number: '',
+ part_no: '',
+ rolling_quantity: 0,
+ sample_quantity: 0,
subDetailCodeNo:'',
- inspectionTypeNo:'',
+ inspectionTypeNo:'102',
inspectorNo:'',
isQualified:''
};
this.modalDisableFlag = false;
this.inspectionRecordsFlag = true;
},
- // updateModal(row){
- // this.modalData={
- // flag: '2',
- // functionType: 'E',
- // site: row.site,
- // inspectionNo: row.inspectionNo,
- // masterCodeDesc: row.masterCodeDesc,
- // masterCodeNo: row.masterCodeNo,
- // detailCodeNo: row.detailCodeNo,
- // subDetailCodeNo: row.subDetailCodeNo,
- // inspectionTypeNo: row.inspectionTypeNo,
- // inspectorNo: row.inspectorNo,
- // isQualified: row.isQualified
- // };
- // this.modalDisableFlag = true;
- // this.inspectionRecordsFlag = true;
- // },
// 删除检验记录
deleteModal (row) {
@@ -879,7 +1058,6 @@
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
- // console.log(row)
qcInspectionInformationDelete(row).then(({data}) => {
if (data && data.code ==0) {
this.getDataList()
@@ -902,45 +1080,29 @@
// 新增检验记录
saveData(){
+ console.log(this.modalData)
if (this.modalData.inspectionNo == '' || this.modalData.inspectionNo == null) {
this.$alert('请输入检验编码 !', '错误', {
confirmButtonText: '确定'
})
return false
}
- if (this.modalData.masterCodeNo == '' || this.modalData.masterCodeNo == null) {
- this.$alert('请选择主记录信息模板!', '错误', {
- confirmButtonText: '确定'
- })
- return false
- }
if (this.modalData.detailCodeNo == '' || this.modalData.detailCodeNo == null) {
this.$alert('请选择明细记录信息分类!', '错误', {
confirmButtonText: '确定'
})
return false
}
- // if (this.modalData.subDetailCodeNo == '' || this.modalData.subDetailCodeNo == null) {
- // this.$alert('请选择子明细模板!', '错误', {
- // confirmButtonText: '确定'
- // })
- // return false
- // }
- if (this.modalData.inspectionTypeNo == '' || this.modalData.inspectionTypeNo == null) {
- this.$alert('请选择明细检验类型!', '错误', {
- confirmButtonText: '确定'
- })
- return false
- }
if (this.modalData.inspectorNo == '' || this.modalData.inspectorNo == null) {
this.$alert('请选择质检员!', '错误', {
confirmButtonText: '确定'
})
return false
}
- if(this.modalData.flag=='1'){
- this.modalData.detailCodeNo = JSON.parse(JSON.stringify(this.modalData.detailCodeNo[1]))
- this.modalData.isQualified = '待提交'
+ if(this.modalData.flag == '1'){
+ //this.modalData.detailCodeNo = JSON.parse(JSON.stringify(this.modalData.detailCodeNo[1]))
+ this.modalData.isQualified = 'D'
+ this.modalData.isQualifiedChinese = '待提交'
qcInspectionInformationSave(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
@@ -959,72 +1121,31 @@
}
})
}
- // else {
- // eamWorkPlanEdit(this.modalData).then(({data}) => {
- // if (data && data.code === 0) {
- // this.getDataList()
- // this.inspectionRecordsFlag = false
- // this.$message({
- // message: '操作成功',
- // type: 'success',
- // duration: 1500,
- // onClose: () => {
- // }
- // })
- // } else {
- // this.$alert(data.msg, '错误', {
- // confirmButtonText: '确定'
- // })
- // }
- // })
- // }
},
- // 新增主信息
- saveMasterInformationValue(){
- for (let i = 0; i < this.masterList.length; i++) {
- if(this.masterList[i].informationValue == '' || this.masterList[i].informationValue == null){
- this.$alert(this.masterList[i].informationName + '实测值未填写!', '错误', {
- confirmButtonText: '确定'
- })
- return false
- }
- }
- this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.masterList))
- saveMasterInformationValue(this.saveInformationData.itemList).then(({data}) => {
- if (data && data.code == '0') {
- this.getDataList()
- this.masterInformationFlag = false
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
+ Transfer(){
+ for (let i = 0; i < this.detailList.length; i++) {
+ if(this.detailList[i].valueTypeDb == 'N') {
+ checkSubDetailValue(this.detailList[i]).then(({data}) => {
+ if (data.flag == 2 && this.detailList[i].isQualified == 'Y') {
+ this.$confirm(this.detailList[i].itemDesc + '子明细中实测值不在合格范围!是否保存为合格', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.saveDetailInformation()
+ }).then(() => {
+ return false
+ })
}
})
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
}
- })
+ }
},
// 新增明细信息
async saveDetailInformation(){
for (let i = 0; i < this.detailList.length; i++) {
- if(this.detailList[i].valueTypeDb == 'N' && (this.detailList[i].numberValue=='' || this.detailList[i].numberValue == null)){
- this.$alert(this.detailList[i].itemDesc+'实测值未填写!', '错误', {
- confirmButtonText: '确定'
- })
- return false
- }
- if(this.detailList[i].valueTypeDb == 'T' && (this.detailList[i].textValue == '' || this.detailList[i].textValue == null)){
- this.$alert(this.detailList[i].itemDesc+'实测值未填写!', '错误', {
- confirmButtonText: '确定'
- })
- return false
- }
if(this.detailList[i].isQualified == '' || this.detailList[i].isQualified == null){
this.$alert(this.detailList[i].itemDesc+'是否合格未确认!', '错误', {
confirmButtonText: '确定'
@@ -1074,18 +1195,6 @@
})
},
- // 主记录信息查询
- masterModal(row){
- this.detailData.site = row.site
- this.detailData.masterCodeNo = row.masterCodeNo
- this.detailData.inspectionNo = row.inspectionNo
- this.detailData.inspectorNo = row.inspectorNo
- masterInformationSearch(this.detailData).then(({data}) => {
- this.masterList = data.rows
- })
- this.masterInformationFlag = true;
- },
-
// 明细记录信息查询
detailModal(row){
this.detailData.site = row.site
@@ -1098,6 +1207,21 @@
this.detailInformationFlag = true;
},
+ // 子明细记录信息查询
+ subDetailModal(row){
+ this.subDetailData.inspectionNo = row.inspectionNo;
+ this.subDetailData.itemNo = row.itemNo;
+ this.subDetailData.itemDesc = row.itemDesc;
+ this.subDetailData.methodName = row.methodName;
+ this.subDetailData.methodRemark = row.methodRemark;
+ this.subDetailData.defaultValue = row.defaultValue;
+ this.subDetailData.maxValue = row.maxValue;
+ this.subDetailData.minValue = row.minValue;
+ selectSubDetailInformation(this.subDetailData).then(({data}) => {
+ this.tableData = data.rows
+ })
+ this.subDetailFlag = true;
+ },
//导出excel
async createExportData() {
@@ -1127,6 +1251,247 @@
let s = eval("(" + json + ")")
return s
},
+
+ // 提交按钮
+ submitResult(row){
+ this.submitData.site = row.site
+ this.submitData.inspectionNo = row.inspectionNo;
+ this.checkCompletedData.inspectionNo = row.inspectionNo;
+ // 判断主信息和明细信息是否已填写
+ checkCompleted(this.checkCompletedData).then(({data}) =>{
+ if (data && data.code == '1') {
+ this.submitFlag = true;
+ }else {
+ this.$alert(data.msg, '错误!', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
+
+ // 保存提交结果
+ saveSubmitResult(){
+ if (this.submitData.isQualified == '' || this.submitData.isQualified == null){
+ this.$alert('请选择是否合格!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return false
+ }
+ if (this.submitData.isQualified == 'Y'){
+ this.submitData.isQualifiedChinese = '合格'
+ }
+ if (this.submitData.isQualified == 'N'){
+ this.submitData.isQualifiedChinese = '不合格'
+ }
+ saveSubmitResult(this.submitData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getDataList()
+ this.submitFlag = false
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
+
+
+ // 子明细方法
+
+ //表格的新增
+ rowClassName({ row, rowIndex }) {
+ row.xh = rowIndex + 1;
+ },
+ //单选框选中数据
+ handleDetailSelectionChange(selection) {
+ this.checkedDetail = selection;
+ },
+ //点击新增更多
+ handleAddBtn(td) {
+ checkOutIsSubmit(td).then(({data}) => {
+ if (data.flag != 1) {
+ let obj = {};
+ obj.subDetailValue = "";
+ obj.samplingLocation = "";
+ this.tableData.push(obj);
+ } else {
+ this.$alert("记录已提交!", '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
+ //删除
+ handleDeleteBtn(td) {
+ checkOutIsSubmit(td).then(({data}) => {
+ if (data.flag != 1) {
+ if (this.checkedDetail.length == 0) {
+ this.$alert("请先选择要删除的数据", "提示", {
+ confirmButtonText: "确定",
+ });
+ } else {
+ this.$confirm("请是否确认删除该子明细记录?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ callback: (action) => {
+ if (action === "confirm") {
+ let val = this.checkedDetail;
+ val.forEach((val, index) => {
+ this.tableData.forEach((v, i) => {
+ if (val.xh === v.xh) {
+ this.tableData.splice(i, 1);
+ }
+ });
+ });
+ this.$message({
+ message: "删除成功,记得保存修改喔!",
+ type: "success",
+ });
+ //this.$refs.tb.clearSelection();
+ return;
+ } else {
+ this.$message({
+ message: "已取消删除操作",
+ type: "warning",
+ });
+ return;
+ }
+ },
+ });
+ }
+ } else {
+ this.$alert("记录已提交!", '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+
+
+ },
+ //红色五角星提示
+ starAdd(obj) {
+ if (obj.columnIndex === 2 || obj.columnIndex === 3) {
+ return "star";
+ }
+ },
+ //点击编辑
+ showUpdate(index, row) {
+ this.showEdit[index] = true;
+ this.$set(this.showEdit, index, true); //这里要用$set方法,否则页面状态不更新
+ },
+ saveSubDetailResult(){
+ //this.modalData.detailCodeNo = JSON.parse(JSON.stringify(this.modalData.detailCodeNo[1]))
+ this.subDetailData.subDetailValues = this.tableData
+ subDetailInformationSave(this.subDetailData).then(({data}) => {
+ if (data && data.code === 0) {
+ this.getDataList()
+ this.subDetailFlag = false
+ this.tableData = []
+ this.$message({
+ message: '操作成功',
+ type: 'success',
+ duration: 1500,
+ onClose: () => {
+ }
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ },
+
+ // 物料编码内容改变事件
+ // partNoBlur(){
+ // let inData = {
+ // partNo: this.modalData.partNo
+ // }
+ // selectModelByPartNo(inData).then(({data}) => {
+ // if(data.rows.length > 0){
+ // this.modalData.detailCodeNo = data.rows[0].codeNo
+ // this.modalData.detailCodeDesc = data.rows[0].detailCodeDesc
+ // this.detailData.functionType = data.rows[0].functionType
+ // }else {
+ // this.modalData.detailCodeNo = ''
+ // }
+ // })
+ // },
+
+ // 工单号失去焦点事件
+ workOrderBlur(){
+ let inData = {
+ site: this.modalData.site,
+ workOrderNumber: this.modalData.workOrderNumber
+ }
+ selectInformationByWorkOrderNo(inData).then(({data}) => {
+ if(data.rows.length > 0){
+ this.modalData.partNo = data.rows[0].partNo
+ selectModelByPartNo(this.modalData).then(({data}) => {
+ if(data.rows.length > 0){
+ this.modalData.detailCodeNo = data.rows[0].codeNo
+ this.modalData.detailCodeDesc = data.rows[0].detailCodeDesc
+ this.detailData.functionType = data.rows[0].functionType
+ console.log(this.modalData.detailCodeNo)
+ }else {
+ this.modalData.detailCodeNo = ''
+ }
+ })
+ }else {
+ this.modalData.partNo = ''
+ }
+ })
+ },
+
+ // 获取主信息数据列表
+ getDataList1 () {
+ this.searchData.limit = this.pageSize
+ this.searchData.page = this.pageIndex
+ qcInspectionInformationSearch(this.searchData).then(({data}) => {
+ if (data.code == 0) {
+ this.dataList = data.page.list
+ this.pageIndex = data.page.currPage
+ this.pageSize = data.page.pageSize
+ this.totalPage = data.page.totalCount
+ }
+ this.dataListLoading = false
+ })
+ },
+
+ // 获取工单列表
+ getWorkOrderList(){
+ workOrderSearch(this.workOrderData).then(({data}) => {
+ if (data.code == 0) {
+ this.workOrderDataList = data.rows
+ this.oldWorkOrderDataList = data.rows
+ }
+ })
+ },
+
+ // 搜索
+ inputSearch(val){
+ let searchVal = val.toLowerCase()
+ let newListData = []
+ if (searchVal !== ''){
+ this.workOrderDataList.filter(item => {
+ if (item.orderNo.toLowerCase().indexOf(searchVal) !== -1){
+ newListData.push(item)
+ }
+ })
+ this.workOrderDataList = newListData
+ }else {
+ this.workOrderDataList = this.oldWorkOrderDataList
+ }
+ }
+
}
}
diff --git a/src/views/modules/qc/IPQCResultEntry.vue b/src/views/modules/qc/IPQCResultEntry.vue
new file mode 100644
index 0000000..be367a7
--- /dev/null
+++ b/src/views/modules/qc/IPQCResultEntry.vue
@@ -0,0 +1,1546 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 清空
+ 查询
+ 新增检验记录
+
+ {{ "导出" }}
+
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+
+
+ 明细信息
+
+ 提交
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 质检员
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+ ;width:98%">
+ ;width:98%">
+ ;width:98%">
+ ;width:98%">
+
+
+
+
+
+ 点击输入
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
+
+
+
+ 添加
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/modules/qc/qcCheckOutMethod.vue b/src/views/modules/qc/qcCheckOutMethod.vue
index e9d7623..3bf5fce 100644
--- a/src/views/modules/qc/qcCheckOutMethod.vue
+++ b/src/views/modules/qc/qcCheckOutMethod.vue
@@ -10,7 +10,7 @@
查询
- 新增
+ 新增
@@ -118,13 +118,13 @@
valueNo: '',
availableValue: '',
methodType: 'D',
- createdBy: this.$store.state.user.name
+ createBy: this.$store.state.user.name
},
modalData: {
flag: '',
methodNo: '',
methodName: '',
- createdBy: this.$store.state.user.name,
+ createBy: this.$store.state.user.name,
methodRemark: '',
methodType: 'D'
},
@@ -208,7 +208,7 @@
flag: '1',
methodNo: '',
methodName: '',
- createdBy: this.$store.state.user.name,
+ createBy: this.$store.state.user.name,
methodRemark: '',
methodType: 'D'
}
@@ -221,7 +221,7 @@
flag: '2',
methodNo: row.methodNo,
methodName: row.methodName,
- createdBy: this.$store.state.user.name,
+ createBy: this.$store.state.user.name,
methodRemark: row.methodRemark,
methodType: 'D'
}
@@ -256,6 +256,7 @@
},
// 新增/修改方法
saveData () {
+ console.log(this.modalData)
if (this.modalData.methodNo == '' || this.modalData.methodNo == null) {
this.$alert('请输入检验方法编码!', '错误', {
confirmButtonText: '确定'
diff --git a/src/views/modules/qc/qcFamily.vue b/src/views/modules/qc/qcFamily.vue
deleted file mode 100644
index bd4e056..0000000
--- a/src/views/modules/qc/qcFamily.vue
+++ /dev/null
@@ -1,621 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
- 新增
-
-
-
-
-
-
-
- {{ scope.row[item.columnProp] }}
-
-
-
-
-
- 修改
- 检验模板
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 保存
- 关闭
-
-
-
-
-
-
-
-
-
-
-
-
-
- 新增
-
-
-
-
-
-
- {{ scope.row[item.columnProp] }}
-
-
-
-
-
- 删除模板
-
-
-
-
- 关闭
-
-
-
-
-
-
-
- 检验模板编码
-
-
-
-
-
-
-
- 保存
- 关闭
-
-
-
-
-
-
-
-
diff --git a/src/views/modules/qc/qcCheckOutModel.vue b/src/views/modules/qc/qcFamilyModel.vue
similarity index 85%
rename from src/views/modules/qc/qcCheckOutModel.vue
rename to src/views/modules/qc/qcFamilyModel.vue
index ee30cc5..9d5b68d 100644
--- a/src/views/modules/qc/qcCheckOutModel.vue
+++ b/src/views/modules/qc/qcFamilyModel.vue
@@ -2,12 +2,18 @@
+
+
+
+
+
+
@@ -16,8 +22,9 @@
- 查询
- 新增
+ 清空
+ 查询
+ 新增
@@ -70,6 +77,27 @@
+
+
+
+ 物料分类编码
+
+
+
+
+
+
+
+
+
+ 检验类型编码
+
+
+
+
+
+
+
@@ -77,6 +105,7 @@
+
@@ -84,6 +113,7 @@
+
保存
关闭
@@ -323,7 +353,9 @@
codeNo: '',
codeDesc: '',
active:'',
+ familyName:'',
functionType:'D',
+ inspectionTypeName:'',
page: 1,
limit: 10,
},
@@ -338,9 +370,13 @@
flag:'',
codeNo:'',
codeDesc:'',
+ familyID:'',
+ familyName:'',
active:'',
functionType:'D',
- userId:this.$store.state.user.name
+ inspectionTypeNo:'',
+ inspectionTypeName:'',
+ createdBy:this.$store.state.user.name
},
detailData:{
codeNo:'',
@@ -349,7 +385,7 @@
itemNo:'',
itemDesc:'',
itemType:'D',
- userId:this.$store.state.user.name
+ createdBy:this.$store.state.user.name
},
columnList: [
{
@@ -388,6 +424,42 @@
fixed: '',
columnWidth: 140,
},
+ {
+ userId: this.$store.state.user.name,
+ functionId: 301003,
+ serialNumber: '301003TableActive',
+ tableId: "301003Table",
+ tableName: "检验模板表",
+ columnProp: 'familyName',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '物料分类名称',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 140,
+ },
+ {
+ userId: this.$store.state.user.name,
+ functionId: 301003,
+ serialNumber: '301003TableCodeDesc',
+ tableId: "301003Table",
+ tableName: "检验模板表",
+ columnProp: 'inspectionTypeName',
+ headerAlign: "center",
+ align: "left",
+ columnLabel: '检验类型名称',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: '',
+ columnWidth: 140,
+ },
{
userId: this.$store.state.user.name,
functionId: 301003,
@@ -406,6 +478,7 @@
fixed: '',
columnWidth: 40,
},
+
],
detailModelFlag:false,
detailList: [],
@@ -578,6 +651,20 @@
this.getDataList();
},
methods: {
+ // 清空搜索栏
+ doEmpty(){
+ this.searchData = {
+ codeNo: '',
+ codeDesc: '',
+ active:'',
+ familyName:'',
+ functionType:'D',
+ inspectionTypeName:'',
+ page: 1,
+ limit: 10,
+ }
+ },
+
// 获取基础数据列表S
getBaseList (val,type) {
this.tagNo = val
@@ -585,8 +672,16 @@
let strVal = ''
if (val === 1034) {
strVal = this.detailData.itemNo
+ this.$refs.baseList.init(val, strVal)
+ }
+ if (val === 1042) {
+ strVal = this.modalData.familyID
+ this.$refs.baseList.init(val, strVal)
+ }
+ if (val === 1045) {
+ strVal = this.modalData.inspectionTypeNo
+ this.$refs.baseList.init(val, strVal)
}
- this.$refs.baseList.init(val, strVal)
})
},
/* 列表方法的回调 */
@@ -595,6 +690,14 @@
this.detailData.itemNo = val.ItemNo
this.detailData.itemDesc = val.ItemDesc
}
+ if (this.tagNo === 1042) {
+ this.modalData.familyID = val.FamilyID
+ this.modalData.familyName = val.FamilyName
+ }
+ if (this.tagNo === 1045) {
+ this.modalData.inspectionTypeNo = val.inspection_type_no
+ this.modalData.inspectionTypeName = val.inspection_type_name
+ }
},
// 获取数据列表
getDataList () {
@@ -628,10 +731,12 @@
codeDesc:'',
active:'Y',
functionType:'D',
- userId:this.$store.state.user.name
+ inspectionTypeNo:'',
+ inspectionTypeName:'',
+ createdBy:this.$store.state.user.name
};
- this.modalDisableFlag=false;
- this.modalFlag=true;
+ this.modalDisableFlag = false;
+ this.modalFlag = true;
},
updateModal(row){
this.modalData={
@@ -639,11 +744,15 @@
codeNo:row.codeNo,
codeDesc:row.codeDesc,
active:row.active,
+ familyID: row.familyID,
+ familyName: row.familyName,
+ inspectionTypeNo: row.inspectionTypeNo,
+ inspectionTypeName:row.inspectionTypeName,
functionType:'D',
- userId:this.$store.state.user.name
+ createdBy:this.$store.state.user.name
};
- this.modalDisableFlag=true;
- this.modalFlag=true;
+ this.modalDisableFlag = true;
+ this.modalFlag = true;
},
// 删除
deletePropertiesModel (row) {
@@ -684,6 +793,18 @@
})
return false
}
+ if (this.modalData.familyID == '' || this.modalData.familyID == null) {
+ this.$alert('请选择物料分类编码!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return false
+ }
+ if (this.modalData.inspectionTypeNo == '' || this.modalData.inspectionTypeNo == null) {
+ this.$alert('请选择检验类型!', '错误', {
+ confirmButtonText: '确定'
+ })
+ return false
+ }
if (this.modalData.active == '' || this.modalData.active == null) {
this.$alert('选择是否在用!', '错误', {
confirmButtonText: '确定'
@@ -712,7 +833,7 @@
qcCheckOutModelUpdate(this.modalData).then(({data}) => {
if (data && data.code === 0) {
this.getDataList()
- this.modalFlag=false
+ this.modalFlag = false
this.$message({
message: '操作成功',
type: 'success',
@@ -777,7 +898,7 @@
itemNo: this.itemListRow1.itemNo,
itemDesc:this.itemListRow1.itemDesc,
itemType:this.detailData.itemType,
- userId:this.$store.state.user.name
+ createdBy:this.$store.state.user.name
}
saveModalDetails(inData).then(({data}) => {
if (data && data.code == 0) {
@@ -808,7 +929,7 @@
itemNo: this.itemListRow2.itemNo,
itemDesc:this.itemListRow2.itemDesc,
itemType:this.detailData.itemType,
- userId:this.$store.state.user.name
+ createdBy:this.$store.state.user.name
}
deleteModalDetails(inData).then(({data}) => {
if (data && data.code === 0) {
diff --git a/src/views/modules/qc/qcMasterInformationModel.vue b/src/views/modules/qc/qcMasterInformationModel.vue
index 8676caf..ba124d6 100644
--- a/src/views/modules/qc/qcMasterInformationModel.vue
+++ b/src/views/modules/qc/qcMasterInformationModel.vue
@@ -16,8 +16,8 @@
- 查询
- 新增
+ 查询
+ 新增
diff --git a/src/views/modules/qc/qcPartModel.vue b/src/views/modules/qc/qcPartModel.vue
new file mode 100644
index 0000000..0e9c8f0
--- /dev/null
+++ b/src/views/modules/qc/qcPartModel.vue
@@ -0,0 +1,1057 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 清空
+ 查询
+ 新增
+
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+ 修改
+ 检验项目
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+ 物料编码
+
+
+
+
+
+
+
+
+
+ 检验类型编码
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+ 快速新增
+
+
+
+
+
+
+ {{ scope.row[item.columnProp] }}
+
+
+
+
+
+
+ 可选值
+ 删除项目
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+ 检验项目编码
+
+
+
+
+
+
+
+ 保存
+ 关闭
+
+
+
+
+
+
+ 检验模板编码:
+ 检验模板名称:
+
+
+
+ 可选项目:
+
+
+
+
+
+
+
+
+
+ 添加>>
+
+
+ 删除<<
+
+
+
+ 已有项目:
+
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 关闭
+
+
+
+
+
+
+
+