From b903eae51c77affd9a37396c31f72716e515df10 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BB=84=E6=B3=BD=E8=85=BE?= <1178634255@qq.com>
Date: Fri, 25 Aug 2023 15:53:23 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=AE=A1=E7=90=86-=E8=AE=BE?=
=?UTF-8?q?=E5=A4=87=E8=B5=84=E8=B4=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/inventory/deviceCert.js | 10 +-
src/views/inventory/DeptDeviceDetail.vue | 39 +-
src/views/inventory/cert/depCertAddDialog.vue | 403 ++++++++++++++++++
src/views/inventory/invDeviceEditDialog.vue | 89 ++--
4 files changed, 469 insertions(+), 72 deletions(-)
create mode 100644 src/views/inventory/cert/depCertAddDialog.vue
diff --git a/src/api/inventory/deviceCert.js b/src/api/inventory/deviceCert.js
index 546c596d..8668b4a4 100644
--- a/src/api/inventory/deviceCert.js
+++ b/src/api/inventory/deviceCert.js
@@ -14,17 +14,17 @@ export function filterDeviceCert(query) {
export function insertCompanyCert(query) {
return axios(
{
- url: "/sup/info/insertCompanyCert",
+ url: "/inv/info/insertDeviceCert",
method: "post",
data: query
}
);
}
-export function updateCompanyCert(query) {
+export function updateDeviceCert(query) {
return axios(
{
- url: "/sup/info/updateCompanyCert",
+ url: "/inv/info/updateDeviceCert",
method: "post",
data: query
}
@@ -42,10 +42,10 @@ export function auditSupCert(query) {
}
-export function deleteCompanyCert(query) {
+export function deleteDeviceCert(query) {
return axios(
{
- url: "/sup/info/deleteCompanyCert",
+ url: "/inv/info/deleteDeviceCert",
method: "post",
data: query
}
diff --git a/src/views/inventory/DeptDeviceDetail.vue b/src/views/inventory/DeptDeviceDetail.vue
index b0514a71..4a041034 100644
--- a/src/views/inventory/DeptDeviceDetail.vue
+++ b/src/views/inventory/DeptDeviceDetail.vue
@@ -115,7 +115,7 @@
@@ -173,17 +173,15 @@
-
+
-
+
-
-
-
+
@@ -223,7 +221,7 @@
+
+
+
+
diff --git a/src/views/inventory/invDeviceEditDialog.vue b/src/views/inventory/invDeviceEditDialog.vue
index 049d214e..4c18dc51 100644
--- a/src/views/inventory/invDeviceEditDialog.vue
+++ b/src/views/inventory/invDeviceEditDialog.vue
@@ -21,13 +21,13 @@
{{ expire[scope.row.status] }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -36,17 +36,16 @@
type="text"
size="small"
@click.native="addCert(scope.row)"
- v-if="scope.row.auditStatus == 0 || scope.row.auditStatus == 2|| scope.row.auditStatus == 6"
>编辑
- 预览
+ 预览
+
删除
@@ -73,12 +72,12 @@
append-to-body
@close='closeLocalDialog'
>
-
+ >
@@ -90,10 +89,10 @@
import {modifyCompany, addCompany, bindCorp, previewImage} from "@/api/purchase/supCompany";
import store from "@/store/index";
import {regionDataPlus, CodeToText} from "element-china-area-data";
-import { deleteCompanyCert, updateCompanyCert} from "@/api/purchase/companyCert";
+import {deleteDeviceCert, updateDeviceCert} from "@/api/inventory/deviceCert";
import {filterDeviceCert} from "@/api/inventory/deviceCert";
import corpMaintainSelect from "@/views/basic/corpMaintain/corpMaintainSelect"
-import companyAddCert from "@/views/purchase/cert/supCertAddDialog";
+import deviceAddCert from "@/views/inventory/cert/depCertAddDialog.vue";
import draggable from "vuedraggable";
import {getUUID, isBlank} from "@/utils/strUtil";
import supCertSetSelectDialog from "@/views/purchase/cert/supCertSetSelectDialog";
@@ -116,17 +115,23 @@ export default {
// type: Number,
// required: true,
// }
- rowData: {
+ idQuery: {
type: Object,
required: true,
},
- idQuery: {
+ rowData: {
type: Object,
required: true,
},
- },
+ },
+ watch: {
+ rowData: function (newVal, oldVal) {
+ this.searchData(newVal);
+ }
+ }
+ ,
data() {
return {
BASE_URL: process.env.VUE_APP_BASE_API,
@@ -138,7 +143,7 @@ export default {
options: regionDataPlus,
inputQuery: {
// customerId: null,
- devCodeFk:null,
+ devCodeFk: null,
companyName: null,
contacts: null,
mobile: null,
@@ -256,7 +261,7 @@ export default {
companyApplyUpdateVisible: false,
companyEditDisabled: true,
companyEditButtonStr: "编辑",
- addType: "1", //证书类型:1:供应商;2.生产企业;3.产品品种
+ addType: "1", //证书类型(1:资质证书;2:技术材料)
checkFlag: {
0: "草稿",
1: "已通过",
@@ -272,31 +277,32 @@ export default {
customerId: null,
};
- }
- ,
+ },
created() {
console.log("第一次this.rowData:")
console.log(this.rowData)
- // if (this.editType == 1) {
- this.getDeviceCertList();
+ // if (this.rowData.editType == 1) {
+ // this.getDeviceCertList();
// }
-
this.getBasicUnitMaintainsList();
this.headers = {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
- // this.inputQuery = this.inputEdit
- // this.inputQuery = this.idQuery
- // if (this.inputQuery.areaCode != null)
- // this.selectedOptions = this.inputQuery.areaCode.split(",");
- }
- ,
+ },
components: {
- draggable, companyAddCert, corpMaintainSelect, supCertSetSelectDialog, ElImageViewer
+ draggable, deviceAddCert, corpMaintainSelect, supCertSetSelectDialog, ElImageViewer
}
,
methods: {
+ searchData(query) {
+ console.log("完成!")
+ console.log(query)
+ this.idQuery = {...query}
+
+ this.getDeviceCertList();
+
+ },
//预览照片
showImgViewer(row) {
this.certFileUrl = this.BASE_URL + "/udiwms/image/register/file/getImage?type=image2&name=";
@@ -337,10 +343,10 @@ export default {
,
//添加资质证书
addCert(row) {
- if (isBlank(this.inputQuery.customerId)) {
- return this.$message.error("请先选择供应商");
+ if (isBlank(this.inputQuery.devCodeFk)) {
+ return this.$message.error("请先选择设备");
}
-
+ console.log(this.inputQuery.devCodeFk)
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.formName = 2
this.inputQuery.formData = row;
@@ -379,8 +385,11 @@ export default {
console.log("获取idQuery:")
console.log(this.idQuery)
this.certQuery.devCodeFk = this.idQuery.code;
- console.log( "获取this.certQuery:")
- console.log( this.certQuery)
+ this.inputQuery={...this.idQuery};
+ this.inputQuery.devCodeFk=this.idQuery.code;
+ console.log(this.inputQuery);
+ console.log("获取this.certQuery:")
+ console.log(this.certQuery)
filterDeviceCert(this.certQuery)
.then((response) => {
this.certLoading = false;
@@ -393,7 +402,7 @@ export default {
});
},
- deleteCompanyCert(row) {
+ deleteDeviceCert(row) {
this.$confirm("是否删除?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -404,11 +413,11 @@ export default {
id: row.id,
filePath: row.filePath,
};
- deleteCompanyCert(tquery)
+ deleteDeviceCert(tquery)
.then((response) => {
this.certLoading = false;
if (response.code === 20000) {
- this.getCompanyCertList();
+ this.getDeviceCertList();
this.$message({
type: "success",
message: "删除成功!",