|
@@ -34,29 +34,29 @@
|
|
|
<div class="flex-justify-between padding-right-20 padding-left-20">
|
|
|
<div>
|
|
|
<template v-if="edit_visible">
|
|
|
- <!-- 转派按钮 科室经理、分管副总、总经理可见 -->
|
|
|
+ <!-- 转派按钮 科室经理 7、分管副总 2、总经理 1可见 -->
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
v-if="
|
|
|
- edit_form.status === '0' && (duty === '7' || duty === '10')
|
|
|
+ edit_form.status === '0' &&
|
|
|
+ (duty === '7' || duty === '2' || duty === '1')
|
|
|
"
|
|
|
@click="handleTransfer"
|
|
|
>转派</el-button
|
|
|
>
|
|
|
- <!-- 提交按钮 科员可见 -->
|
|
|
- <el-button
|
|
|
+ <!-- 提交按钮 科员可见 9 -->
|
|
|
+ <!-- <el-button
|
|
|
type="primary"
|
|
|
- v-if="
|
|
|
- edit_form.status === '0' && (duty === '1' || duty === '10')
|
|
|
- "
|
|
|
+ v-if="edit_form.status === '1' && duty === '9'"
|
|
|
@click="handleSubmit"
|
|
|
>提交</el-button
|
|
|
- >
|
|
|
+ > -->
|
|
|
<!-- 审批按钮 科室经理、分管副总、总经理可见 -->
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
v-if="
|
|
|
- edit_form.status === '2' && (duty === '7' || duty === '10')
|
|
|
+ edit_form.status === '2' &&
|
|
|
+ (duty === '7' || duty === '2' || duty === '1')
|
|
|
"
|
|
|
@click="handleApprove"
|
|
|
>审批</el-button
|
|
@@ -72,7 +72,12 @@
|
|
|
</div> -->
|
|
|
</div>
|
|
|
<!-- 主体部分 -->
|
|
|
- <simple-sheet v-if="visible" :id="edit_form.id" :type="edit_visible?'edit':'view'" attribute="file" />
|
|
|
+ <simple-sheet
|
|
|
+ v-if="visible"
|
|
|
+ :id="edit_form.id"
|
|
|
+ :type="edit_visible&&edit_form.status === '1' && duty === '9' ? 'edit' : 'view'"
|
|
|
+ attribute="file"
|
|
|
+ />
|
|
|
<!-- <analysis
|
|
|
:edit="edit_form.department_status === '待处理' && edit_visible"
|
|
|
/> -->
|
|
@@ -136,8 +141,23 @@
|
|
|
placeholder="请选择转派人员"
|
|
|
>
|
|
|
<el-option
|
|
|
- v-for="item in transfer_list"
|
|
|
- :key="item.value"
|
|
|
+ v-for="(item, index) in transfer_list"
|
|
|
+ :key="index"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.loginNoStr"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="可编辑行" prop="rows">
|
|
|
+ <el-select
|
|
|
+ v-model="transfer_form.rows"
|
|
|
+ placeholder="可编辑行"
|
|
|
+ multiple
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in transfer_rows"
|
|
|
+ :key="index"
|
|
|
:label="item.label"
|
|
|
:value="item.value"
|
|
|
>
|
|
@@ -210,8 +230,10 @@ export default {
|
|
|
track_visible: false,
|
|
|
edit_form: {},
|
|
|
transfer_list: [],
|
|
|
+ transfer_rows: [],
|
|
|
transfer_form: {
|
|
|
personnel: "", // 转派人员
|
|
|
+ rows: [],
|
|
|
},
|
|
|
reload: 0,
|
|
|
// 判断类型
|
|
@@ -234,6 +256,13 @@ export default {
|
|
|
trigger: "change",
|
|
|
},
|
|
|
],
|
|
|
+ rows: [
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ message: "请选择行",
|
|
|
+ trigger: "change",
|
|
|
+ },
|
|
|
+ ],
|
|
|
},
|
|
|
// 审批意见
|
|
|
approveForm: { comments: "" },
|
|
@@ -288,7 +317,7 @@ export default {
|
|
|
label: "处理",
|
|
|
props: "edit",
|
|
|
visible: {
|
|
|
- status: ["0", "2"],
|
|
|
+ status: ["0", "1", "2"],
|
|
|
},
|
|
|
},
|
|
|
],
|
|
@@ -332,18 +361,20 @@ export default {
|
|
|
});
|
|
|
// 职位
|
|
|
this.duty = JSON.parse(sessionStorage.userInfo).duty;
|
|
|
- // 根据职位判定 科室经理7、分管副总 5 、总经理 10 、职员 1 3,4
|
|
|
+ // 根据职位判定 科室经理7、分管副总 2 、总经理 1 、职员 9
|
|
|
console.log(this.duty, "duty");
|
|
|
switch (this.duty) {
|
|
|
// 科室经理
|
|
|
case "7":
|
|
|
this.type = "1";
|
|
|
break;
|
|
|
- case "3":
|
|
|
+ // 分管副总
|
|
|
+ case "2":
|
|
|
this.type = "2";
|
|
|
break;
|
|
|
- case "4":
|
|
|
- this.type = "2";
|
|
|
+ // 总经理
|
|
|
+ case "1":
|
|
|
+ this.type = "3";
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
@@ -357,8 +388,8 @@ export default {
|
|
|
"Content-Type": "application/json",
|
|
|
},
|
|
|
data: data,
|
|
|
- }).then(({ data: { data } }) => {
|
|
|
- console.log(data);
|
|
|
+ }).then(({ data: { count, data } }) => {
|
|
|
+ this.total = count;
|
|
|
this.table_list = data;
|
|
|
// this.table_list = [
|
|
|
// {
|
|
@@ -441,29 +472,43 @@ export default {
|
|
|
transferConfirm() {
|
|
|
this.$refs["transfer_form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.transfer_visible = false;
|
|
|
- // this.$http({
|
|
|
- // url: "/market/CMKIssued/CMKIssuedTransfer",
|
|
|
- // method: "post",
|
|
|
- // headers: {
|
|
|
- // "Content-Type": "application/json",
|
|
|
- // },
|
|
|
- // data: {
|
|
|
- // issuedId:Number(this.transfer_form.personnel),
|
|
|
- // },
|
|
|
- // }).then((res) => {
|
|
|
- // console.log(res, "res");
|
|
|
- // });
|
|
|
+ let obj = {};
|
|
|
+ this.transfer_form.rows.forEach((el) => {
|
|
|
+ obj = {
|
|
|
+ ...obj,
|
|
|
+ [el]: this.transfer_form.personnel,
|
|
|
+ };
|
|
|
+ });
|
|
|
+ let reqdata = {
|
|
|
+ forward: JSON.stringify(obj),
|
|
|
+ issuedId: this.edit_form.id,
|
|
|
+ };
|
|
|
+ this.$http({
|
|
|
+ url: "/market/CMKIssued/CMKIssuedTransfer",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: reqdata,
|
|
|
+ }).then(({ data: { desc } }) => {
|
|
|
+ if (desc === "转派成功") {
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: desc,
|
|
|
+ });
|
|
|
+ this.transfer_visible = false;
|
|
|
+ this.handleCancel("visible");
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- handleTransfer() {
|
|
|
+ async handleTransfer() {
|
|
|
console.log(this.edit_form, "prams");
|
|
|
- this.transfer_visible = true;
|
|
|
+ let loginNoStr = JSON.parse(sessionStorage.userInfo).loginNoStr;
|
|
|
let groupId = JSON.parse(sessionStorage.userInfo).groupId;
|
|
|
- console.log(groupId, "groupId");
|
|
|
- this.$http({
|
|
|
- url: "/spfm/sysmgr/sysuserinfo/queryList",
|
|
|
+ await this.$http({
|
|
|
+ url: "/sysmgr/sysuserinfo/queryList",
|
|
|
method: "post",
|
|
|
headers: {
|
|
|
"Content-Type": "application/json",
|
|
@@ -471,9 +516,34 @@ export default {
|
|
|
data: {
|
|
|
groupId,
|
|
|
},
|
|
|
- }).then((res) => {
|
|
|
- console.log(res, "res");
|
|
|
+ }).then(({ data }) => {
|
|
|
+ this.transfer_list = data
|
|
|
+ .filter((el) => {
|
|
|
+ return el.loginNoStr !== loginNoStr;
|
|
|
+ })
|
|
|
+ .map((el) => ({
|
|
|
+ ...el,
|
|
|
+ label: el.loginNameStr,
|
|
|
+ }));
|
|
|
+ // 可编辑行
|
|
|
+ });
|
|
|
+ await this.$http({
|
|
|
+ url: "/market/CMKIssued/CMKIssuedRow",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ id: this.edit_form.id,
|
|
|
+ },
|
|
|
+ }).then(({ data }) => {
|
|
|
+ console.log(data);
|
|
|
+ this.transfer_rows = data.map((el) => ({
|
|
|
+ label: el,
|
|
|
+ value: el,
|
|
|
+ }));
|
|
|
});
|
|
|
+ this.transfer_visible = true;
|
|
|
},
|
|
|
handleTurn(type) {
|
|
|
// finish 结束 transfer 转派 back //打回 // agree 同意
|
|
@@ -484,10 +554,11 @@ export default {
|
|
|
};
|
|
|
switch (type) {
|
|
|
case "finish":
|
|
|
- // 0.打回 3.结束
|
|
|
+ // status 0.打回 3.结束
|
|
|
reqdata.status = "3";
|
|
|
break;
|
|
|
case "transfer":
|
|
|
+ // reviewType 2.副总经理 3.经理
|
|
|
if (this.duty === "7") {
|
|
|
reqdata.reviewType = 2;
|
|
|
} else {
|
|
@@ -602,22 +673,24 @@ export default {
|
|
|
// 提交好了
|
|
|
let reqdata = {
|
|
|
id: this.edit_form.id,
|
|
|
- templateContent: this.edit_form.templateContent,
|
|
|
+ templateContent: "asdad",
|
|
|
};
|
|
|
- console.log(reqdata, "reqdata");
|
|
|
-
|
|
|
- // this.$http({
|
|
|
- // url: "/CMKIssued/CMKIssuedSubmit",
|
|
|
- // method: "post",
|
|
|
- // headers: {
|
|
|
- // "Content-Type": "application/json",
|
|
|
- // },
|
|
|
- // data: reqdata,
|
|
|
- // }).then((res) => {
|
|
|
- // console.log(res);
|
|
|
- // this.$message.success("提交成功");
|
|
|
- // this.handleCancel("visible");
|
|
|
- // });
|
|
|
+ this.$http({
|
|
|
+ url: "/CMKIssued/CMKIssuedSubmit",
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: reqdata,
|
|
|
+ }).then(({ data }) => {
|
|
|
+ console.log(data, "data");
|
|
|
+ if (data) {
|
|
|
+ this.$message.success("提交成功");
|
|
|
+ this.handleCancel("visible");
|
|
|
+ } else {
|
|
|
+ this.$message.error("提交失败");
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|