diff --git a/src/api/yingji/enterprise.js b/src/api/yingji/enterprise.js
index af7af6b..4539da1 100644
--- a/src/api/yingji/enterprise.js
+++ b/src/api/yingji/enterprise.js
@@ -1,46 +1,54 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
// 查询计划企业列表
export function listEnterprise(query) {
return request({
- url: '/pharmaceuticals/bPlanEnterprise/list',
- method: 'get',
- params: query
- })
+ url: "/pharmaceuticals/bPlanEnterprise/list",
+ method: "get",
+ params: query,
+ });
}
// 查询计划企业详细
export function getEnterprise(id) {
return request({
- url: '/system/enterprise/' + id,
- method: 'get'
- })
+ url: "/system/enterprise/" + id,
+ method: "get",
+ });
}
// 新增计划企业
export function addEnterprise(data) {
return request({
- url: '/pharmaceuticals/bPlanEnterprise',
- method: 'post',
- data: data
- })
+ url: "/pharmaceuticals/bPlanEnterprise",
+ method: "post",
+ data: data,
+ });
}
// 修改计划企业
export function updateEnterprise(data) {
return request({
- url: '/pharmaceuticals/bPlanEnterprise',
- method: 'put',
- data: data
- })
+ url: "/pharmaceuticals/bPlanEnterprise",
+ method: "put",
+ data: data,
+ });
+}
+
+// 批量提交企业
+export function updateIdList(idList) {
+ return request({
+ url: "/pharmaceuticals/bPlanEnterprise/updateIdList?idListStr=" + idList,
+ method: "post",
+ });
}
// 删除计划企业
export function delEnterprise(id) {
return request({
- url: '/pharmaceuticals/bPlanEnterprise?idList=' + id,
- method: 'delete'
- })
+ url: "/pharmaceuticals/bPlanEnterprise?idList=" + id,
+ method: "delete",
+ });
}
// 首页表格
@@ -50,4 +58,4 @@ export function treeEnterprise(params) {
method: "get",
params,
});
-}
\ No newline at end of file
+}
diff --git a/src/views/components/AddDialog/tab3.vue b/src/views/components/AddDialog/tab3.vue
index 399c351..4e44d85 100644
--- a/src/views/components/AddDialog/tab3.vue
+++ b/src/views/components/AddDialog/tab3.vue
@@ -34,7 +34,11 @@
-
+
@@ -66,7 +70,7 @@
草稿箱( {{ total }} 家)
- 正式提交
+ 正式提交
@@ -80,6 +84,7 @@ import {
getEnterprise,
delEnterprise,
addEnterprise,
+ updateIdList,
updateEnterprise,
} from "@/api/yingji/enterprise";
@@ -149,6 +154,18 @@ export default {
});
},
methods: {
+ onSubmit() {
+ console.log();
+ let ids = []
+ this.enterpriseList.map(item=>{
+ ids.push( item.id)
+
+ })
+ updateIdList(ids.join(',')).then((response) => {
+ this.$modal.msgSuccess("提交成功");
+ this.getList();
+ });
+ },
// 编辑月份
editMonth(row) {
let _this = this;
diff --git a/src/views/yingji/enforcing.vue b/src/views/yingji/enforcing.vue
index b3ac64b..efd161c 100644
--- a/src/views/yingji/enforcing.vue
+++ b/src/views/yingji/enforcing.vue
@@ -481,7 +481,7 @@ export default {
console.log(e);
this.addShow = true;
this.detailLoad = true;
- enforcingGet(e.longId).then((res) => {
+ enforcingGet(e.checkId).then((res) => {
for (let key in res.data) {
this.listDes.forEach((value1, index1) => {
if (key == value1.eng) {
@@ -537,7 +537,7 @@ export default {
getList() {
this.loads = true;
enforcingDetail(this.searchBefore).then((res) => {
- console.log(res);
+ // console.log(res);
this.tableData = res.rows;
this.total = res.total;
this.loads = false;