证书名称:
@@ -188,38 +184,38 @@
-
+
-
-
- 是否必传:
+ 产地:
-
-
-
-
+
+
+
+
+
+
-
- 产地:
+ 是否禁用:
-
-
-
-
-
+
+
+
+
@@ -270,11 +266,6 @@
-
-
- {{ enableMap[scope.row.need] }}
-
-
{{ foreignMap[scope.row.imports] }}
@@ -284,7 +275,16 @@
+
+
+
+
+
+
+ {{ statusMap[scope.row.need] }}
+
+
- 是否必传:
+ 是否禁用:
-
+
-
-
+
+
@@ -414,6 +414,42 @@
+
+
+
+
+
+ 分类编码:
+
+
+
+
+
+
+ {{ item.code }}
+ {{ item.name }}
+
+
+
+
+
+
+
import {filterCertSet, delSupCertCert, modifySupCertSet, addSupCertSet} from "@/api/purchase/supCertSet";
+import {filterClassify} from "@/api/purchase/classifyCode"
export default {
data() {
@@ -459,14 +496,27 @@ export default {
update: "编辑配送企业资质设置",
},
- /**--------生产企业资质设置 0--------------*/
+ formRules: {
+ name: [
+ {required: true, message: "证书名称", trigger: "blur"}
+ ],
+ need: [
+ {required: true, message: "请选择是否必传", trigger: "blur"}
+ ],
+
+ },
+
+ /**--------生产企业资质设置 --------------*/
manufacturerList: [],
manufacturerQuery: {
type: 2,
page: 1,
limit: 20
},
-
+ statusMap: {
+ true: "禁用",
+ false: "启用",
+ },
foreignMap: {
"1": "全部",
"2": "国外",
@@ -483,6 +533,15 @@ export default {
update: "编辑生产企业资质设置",
},
+ formManufactureRules: {
+ name: [
+ {required: true, message: "证书名称", trigger: "blur"}
+ ],
+ need: [
+ {required: true, message: "请选择是否禁用", trigger: "blur"}
+ ],
+ },
+
/**--------产品资质设置--------------*/
productList: [],
productQuery: {
@@ -500,6 +559,9 @@ export default {
update: "编辑产品资质设置",
},
+ classifyList: [],
+ mutilData: [],
+ inputKey: null,
};
},
@@ -524,6 +586,8 @@ export default {
this.total = 0;
});
},
+
+
handleEdit(row) {
this.formName = "update";
this.currentSup = row;
@@ -547,25 +611,31 @@ export default {
this.addDialogVisible = true;
},
onAddSubmit() {
- this.addDialogVisible = false;
- if (this.formName == "add") {
- this.currentSup.type = 1;
- addSupCertSet(this.currentSup)
- .then((response) => {
- this.getList();
- })
- .catch(() => {
- });
- } else {
- modifySupCertSet(this.currentSup).then((res) => {
- if (res.code == 20000) {
- this.getList();
- this.$message.success("保存成功!");
+ this.$refs["dataForm"].validate(valid => {
+ if (valid) {
+ this.addDialogVisible = false;
+ if (this.formName == "add") {
+ this.currentSup.type = 1;
+ addSupCertSet(this.currentSup)
+ .then((response) => {
+ this.getList();
+ })
+ .catch(() => {
+ });
} else {
- this.$message.error(res.message);
+ modifySupCertSet(this.currentSup).then((res) => {
+ if (res.code == 20000) {
+ this.getList();
+ this.$message.success("保存成功!");
+ } else {
+ this.$message.error(res.message);
+ }
+ })
}
- })
- }
+ }
+ });
+
+
},
cancelDialog() {
this.addDialogVisible = false;
@@ -612,25 +682,31 @@ export default {
this.addManufacturerDialogVisible = true;
},
onAddManufacturerSubmit() {
- this.addManufacturerDialogVisible = false;
- if (this.formManufacturerName == "add") {
- this.currentManufacturer.type = 2;
- addSupCertSet(this.currentManufacturer)
- .then((response) => {
- this.getManufacturerList();
- })
- .catch(() => {
- });
- } else {
- modifySupCertSet(this.currentManufacturer).then((res) => {
- if (res.code == 20000) {
- this.getManufacturerList();
- this.$message.success("保存成功!");
+
+ this.$refs["dataManufacturerForm"].validate(valid => {
+ if (valid) {
+ this.addManufacturerDialogVisible = false;
+ if (this.formManufacturerName == "add") {
+ this.currentManufacturer.type = 2;
+ addSupCertSet(this.currentManufacturer)
+ .then((response) => {
+ this.getManufacturerList();
+ })
+ .catch(() => {
+ });
} else {
- this.$message.error(res.message);
+ modifySupCertSet(this.currentManufacturer).then((res) => {
+ if (res.code == 20000) {
+ this.getManufacturerList();
+ this.$message.success("保存成功!");
+ } else {
+ this.$message.error(res.message);
+ }
+ })
}
- })
- }
+ }
+ });
+
},
@@ -654,6 +730,8 @@ export default {
this.currentProduct = row;
this.addProductDialogVisible = true;
+ this.classifyFirstSearch(this.currentProduct.flbm);
+
},
handleProductDel(row) {
let query = {
@@ -672,28 +750,62 @@ export default {
this.addProductDialogVisible = true;
},
onAddProductSubmit() {
- this.addProductDialogVisible = false;
- if (this.formProductName == "add") {
- this.currentProduct.type = 3;
- addSupCertSet(this.currentProduct)
- .then((response) => {
- this.getProductList();
- })
- .catch(() => {
- });
- } else {
- modifySupCertSet(this.currentProduct).then((res) => {
- if (res.code == 20000) {
- this.getProductList();
- this.$message.success("保存成功!");
+ this.$refs["dataForm"].validate(valid => {
+ if (valid) {
+ this.addProductDialogVisible = false;
+ if (this.formProductName == "add") {
+ this.currentProduct.type = 3;
+ addSupCertSet(this.currentProduct)
+ .then((response) => {
+ this.getProductList();
+ })
+ .catch(() => {
+ });
} else {
- this.$message.error(res.message);
+ modifySupCertSet(this.currentProduct).then((res) => {
+ if (res.code == 20000) {
+ this.getProductList();
+ this.$message.success("保存成功!");
+ } else {
+ this.$message.error(res.message);
+ }
+ })
}
- })
- }
+ }
+ })
+
},
+ classifyFirstSearch(key) {
+ let query = {
+ inFilter: key,
+ }
+ filterClassify(query)
+ .then(response => {
+ this.loading = false;
+ this.classifyList = response.data.list || [];
+ })
+ .catch(() => {
+ this.loading = false;
+ this.classifyList = [];
+ });
+ },
+
+ classifySearch(key) {
+ let query = {
+ key: key,
+ }
+ filterClassify(query)
+ .then(response => {
+ this.loading = false;
+ this.classifyList = response.data.list || [];
+ })
+ .catch(() => {
+ this.loading = false;
+ this.classifyList = [];
+ });
+ },
},
filters: {},
mounted() {
diff --git a/src/views/purchase/supCertSetSelectDialog.vue b/src/views/purchase/supCertSetSelectDialog.vue
index 9b2769c..5494100 100644
--- a/src/views/purchase/supCertSetSelectDialog.vue
+++ b/src/views/purchase/supCertSetSelectDialog.vue
@@ -14,11 +14,34 @@
-
+
{{ enableMap[scope.row.need] }}
+
+
+
+ {{ foreignMap[scope.row.foreign] }}
+
+
+
+
+
+
+ {{ foreignMap[scope.row.imports] }}
+
+
+
+
+
+
+
+
+
+
+
+
{
diff --git a/src/views/purchase/supCertificationAdd.vue b/src/views/purchase/supCertificationAdd.vue
index 91b654e..19df5bd 100644
--- a/src/views/purchase/supCertificationAdd.vue
+++ b/src/views/purchase/supCertificationAdd.vue
@@ -55,6 +55,7 @@
+
@@ -96,7 +97,7 @@
:total="total"
>
+
+ 选入资质证书
+
+
添加资质证书
@@ -161,6 +168,14 @@
+ 编辑
+
删除
+
+ 禁用
+
+
+ 启用
+
@@ -222,6 +256,23 @@
+
+
+
+
@@ -237,7 +288,7 @@ import {
CodeToText,
TextToCode,
} from "element-china-area-data";
-import {filterCompanyCert, deleteCompanyCert} from "../../api/purchase/companyCert";
+import {filterCompanyCert, deleteCompanyCert, updateCompanyCert} from "../../api/purchase/companyCert";
import corpMaintainSelect from "../../views/basic/CorpMaintainSelect"
import companyAddCert from "./supCertAddDialog";
@@ -245,6 +296,7 @@ import draggable from "vuedraggable";
import {BASE_URL} from "@/config/app";
import {getUUID} from "@/utils/strUtil";
import {bindProduct} from "@/api/purchase/suppliersRegistrationBasic";
+import supCertSetSelectDialog from "./../purchase/supCertSetSelectDialog";
export default {
@@ -335,6 +387,7 @@ export default {
trigger: "change"
}
],
+
},
uploadUrl: "",
fileUrl: "",
@@ -380,12 +433,15 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
- 4: "变更未审核",
+ 3: "变更未审核",
6: "未审核",
},
editTye: 1,
selectCorpVisible: false,
+ selectCertVisible: false,
+ certType: 1,
+ customerId: null,
};
}
@@ -399,10 +455,15 @@ export default {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
+
+ this.customerId = this.inputQuery.customerId;
+
+ if (this.inputQuery.areaCode != null)
+ this.selectedOptions = this.inputQuery.areaCode.split(",");
}
,
components: {
- draggable, companyAddCert, corpMaintainSelect
+ draggable, companyAddCert, corpMaintainSelect, supCertSetSelectDialog
}
,
methods: {
@@ -482,6 +543,7 @@ export default {
closeLocalDialog() {
this.addCertVisible = false;
+ this.selectCertVisible = false;
this.getCompanyCertList();
}
,
@@ -512,18 +574,23 @@ export default {
}
,
- addCert(index, row) {
- this.inputQuery.id = '';
- if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
- this.inputQuery.id = row.id;
+ addCert(row) {
+ if (this.$isNotBlank(row)) {
+ this.formName = 2
this.inputQuery.formData = row;
+ this.editTye = 2;
} else {
- this.inputQuery.formData = {};
+ this.formName = 1;
+ this.editTye = 1;
}
this.addCertVisible = true;
}
,
+ selectCert() {
+ this.selectCertVisible = true;
+ },
+
toViewCompanyCert(row) {
this.certFileUrl = BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
window.open(this.certFileUrl + row.filePath);
@@ -583,6 +650,20 @@ export default {
}
,
+
+ disableCert(row, status) {
+ row.status = status;
+ updateCompanyCert(row).then(response => {
+ this.loading = false;
+ if (response.code === 20000) {
+ this.$message.success("更新成功!");
+ this.getCompanyCertList();
+ } else {
+ this.$message.error(response.message);
+ }
+ });
+
+ },
}
,
filters: {
diff --git a/src/views/purchase/supCompanySearch.vue b/src/views/purchase/supCompanySearch.vue
index c5d66bb..0de0ff7 100644
--- a/src/views/purchase/supCompanySearch.vue
+++ b/src/views/purchase/supCompanySearch.vue
@@ -136,7 +136,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
- 4: "变更未审核",
+ 3: "变更未审核",
6: "未审核",
},
diff --git a/src/views/purchase/supManufacturerAdd.vue b/src/views/purchase/supManufacturerAdd.vue
index c99e7b1..cee117d 100644
--- a/src/views/purchase/supManufacturerAdd.vue
+++ b/src/views/purchase/supManufacturerAdd.vue
@@ -163,7 +163,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
- 4: "变更未审核",
+ 3: "变更未审核",
6: "未审核",
},
loading: false,
@@ -186,6 +186,7 @@ export default {
fileUrl: "",
inputQuery: {},
editType: 1,
+ fromType: 2,
};
},
filters: {
diff --git a/src/views/purchase/supManufacturerAudit.vue b/src/views/purchase/supManufacturerAudit.vue
index 1572e69..6cc1e91 100644
--- a/src/views/purchase/supManufacturerAudit.vue
+++ b/src/views/purchase/supManufacturerAudit.vue
@@ -147,7 +147,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
- 4: "变更未审核",
+ 3: "变更未审核",
6: "未审核",
},
loading: false,
diff --git a/src/views/purchase/supManufacturerAuditDialog.vue b/src/views/purchase/supManufacturerAuditDialog.vue
index ecce5ba..b944684 100644
--- a/src/views/purchase/supManufacturerAuditDialog.vue
+++ b/src/views/purchase/supManufacturerAuditDialog.vue
@@ -401,7 +401,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
- 4: "变更未审核",
+ 3: "变更未审核",
6: "未审核",
},
certAuditVisible: false,
diff --git a/src/views/purchase/supManufacturerEditDialog.vue b/src/views/purchase/supManufacturerEditDialog.vue
index 3bec213..3c1cbd0 100644
--- a/src/views/purchase/supManufacturerEditDialog.vue
+++ b/src/views/purchase/supManufacturerEditDialog.vue
@@ -306,6 +306,7 @@
@@ -458,7 +459,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
- 4: "变更未审核",
+ 3: "变更未审核",
6: "未审核",
},
editTye: 1,
@@ -468,11 +469,15 @@ export default {
2: "编辑生产企业资质证书",
},
manufacturerId: null,
+ customerId:null,
selectCertVisible: false,
certType: 2,
};
},
created() {
+
+ console.log(this.fromType+"----------------------");
+
if (this.editType == 0) {
this.inputQuery.manufacturerId = getUUID("")
} else {
@@ -483,6 +488,7 @@ export default {
}
this.certQuery.manufacturerIdFk = this.inputQuery.manufacturerId;
this.manufacturerId = this.inputQuery.manufacturerId
+ this.customerId = this.inputQuery.customerId;
// this.getData();
this.getCompanyCertList();
this.findMethod();
@@ -499,10 +505,13 @@ export default {
this.$refs["inputQuery"].validate(valid => {
if (valid) {
- this.inputQuery.auditStatus = type;
+
+ let formData = JSON.parse(JSON.stringify(this.inputQuery));
+ formData.auditStatus = type;
+
this.loading = true;
let urlName = this.editType == 0 ? 'add' : 'update';
- addOrModifyCompany(this.inputQuery, urlName).then(response => {
+ addOrModifyCompany(formData, urlName).then(response => {
this.loading = false;
if (response.code === 20000) {
this.addCloseDialog(true);
@@ -546,6 +555,7 @@ export default {
},
selectCert() {
+ this.customerId = this.inputQuery.customerId;
this.selectCertVisible = true;
},
diff --git a/src/views/purchase/supManufacturerSearch.vue b/src/views/purchase/supManufacturerSearch.vue
index cb7de20..e283b85 100644
--- a/src/views/purchase/supManufacturerSearch.vue
+++ b/src/views/purchase/supManufacturerSearch.vue
@@ -149,7 +149,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
- 4: "变更未审核",
+ 3: "变更未审核",
6: "未审核",
},
loading: false,
diff --git a/src/views/purchase/supProductAdd.vue b/src/views/purchase/supProductAdd.vue
index 33277ee..76e0880 100644
--- a/src/views/purchase/supProductAdd.vue
+++ b/src/views/purchase/supProductAdd.vue
@@ -176,7 +176,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
- 4: "变更未审核",
+ 3: "变更未审核",
6: "未审核",
},
list: [],
diff --git a/src/views/purchase/supProductAudit.vue b/src/views/purchase/supProductAudit.vue
index 2fbfef7..5ecfe34 100644
--- a/src/views/purchase/supProductAudit.vue
+++ b/src/views/purchase/supProductAudit.vue
@@ -160,7 +160,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
- 4: "变更未审核",
+ 3: "变更未审核",
6: "未审核",
},
list: [],
diff --git a/src/views/purchase/supProductAuditDialog.vue b/src/views/purchase/supProductAuditDialog.vue
index 395b858..c9a9bb8 100644
--- a/src/views/purchase/supProductAuditDialog.vue
+++ b/src/views/purchase/supProductAuditDialog.vue
@@ -420,7 +420,7 @@ export default {
0: "草稿",
1: "已通过",
2: "已拒绝",
- 4: "变更未审核",
+ 3: "变更未审核",
6: "未审核",
},
diff --git a/src/views/purchase/supProductEditDialog.vue b/src/views/purchase/supProductEditDialog.vue
index 4b7bfa3..4d848e2 100644
--- a/src/views/purchase/supProductEditDialog.vue
+++ b/src/views/purchase/supProductEditDialog.vue
@@ -42,8 +42,8 @@
size="mini"
icon="search"
v-if="inputQuery.auditStatus == 4|| inputQuery.auditStatus == 1|| inputQuery.auditStatus == 2"
- @click="onModifySubmit(4)"
- >提交变更
+ @click="onModifySubmit(3)"
+ >提交审核
@@ -104,56 +104,35 @@