-
-
+
+
-
-
+
+
+
{
if (data && data.code === 0) {
@@ -882,24 +867,6 @@
})
}
})
- }else {
- qcPartModelUpdate(this.modalData).then(({data}) => {
- if (data && data.code === 0) {
- this.getDataList()
- this.modalFlag=false
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- }
- })
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
- }
- })
}
},
// 保存属性模板
@@ -936,14 +903,6 @@
})
this.detailModelFlag = true;
},
-
- // 普通新增
- addDetailModal(){
- this.detailData.templateId = '';
- this.detailData.templateName = '';
- this.addDetailModalFlag = true;
- },
-
checkInspectionType(){
getItemLists(this.detailData).then(({data}) => {
this.itemList1 = data.row1;
@@ -961,7 +920,6 @@
})
this.fastAddFlag = true;
},
-
clickItem1(row){
this.itemListRow1 = JSON.parse(JSON.stringify(row));
},
@@ -985,8 +943,8 @@
savePartAttributeDetails(inData).then(({data}) => {
if (data && data.code == 0) {
getItemLists(this.detailData).then(({data}) => {
- this.itemList1=data.row1;
- this.itemList2=data.row2;
+ this.itemList1 = data.row1;
+ this.itemList2 = data.row2;
})
this.itemListRow1 = null
} else {
@@ -1029,48 +987,47 @@
this.detailList = data.rows
})
},
-
- // 保存物料属性中的模板明细
- savePartAttributeDetails(){
- if(this.detailData.templateId == "" || this.detailData.templateId == null){
- this.$alert('请选择检验模板!', '错误', {
- confirmButtonText: '确定'
- })
- return false
- }
- savePartAttributeDetails(this.detailData).then(({data}) => {
- if (data && data.code == 0) {
- searchPartAttributeDetails(this.detailData).then(({data}) => {
- this.detailList = data.rows
- })
- this.addDetailModalFlag = false;
- this.$message({
- message: '操作成功',
- type: 'success',
- duration: 1500,
- onClose: () => {
- }
- })
- } else {
- this.$alert(data.msg, '错误', {
- confirmButtonText: '确定'
- })
- }
- })
- },
- itemNoBlur(){
- let inData = {
- itemType: 'D',
- itemNo: this.detailData.itemNo
- }
- qcCheckOutItemSearch(inData).then(({data}) => {
- if(data.rows.length > 0){
- this.detailData.itemDesc = data.rows[0].itemDesc
- }else {
- this.detailData.itemDesc = ''
- }
- })
- },
+ // // 保存物料属性中的模板明细
+ // savePartAttributeDetails(){
+ // if(this.detailData.templateId == "" || this.detailData.templateId == null){
+ // this.$alert('请选择检验模板!', '错误', {
+ // confirmButtonText: '确定'
+ // })
+ // return false
+ // }
+ // savePartAttributeDetails(this.detailData).then(({data}) => {
+ // if (data && data.code == 0) {
+ // searchPartAttributeDetails(this.detailData).then(({data}) => {
+ // this.detailList = data.rows
+ // })
+ // this.addDetailModalFlag = false;
+ // this.$message({
+ // message: '操作成功',
+ // type: 'success',
+ // duration: 1500,
+ // onClose: () => {
+ // }
+ // })
+ // } else {
+ // this.$alert(data.msg, '错误', {
+ // confirmButtonText: '确定'
+ // })
+ // }
+ // })
+ // },
+ // itemNoBlur(){
+ // let inData = {
+ // itemType: 'D',
+ // itemNo: this.detailData.itemNo
+ // }
+ // qcCheckOutItemSearch(inData).then(({data}) => {
+ // if(data.rows.length > 0){
+ // this.detailData.itemDesc = data.rows[0].itemDesc
+ // }else {
+ // this.detailData.itemDesc = ''
+ // }
+ // })
+ // },
// 删除物料属性中的模板
deletePartAttributeDetails(row){
this.$confirm(`是否删除这个检验模板?`, '提示', {
@@ -1178,6 +1135,37 @@
},
// 导出 end
+
+ // 导入
+ clickFile() {
+ this.$refs.file.dispatchEvent(new MouseEvent('click'))
+ },
+ async uploadFile() {
+ const file = this.$refs.file.files
+ let extName = file[0].name.substring(file[0].name.lastIndexOf('.')).toLowerCase()
+ if (extName === '.xlsx' || extName === '.xls') {
+ let formData = new FormData()
+ formData.append('file', file[0])
+ uploadPartAttributeExcel(formData).then(({data}) => {
+ if(data.code === 0) {
+ this.getDataList()
+ this.$message({
+ type: 'success',
+ message: '数据导入成功!'
+ })
+ } else {
+ this.$alert(data.msg, '错误', {
+ confirmButtonText: '确定'
+ })
+ }
+ })
+ }
+ else {
+ this.$message.error('数据导入失败,请选择正确的xlsx模板文件')
+ }
+ this.load();
+ },
+
}
}
diff --git a/src/views/modules/qc/qcSamplingInspection.vue b/src/views/modules/qc/qcSamplingInspectionPlan.vue
similarity index 92%
rename from src/views/modules/qc/qcSamplingInspection.vue
rename to src/views/modules/qc/qcSamplingInspectionPlan.vue
index 0f472b6..9073fc5 100644
--- a/src/views/modules/qc/qcSamplingInspection.vue
+++ b/src/views/modules/qc/qcSamplingInspectionPlan.vue
@@ -8,21 +8,15 @@
-
-
+
+
-
-
-
-
-
-
-
-
+
+
@@ -76,7 +70,7 @@
width="160"
label="操作">
- 修改
+ 编辑
删除
@@ -94,7 +88,18 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -126,15 +131,6 @@
-
-
-
-
-
-
-
-
-
保存
关闭
@@ -147,10 +143,10 @@
diff --git a/src/views/modules/qc/qcTemplate.vue b/src/views/modules/qc/qcTemplate.vue
index 5b9bbb9..b8e5f48 100644
--- a/src/views/modules/qc/qcTemplate.vue
+++ b/src/views/modules/qc/qcTemplate.vue
@@ -8,14 +8,15 @@
-
+
-
+
+
清空
查询
新增
+
+
+
+ 导入
-
@@ -113,11 +117,13 @@
-
- 抽样方案
-
+ 抽样方案编码
+
+
+
+
检验水平编码
@@ -127,7 +133,6 @@
-
@@ -139,7 +144,6 @@
-
@@ -148,7 +152,6 @@
-
保存
关闭
@@ -191,7 +194,6 @@
-
删除项目
-
@@ -263,8 +264,14 @@
- 检验模板编码:
- 检验模板名称:
+
+
+
+
+
+
+
+
@@ -333,37 +340,6 @@
-
-