删除草稿箱,编辑对话框

zhangtao
laozt 1 year ago
parent 3da23d1037
commit 56433015b2

@ -20,7 +20,7 @@ export function getEnterprise(id) {
// 新增计划企业
export function addEnterprise(data) {
return request({
url: '/system/enterprise',
url: '/pharmaceuticals/bPlanEnterprise',
method: 'post',
data: data
})
@ -29,7 +29,7 @@ export function addEnterprise(data) {
// 修改计划企业
export function updateEnterprise(data) {
return request({
url: '/system/enterprise',
url: '/pharmaceuticals/bPlanEnterprise',
method: 'put',
data: data
})
@ -38,7 +38,7 @@ export function updateEnterprise(data) {
// 删除计划企业
export function delEnterprise(id) {
return request({
url: '/system/enterprise/' + id,
url: '/pharmaceuticals/bPlanEnterprise?idList=' + id,
method: 'delete'
})
}

@ -1,12 +1,12 @@
/*
* @Descripttion:
* @version:
* @Descripttion:
* @version:
* @Author: JC9527
* @Date: 2023-09-11 15:38:21
* @LastEditors: JC9527
* @LastEditTime: 2023-09-30 00:52:32
*/
import request from '@/utils/request'
import request from "@/utils/request";
export default {
// 行政区划
@ -31,60 +31,59 @@ export default {
url: "/pharmaceuticals/info/list",
method: "get",
params,
})
});
},
// 查看,新增,修改,删除计划管理表 get\delete 传参是params put\post 传参是data
bPlanManage(method,data = null, params = null, id){
bPlanManage(method, data = null, params = null, id) {
return request({
url: `/pharmaceuticals/bPlanManage${id ? `/${id}` : ''}`,
url: `/pharmaceuticals/bPlanManage${id ? `/${id}` : ""}`,
method,
data,
params
params,
});
},
bPlanManageTwo(id){
bPlanManageTwo(id) {
return request({
url: `/pharmaceuticals/bPlanEnterprise/${id}`,
method:'get',
method: "get",
});
},
dictdata(params){
dictdata(params) {
return request({
url: `/pharmaceuticals/dictdata`,
method:'get',
params
method: "get",
params,
});
},
bPlanEnterprise(method,data = null, params = null, id){
bPlanEnterprise(method, data = null, params = null, id) {
return request({
url: `/pharmaceuticals/bPlanEnterprise${id ? `/${id}` : ''}`,
url: `/pharmaceuticals/bPlanEnterprise${id ? `/${id}` : ""}`,
method,
data,
params
params,
});
},
// 查看计划明细
planmx(params){
planmx(params) {
return request({
url: `/pharmaceuticals/bPlanEnterprise/planmx`,
method:'post',
method: "post",
params,
});
},
// 查询计划企业列表
bPlanEnterpriseList(){
bPlanEnterpriseList() {
return request({
url: `/pharmaceuticals/bPlanEnterprise/list`,
method:'get',
method: "get",
});
},
// 根据行政区划查询重点企业数量
getBydistrict(params){
getBydistrict(params) {
return request({
url: `/pharmaceuticals/bKeyEnterprise/getBydistrict`,
method:'get',
params
method: "get",
params,
});
},
};
};

@ -54,7 +54,7 @@
<tab2 @nextTab="selectTab" />
</div>
<div v-show="activeTab == 2">
<tab3 />
<tab3 ref="tabs" />
</div>
</div>
</div>
@ -87,6 +87,9 @@ export default {
selectTab(index) {
console.log(index);
this.activeTab = index;
if (index == 2) {
this.$refs.tabs.getList();
}
},
//
openDialog(item, dept) {

@ -137,7 +137,7 @@
<div class="next">
<div class="selected">
草稿箱(<span> {{ 100 }} </span>)
草稿箱(<span> {{ enterpriseTotal }} </span>)
</div>
<div class="btn" ref="next" @click="btnNext"></div>
</div>
@ -153,6 +153,13 @@ import dictzh from "@/utils/dictzh.js";
//
import executive from "../../yingji/echarts/executive.vue";
import { listNew, getNew, delNew, addNew, updateNew } from "@/api/yingji/new";
import {
listEnterprise,
getEnterprise,
delEnterprise,
addEnterprise,
updateEnterprise,
} from "@/api/yingji/enterprise";
export default {
dicts: [
@ -203,12 +210,47 @@ export default {
form: {},
//
rules: {},
//
queryPlanEnterpriseParams: {
pageNum: 1,
pageSize: 10,
enterpriseId: null,
createId: null,
updateId: null,
userId: null,
deptId: null,
district: null,
plannedYear: null,
isPoint: "",
enterpriseName: null,
lawSort: null,
lawAreas: null,
lawLevel: null,
lawHierarchy: null,
plannedMonth: null,
status: 1,
checkStatus: null,
checkId: null,
checkAgeing: null,
},
enterpriseList: [],
enterpriseTotal: 0,
//
formPlanEnterprise: {},
};
},
created() {
this.getList();
this.getPlanEnterpriseList();
},
methods: {
/** 查询计划企业列表 */
getPlanEnterpriseList() {
listEnterprise(this.queryPlanEnterpriseParams).then((response) => {
this.enterpriseList = response.data;
this.enterpriseTotal = response.data.length;
});
},
/** 查询企业新列表 */
getList() {
this.loading = true;
@ -222,7 +264,53 @@ export default {
this.$emit("nextTab", 1);
},
// 稿
handleAddDrafts(row) {},
handleAddDrafts(row) {
// console.log("1", row);
this.resetPlanEnterprise();
this.formPlanEnterprise.plannedYear = this.$moment(new Date()).format(
"yyyy"
);
this.formPlanEnterprise.plannedMonth = "";
this.formPlanEnterprise.enterpriseId = row.enterpriseId;
this.formPlanEnterprise.enterpriseName = row.enterpriseName;
this.formPlanEnterprise.district = row.district;
this.formPlanEnterprise.status = 0;
// console.log("2", this.formPlanEnterprise);
addEnterprise(this.formPlanEnterprise).then((response) => {
this.$modal.msgSuccess("加入成功");
this.getList(); //稿
this.getPlanEnterpriseList();
});
},
//
resetPlanEnterprise() {
this.formPlanEnterprise = {
id: null,
enterpriseId: null,
createId: null,
createBy: null,
createTime: null,
updateId: null,
updateBy: null,
updateTime: null,
remark: null,
userId: null,
deptId: null,
district: null,
plannedYear: null,
isPoint: null,
enterpriseName: null,
lawSort: null,
lawAreas: null,
lawLevel: null,
lawHierarchy: null,
plannedMonth: null,
status: null,
checkStatus: null,
checkId: null,
checkAgeing: null,
};
},
//
handleInfo(row) {
this.$refs.firmDialog.open(row);

@ -137,7 +137,7 @@
<div class="next">
<div class="selected">
草稿箱(<span> {{ 100 }} </span>)
草稿箱(<span> {{ enterpriseTotal }} </span>)
</div>
<div class="btn" ref="next" @click="btnNext"></div>
</div>
@ -153,6 +153,13 @@ import dictzh from "@/utils/dictzh.js";
//
import executive from "../../yingji/echarts/executive.vue";
import { listNew, getNew, delNew, addNew, updateNew } from "@/api/yingji/new";
import {
listEnterprise,
getEnterprise,
delEnterprise,
addEnterprise,
updateEnterprise,
} from "@/api/yingji/enterprise";
export default {
dicts: [
@ -203,12 +210,47 @@ export default {
form: {},
//
rules: {},
//
queryPlanEnterpriseParams: {
pageNum: 1,
pageSize: 10,
enterpriseId: null,
createId: null,
updateId: null,
userId: null,
deptId: null,
district: null,
plannedYear: null,
isPoint: "",
enterpriseName: null,
lawSort: null,
lawAreas: null,
lawLevel: null,
lawHierarchy: null,
plannedMonth: null,
status: 1,
checkStatus: null,
checkId: null,
checkAgeing: null,
},
enterpriseList: [],
enterpriseTotal: 0,
//
formPlanEnterprise: {},
};
},
created() {
this.getList();
this.getPlanEnterpriseList();
},
methods: {
/** 查询计划企业列表 */
getPlanEnterpriseList() {
listEnterprise(this.queryPlanEnterpriseParams).then((response) => {
this.enterpriseList = response.data;
this.enterpriseTotal = response.data.length;
});
},
/** 查询企业新列表 */
getList() {
this.loading = true;
@ -222,7 +264,53 @@ export default {
this.$emit("nextTab", 2);
},
// 稿
handleAddDrafts(row) {},
handleAddDrafts(row) {
// console.log("1", row);
this.resetPlanEnterprise();
this.formPlanEnterprise.plannedYear = this.$moment(new Date()).format(
"yyyy"
);
this.formPlanEnterprise.plannedMonth = "";
this.formPlanEnterprise.enterpriseId = row.enterpriseId;
this.formPlanEnterprise.enterpriseName = row.enterpriseName;
this.formPlanEnterprise.district = row.district;
this.formPlanEnterprise.status = 0;
// console.log("2", this.formPlanEnterprise);
addEnterprise(this.formPlanEnterprise).then((response) => {
this.$modal.msgSuccess("加入成功");
this.getList(); //稿
this.getPlanEnterpriseList();
});
},
//
resetPlanEnterprise() {
this.formPlanEnterprise = {
id: null,
enterpriseId: null,
createId: null,
createBy: null,
createTime: null,
updateId: null,
updateBy: null,
updateTime: null,
remark: null,
userId: null,
deptId: null,
district: null,
plannedYear: null,
isPoint: null,
enterpriseName: null,
lawSort: null,
lawAreas: null,
lawLevel: null,
lawHierarchy: null,
plannedMonth: null,
status: null,
checkStatus: null,
checkId: null,
checkAgeing: null,
};
},
//
handleInfo(row) {
this.$refs.firmDialog.open(row);

@ -64,7 +64,7 @@
<div class="next">
<div class="selected">
草稿箱(<span> {{ 100 }} </span>)
草稿箱(<span> {{ total }} </span>)
</div>
<div class="btn" ref="next">正式提交</div>
</div>
@ -130,7 +130,7 @@ export default {
lawLevel: null,
lawHierarchy: null,
plannedMonth: null,
status: 1,
status: 0,
checkStatus: null,
checkId: null,
checkAgeing: null,
@ -147,6 +147,7 @@ export default {
methods: {
//
editMonth(row) {
let _this = this;
this.$prompt("请输入月份", "编辑", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -158,6 +159,14 @@ export default {
})
.then(({ value }) => {
//
if (row.id != null) {
row.createTime = null;
row.plannedMonth = value;
updateEnterprise(row).then((response) => {
this.$modal.msgSuccess("修改成功");
_this.getList();
});
}
})
.catch(() => {
this.$message({
@ -176,7 +185,18 @@ export default {
});
},
//
handleDelete(row) {},
handleDelete(row) {
this.$modal
.confirm("是否确认删除计划企业数据项?")
.then(function () {
return delEnterprise(row.id);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
//
componendDistrict(district) {
let fullName;

Loading…
Cancel
Save