00095cc2 by xiaomiao

--no commit message

1 parent f027b0f4
<!--
* @Description: 审批意见
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:41:24
* @LastEditTime: 2023-08-16 14:39:55
-->
<template>
<div class="spyj loadingtext">
......@@ -14,7 +14,7 @@
<el-form
:model="tableData[index]"
label-width="120px"
ref="ruleFormRef'"
ref="ruleForm'"
>
<div class="spyj_form">
<div class="item_left">
......@@ -23,9 +23,12 @@
<div class="item_right">
<el-row>
<el-col :span="24">
<el-form-item label-width="0" class="opinion_item">
<el-form-item
label-width="0"
class="opinion_item"
>
<el-input
:disabled="!ableOperation&&item.show"
:disabled="!viewEdit || item.show"
type="textarea"
:rows="4"
class="opinion"
......@@ -35,7 +38,7 @@
<el-button
class="opinion_btn"
@click="commonOpinion(index)"
v-if="ableOperation"
:disabled="!viewEdit|| item.show"
>常用意见</el-button
>
</el-form-item>
......@@ -44,23 +47,12 @@
<el-row>
<el-col :span="16">
<el-form-item label="审查人">
<el-input
:disabled="!ableOperation"
v-model="item.shryxm"
></el-input>
{{ item.shryxm }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="sjxzq" label="审核时间">
<el-date-picker
:disabled="!ableOperation"
v-model="item.shjssj"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
>
</el-date-picker>
<el-form-item disabled label="审核时间" :key="refresh">
{{ item.shjssj }}
</el-form-item>
</el-col>
</el-row>
......@@ -68,8 +60,10 @@
</div>
</el-form>
</div>
<div class="submit_button" v-if="ableOperation">
<el-button type="primary" @click="onSubmit()">保存</el-button>
<div class="submit_button" v-if="viewEdit">
<el-button type="primary" :disabled="shows" @click="onSubmit()"
>保存</el-button
>
</div>
</div>
<!-- <el-empty v-if="isNoData" description="暂无数据"></el-empty> -->
......@@ -78,6 +72,7 @@
<script>
import { saveSpyjBySlsq, getSpyjList } from "@/api/opinion.js";
import { mapGetters } from "vuex";
import { getNewDatesh } from "@/utils/util";
export default {
computed: {
...mapGetters(["userData", "yjsqOptions", "userInfo"]),
......@@ -87,7 +82,8 @@ export default {
isNoData: false,
currentindex: 0,
bsmSlsq: "",
ableOperation: false,
refresh: 10,
viewEdit: false,
bsmSlsq: this.$route.query.bsmSlsq,
bestepid: this.$route.query.bestepid,
propsParam: {},
......@@ -96,13 +92,13 @@ export default {
falg1: false,
jdmc: "",
indexdqlc: 0,
shows: false,
};
},
watch: {
yjsqOptions: {
handler(val) {
console.log("val", val);
this.add(val);
},
deep: true,
......@@ -112,9 +108,7 @@ export default {
created() {},
mounted() {
this.propsParam = this.$attrs;
console.log("this.$parent.dqhj", this.$parent.dqhj);
this.ableOperation = this.$parent.currentSelectTab.ableOperation;
// this.ableOperation = this.$parent.ableOperation;
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
this.getShList();
switch (this.$parent.dqhj) {
......@@ -139,9 +133,7 @@ export default {
* @author: renchao
*/
getShList() {
let that = this;
this.$startLoading();
console.log(this.userInfo);
var formdata = new FormData();
formdata.append("bsmBusiness", this.propsParam.bsmBusiness);
formdata.append("bestepid", this.$route.query.bestepid);
......@@ -149,22 +141,40 @@ export default {
getSpyjList(formdata).then((res) => {
this.$endLoading();
if (res.code === 200 && res.result) {
this.tableData = res.result;
if (this.tableData.length == 0&&this.jdmc=="初审") {
console.log(0);
this.tableData.push({ jdmc: "初审" });
}else if(this.tableData[this.tableData.length-1].jdmc=="初审"&&this.jdmc=="复审") {
console.log(1);
this.tableData.push({ jdmc: "复审" });
}else if(this.tableData[this.tableData.length-1].jdmc=="复审"&&this.jdmc=="核定") {
console.log(2);
this.tableData.push({ jdmc: "核定" });
}
this.$nextTick(() => {
this.tableData = res.result;
if (this.shows) {
this.shows = false;
}
if(this.$parent.dqhj=="cs"){
this.tableData[0].show=false
}
console.log("this.tableData", this.tableData);
var index = this.tableData.findIndex(
(item) => item.jddm === this.$parent.dqhj
);
if (index == -1) {
switch (this.$parent.dqhj) {
case "cs":
this.tableData.push({ jdmc: "初审", jddm: "cs", sxh: 1 });
break;
case "fs":
this.tableData.push({ jdmc: "复审", jddm: "fs", sxh: 2 });
break;
case "hd":
this.tableData.push({ jdmc: "核定", jddm: "hd", sxh: 3 });
break;
}
}
this.tableData.forEach((item) => {
item.show = true;
if (this.$parent.dqhj == item.jddm) {
item["stepid"] = this.$route.query.bestepid;
item.shjssj = getNewDatesh();
item.shkssj = getNewDatesh();
item["shryxm"] = this.userInfo.name;
item["userid"] = this.userInfo.id;
item.show = false;
}
});
});
}
});
},
......@@ -179,29 +189,29 @@ export default {
* @author: renchao
*/
onSubmit() {
this.tableData.forEach((item, index) => {
item["bsmBusiness"] = this.propsParam.bsmBusiness;
item["bestepid"] = this.$route.query.bestepid;
item["shryxm"] = this.userInfo.name;
item["userid"] = this.userInfo.id;
item["shjssj"] = item.shkssj;
item["czjg"] = "1";
item["jddm"] = this.$parent.dqhj;
item["jdmc"] = this.jdmc;
});
console.log("this.tableData", this.tableData);
saveSpyjBySlsq(this.tableData).then((res) => {
if (res.code === 200) {
this.$message.success("保存成功");
this.refresh += 1;
} else {
this.$message.error(res.message);
}
});
// } else {
// return false;
// }
this.tableData.forEach((item, index) => {
item["bsmBusiness"] = this.propsParam.bsmBusiness;
item["czjg"] = "1";
});
var index = this.tableData.findIndex(
(item) => item.shyj === null||item.shyj === ""
);
if(index==-1){
this.shows = true;
saveSpyjBySlsq(this.tableData).then((res) => {
if (res.code === 200) {
this.$message.success("保存成功");
this.refresh += 1;
this.getShList();
} else {
this.$message.error(res.message);
}
});
}else{
this.$message.error("意见不能为空");
}
},
//打开常用意见列表弹窗
/**
......
<!--
* @Description: 审批意见
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:41:24
* @LastEditTime: 2023-08-16 14:39:55
-->
<template>
<div class="spyj loadingtext">
......@@ -14,7 +14,7 @@
<el-form
:model="tableData[index]"
label-width="120px"
ref="ruleFormRef'"
ref="ruleForm'"
>
<div class="spyj_form">
<div class="item_left">
......@@ -23,9 +23,12 @@
<div class="item_right">
<el-row>
<el-col :span="24">
<el-form-item label-width="0" class="opinion_item">
<el-form-item
label-width="0"
class="opinion_item"
>
<el-input
:disabled="!ableOperation || item.show"
:disabled="!viewEdit || item.show"
type="textarea"
:rows="4"
class="opinion"
......@@ -35,7 +38,7 @@
<el-button
class="opinion_btn"
@click="commonOpinion(index)"
v-if="ableOperation"
:disabled="!viewEdit|| item.show"
>常用意见</el-button
>
</el-form-item>
......@@ -57,8 +60,10 @@
</div>
</el-form>
</div>
<div class="submit_button" v-if="ableOperation">
<el-button type="primary" @click="onSubmit()">保存</el-button>
<div class="submit_button" v-if="viewEdit">
<el-button type="primary" :disabled="shows" @click="onSubmit()"
>保存</el-button
>
</div>
</div>
<!-- <el-empty v-if="isNoData" description="暂无数据"></el-empty> -->
......@@ -78,7 +83,7 @@ export default {
currentindex: 0,
bsmSlsq: "",
refresh: 10,
ableOperation: false,
viewEdit: false,
bsmSlsq: this.$route.query.bsmSlsq,
bestepid: this.$route.query.bestepid,
propsParam: {},
......@@ -87,6 +92,7 @@ export default {
falg1: false,
jdmc: "",
indexdqlc: 0,
shows: false,
};
},
......@@ -102,8 +108,7 @@ export default {
created() {},
mounted() {
this.propsParam = this.$attrs;
this.ableOperation = this.$parent.currentSelectTab.ableOperation;
// this.ableOperation = this.$parent.ableOperation;
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
this.getShList();
switch (this.$parent.dqhj) {
......@@ -128,7 +133,6 @@ export default {
* @author: renchao
*/
getShList() {
let that = this;
this.$startLoading();
var formdata = new FormData();
formdata.append("bsmBusiness", this.propsParam.bsmBusiness);
......@@ -137,33 +141,39 @@ export default {
getSpyjList(formdata).then((res) => {
this.$endLoading();
if (res.code === 200 && res.result) {
this.tableData = res.result;
var index = this.tableData.findIndex(
(item) => item.jddm === this.$parent.dqhj
);
if (index == -1) {
switch (this.$parent.dqhj) {
case "cs":
this.tableData.push({ jdmc: "初审", jddm: "cs", sxh: 1 });
break;
case "fs":
this.tableData.push({ jdmc: "复审", jddm: "fs", sxh: 2 });
break;
case "hd":
this.tableData.push({ jdmc: "核定", jddm: "hd", sxh: 3 });
break;
this.$nextTick(() => {
this.tableData = res.result;
if (this.shows) {
this.shows = false;
}
}
this.tableData.forEach((item) => {
item.show = true;
if (this.$parent.dqhj == item.jddm) {
item["stepid"] = this.$route.query.bestepid;
item.shjssj = getNewDatesh();
item.shkssj = getNewDatesh();
item["shryxm"] = this.userInfo.name;
item["userid"] = this.userInfo.id;
item.show = false;
var index = this.tableData.findIndex(
(item) => item.jddm === this.$parent.dqhj
);
if (index == -1) {
switch (this.$parent.dqhj) {
case "cs":
this.tableData.push({ jdmc: "初审", jddm: "cs", sxh: 1 });
break;
case "fs":
this.tableData.push({ jdmc: "复审", jddm: "fs", sxh: 2 });
break;
case "hd":
this.tableData.push({ jdmc: "核定", jddm: "hd", sxh: 3 });
break;
}
}
this.tableData.forEach((item) => {
item.show = true;
if (this.$parent.dqhj == item.jddm) {
item["stepid"] = this.$route.query.bestepid;
item.shjssj = getNewDatesh();
item.shkssj = getNewDatesh();
item["shryxm"] = this.userInfo.name;
item["userid"] = this.userInfo.id;
item.show = false;
}
});
});
}
});
......@@ -179,21 +189,29 @@ export default {
* @author: renchao
*/
onSubmit() {
this.tableData.forEach((item, index) => {
item["bsmBusiness"] = this.propsParam.bsmBusiness;
item["czjg"] = "1";
});
saveSpyjBySlsq(this.tableData).then((res) => {
if (res.code === 200) {
this.$message.success("保存成功");
this.refresh += 1;
} else {
this.$message.error(res.message);
}
});
// } else {
// return false;
// }
this.tableData.forEach((item, index) => {
item["bsmBusiness"] = this.propsParam.bsmBusiness;
item["czjg"] = "1";
});
var index = this.tableData.findIndex(
(item) => item.shyj === null||item.shyj === ""
);
if(index==-1){
this.shows = true;
saveSpyjBySlsq(this.tableData).then((res) => {
if (res.code === 200) {
this.$message.success("保存成功");
this.refresh += 1;
this.getShList();
} else {
this.$message.error(res.message);
}
});
}else{
this.$message.error("意见不能为空");
}
},
//打开常用意见列表弹窗
/**
......