Merge branch 'master' of http://gitea.xxhhcty.xyz:8080/zcdsj/factory_web
This commit is contained in:
commit
f10ab753e2
|
@ -140,9 +140,9 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
field:{
|
||||
vehicle:{
|
||||
list: {
|
||||
url: `${config.API_URL}/ofm/customfield/`,
|
||||
url: `${config.API_URL}/ofm/vehicle/`,
|
||||
name: "字段列表",
|
||||
req: async function(data){
|
||||
return await http.get(this.url, data);
|
||||
|
@ -151,11 +151,11 @@ export default {
|
|||
item: {
|
||||
name: "字段详情",
|
||||
req: async function(id){
|
||||
return await http.get( `${config.API_URL}/ofm/customfield/${id}/`);
|
||||
return await http.get( `${config.API_URL}/ofm/vehicle/${id}/`);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
url: `${config.API_URL}/ofm/customfield/`,
|
||||
url: `${config.API_URL}/ofm/vehicle/`,
|
||||
name: "新增字段",
|
||||
req: async function(data){
|
||||
return await http.post(this.url, data);
|
||||
|
@ -165,7 +165,7 @@ export default {
|
|||
name: "更新字段",
|
||||
req: async function(id, data){
|
||||
return await http.put(
|
||||
`${config.API_URL}/ofm/customfield/${id}/`,
|
||||
`${config.API_URL}/ofm/vehicle/${id}/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
|
@ -173,50 +173,50 @@ export default {
|
|||
delete: {
|
||||
name: "删除字段",
|
||||
req: async function(id){
|
||||
return await http.delete(`${config.API_URL}/ofm/customfield/${id}/`);
|
||||
return await http.delete(`${config.API_URL}/ofm/vehicle/${id}/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
state:{
|
||||
filerecord:{
|
||||
list: {
|
||||
url: `${config.API_URL}/ofm/state/`,
|
||||
name: "状态列表",
|
||||
url: `${config.API_URL}/ofm/filerecord/`,
|
||||
name: "档案列表",
|
||||
req: async function(data){
|
||||
return await http.get(this.url, data);
|
||||
}
|
||||
},
|
||||
item: {
|
||||
name: "状态详情",
|
||||
name: "档案详情",
|
||||
req: async function(id){
|
||||
return await http.get( `${config.API_URL}/ofm/state/${id}/`);
|
||||
return await http.get( `${config.API_URL}/ofm/filerecord/${id}/`);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
url: `${config.API_URL}/ofm/state/`,
|
||||
name: "新增状态",
|
||||
url: `${config.API_URL}/ofm/filerecord/`,
|
||||
name: "新增档案",
|
||||
req: async function(data){
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
update: {
|
||||
name: "更新状态",
|
||||
name: "更新档案",
|
||||
req: async function(id, data){
|
||||
return await http.put(
|
||||
`${config.API_URL}/ofm/state/${id}/`,
|
||||
`${config.API_URL}/ofm/filerecord/${id}/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除状态",
|
||||
name: "删除档案",
|
||||
req: async function(id){
|
||||
return await http.delete(`${config.API_URL}/ofm/state/${id}/`);
|
||||
return await http.delete(`${config.API_URL}/ofm/filerecord/${id}/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
transition:{
|
||||
borrow:{
|
||||
list: {
|
||||
url: `${config.API_URL}/ofm/transition/`,
|
||||
url: `${config.API_URL}/ofm/fileborrow/`,
|
||||
name: "流转列表",
|
||||
req: async function(data){
|
||||
return await http.get(this.url, data);
|
||||
|
@ -225,11 +225,11 @@ export default {
|
|||
item: {
|
||||
name: "流转详情",
|
||||
req: async function(id){
|
||||
return await http.get( `${config.API_URL}/ofm/transition/${id}/`);
|
||||
return await http.get( `${config.API_URL}/ofm/fileborrow/${id}/`);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
url: `${config.API_URL}/ofm/transition/`,
|
||||
url: `${config.API_URL}/ofm/fileborrow/`,
|
||||
name: "新增流转",
|
||||
req: async function(data){
|
||||
return await http.post(this.url, data);
|
||||
|
@ -239,7 +239,7 @@ export default {
|
|||
name: "更新流转",
|
||||
req: async function(id, data){
|
||||
return await http.put(
|
||||
`${config.API_URL}/ofm/transition/${id}/`,
|
||||
`${config.API_URL}/ofm/fileborrow/${id}/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
|
@ -247,8 +247,45 @@ export default {
|
|||
delete: {
|
||||
name: "删除流转",
|
||||
req: async function(id){
|
||||
return await http.delete(`${config.API_URL}/ofm/transition/${id}/`);
|
||||
return await http.delete(`${config.API_URL}/ofm/fileborrow/${id}/`);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
publicity: {
|
||||
list: {
|
||||
url: `${config.API_URL}/ofm/publicity/`,
|
||||
name: "宣传报道列表",
|
||||
req: async function(data){
|
||||
return await http.get(this.url, data);
|
||||
}
|
||||
},
|
||||
item: {
|
||||
name: "宣传报道详情",
|
||||
req: async function(id){
|
||||
return await http.get( `${config.API_URL}/ofm/publicity/${id}/`);
|
||||
}
|
||||
},
|
||||
create: {
|
||||
url: `${config.API_URL}/ofm/publicity/`,
|
||||
name: "创建宣传报道",
|
||||
req: async function(data){
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
update: {
|
||||
name: "删除宣传报道",
|
||||
req: async function(id, data){
|
||||
return await http.put(
|
||||
`${config.API_URL}/ofm/publicity/${id}/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
delete: {
|
||||
name: "删除宣传报道",
|
||||
req: async function(id){
|
||||
return await http.delete(`${config.API_URL}/ofm/publicity/${id}/`);
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
|
@ -2985,17 +2985,17 @@ const routes = [
|
|||
},
|
||||
component: "fac_cal/mpointstat_point",
|
||||
},
|
||||
{
|
||||
name:'box_pic',
|
||||
path: "/fac_cal/box_pic",
|
||||
meta: {
|
||||
title: "箱线图",
|
||||
// icon: "el-icon-postcard",
|
||||
type: "menu",
|
||||
perms: ["mpointstat_point"],
|
||||
},
|
||||
component: "fac_cal/box_picture",
|
||||
},
|
||||
// {
|
||||
// name:'box_pic',
|
||||
// path: "/fac_cal/box_pic",
|
||||
// meta: {
|
||||
// title: "箱线图",
|
||||
// // icon: "el-icon-postcard",
|
||||
// type: "menu",
|
||||
// perms: ["mpointstat_point"],
|
||||
// },
|
||||
// component: "fac_cal/box_picture",
|
||||
// },
|
||||
{
|
||||
path: "/fac_cal/mpointstat",
|
||||
meta: {
|
||||
|
|
|
@ -83,9 +83,9 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item, index) in tableDatas" :key="item">
|
||||
<td rowspan="10" v-if="index == 0" class="numCell">{{ item[0] }}</td>
|
||||
<td v-else-if="index==10" class="numCell">{{ item[0] }}</td>
|
||||
<td v-else-if="index==11" class="numCell"
|
||||
<td rowspan="11" v-if="index == 0" class="numCell">{{ item[0] }}</td>
|
||||
<td v-else-if="index==11" class="numCell">{{ item[0] }}</td>
|
||||
<td v-else-if="index==12" class="numCell"
|
||||
rowspan="2"
|
||||
>{{ item[0] }}</td>
|
||||
<td class="numCell">{{ item[1] }}</td>
|
||||
|
@ -407,6 +407,7 @@ export default {
|
|||
["出厂水泥", "复合硅酸盐水泥;42.5R;袋装水泥(t)", 0, 0, 0, 0],
|
||||
["出厂水泥", "复合硅酸盐水泥;42.5R;散装水泥(t)", 0, 0, 0, 0],
|
||||
["出厂水泥", "普通硅酸盐水泥;52.5;散装水泥(t)", 0,0, 0, 0],
|
||||
["出厂水泥", "普通硅酸盐水泥;42.5:散装缓凝水泥(t)", 0,0, 0, 0],
|
||||
["出厂水泥", "散装水泥(t)", 0,0, 0, 0],
|
||||
["出厂水泥", "袋装水泥(t)", 0,0, 0, 0],
|
||||
["出厂水泥", "出厂水泥合计(t)", 0,0, 0, 0, 0, 0, 0, 0],
|
||||
|
@ -606,32 +607,34 @@ export default {
|
|||
this.$API.enm.mpointstat.list.req(params1).then((res1) => {
|
||||
if (res1.length > 0) {
|
||||
res1.forEach((item) => {
|
||||
if (item.nickname == "水泥+P.O42.5R 散装") {
|
||||
if (item.mpoint_nickname == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][5] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][5] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 袋装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][5] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][5] = item.val;
|
||||
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
that.tableDatas[4][5] = item.val;
|
||||
}else if (item.nickname == "水泥+P.C42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;散装水泥") {
|
||||
that.tableDatas[5][5] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O52.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][5] = item.val;
|
||||
}else if (item.nickname == "散装水泥总和"){
|
||||
}else if (item.mpoint_nickname == "水泥+P.C42.5 散装"){
|
||||
that.tableDatas[7][5] = item.val;
|
||||
}else if (item.nickname == "袋装水泥总和") {
|
||||
}else if (item.mpoint_nickname == "散装水泥总和"){
|
||||
that.tableDatas[8][5] = item.val;
|
||||
}
|
||||
else if (item.nickname == "出厂水泥") {
|
||||
}else if (item.mpoint_nickname == "袋装水泥总和") {
|
||||
that.tableDatas[9][5] = item.val;
|
||||
}else if (item.nickname == "出厂熟料"){
|
||||
}
|
||||
else if (item.mpoint_nickname == "出厂水泥") {
|
||||
that.tableDatas[10][5] = item.val;
|
||||
}else if (item.nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[11][5] = item.elec_consume_unit;
|
||||
that.tableDatas[12][5] = item.val;
|
||||
}else if (item.mpoint_nickname == "出厂熟料"){
|
||||
that.tableDatas[11][5] = item.val;
|
||||
}else if (item.mpoint_nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[12][5] = item.elec_consume_unit;
|
||||
that.tableDatas[13][5] = item.val;
|
||||
}
|
||||
}
|
||||
)}
|
||||
|
@ -646,32 +649,35 @@ export default {
|
|||
this.$API.enm.mpointstat.list.req(params2).then((res2) => {
|
||||
if (res2.length > 0) {
|
||||
res2.forEach((item) => {
|
||||
if (item.nickname == "水泥+P.O42.5R 散装") {
|
||||
if (item.mpoint_nickname == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][4] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][4] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 袋装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][4] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][4] = item.val;
|
||||
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
that.tableDatas[4][4] = item.val;
|
||||
}else if (item.nickname == "水泥+P.C42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;散装水泥") {
|
||||
that.tableDatas[5][4] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O52.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][4] = item.val;
|
||||
}else if (item.nickname == "散装水泥总和"){
|
||||
that.tableDatas[7][4] = item.val;
|
||||
}else if (item.nickname == "袋装水泥总和") {
|
||||
that.tableDatas[8][4] = item.val;
|
||||
}
|
||||
else if (item.nickname == "出厂水泥") {
|
||||
else if (item.mpoint_nickname == "水泥+P.C42.5 散装"){
|
||||
that.tableDatas[7][4] = item.val;
|
||||
}else if (item.mpoint_nickname == "散装水泥总和"){
|
||||
that.tableDatas[8][4] = item.val;
|
||||
}else if (item.mpoint_nickname == "袋装水泥总和") {
|
||||
that.tableDatas[9][4] = item.val;
|
||||
}else if (item.nickname == "出厂熟料"){
|
||||
}
|
||||
else if (item.mpoint_nickname == "出厂水泥") {
|
||||
that.tableDatas[10][4] = item.val;
|
||||
}else if (item.nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[11][4] = item.elec_consume_unit;
|
||||
that.tableDatas[12][4] = item.val;
|
||||
}else if (item.mpoint_nickname == "出厂熟料"){
|
||||
that.tableDatas[11][4] = item.val;
|
||||
}else if (item.mpoint_nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[12][4] = item.elec_consume_unit;
|
||||
that.tableDatas[13][4] = item.val;
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -688,32 +694,34 @@ export default {
|
|||
this.$API.enm.mpointstat.list.req(params3).then((res3) => {
|
||||
if (res3.length > 0) {
|
||||
res3.forEach((item) => {
|
||||
if (item.nickname == "水泥+P.O42.5R 散装") {
|
||||
if (item.mpoint_nickname == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][2] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][2] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 袋装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][2] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][2] = item.val;
|
||||
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
that.tableDatas[4][2] = item.val;
|
||||
}else if (item.nickname == "水泥+P.C42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;散装水泥") {
|
||||
that.tableDatas[5][2] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O52.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][2] = item.val;
|
||||
}else if (item.nickname == "散装水泥总和"){
|
||||
}else if (item.mpoint_nickname == "水泥+P.C42.5 散装"){
|
||||
that.tableDatas[7][2] = item.val;
|
||||
}else if (item.nickname == "袋装水泥总和") {
|
||||
}else if (item.mpoint_nickname == "散装水泥总和"){
|
||||
that.tableDatas[8][2] = item.val;
|
||||
}
|
||||
else if (item.nickname == "出厂水泥") {
|
||||
}else if (item.mpoint_nickname == "袋装水泥总和") {
|
||||
that.tableDatas[9][2] = item.val;
|
||||
}else if (item.nickname == "出厂熟料"){
|
||||
}
|
||||
else if (item.mpoint_nickname == "出厂水泥") {
|
||||
that.tableDatas[10][2] = item.val;
|
||||
}else if (item.nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[11][2] = item.elec_consume_unit;
|
||||
that.tableDatas[12][2] = item.val;
|
||||
}else if (item.mpoint_nickname == "出厂熟料"){
|
||||
that.tableDatas[11][2] = item.val;
|
||||
}else if (item.mpoint_nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[12][2] = item.elec_consume_unit;
|
||||
that.tableDatas[13][2] = item.val;
|
||||
}
|
||||
}
|
||||
)}
|
||||
|
@ -731,32 +739,34 @@ export default {
|
|||
this.$API.enm.mpointstat.list.req(params4).then((res3) => {
|
||||
if (res3.length > 0) {
|
||||
res3.forEach((item) => {
|
||||
if (item.nickname == "水泥+P.O42.5R 散装") {
|
||||
if (item.mpoint_nickname == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][3] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][3] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 袋装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][3] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][3] = item.val;
|
||||
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
that.tableDatas[4][3] = item.val;
|
||||
}else if (item.nickname == "水泥+P.C42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;散装水泥") {
|
||||
that.tableDatas[5][3] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O52.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][3] = item.val;
|
||||
}else if (item.nickname == "散装水泥总和"){
|
||||
that.tableDatas[7][3] = item.val;
|
||||
}else if (item.nickname == "袋装水泥总和") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.C42.5 散装"){
|
||||
that.tableDatas[7][2] = item.val;
|
||||
}else if (item.mpoint_nickname == "散装水泥总和"){
|
||||
that.tableDatas[8][3] = item.val;
|
||||
}
|
||||
else if (item.nickname == "出厂水泥") {
|
||||
}else if (item.mpoint_nickname == "袋装水泥总和") {
|
||||
that.tableDatas[9][3] = item.val;
|
||||
}else if (item.nickname == "出厂熟料"){
|
||||
}
|
||||
else if (item.mpoint_nickname == "出厂水泥") {
|
||||
that.tableDatas[10][3] = item.val;
|
||||
}else if (item.nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[11][3] = item.elec_consume_unit;
|
||||
that.tableDatas[12][3] = item.val;
|
||||
}else if (item.mpoint_nickname == "出厂熟料"){
|
||||
that.tableDatas[11][3] = item.val;
|
||||
}else if (item.mpoint_nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[12][3] = item.elec_consume_unit;
|
||||
that.tableDatas[13][3] = item.val;
|
||||
}
|
||||
}
|
||||
)}
|
||||
|
@ -797,32 +807,35 @@ export default {
|
|||
this.$API.enm.mpointstat.list.req(params1).then((res1) => {
|
||||
if (res1.length > 0) {
|
||||
res1.forEach((item) => {
|
||||
if (item.nickname == "水泥+P.O42.5R 散装") {
|
||||
if (item.mpoint_nickname == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][5] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][5] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 袋装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][5] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][5] = item.val;
|
||||
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
that.tableDatas[4][5] = item.val;
|
||||
}else if (item.nickname == "水泥+P.C42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;散装水泥") {
|
||||
that.tableDatas[5][5] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O52.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][5] = item.val;
|
||||
}else if (item.nickname == "散装水泥总和"){
|
||||
that.tableDatas[7][5] = item.val;
|
||||
}else if (item.nickname == "袋装水泥总和") {
|
||||
that.tableDatas[8][5] = item.val;
|
||||
}
|
||||
else if (item.nickname == "出厂水泥") {
|
||||
else if (item.mpoint_nickname == "水泥+P.C42.5 散装"){
|
||||
that.tableDatas[7][5] = item.val;
|
||||
}else if (item.mpoint_nickname == "散装水泥总和"){
|
||||
that.tableDatas[8][5] = item.val;
|
||||
}else if (item.mpoint_nickname == "袋装水泥总和") {
|
||||
that.tableDatas[9][5] = item.val;
|
||||
}else if (item.nickname == "出厂熟料"){
|
||||
}
|
||||
else if (item.mpoint_nickname == "出厂水泥") {
|
||||
that.tableDatas[10][5] = item.val;
|
||||
}else if (item.nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[11][5] = item.elec_consume_unit;
|
||||
that.tableDatas[12][5] = item.val;
|
||||
}else if (item.mpoint_nickname == "出厂熟料"){
|
||||
that.tableDatas[11][5] = item.val;
|
||||
}else if (item.mpoint_nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[12][5] = item.elec_consume_unit;
|
||||
that.tableDatas[13][5] = item.val;
|
||||
}
|
||||
})}
|
||||
})
|
||||
|
@ -839,32 +852,34 @@ export default {
|
|||
this.$API.enm.mpointstat.list.req(params2).then((res2) => {
|
||||
if (res2.length > 0) {
|
||||
res2.forEach((item) => {
|
||||
if (item.nickname == "水泥+P.O42.5R 散装") {
|
||||
if (item.mpoint_nickname == "水泥+P.O42.5R 散装") {
|
||||
that.tableDatas[0][4] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5R 袋装"){
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5R 袋装"){
|
||||
that.tableDatas[1][4] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 袋装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 袋装") {
|
||||
that.tableDatas[2][4] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O42.5 散装") {
|
||||
that.tableDatas[3][4] = item.val;
|
||||
}else if (item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
that.tableDatas[4][4] = item.val;
|
||||
}else if (item.nickname == "水泥+P.C42.5 散装") {
|
||||
}else if (item.mpoint_nickname == "复合硅酸盐水泥;42.5R;散装水泥") {
|
||||
that.tableDatas[5][4] = item.val;
|
||||
}else if (item.nickname == "水泥+P.O52.5 散装") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][4] = item.val;
|
||||
}else if (item.nickname == "散装水泥总和"){
|
||||
that.tableDatas[7][4] = item.val;
|
||||
}else if (item.nickname == "袋装水泥总和") {
|
||||
}else if (item.mpoint_nickname == "水泥+P.C42.5 散装"){
|
||||
that.tableDatas[7][4] = item.val;
|
||||
}else if (item.mpoint_nickname == "散装水泥总和"){
|
||||
that.tableDatas[8][4] = item.val;
|
||||
}
|
||||
else if (item.nickname == "出厂水泥") {
|
||||
}else if (item.mpoint_nickname == "袋装水泥总和") {
|
||||
that.tableDatas[9][4] = item.val;
|
||||
}else if (item.nickname == "出厂熟料"){
|
||||
}
|
||||
else if (item.mpoint_nickname == "出厂水泥") {
|
||||
that.tableDatas[10][4] = item.val;
|
||||
}else if (item.nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[11][4] = item.elec_consume_unit;
|
||||
that.tableDatas[12][4] = item.val;
|
||||
}else if (item.mpoint_nickname == "出厂熟料"){
|
||||
that.tableDatas[11][4] = item.val;
|
||||
}else if (item.mpoint_nickname == "水泥包装用电合计") {
|
||||
that.tableDatas[12][4] = item.elec_consume_unit;
|
||||
that.tableDatas[13][4] = item.val;
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -890,17 +905,17 @@ export default {
|
|||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let ind = item.day_s - 1;
|
||||
if (item.nickname == "袋装水泥总和") {
|
||||
if (item.mpoint_nickname == "袋装水泥总和") {
|
||||
seriesData1[ind] = item.val;
|
||||
}else if (item.nickname == "散装水泥总和"){
|
||||
}else if (item.mpoint_nickname == "散装水泥总和"){
|
||||
seriesData2[ind] = item.val;
|
||||
}else if (item.nickname == "出厂熟料") {
|
||||
}else if (item.mpoint_nickname == "出厂熟料") {
|
||||
seriesData3[ind] = item.val;
|
||||
}else if (item.nickname == "出厂水泥") {
|
||||
}else if (item.mpoint_nickname == "出厂水泥") {
|
||||
seriesData4[ind] = item.val;
|
||||
}else if (item.nickname == "复合水泥合计" || item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
}else if (item.mpoint_nickname == "复合水泥合计" || item.mpoint_nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
seriesData5[ind] = item.val;
|
||||
}else if(item.nickname == "水泥包装用电合计"){
|
||||
}else if(item.mpoint_nickname == "水泥包装用电合计"){
|
||||
seriesData6[ind] = item.elec_consume_unit;
|
||||
}
|
||||
|
||||
|
@ -963,18 +978,18 @@ export default {
|
|||
data.forEach((item) => {
|
||||
let goal_index = 'goal_val_' + item.month_s;
|
||||
let ind = item.month_s - 1;
|
||||
if (item.nickname == "袋装水泥总和") {
|
||||
if (item.mpoint_nickname == "袋装水泥总和") {
|
||||
seriesData1[ind] = item.val;
|
||||
}else if (item.nickname == "散装水泥总和"){
|
||||
}else if (item.mpoint_nickname == "散装水泥总和"){
|
||||
seriesData2[ind] = item.val;
|
||||
}else if (item.nickname == "出厂熟料") {
|
||||
}else if (item.mpoint_nickname == "出厂熟料") {
|
||||
seriesData3[ind] = item.val;
|
||||
}else if (item.nickname == "出厂水泥") {
|
||||
}else if (item.mpoint_nickname == "出厂水泥") {
|
||||
seriesData4[ind] = item.val;
|
||||
}else if (item.nickname == "复合水泥合计" || item.nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
console.log(item.nickname, item.val);
|
||||
}else if (item.mpoint_nickname == "复合水泥合计" || item.mpoint_nickname == "复合硅酸盐水泥;42.5R;袋装水泥") {
|
||||
console.log(item.mpoint_nickname, item.val);
|
||||
seriesData5[ind] = item.val;
|
||||
}else if(item.nickname == "水泥包装用电合计"){
|
||||
}else if(item.mpoint_nickname == "水泥包装用电合计"){
|
||||
seriesData7[ind] = item.elec_consume_unit;
|
||||
}
|
||||
seriesData6[ind] = that.goal_list[0][goal_index];
|
||||
|
|
|
@ -63,11 +63,10 @@
|
|||
>
|
||||
</el-progress>
|
||||
</div>
|
||||
<div class="items" v-if="monthData.原料磨">
|
||||
<div class="items" v-if="monthData['生料工序(二次配料)']">
|
||||
<div class="item-number">
|
||||
{{
|
||||
monthData.原料磨
|
||||
.total_production
|
||||
monthData['生料工序(二次配料)'].total_production
|
||||
}}
|
||||
</div>
|
||||
<div class="item-name">月生料产量</div>
|
||||
|
@ -220,11 +219,11 @@
|
|||
</div>
|
||||
<div
|
||||
class="items"
|
||||
v-if="yearData.原料磨"
|
||||
v-if="yearData['生料工序(二次配料)']"
|
||||
>
|
||||
<div class="item-number">
|
||||
{{
|
||||
yearData.原料磨
|
||||
yearData['生料工序(二次配料)']
|
||||
.total_production
|
||||
}}
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,407 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel-group">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
v-auth="'fileborrow.create'"
|
||||
></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
v-model="query.file_name"
|
||||
placeholder="档案名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="档案名称"
|
||||
prop="file_name"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="申请部门"
|
||||
prop="belong_dept_name"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="申请人"
|
||||
prop="create_by_name"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="申请人电话"
|
||||
prop="contacts"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="借阅时间"
|
||||
prop="borrow_date"
|
||||
min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="用途"
|
||||
prop="remark"
|
||||
min-width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="归还时间"
|
||||
prop="return_date"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="borrowEidt(scope.row)"
|
||||
v-auth="'fileborrow.update'"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="borrowDel(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="danger"
|
||||
v-auth="'fileborrow.delete'"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer :title="titleMap[type] " v-model="limitedVisible" size="50%">
|
||||
<el-form
|
||||
:model="addForm"
|
||||
:rules="rules"
|
||||
ref="addForm"
|
||||
label-width="100px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-form-item label="档案名称">
|
||||
<el-select v-model="addForm.borrow_file" multiple placeholder="请选择档案" clearable style="width: 300px;">
|
||||
<el-option
|
||||
v-for="item in fileList"
|
||||
:key="item.id"
|
||||
:value="item.id"
|
||||
:label="item.name"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请人电话" prop="contacts">
|
||||
<el-input v-model="addForm.contacts" clearable style="width: 300px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="借阅时间" prop="borrow_date">
|
||||
<el-date-picker
|
||||
v-model="addForm.borrow_date"
|
||||
type="date"
|
||||
placeholder="选择日期时间"
|
||||
align="right"
|
||||
value-format="YYYY-MM-DD"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="归还时间" prop="return_date">
|
||||
<el-date-picker
|
||||
v-model="addForm.return_date"
|
||||
type="date"
|
||||
placeholder="选择日期时间"
|
||||
align="right"
|
||||
value-format="YYYY-MM-DD"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="用途" prop="remark">
|
||||
<el-checkbox-group v-model="addForm.remark">
|
||||
<el-checkbox label="借阅"></el-checkbox>
|
||||
<el-checkbox label="复印"></el-checkbox>
|
||||
<el-checkbox label="查阅"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button
|
||||
v-for="item in transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
:loading="isSaving"
|
||||
:disabled="isSaving"
|
||||
@click="submitTicketCreate(item.id)"
|
||||
style="margin-right: 4px"
|
||||
>{{ item.name }}</el-button>
|
||||
<el-button @click="handleCancel">取 消</el-button>
|
||||
<el-button
|
||||
v-auth="'fileborrow.return'"
|
||||
v-if="type !== 'show'"
|
||||
type="primary"
|
||||
:loading="isSaving"
|
||||
@click="submitHandle()"
|
||||
> 保 存</el-button
|
||||
>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
apiObj: this.$API.ofm.borrow.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
fileList: [],
|
||||
transitions:[],
|
||||
timeRange: [],
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
limitedWatch: false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
show: "查看",
|
||||
},
|
||||
//表单数据
|
||||
addForm: {
|
||||
borrow_file: [],
|
||||
number: null,
|
||||
counts: null,
|
||||
location: null,
|
||||
contacts: null,
|
||||
ticket: null,
|
||||
reciver: "",
|
||||
remark: [],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
that.getInit();
|
||||
this.getFileList();
|
||||
},
|
||||
methods: {
|
||||
getInit() {
|
||||
let that = this;
|
||||
if(this.addForm.ticket!==null){
|
||||
this.$API.wf.ticket.ticketTransitions.req(this.addForm.ticket).then((res) => {
|
||||
that.transitions = res;
|
||||
})
|
||||
}else{
|
||||
that.$API.wf.workflow.initkey.req("borrowrecord").then((res) => {
|
||||
that.initForm = res;
|
||||
that.transitions = res.transitions;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.type = "add";
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
getFileList() {
|
||||
this.$API.ofm.filerecord.list.req(this.query).then((res) => {
|
||||
this.fileList = res.results;
|
||||
});
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
this.getDefaultForm()// 清空表单
|
||||
},
|
||||
submitHandle() {
|
||||
let that = this;
|
||||
that.isSaving = true;
|
||||
that.submit();
|
||||
},
|
||||
getDefaultForm(){
|
||||
return {
|
||||
borrow_file: [],
|
||||
number: null,
|
||||
counts: null,
|
||||
location: null,
|
||||
contacts: null,
|
||||
reciver: "",
|
||||
remark: [],
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
let that = this;
|
||||
let res = null;
|
||||
try {
|
||||
if (that.type === "add") {
|
||||
res = await that.$API.ofm.borrow.create.req(that.addForm);
|
||||
} else {
|
||||
res = await that.$API.ofm.borrow.update.req(
|
||||
that.editId,
|
||||
that.addForm
|
||||
);
|
||||
}
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$refs.table.refresh();
|
||||
} catch (e) {
|
||||
that.isSaving = false;
|
||||
}
|
||||
},
|
||||
submitTicketCreate(id) {
|
||||
let that = this;
|
||||
if(that.type == "add") {
|
||||
that.$API.ofm.borrow.create.req(that.addForm).then((res) => {
|
||||
let ticket = {};
|
||||
ticket.title = '档案借阅审批单';
|
||||
ticket.workflow = that.initForm.workflow;
|
||||
ticket.ticket_data = {t_id: res.id};
|
||||
ticket.transition = id;
|
||||
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$emit("success");
|
||||
that.$refs.table.refresh();
|
||||
that.$message.success("提交成功");
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
});
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
});
|
||||
} else if (that.type == "edit") {
|
||||
that.$API.ofm.borrow.update.req(that.addForm.id, that.addForm).then((res) => {
|
||||
if (that.addForm.ticket == null) {
|
||||
let ticket = {};
|
||||
ticket.title = '档案借阅审批单';
|
||||
ticket.workflow = that.initForm.workflow;
|
||||
ticket.ticket_data = {t_id: res.id};
|
||||
ticket.transition = id;
|
||||
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("提交成功");
|
||||
that.$refs.table.refresh();
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
});
|
||||
} else {
|
||||
let data = {transition: id, ticket_data: {}}
|
||||
that.$API.wf.ticket.ticketHandle.req(that.addForm.ticket, data).then(res=>{
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("提交成功");
|
||||
that.$refs.table.refresh();
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
})
|
||||
}
|
||||
}).catch((err) => {
|
||||
that.isSaving = false;
|
||||
return err;
|
||||
});
|
||||
}
|
||||
},
|
||||
// 审批流结束之后才可以编辑
|
||||
borrowEidt(row) {
|
||||
this.type = "edit";
|
||||
this.editId = row.id;
|
||||
this.limitedVisible = true;
|
||||
if (!this.fileList || this.fileList.length === 0) {
|
||||
this.getFileList();
|
||||
}
|
||||
this.addForm = Object.assign({}, row);
|
||||
if(row.file_detail){
|
||||
this.addForm.borrow_file = row.file_detail.map(item => item.id);
|
||||
}
|
||||
},
|
||||
async borrowDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.ofm.borrow.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
}
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.treeMain {
|
||||
height: 280px;
|
||||
overflow: auto;
|
||||
border: 1px solid #dcdfe6;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
|
||||
background-color: #fefefe;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.node rect {
|
||||
stroke: #606266;
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.edgePath path {
|
||||
stroke: #606266;
|
||||
fill: #333;
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
|
||||
g.conditions > rect {
|
||||
fill: #00ffd0;
|
||||
stroke: #000;
|
||||
}
|
||||
|
||||
.el-icon-close {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.left-panel-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px; /* 按钮之间的间隙,可以调小点 */
|
||||
margin-left: 0; /* 靠左 */
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,313 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel-group">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
v-auth="'filerecord.create'"
|
||||
></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
v-model="query.name"
|
||||
placeholder="档案名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="资料名称"
|
||||
prop="name"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="文件份数"
|
||||
prop="counts"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="档案编号"
|
||||
prop="number"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="存档部门"
|
||||
prop="belong_dept_name"
|
||||
min-width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="存档人姓名"
|
||||
prop="create_by_name"
|
||||
min-width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="存档人电话"
|
||||
prop="contacts"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="存档位置"
|
||||
prop="location"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="存档时间"
|
||||
prop="create_time"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="接收人(综合办公室)"
|
||||
prop="reciver"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
prop="remark"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="filerecordEidt(scope.row)"
|
||||
v-auth="'filerecord.update'"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="fileDel(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="danger"
|
||||
v-auth="'filerecord.delete'"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer :title="titleMap[type] " v-model="limitedVisible" size="50%">
|
||||
<el-form
|
||||
:model="addForm"
|
||||
:rules="rules"
|
||||
ref="addForm"
|
||||
label-width="100px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-form-item label="资料名称" prop="name">
|
||||
<el-input v-model="addForm.name" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="档案编号" prop="number">
|
||||
<el-input v-model="addForm.number" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件份数" prop="counts">
|
||||
<el-input v-model="addForm.counts" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="存放位置" prop="location">
|
||||
<el-input v-model="addForm.location" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="存档人电话" prop="contacts">
|
||||
<el-input v-model="addForm.contacts" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="接收人(综合办)" prop="reciver" label-width="120px">
|
||||
<el-input v-model="addForm.reciver" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark" type="textarea">
|
||||
<el-input v-model="addForm.remark" clearable></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button
|
||||
v-auth="'filerecord.create'"
|
||||
v-if="type !== 'show'"
|
||||
type="primary"
|
||||
:loading="isSaving"
|
||||
@click="submitHandle()"
|
||||
> 保 存</el-button
|
||||
>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
apiObj: this.$API.ofm.filerecord.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
transitions:[],
|
||||
timeRange: [],
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
limitedWatch: false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
show: "查看",
|
||||
},
|
||||
//表单数据
|
||||
addForm: {
|
||||
name: null,
|
||||
number: null,
|
||||
counts: null,
|
||||
location: null,
|
||||
contacts: null,
|
||||
reciver: "",
|
||||
remark: ""
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleAdd() {
|
||||
this.type = "add";
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleAdd_outer() {
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.type = "add";
|
||||
this.limitedVisible = true;
|
||||
this.lending_type = "outer";
|
||||
this.addForm.is_lending = true;
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
this.getDefaultForm()// 清空表单
|
||||
},
|
||||
submitHandle() {
|
||||
let that = this;
|
||||
that.isSaving = true;
|
||||
that.submit();
|
||||
},
|
||||
getDefaultForm(){
|
||||
return {
|
||||
name: null,
|
||||
number: null,
|
||||
counts: null,
|
||||
location: null,
|
||||
contacts: null,
|
||||
reciver: "",
|
||||
remark: ""
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
let that = this;
|
||||
let res = null;
|
||||
try {
|
||||
if (that.type === "add") {
|
||||
res = await that.$API.ofm.filerecord.create.req(that.addForm);
|
||||
} else {
|
||||
res = await that.$API.ofm.filerecord.update.req(
|
||||
that.editId,
|
||||
that.addForm
|
||||
);
|
||||
}
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$refs.table.refresh();
|
||||
} catch (e) {
|
||||
that.isSaving = false;
|
||||
}
|
||||
},
|
||||
// 审批流结束之后才可以编辑
|
||||
filerecordEidt(row) {
|
||||
this.type = "edit";
|
||||
this.editId = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.addForm = Object.assign({}, row);
|
||||
},
|
||||
async filerecordDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.ofm.filerecord.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
}
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.treeMain {
|
||||
height: 280px;
|
||||
overflow: auto;
|
||||
border: 1px solid #dcdfe6;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
|
||||
background-color: #fefefe;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.node rect {
|
||||
stroke: #606266;
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.edgePath path {
|
||||
stroke: #606266;
|
||||
fill: #333;
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
|
||||
g.conditions > rect {
|
||||
fill: #00ffd0;
|
||||
stroke: #000;
|
||||
}
|
||||
|
||||
.el-icon-close {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.left-panel-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px; /* 按钮之间的间隙,可以调小点 */
|
||||
margin-left: 0; /* 靠左 */
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,491 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel-group">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
v-auth="'publicity.create'"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="#" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="记录编号"
|
||||
prop="number"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="送审稿件标题"
|
||||
prop="title"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="所有撰稿人"
|
||||
prop="participants"
|
||||
min-width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="所在部门"
|
||||
prop="belong_dept_name"
|
||||
min-width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="涉密等级"
|
||||
prop="level"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="稿件内容涉及"
|
||||
prop="content"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="宣传报道目的"
|
||||
prop="report_purpose"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="宣传报道渠道"
|
||||
prop="channel"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="第一撰稿人自审"
|
||||
prop="review"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="部门负责人意见"
|
||||
prop="dept_opinion"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="总经理意见"
|
||||
prop="dept_opinion_review"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="publicityEdit(scope.row)"
|
||||
v-auth="'publicity.update'"
|
||||
>编辑
|
||||
</el-button>
|
||||
<!-- <el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="vehicleDel(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="danger"
|
||||
v-auth="'vehicle.delete'"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-popconfirm> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer :title="titleMap[type] " v-model="limitedVisible" size="50%">
|
||||
<el-form
|
||||
:model="addForm"
|
||||
:rules="rules"
|
||||
ref="addForm"
|
||||
label-width="100px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-form-item label="送审稿件标题" prop="reason">
|
||||
<el-input v-model="addForm.reason" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="文件内容">
|
||||
<sc-upload-file
|
||||
v-model="addForm.pfile"
|
||||
:multiple="false"
|
||||
:limit="1"
|
||||
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
|
||||
@success = "fileUPSuccess"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-upload"> </el-button>
|
||||
</sc-upload-file>
|
||||
</el-form-item>
|
||||
<el-form-item label="所有撰稿人" prop="participants">
|
||||
<el-input v-model="addForm.participants" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="部室/研究院" prop="department">
|
||||
<el-input v-model="addForm.department" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="第一撰稿人涉密等级" prop="review">
|
||||
<el-radio-group v-model="addForm.review">
|
||||
<el-radio label="重要"></el-radio>
|
||||
<el-radio label="一般"></el-radio>
|
||||
<el-radio label="非涉密"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="稿件内容涉及" prop="content">
|
||||
<el-checkbox-group v-model="addForm.content">
|
||||
<el-checkbox label="武器装备科研生产综合事项"></el-checkbox>
|
||||
<el-checkbox label="其他"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<el-input
|
||||
v-if="(addForm.content || []).includes('其他')"
|
||||
v-model="addForm.other_content"
|
||||
placeholder = "请输入名称"
|
||||
size = "small"
|
||||
style="margin-top: 10;"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="宣传报道目的" prop="report_purpose">
|
||||
<el-input v-model="addForm.report_purpose" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="宣传渠道" prop="channel">
|
||||
<el-checkbox-group v-model="addForm.channel">
|
||||
<el-checkbox label="互联网"></el-checkbox>
|
||||
<el-checkbox label="信息平台"></el-checkbox>
|
||||
<el-checkbox label="官微"></el-checkbox>
|
||||
<el-checkbox label="公开发行物"></el-checkbox>
|
||||
<el-checkbox label="其他"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<el-input
|
||||
v-if="(addForm.channel || []).includes('其他')"
|
||||
v-model="addForm.other_channel"
|
||||
placeholder = "请输入渠道名称"
|
||||
size = "small"
|
||||
style="margin-top: 10;"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button
|
||||
v-for="item in transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
:loading="isSaving"
|
||||
:disabled="isSaving"
|
||||
@click="submitTicketCreate(item.id)"
|
||||
style="margin-right: 4px"
|
||||
>{{ item.name }}</el-button>
|
||||
<el-button @click="handleCancel">取 消</el-button>
|
||||
<el-button
|
||||
v-auth="'publicity.return'"
|
||||
v-if="type !== 'show'"
|
||||
type="primary"
|
||||
:loading="isSaving"
|
||||
@click="submitHandle()"
|
||||
> 保 存</el-button
|
||||
>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
apiObj: this.$API.ofm.publicity.list,
|
||||
fileList: [],
|
||||
transitions:[],
|
||||
timeRange: [],
|
||||
lending_type: "",
|
||||
choiceOption: [],
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
limitedWatch: false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
show: "查看",
|
||||
},
|
||||
//表单数据
|
||||
addForm: {
|
||||
number: null,
|
||||
title: null,
|
||||
participants: null,
|
||||
department: null,
|
||||
pfile: null,
|
||||
level: null,
|
||||
content: [],
|
||||
other_content: '',
|
||||
channel: [],
|
||||
other_channel: [],
|
||||
report_purpose: null,
|
||||
report_name: null,
|
||||
review:null,
|
||||
dept_opinion: null,
|
||||
dept_opinion_review: null,
|
||||
publicity_opinion: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
that.getInit();
|
||||
},
|
||||
methods: {
|
||||
//添加工作流
|
||||
//渲染工单提交按钮
|
||||
getInit() {
|
||||
let that = this;
|
||||
if(this.addForm.ticket!==null){
|
||||
this.$API.wf.ticket.ticketTransitions.req(this.addForm.ticket).then((res) => {
|
||||
that.transitions = res;
|
||||
})
|
||||
}else{
|
||||
that.$API.wf.workflow.initkey.req("publicity").then((res) => {
|
||||
that.initForm = res;
|
||||
that.transitions = res.transitions;
|
||||
});
|
||||
}
|
||||
},
|
||||
fileUPSuccess(res) {
|
||||
let that = this;
|
||||
this.test_file = res.path;
|
||||
},
|
||||
handleAdd() {
|
||||
this.type = "add";
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleAdd_outer() {
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.type = "add";
|
||||
this.limitedVisible = true;
|
||||
this.lending_type = "outer";
|
||||
this.addForm.is_lending = true;
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
this.getDefaultForm()// 清空表单
|
||||
},
|
||||
submitTicketCreate(id) {
|
||||
let that = this;
|
||||
that.addForm.pfile = that.test_file;
|
||||
if(that.type == "add") {
|
||||
that.addForm.channel = this.addForm.channel.map(type=>{
|
||||
if(type === "其他"){
|
||||
return this.addForm.other_channel
|
||||
}
|
||||
return type;
|
||||
})
|
||||
that.addForm.channel = this.addForm.content.map(type=>{
|
||||
if(type === "其他"){
|
||||
return this.addForm.other_content
|
||||
}
|
||||
return type;
|
||||
})
|
||||
that.$API.ofm.lendingseal.create.req(that.addForm).then((res) => {
|
||||
let ticket = {};
|
||||
ticket.title = '印章使用审批单';
|
||||
ticket.workflow = that.initForm.workflow;
|
||||
ticket.ticket_data = {t_id: res.id};
|
||||
ticket.transition = id;
|
||||
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("提交成功");
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
});
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
});
|
||||
} else if (that.type == "edit") {
|
||||
that.$API.ofm.lendingseal.update.req(that.addForm.id, that.addForm).then((res) => {
|
||||
if (that.addForm.ticket == null) {
|
||||
let ticket = {};
|
||||
ticket.title = '印章使用审批单';
|
||||
ticket.workflow = that.initForm.workflow;
|
||||
ticket.ticket_data = {t_id: res.id};
|
||||
ticket.transition = id;
|
||||
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("提交成功");
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
});
|
||||
} else {
|
||||
let data = {transition: id, ticket_data: {}}
|
||||
that.$API.wf.ticket.ticketHandle.req(that.addForm.ticket, data).then(res=>{
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("提交成功");
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
})
|
||||
}
|
||||
}).catch((err) => {
|
||||
that.isSaving = false;
|
||||
return err;
|
||||
});
|
||||
}
|
||||
this.$refs.table.refresh();
|
||||
},
|
||||
submitHandle() {
|
||||
let that = this;
|
||||
this.$refs.addForm.validate((valid) => {
|
||||
if (valid) {
|
||||
that.isSaving = true;
|
||||
that.addForm.content = this.addForm.content.map(type=>{
|
||||
if(type === "其他"){
|
||||
return this.addForm.other_content
|
||||
}
|
||||
return type;
|
||||
})
|
||||
that.addForm.channel = this.addForm.channel.map(type=>{
|
||||
if(type === "其他"){
|
||||
return this.addForm.other_channel
|
||||
}
|
||||
return type;
|
||||
})
|
||||
that.submit();
|
||||
}
|
||||
});
|
||||
},
|
||||
getDefaultForm(){
|
||||
return {
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
location: null,
|
||||
via: null,
|
||||
destination: null,
|
||||
start_km: "",
|
||||
end_km: "",
|
||||
is_city: true,
|
||||
reason: null,
|
||||
ticket:null
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
let that = this;
|
||||
let res = null;
|
||||
try {
|
||||
if (that.type === "add") {
|
||||
res = await that.$API.ofm.publicity.create.req(that.addForm);
|
||||
} else {
|
||||
res = await that.$API.ofm.publicity.update.req(
|
||||
that.editId,
|
||||
that.addForm
|
||||
);
|
||||
}
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$refs.table.refresh();
|
||||
} catch (e) {
|
||||
that.isSaving = false;
|
||||
}
|
||||
},
|
||||
// 审批流结束之后才可以编辑
|
||||
publicityEdit(row) {
|
||||
this.type = "edit";
|
||||
this.editId = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.addForm = Object.assign({}, row);
|
||||
if (row.lending_date && row.return_date) {
|
||||
this.timeRange = [row.lending_date, row.return_date];
|
||||
} else {
|
||||
this.timeRange = [];
|
||||
}
|
||||
if (Array.isArray(row.channel)) {
|
||||
let knownSeals = ["互联网", "信息平台", "官微", "公开发行物"];
|
||||
let otherItem = row.channel.filter((item) => !knownSeals.includes(item));
|
||||
this.addForm.channel = row.channel.filter((item) => knownSeals.includes(item));
|
||||
|
||||
if (otherItem.length > 0) {
|
||||
this.addForm.channel.push("其他");
|
||||
this.addForm.other_channel = otherItem.join(",");
|
||||
}else{
|
||||
this.addForm.other_channel = "";
|
||||
}
|
||||
} else {
|
||||
this.addForm.channel = [];
|
||||
}
|
||||
},
|
||||
async publicityDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.ofm.publicity.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
}
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.treeMain {
|
||||
height: 280px;
|
||||
overflow: auto;
|
||||
border: 1px solid #dcdfe6;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
|
||||
background-color: #fefefe;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.node rect {
|
||||
stroke: #606266;
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.edgePath path {
|
||||
stroke: #606266;
|
||||
fill: #333;
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
|
||||
g.conditions > rect {
|
||||
fill: #00ffd0;
|
||||
stroke: #000;
|
||||
}
|
||||
|
||||
.el-icon-close {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.left-panel-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px; /* 按钮之间的间隙,可以调小点 */
|
||||
margin-left: 0; /* 靠左 */
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,344 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel-group">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
v-auth="'seal.create'"
|
||||
>内用</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd_outer"
|
||||
v-auth="'seal.create'"
|
||||
>外借</el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<el-input
|
||||
v-model="query.seal"
|
||||
placeholder="印章名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
></el-input>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="#" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="用印时间"
|
||||
prop="create_time"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="用印类别"
|
||||
prop="seal"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="文件(资料)名称"
|
||||
prop="filename"
|
||||
min-width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="份数"
|
||||
prop="file_count"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="印章部门"
|
||||
prop="belong_dept_name"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="用印人"
|
||||
prop="create_by_name"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="借出时间"
|
||||
prop="lending_date"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="拟归还时间"
|
||||
prop="return_date"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="实际归还时间"
|
||||
prop="actual_return_date"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="是否借出"
|
||||
prop="is_lending"
|
||||
min-width="100"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.is_lending" style="color: red;">是</span>
|
||||
<span v-else>否</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
prop="reason"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="sealEidt(scope.row)"
|
||||
v-auth="'seal.update'"
|
||||
>详情
|
||||
</el-button>
|
||||
<el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="sealDel(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="danger"
|
||||
v-auth="'seal.delete'"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer
|
||||
:title="drawerTitle[mode]"
|
||||
v-model="limitedVisible"
|
||||
:destroy-on-close="true"
|
||||
direction="rtl"
|
||||
size="70%"
|
||||
>
|
||||
<div style="display: flex; height: calc(100% - 60px);">
|
||||
<div style="flex: 1; padding-right: 20px; overflow-y: auto;">
|
||||
<SealForm
|
||||
:mode="mode"
|
||||
v-model="addForm"
|
||||
:lending_type="lending_type"
|
||||
@success="()=>{handleQuery(); limitedVisible = false}"
|
||||
@closed="limitedVisible = false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import SealForm from "./sealForm.vue";
|
||||
|
||||
|
||||
export default {
|
||||
components: { SealForm},
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
apiObj: this.$API.ofm.lendingseal.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
fileList: [],
|
||||
transitions:[],
|
||||
timeRange: [],
|
||||
lending_type: "",
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
mode: "add",
|
||||
drawerTitle: {
|
||||
add: "新增印章使用",
|
||||
edit: "编辑印章使用",
|
||||
view: "查看印章使用",
|
||||
},
|
||||
currentRow: null,
|
||||
//表单数据
|
||||
addForm: {
|
||||
seal: [],
|
||||
create_by_name: "",
|
||||
seal_other: "",
|
||||
filename: "",
|
||||
file: "",
|
||||
file_count: "",
|
||||
is_lending: false,
|
||||
contacts: "",
|
||||
lending_date: null,
|
||||
return_date: null,
|
||||
actual_return_date: null,
|
||||
reason: "",
|
||||
ticket:null
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
that.getInit();
|
||||
},
|
||||
methods: {
|
||||
//添加工作流
|
||||
//渲染工单提交按钮
|
||||
getInit() {
|
||||
let that = this;
|
||||
if(this.addForm.ticket!==null){
|
||||
this.$API.wf.ticket.ticketTransitions.req(this.addForm.ticket).then((res) => {
|
||||
that.transitions = res;
|
||||
})
|
||||
}else{
|
||||
that.$API.wf.workflow.initkey.req("seal").then((res) => {
|
||||
that.initForm = res;
|
||||
that.transitions = res.transitions;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.mode = "add";
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.lending_type = "";
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleAdd_outer() {
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.mode = "add";
|
||||
this.limitedVisible = true;
|
||||
this.lending_type = "outer";
|
||||
this.addForm.is_lending = true;
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
this.getDefaultForm()// 清空表单
|
||||
},
|
||||
|
||||
getDefaultForm(){
|
||||
return {
|
||||
seal: [],
|
||||
create_by_name: "",
|
||||
seal_other: "",
|
||||
filename: "",
|
||||
file: "",
|
||||
file_count: "",
|
||||
is_lending: false,
|
||||
contacts: "",
|
||||
lending_date: null,
|
||||
return_date: null,
|
||||
actual_return_date: null,
|
||||
reason: "",
|
||||
ticket:null
|
||||
}
|
||||
},
|
||||
// 审批流结束之后才可以编辑
|
||||
sealEidt(row) {
|
||||
this.mode = "edit";
|
||||
this.editId = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.lending_type = 'outer';
|
||||
this.addForm = Object.assign({}, row);
|
||||
if (row.lending_date && row.return_date) {
|
||||
this.timeRange = [row.lending_date, row.return_date];
|
||||
} else {
|
||||
this.timeRange = [];
|
||||
}
|
||||
if (Array.isArray(row.seal)) {
|
||||
let knownSeals = ["公章", "法人章", "合同章", "财务章"];
|
||||
let otherItem = row.seal.filter((item) => !knownSeals.includes(item));
|
||||
this.addForm.seal = row.seal.filter((item) => knownSeals.includes(item));
|
||||
|
||||
if (otherItem.length > 0) {
|
||||
this.addForm.seal.push("其他");
|
||||
this.addForm.seal_other = otherItem.join(",");
|
||||
}else{
|
||||
this.addForm.seal_other = "";
|
||||
}
|
||||
} else {
|
||||
this.addForm.seal = [];
|
||||
}
|
||||
this.addForm.is_lending = true;
|
||||
},
|
||||
async sealDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.ofm.lendingseal.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
}
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.treeMain {
|
||||
height: 280px;
|
||||
overflow: auto;
|
||||
border: 1px solid #dcdfe6;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
|
||||
background-color: #fefefe;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.node rect {
|
||||
stroke: #606266;
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.edgePath path {
|
||||
stroke: #606266;
|
||||
fill: #333;
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
|
||||
g.conditions > rect {
|
||||
fill: #00ffd0;
|
||||
stroke: #000;
|
||||
}
|
||||
|
||||
.el-icon-close {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.left-panel-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px; /* 按钮之间的间隙,可以调小点 */
|
||||
margin-left: 0; /* 靠左 */
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,188 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main>
|
||||
<el-form :model="localForm" label-width="100px" label-position="left" :rules="rules">
|
||||
<el-form-item label="文件名称" prop="filename">
|
||||
<el-input v-model="localForm.filename" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="contacts">
|
||||
<el-input v-model="localForm.contacts" clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="印章类型">
|
||||
<el-checkbox-group v-model="localForm.seal">
|
||||
<el-checkbox label="公章"></el-checkbox>
|
||||
<el-checkbox label="法人章"></el-checkbox>
|
||||
<el-checkbox label="合同章"></el-checkbox>
|
||||
<el-checkbox label="财务章"></el-checkbox>
|
||||
<el-checkbox label="其他"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
<el-input
|
||||
v-if="localForm.seal.includes('其他')"
|
||||
v-model="localForm.seal_other"
|
||||
placeholder = "请输入印章名称"
|
||||
size = "small"
|
||||
style="margin-top: 10;"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<template v-if="lending_type === 'outer'">
|
||||
<el-form-item label="借用日期">
|
||||
<el-date-picker
|
||||
v-model="timeRange"
|
||||
type="daterange"
|
||||
align="right"
|
||||
value-format="YYYY-MM-DD"
|
||||
unlink-panels
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="handleDateChange">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="实际归还日期" v-auth="'seal.return'">
|
||||
<el-date-picker
|
||||
v-model="localForm.actual_return_date"
|
||||
type="date"
|
||||
align="right"
|
||||
value-format="YYYY-MM-DD"
|
||||
unlink-panels
|
||||
placeholder="选择日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="借用理由" prop="reason" >
|
||||
<el-input
|
||||
type='textarea'
|
||||
placeholder="请输入借用理由"
|
||||
v-model="localForm.reason"
|
||||
rows = '3'>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
<el-form-item label="文件内容">
|
||||
<sc-upload-file
|
||||
v-model="localForm.file"
|
||||
:multiple="false"
|
||||
:limit="1"
|
||||
:accept="['.xlsx', '.xls','.pdf','.docx', '.doc', '.jpg', '.png', '.jpeg']"
|
||||
@success = "fileUPSuccess"
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-upload"> </el-button>
|
||||
</sc-upload-file>
|
||||
</el-form-item>
|
||||
<el-form-item label="用印份数" prop="file_count">
|
||||
<el-input v-model="localForm.file_count" clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="!isView">
|
||||
<el-button type="primary" @click="onSubmit">保存</el-button>
|
||||
<el-button @click="$emit('cancel')">取消</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<el-footer v-show="mode!=='show'">
|
||||
<ticketd_b_start
|
||||
:workflow_key="'seal'"
|
||||
:title="ticketTitle"
|
||||
:t_id="localForm.id"
|
||||
:ticketId="localForm.ticket"
|
||||
:submit_b_func="submit_b_func"
|
||||
ref="ticketd_b_start"
|
||||
@success="$emit('success')"
|
||||
/>
|
||||
<el-button @click="$emit('closed')">取消</el-button>
|
||||
</el-footer>
|
||||
</el-main>
|
||||
<el-aside v-if="localForm.ticket">
|
||||
<ticketd
|
||||
:ticketId="localForm.ticket"
|
||||
@success="$emit('success')"
|
||||
style="margin-top: 20px;"
|
||||
/>
|
||||
</el-aside>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ticketd_b_start from "@/views/wf/ticketd_b_start.vue";
|
||||
import ticketd from '@/views/wf/ticketd.vue'
|
||||
export default {
|
||||
props: {
|
||||
mode: { type: String, default: "view" }, // add / edit / view
|
||||
lending_type: { type: String, default: "outer" }, // inner / outer
|
||||
modelValue: { type: Object, default: () => ({}) },
|
||||
},
|
||||
|
||||
components: {ticketd, ticketd_b_start },
|
||||
emits: ["update:modelValue", "submit", "cancel"],
|
||||
data() {
|
||||
return {
|
||||
ticketTitle: "用印申请",
|
||||
localForm: { ...this.modelValue },
|
||||
timeRange: [],
|
||||
rules: {
|
||||
filename: [{ required: true, message: "请输入文件名称", trigger: "blur" }],
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isView() {
|
||||
return this.mode === "view";
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.initTimeRange();
|
||||
},
|
||||
watch: {
|
||||
// 父组件数据变动 -> 同步到本地
|
||||
modelValue: {
|
||||
handler(val) {
|
||||
this.localForm = { ...val };
|
||||
this.initTimeRange();
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
// 本地数据变动 -> 同步回父组件
|
||||
localForm: {
|
||||
handler(val) {
|
||||
this.$emit("update:modelValue", val);
|
||||
},
|
||||
deep: true,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
this.$emit("submit", this.localForm);
|
||||
},
|
||||
handleDateChange(val) {
|
||||
this.localForm.lending_date = val?.[0] || null
|
||||
this.localForm.return_date = val?.[1] || null
|
||||
},
|
||||
async submit_b_func() {
|
||||
let that = this;
|
||||
this.ticketTitle = `${this.localForm.filename}-用印申请`
|
||||
if(that.mode == "add") {
|
||||
let res = await that.$API.ofm.lendingseal.create.req(that.localForm);
|
||||
|
||||
that.localForm.id = res.id;
|
||||
} else if (that.mode == "edit") {
|
||||
await that.$API.ofm.lendingseal.update.req(that.localForm.id, that.localForm);
|
||||
}
|
||||
},
|
||||
initTimeRange() {
|
||||
if (this.localForm.lending_date && this.localForm.return_date) {
|
||||
this.timeRange = [
|
||||
this.localForm.lending_date,
|
||||
this.localForm.return_date,
|
||||
];
|
||||
} else {
|
||||
this.timeRange = [];
|
||||
}
|
||||
},
|
||||
fileUPSuccess(res) {
|
||||
this.localForm.file = res?.path || ''
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
|
@ -0,0 +1,423 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel-group">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd"
|
||||
v-auth="'vehicle.create'"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
<el-table-column label="#" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="日期"
|
||||
prop="create_time"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="用车部门"
|
||||
prop="belong_dept_name"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="用车人"
|
||||
prop="create_by_name"
|
||||
min-width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="用车事由"
|
||||
prop="reason"
|
||||
min-width="120">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="出车时间"
|
||||
prop="start_time"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="发车地点"
|
||||
prop="location"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="途经地点"
|
||||
prop="via"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="到底地点"
|
||||
prop="destination"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="收车时间"
|
||||
prop="end_time"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="出发公里"
|
||||
prop="start_km"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="结束公里"
|
||||
prop="end_km"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="使用公里"
|
||||
prop="actual_km"
|
||||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="250">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="primary"
|
||||
@click="vehicleEidt(scope.row)"
|
||||
v-auth="'vehicle.update'"
|
||||
>编辑
|
||||
</el-button>
|
||||
<!-- <el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="vehicleDel(scope.row)"
|
||||
>
|
||||
<template #reference>
|
||||
<el-button
|
||||
link
|
||||
size="small"
|
||||
type="danger"
|
||||
v-auth="'vehicle.delete'"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-popconfirm> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
<el-drawer :title="titleMap[type] " v-model="limitedVisible" direction="rtl" size="50%">
|
||||
<el-form
|
||||
:model="addForm"
|
||||
:rules="rules"
|
||||
ref="addForm"
|
||||
label-width="100px"
|
||||
label-position="left"
|
||||
>
|
||||
<el-form-item label="用车事由" prop="reason">
|
||||
<el-input v-model="addForm.reason" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="出发地点" prop="location">
|
||||
<el-input v-model="addForm.location" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="途经地点" prop="via">
|
||||
<el-input v-model="addForm.via" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="到达地点" prop="destination">
|
||||
<el-input v-model="addForm.destination" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="出发公里数" prop="start_km">
|
||||
<el-input v-model="addForm.start_km" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="归还公里数" prop="end_km">
|
||||
<el-input v-model="addForm.end_km" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="出车时间">
|
||||
<el-date-picker
|
||||
v-model="addForm.start_time"
|
||||
type="date"
|
||||
align="right"
|
||||
value-format="YYYY-MM-DD"
|
||||
unlink-panels
|
||||
placeholder="选择日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="还车时间" v-auth="'vehicle.return'">
|
||||
<el-date-picker
|
||||
v-model="addForm.end_time"
|
||||
type="date"
|
||||
align="right"
|
||||
value-format="YYYY-MM-DD"
|
||||
unlink-panels
|
||||
placeholder="选择日期"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button
|
||||
v-for="item in transitions"
|
||||
:key="item.id"
|
||||
type="primary"
|
||||
:loading="isSaving"
|
||||
:disabled="isSaving"
|
||||
@click="submitTicketCreate(item.id)"
|
||||
style="margin-right: 4px"
|
||||
>{{ item.name }}</el-button>
|
||||
<el-button @click="handleCancel">取 消</el-button>
|
||||
<el-button
|
||||
v-auth="'vehicle.return'"
|
||||
v-if="type !== 'show'"
|
||||
type="primary"
|
||||
:loading="isSaving"
|
||||
@click="submitHandle()"
|
||||
> 保 存</el-button
|
||||
>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "index",
|
||||
data() {
|
||||
return {
|
||||
workflowName:"",
|
||||
workFlowId:'',
|
||||
apiObj: this.$API.ofm.vehicle.list,
|
||||
selection: [],
|
||||
checkList: [],
|
||||
fileList: [],
|
||||
transitions:[],
|
||||
timeRange: [],
|
||||
lending_type: "",
|
||||
choiceOption: [],
|
||||
query: {},
|
||||
editId: null,
|
||||
isSaving: false,
|
||||
limitedVisible: false,
|
||||
limitedWatch: false,
|
||||
type: "add",
|
||||
titleMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
show: "查看",
|
||||
},
|
||||
//表单数据
|
||||
addForm: {
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
location: null,
|
||||
via: null,
|
||||
destination: null,
|
||||
start_km: "",
|
||||
end_km: "",
|
||||
is_city: true,
|
||||
reason: null,
|
||||
ticket:null
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
let that = this;
|
||||
that.getInit();
|
||||
},
|
||||
methods: {
|
||||
//添加工作流
|
||||
//渲染工单提交按钮
|
||||
getInit() {
|
||||
let that = this;
|
||||
if(this.addForm.ticket!==null){
|
||||
this.$API.wf.ticket.ticketTransitions.req(this.addForm.ticket).then((res) => {
|
||||
that.transitions = res;
|
||||
})
|
||||
}else{
|
||||
that.$API.wf.workflow.initkey.req("vehicle").then((res) => {
|
||||
that.initForm = res;
|
||||
that.transitions = res.transitions;
|
||||
});
|
||||
}
|
||||
},
|
||||
handleAdd() {
|
||||
this.type = "add";
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.limitedVisible = true;
|
||||
},
|
||||
handleAdd_outer() {
|
||||
this.addForm = this.getDefaultForm();
|
||||
this.type = "add";
|
||||
this.limitedVisible = true;
|
||||
this.lending_type = "outer";
|
||||
this.addForm.is_lending = true;
|
||||
},
|
||||
handleCancel() {
|
||||
this.limitedVisible = false; // 关闭弹窗
|
||||
this.lending_type = ""; // 重置 lending_type
|
||||
this.getDefaultForm()// 清空表单
|
||||
},
|
||||
submitTicketCreate(id) {
|
||||
let that = this;
|
||||
if(that.type == "add") {
|
||||
that.$API.ofm.vehicle.create.req(that.addForm).then((res) => {
|
||||
let ticket = {};
|
||||
ticket.title = '车辆使用审批单';
|
||||
ticket.workflow = that.initForm.workflow;
|
||||
ticket.ticket_data = {t_id: res.id};
|
||||
ticket.transition = id;
|
||||
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$emit("success");
|
||||
that.$refs.table.refresh();
|
||||
that.$message.success("提交成功");
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
});
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
});
|
||||
} else if (that.type == "edit") {
|
||||
that.$API.ofm.vehicle.update.req(that.addForm.id, that.addForm).then((res) => {
|
||||
if (that.addForm.ticket == null) {
|
||||
let ticket = {};
|
||||
ticket.title = '车辆使用审批单';
|
||||
ticket.workflow = that.initForm.workflow;
|
||||
ticket.ticket_data = {t_id: res.id};
|
||||
ticket.transition = id;
|
||||
that.$API.wf.ticket.create.req(ticket).then((res) => {
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("提交成功");
|
||||
that.$refs.table.refresh();
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
});
|
||||
} else {
|
||||
let data = {transition: id, ticket_data: {}}
|
||||
that.$API.wf.ticket.ticketHandle.req(that.addForm.ticket, data).then(res=>{
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$emit("success");
|
||||
that.$message.success("提交成功");
|
||||
that.$refs.table.refresh();
|
||||
}).catch((e) => {
|
||||
that.isSaving = false;
|
||||
})
|
||||
}
|
||||
}).catch((err) => {
|
||||
that.isSaving = false;
|
||||
return err;
|
||||
});
|
||||
}
|
||||
},
|
||||
submitHandle() {
|
||||
let that = this;
|
||||
that.isSaving = true;
|
||||
that.submit();
|
||||
},
|
||||
getDefaultForm(){
|
||||
return {
|
||||
start_time: null,
|
||||
end_time: null,
|
||||
location: null,
|
||||
via: null,
|
||||
destination: null,
|
||||
start_km: "",
|
||||
end_km: "",
|
||||
is_city: true,
|
||||
reason: null,
|
||||
ticket:null
|
||||
}
|
||||
},
|
||||
async submit() {
|
||||
let that = this;
|
||||
let res = null;
|
||||
try {
|
||||
if (that.type === "add") {
|
||||
res = await that.$API.ofm.vehicle.create.req(that.addForm);
|
||||
} else {
|
||||
res = await that.$API.ofm.vehicle.update.req(
|
||||
that.editId,
|
||||
that.addForm
|
||||
);
|
||||
}
|
||||
that.isSaving = false;
|
||||
that.limitedVisible = false;
|
||||
that.$refs.table.refresh();
|
||||
} catch (e) {
|
||||
that.isSaving = false;
|
||||
}
|
||||
},
|
||||
// 审批流结束之后才可以编辑
|
||||
vehicleEidt(row) {
|
||||
this.type = "edit";
|
||||
this.editId = row.id;
|
||||
this.limitedVisible = true;
|
||||
this.addForm = Object.assign({}, row);
|
||||
},
|
||||
async vehicleDel(row) {
|
||||
var id = row.id;
|
||||
var res = await this.$API.ofm.vehicle.delete.req(id);
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
this.$refs.table.refresh();
|
||||
this.$message.success("删除成功");
|
||||
}
|
||||
},
|
||||
//搜索
|
||||
handleQuery() {
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.treeMain {
|
||||
height: 280px;
|
||||
overflow: auto;
|
||||
border: 1px solid #dcdfe6;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.2);
|
||||
background-color: #fefefe;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 5px;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.node rect {
|
||||
stroke: #606266;
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.edgePath path {
|
||||
stroke: #606266;
|
||||
fill: #333;
|
||||
stroke-width: 1.5px;
|
||||
}
|
||||
|
||||
g.conditions > rect {
|
||||
fill: #00ffd0;
|
||||
stroke: #000;
|
||||
}
|
||||
|
||||
.el-icon-close {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.left-panel-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px; /* 按钮之间的间隙,可以调小点 */
|
||||
margin-left: 0; /* 靠左 */
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue