diff --git a/src/views/modules/qc/IQCResultEntry.vue b/src/views/modules/qc/IQCResultEntry.vue
index 1631e8f..49fc279 100644
--- a/src/views/modules/qc/IQCResultEntry.vue
+++ b/src/views/modules/qc/IQCResultEntry.vue
@@ -250,7 +250,7 @@
-
+
diff --git a/src/views/modules/qc/qcItem.vue b/src/views/modules/qc/qcItem.vue
index 4c2d353..eef0813 100644
--- a/src/views/modules/qc/qcItem.vue
+++ b/src/views/modules/qc/qcItem.vue
@@ -13,7 +13,7 @@
-
+
{
+ inspectionTypeSearch({ site }).then(({data}) => {
if (data.code === 0) {
- this.options = data.rows
+ this.options = data.rows || []
}
})
},
@@ -1241,11 +1243,16 @@
loadSiteList () {
getSiteData({ userID: this.$store.state.user.name }).then(({data}) => {
this.siteList = (data && data.rows) ? data.rows : []
+ this.inspectionTypeSearch()
})
},
getDefaultSite () {
return (this.siteList && this.siteList.length) ? this.siteList[0].siteID : ''
},
+ onSearchSiteChange () {
+ this.searchData.inspectionTypeNo = ''
+ this.inspectionTypeSearch()
+ },
onModalSiteChange () {
this.modalData.inspectionTypeNo = ''
this.modalData.methodNo = ''
diff --git a/src/views/modules/qc/qcMethod.vue b/src/views/modules/qc/qcMethod.vue
index c4deedc..1f55f36 100644
--- a/src/views/modules/qc/qcMethod.vue
+++ b/src/views/modules/qc/qcMethod.vue
@@ -13,7 +13,7 @@
-
+
{
this.siteList = (data && data.rows) ? data.rows : []
+ this.inspectionTypeSearch()
})
},
getDefaultSite () {
return (this.siteList && this.siteList.length) ? this.siteList[0].siteID : ''
},
+ onSearchSiteChange () {
+ this.searchData.inspectionTypeNo = ''
+ this.inspectionTypeSearch()
+ },
onModalSiteChange () {
this.modalData.inspectionTypeNo = ''
this.inspectionTypeSearch()
},
- // 查询检验类型
+ // 查询检验类型(必须带 site,否则查不到)
inspectionTypeSearch () {
- let tempData = {
- site: this.modalData.site || this.getDefaultSite()
+ const site = (this.modalFlag && this.modalData.site)
+ ? this.modalData.site
+ : (this.searchData.site || this.getDefaultSite())
+ if (!site) {
+ this.options = []
+ return
}
- inspectionTypeSearch(tempData).then(({data}) => {
+ inspectionTypeSearch({ site }).then(({data}) => {
if (data.code === 0) {
- this.options = data.rows
+ this.options = data.rows || []
}
})
},
diff --git a/src/views/modules/qc/qcPartAttribute.vue b/src/views/modules/qc/qcPartAttribute.vue
index 06a8268..2e46079 100644
--- a/src/views/modules/qc/qcPartAttribute.vue
+++ b/src/views/modules/qc/qcPartAttribute.vue
@@ -135,7 +135,7 @@
更多
- 检验标准
+ 检验标准
文件清单
巡检配置
删除
@@ -193,7 +193,7 @@
-->
-
+
@@ -238,7 +238,7 @@
FQC检验
-
+
SQC检验
@@ -2119,9 +2119,7 @@
// this.getSiteAndBuByUserName()
// 校验用户是否收藏
// this.favoriteIsOk()
- // 获取检验类型
- this.inspectionTypeSearch()
- // 获取工厂列表
+ // 先加载工厂,再按默认 site 查询检验类型
this.loadSiteList()
// 动态列
// this.getTableUserColumn(this.$route.meta.menuId+'table1',1)
@@ -2149,7 +2147,7 @@
},
searchPartInfo () {
-
+
this.partDetailData.site = this.modalData.site
if (!this.partDetailData.partNo && !this.partDetailData.partDesc && !this.partDetailData.spec && !this.partDetailData.cinvSourceCode) {
this.partInfoList = []
@@ -2168,14 +2166,16 @@
}
},
- // 查询检验类型
+ // 查询检验类型(必须带 site,否则查不到)
inspectionTypeSearch () {
- let tempData = {
- site: this.modalData.site || this.getDefaultSite()
+ const site = this.detailData.site || this.modalData.site || this.getDefaultSite()
+ if (!site) {
+ this.options = []
+ return Promise.resolve()
}
- inspectionTypeSearch(tempData).then(({data}) => {
+ return inspectionTypeSearch({ site }).then(({data}) => {
if (data.code === 0) {
- this.options = data.rows
+ this.options = data.rows || []
}
})
},
@@ -2183,6 +2183,7 @@
loadSiteList () {
getSiteData({ userID: this.$store.state.user.name }).then(({data}) => {
this.siteList = (data && data.rows) ? data.rows : []
+ this.inspectionTypeSearch()
})
},
getDefaultSite () {
@@ -2750,6 +2751,7 @@
this.detailList = data.rows
this.normalizeDetailListIpqcInspectionMethod()
})
+ this.inspectionTypeSearch()
this.detailModelFlag = true
},
@@ -2793,10 +2795,21 @@
this.$message.warning('请先选择要设置模板的物料!')
return
}
- if (!this.options || this.options.length === 0) {
- this.$message.warning('检验类型数据加载中,请稍后再试')
+ const openFastAdd = () => {
+ if (!this.options || this.options.length === 0) {
+ this.$message.warning('未查询到检验类型,请检查该工厂是否已维护检验类型')
+ return
+ }
+ this.openFastAddDialog()
+ }
+ if (this.options && this.options.length > 0) {
+ openFastAdd()
return
}
+ this.inspectionTypeSearch().then(openFastAdd)
+ },
+
+ openFastAddDialog () {
this.itemSelections1 = []
this.itemSelections2 = []
this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo
diff --git a/src/views/modules/qc/qcTemplate.vue b/src/views/modules/qc/qcTemplate.vue
index 55e3f1c..7a9dcde 100644
--- a/src/views/modules/qc/qcTemplate.vue
+++ b/src/views/modules/qc/qcTemplate.vue
@@ -13,7 +13,7 @@
-
+
{
+ inspectionTypeSearch({ site }).then(({data}) => {
if (data.code === 0) {
- this.options = data.rows
+ this.options = data.rows || []
}
})
},
@@ -1257,11 +1259,16 @@
loadSiteList () {
getSiteData({ userID: this.$store.state.user.name }).then(({data}) => {
this.siteList = (data && data.rows) ? data.rows : []
+ this.inspectionTypeSearch()
})
},
getDefaultSite () {
return (this.siteList && this.siteList.length) ? this.siteList[0].siteID : ''
},
+ onSearchSiteChange () {
+ this.searchData.inspectionTypeNo = ''
+ this.inspectionTypeSearch()
+ },
onModalSiteChange () {
this.modalData.inspectionTypeNo = ''
this.modalData.samplingProgrammeNo = ''