4f756156 by renchao@pashanhoo.com

style:审批意见模块样式的修改

1 parent f35ecc5f
<!--
* @Description: 审批意见
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:41:24
* @LastEditTime: 2023-09-28 11:27:03
-->
<template>
<div class="spyj loadingtext">
......@@ -14,8 +14,7 @@
<el-form
:model="tableData[index]"
label-width="120px"
ref="ruleFormRef'"
>
ref="ruleFormRef'">
<div class="spyj_form">
<div class="item_left">
<div class="right">{{ item.jdmc }}意见</div>
......@@ -30,14 +29,11 @@
:rows="4"
class="opinion"
placeholder="请输入审批意见"
v-model="item.shyj"
></el-input>
v-model="item.shyj"></el-input>
<el-button
class="opinion_btn"
@click="commonOpinion(index)"
v-if="ableOperation"
>常用意见</el-button
>
v-if="ableOperation">常用意见</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -47,8 +43,7 @@
<el-input
maxlength="20"
:disabled="!ableOperation"
v-model="item.shryxm"
></el-input>
v-model="item.shryxm"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
......@@ -59,8 +54,7 @@
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
>
format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
......@@ -77,13 +71,13 @@
</div>
</template>
<script>
import { addidea, getShList } from "@/api/djbRepair.js";
import { mapGetters } from "vuex";
export default {
import { addidea, getShList } from "@/api/djbRepair.js";
import { mapGetters } from "vuex";
export default {
computed: {
...mapGetters(["userData", "yjsqOptions"]),
},
data() {
data () {
return {
isNoData: false,
currentindex: 0,
......@@ -91,17 +85,17 @@ export default {
tableData: [{ jdmc: "初审" }, { jdmc: "复审" }, { jdmc: "核定" }],
falg: false,
falg1: false,
monitor:true
monitor: true
};
},
watch: {
yjsqOptions: {
handler(val) {
if(this.monitor){
handler (val) {
if (this.monitor) {
this.add("");
this.monitor=false
}else{
this.monitor = false
} else {
this.add(val.opinion);
}
},
......@@ -109,8 +103,8 @@ export default {
immediate: true,
},
},
created() {},
mounted() {
created () { },
mounted () {
this.ableOperation = this.$parent.ableOperation;
this.getShList();
},
......@@ -120,7 +114,7 @@ export default {
* @param {*} obj
* @author: renchao
*/
getShList() {
getShList () {
this.$startLoading();
var formdata = {
bsmRepair: this.$parent.bsmRepair,
......@@ -139,12 +133,12 @@ export default {
* @param {*} obj
* @author: renchao
*/
judgment(obj) {},
judgment (obj) { },
/**
* @description: onSubmit
* @author: renchao
*/
onSubmit() {
onSubmit () {
if (
this.tableData[2].shyj == null ||
this.tableData[2].shryxm == null ||
......@@ -157,12 +151,12 @@ export default {
this.$message.error("请完善核定意见信息填写");
} else {
this.falg = true;
if (this.tableData[0].shyj != null && this.tableData[0].shyj != ""||
this.tableData[0].shryxm != null && this.tableData[0].shryxm != ""||
if (this.tableData[0].shyj != null && this.tableData[0].shyj != "" ||
this.tableData[0].shryxm != null && this.tableData[0].shryxm != "" ||
this.tableData[0].shkssj != null && this.tableData[0].shkssj != "") {
if (
this.tableData[0].shyj == null ||
this.tableData[0].shyj == ""||
this.tableData[0].shyj == "" ||
this.tableData[0].shryxm == null ||
this.tableData[0].shryxm == "" ||
this.tableData[0].shkssj == null ||
......@@ -176,12 +170,12 @@ export default {
} else {
this.falg = true;
}
if (this.tableData[1].shyj != null && this.tableData[1].shyj != ""||
this.tableData[1].shryxm != null && this.tableData[1].shryxm != ""||
if (this.tableData[1].shyj != null && this.tableData[1].shyj != "" ||
this.tableData[1].shryxm != null && this.tableData[1].shryxm != "" ||
this.tableData[1].shkssj != null && this.tableData[1].shkssj != "") {
if (
this.tableData[1].shyj == null ||
this.tableData[1].shyj == ""||
this.tableData[1].shyj == "" ||
this.tableData[1].shryxm == null ||
this.tableData[1].shryxm == "" ||
this.tableData[1].shkssj == null ||
......@@ -219,7 +213,7 @@ export default {
* @param {*} index
* @author: renchao
*/
commonOpinion(index) {
commonOpinion (index) {
this.currentindex = index;
this.$popupDialog(
"常用意见",
......@@ -234,22 +228,21 @@ export default {
* @param {*} val
* @author: renchao
*/
add(val) {
add (val) {
if (val != "") {
this.$set(this.tableData[this.currentindex], "shyj", val);
}
},
},
};
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/mixin.scss";
.spyj {
.spyj {
width: 100%;
height: 100%;
background-color: #f5f5f5;
padding: 5px;
.box {
overflow-x: auto;
width: 100%;
......@@ -355,5 +348,5 @@ export default {
.el-date-editor.el-input {
width: 100%;
}
}
}
</style>
......
<!--
* @Description: 审批意见
* @Autor: renchao
* @LastEditTime: 2023-08-16 14:39:55
* @LastEditTime: 2023-09-28 11:27:06
-->
<template>
<div class="spyj loadingtext">
......@@ -14,8 +14,7 @@
<el-form
:model="tableData[index]"
label-width="120px"
ref="ruleForm'"
>
ref="ruleForm'">
<div class="spyj_form">
<div class="item_left">
<div class="right">{{ item.jdmc }}意见</div>
......@@ -25,22 +24,18 @@
<el-col :span="24">
<el-form-item
label-width="0"
class="opinion_item"
>
class="opinion_item">
<el-input
:disabled="!viewEdit || item.show"
type="textarea"
:rows="4"
class="opinion"
placeholder="请输入审批意见"
v-model="item.shyj"
></el-input>
v-model="item.shyj"></el-input>
<el-button
class="opinion_btn"
@click="commonOpinion(index)"
:disabled="!viewEdit|| item.show"
>常用意见</el-button
>
:disabled="!viewEdit|| item.show">常用意见</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -61,23 +56,21 @@
</el-form>
</div>
<div class="submit_button" v-if="viewEdit">
<el-button type="primary" :disabled="shows" @click="onSubmit()"
>保存</el-button
>
<el-button type="primary" :disabled="shows" @click="onSubmit()">保存</el-button>
</div>
</div>
<!-- <el-empty v-if="isNoData" description="暂无数据"></el-empty> -->
</div>
</template>
<script>
import { saveSpyjBySlsq, getSpyjList } from "@/api/opinion.js";
import { mapGetters } from "vuex";
import { getNewDatesh } from "@/utils/util";
export default {
import { saveSpyjBySlsq, getSpyjList } from "@/api/opinion.js";
import { mapGetters } from "vuex";
import { getNewDatesh } from "@/utils/util";
export default {
computed: {
...mapGetters(["dqhj", "yjsqOptions", "userInfo"]),
},
data() {
data () {
return {
currentindex: 0,
refresh: 10,
......@@ -92,14 +85,14 @@ export default {
watch: {
yjsqOptions: {
handler(val) {
handler (val) {
this.add(val.opinion);
},
deep: true,
immediate: true,
},
dqhj: {
handler(val) {
handler (val) {
this.propsParam = this.$attrs;
this.dataset()
this.getShList();
......@@ -110,14 +103,14 @@ export default {
},
},
created() {},
created () { },
methods: {
/**
* @description: dataset
* @param {*} 数据处理
* @author: renchao
*/
dataset(){
dataset () {
this.viewEdit = this.$parent.currentSelectTab.ableOperation;
// switch (this.$parent.dqhj) {
// case "cs":
......@@ -139,7 +132,7 @@ export default {
* @param {*} obj
* @author: renchao
*/
getShList() {
getShList () {
this.$startLoading();
var formdata = new FormData();
formdata.append("bsmBusiness", this.propsParam.bsmBusiness);
......@@ -191,16 +184,16 @@ export default {
* @description: onSubmit
* @author: renchao
*/
onSubmit() {
onSubmit () {
this.tableData.forEach((item, index) => {
item["bsmBusiness"] = this.propsParam.bsmBusiness;
item["czjg"] = "1";
});
var index = this.tableData.findIndex(
(item) => item.shyj ==null||item.shyj ==""
(item) => item.shyj == null || item.shyj == ""
);
if(index==-1){
if (index == -1) {
this.shows = true;
saveSpyjBySlsq(this.tableData).then((res) => {
if (res.code === 200) {
......@@ -211,7 +204,7 @@ export default {
this.$message.error(res.message);
}
});
}else{
} else {
this.$message.error("意见不能为空");
}
......@@ -222,7 +215,7 @@ export default {
* @param {*} index
* @author: renchao
*/
commonOpinion(index) {
commonOpinion (index) {
this.currentindex = index;
this.$popupDialog(
"常用意见",
......@@ -237,22 +230,21 @@ export default {
* @param {*} val
* @author: renchao
*/
add(val) {
if (val != ""&&this.tableData.length>0) {
add (val) {
if (val != "" && this.tableData.length > 0) {
this.$set(this.tableData[this.currentindex], "shyj", val);
}
},
},
};
};
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/mixin.scss";
.spyj {
.spyj {
width: 100%;
height: 100%;
background-color: #f5f5f5;
padding: 5px;
.box {
overflow-x: auto;
width: 100%;
......@@ -357,5 +349,5 @@ export default {
.el-date-editor.el-input {
width: 100%;
}
}
}
</style>
......