00095cc2 by xiaomiao

--no commit message

1 parent f027b0f4
1 <!-- 1 <!--
2 * @Description: 审批意见 2 * @Description: 审批意见
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-05-17 10:41:24 4 * @LastEditTime: 2023-08-16 14:39:55
5 --> 5 -->
6 <template> 6 <template>
7 <div class="spyj loadingtext"> 7 <div class="spyj loadingtext">
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
14 <el-form 14 <el-form
15 :model="tableData[index]" 15 :model="tableData[index]"
16 label-width="120px" 16 label-width="120px"
17 ref="ruleFormRef'" 17 ref="ruleForm'"
18 > 18 >
19 <div class="spyj_form"> 19 <div class="spyj_form">
20 <div class="item_left"> 20 <div class="item_left">
...@@ -23,9 +23,12 @@ ...@@ -23,9 +23,12 @@
23 <div class="item_right"> 23 <div class="item_right">
24 <el-row> 24 <el-row>
25 <el-col :span="24"> 25 <el-col :span="24">
26 <el-form-item label-width="0" class="opinion_item"> 26 <el-form-item
27 label-width="0"
28 class="opinion_item"
29 >
27 <el-input 30 <el-input
28 :disabled="!ableOperation&&item.show" 31 :disabled="!viewEdit || item.show"
29 type="textarea" 32 type="textarea"
30 :rows="4" 33 :rows="4"
31 class="opinion" 34 class="opinion"
...@@ -35,7 +38,7 @@ ...@@ -35,7 +38,7 @@
35 <el-button 38 <el-button
36 class="opinion_btn" 39 class="opinion_btn"
37 @click="commonOpinion(index)" 40 @click="commonOpinion(index)"
38 v-if="ableOperation" 41 :disabled="!viewEdit|| item.show"
39 >常用意见</el-button 42 >常用意见</el-button
40 > 43 >
41 </el-form-item> 44 </el-form-item>
...@@ -44,23 +47,12 @@ ...@@ -44,23 +47,12 @@
44 <el-row> 47 <el-row>
45 <el-col :span="16"> 48 <el-col :span="16">
46 <el-form-item label="审查人"> 49 <el-form-item label="审查人">
47 <el-input 50 {{ item.shryxm }}
48 :disabled="!ableOperation"
49 v-model="item.shryxm"
50 ></el-input>
51 </el-form-item> 51 </el-form-item>
52 </el-col> 52 </el-col>
53 <el-col :span="8"> 53 <el-col :span="8">
54 <el-form-item class="sjxzq" label="审核时间"> 54 <el-form-item disabled label="审核时间" :key="refresh">
55 <el-date-picker 55 {{ item.shjssj }}
56 :disabled="!ableOperation"
57 v-model="item.shjssj"
58 type="date"
59 placeholder="选择日期"
60 value-format="yyyy-MM-dd HH:mm:ss"
61 format="yyyy-MM-dd"
62 >
63 </el-date-picker>
64 </el-form-item> 56 </el-form-item>
65 </el-col> 57 </el-col>
66 </el-row> 58 </el-row>
...@@ -68,8 +60,10 @@ ...@@ -68,8 +60,10 @@
68 </div> 60 </div>
69 </el-form> 61 </el-form>
70 </div> 62 </div>
71 <div class="submit_button" v-if="ableOperation"> 63 <div class="submit_button" v-if="viewEdit">
72 <el-button type="primary" @click="onSubmit()">保存</el-button> 64 <el-button type="primary" :disabled="shows" @click="onSubmit()"
65 >保存</el-button
66 >
73 </div> 67 </div>
74 </div> 68 </div>
75 <!-- <el-empty v-if="isNoData" description="暂无数据"></el-empty> --> 69 <!-- <el-empty v-if="isNoData" description="暂无数据"></el-empty> -->
...@@ -78,6 +72,7 @@ ...@@ -78,6 +72,7 @@
78 <script> 72 <script>
79 import { saveSpyjBySlsq, getSpyjList } from "@/api/opinion.js"; 73 import { saveSpyjBySlsq, getSpyjList } from "@/api/opinion.js";
80 import { mapGetters } from "vuex"; 74 import { mapGetters } from "vuex";
75 import { getNewDatesh } from "@/utils/util";
81 export default { 76 export default {
82 computed: { 77 computed: {
83 ...mapGetters(["userData", "yjsqOptions", "userInfo"]), 78 ...mapGetters(["userData", "yjsqOptions", "userInfo"]),
...@@ -87,7 +82,8 @@ export default { ...@@ -87,7 +82,8 @@ export default {
87 isNoData: false, 82 isNoData: false,
88 currentindex: 0, 83 currentindex: 0,
89 bsmSlsq: "", 84 bsmSlsq: "",
90 ableOperation: false, 85 refresh: 10,
86 viewEdit: false,
91 bsmSlsq: this.$route.query.bsmSlsq, 87 bsmSlsq: this.$route.query.bsmSlsq,
92 bestepid: this.$route.query.bestepid, 88 bestepid: this.$route.query.bestepid,
93 propsParam: {}, 89 propsParam: {},
...@@ -96,13 +92,13 @@ export default { ...@@ -96,13 +92,13 @@ export default {
96 falg1: false, 92 falg1: false,
97 jdmc: "", 93 jdmc: "",
98 indexdqlc: 0, 94 indexdqlc: 0,
95 shows: false,
99 }; 96 };
100 }, 97 },
101 98
102 watch: { 99 watch: {
103 yjsqOptions: { 100 yjsqOptions: {
104 handler(val) { 101 handler(val) {
105 console.log("val", val);
106 this.add(val); 102 this.add(val);
107 }, 103 },
108 deep: true, 104 deep: true,
...@@ -112,9 +108,7 @@ export default { ...@@ -112,9 +108,7 @@ export default {
112 created() {}, 108 created() {},
113 mounted() { 109 mounted() {
114 this.propsParam = this.$attrs; 110 this.propsParam = this.$attrs;
115 console.log("this.$parent.dqhj", this.$parent.dqhj); 111 this.viewEdit = this.$parent.currentSelectTab.ableOperation;
116 this.ableOperation = this.$parent.currentSelectTab.ableOperation;
117 // this.ableOperation = this.$parent.ableOperation;
118 this.getShList(); 112 this.getShList();
119 113
120 switch (this.$parent.dqhj) { 114 switch (this.$parent.dqhj) {
...@@ -139,9 +133,7 @@ export default { ...@@ -139,9 +133,7 @@ export default {
139 * @author: renchao 133 * @author: renchao
140 */ 134 */
141 getShList() { 135 getShList() {
142 let that = this;
143 this.$startLoading(); 136 this.$startLoading();
144 console.log(this.userInfo);
145 var formdata = new FormData(); 137 var formdata = new FormData();
146 formdata.append("bsmBusiness", this.propsParam.bsmBusiness); 138 formdata.append("bsmBusiness", this.propsParam.bsmBusiness);
147 formdata.append("bestepid", this.$route.query.bestepid); 139 formdata.append("bestepid", this.$route.query.bestepid);
...@@ -149,22 +141,40 @@ export default { ...@@ -149,22 +141,40 @@ export default {
149 getSpyjList(formdata).then((res) => { 141 getSpyjList(formdata).then((res) => {
150 this.$endLoading(); 142 this.$endLoading();
151 if (res.code === 200 && res.result) { 143 if (res.code === 200 && res.result) {
144 this.$nextTick(() => {
152 this.tableData = res.result; 145 this.tableData = res.result;
153 if (this.tableData.length == 0&&this.jdmc=="初审") { 146 if (this.shows) {
154 console.log(0); 147 this.shows = false;
155 this.tableData.push({ jdmc: "初审" });
156 }else if(this.tableData[this.tableData.length-1].jdmc=="初审"&&this.jdmc=="复审") {
157 console.log(1);
158 this.tableData.push({ jdmc: "复审" });
159 }else if(this.tableData[this.tableData.length-1].jdmc=="复审"&&this.jdmc=="核定") {
160 console.log(2);
161 this.tableData.push({ jdmc: "核定" });
162 } 148 }
163 149
164 if(this.$parent.dqhj=="cs"){ 150 var index = this.tableData.findIndex(
165 this.tableData[0].show=false 151 (item) => item.jddm === this.$parent.dqhj
152 );
153 if (index == -1) {
154 switch (this.$parent.dqhj) {
155 case "cs":
156 this.tableData.push({ jdmc: "初审", jddm: "cs", sxh: 1 });
157 break;
158 case "fs":
159 this.tableData.push({ jdmc: "复审", jddm: "fs", sxh: 2 });
160 break;
161 case "hd":
162 this.tableData.push({ jdmc: "核定", jddm: "hd", sxh: 3 });
163 break;
166 } 164 }
167 console.log("this.tableData", this.tableData); 165 }
166 this.tableData.forEach((item) => {
167 item.show = true;
168 if (this.$parent.dqhj == item.jddm) {
169 item["stepid"] = this.$route.query.bestepid;
170 item.shjssj = getNewDatesh();
171 item.shkssj = getNewDatesh();
172 item["shryxm"] = this.userInfo.name;
173 item["userid"] = this.userInfo.id;
174 item.show = false;
175 }
176 });
177 });
168 } 178 }
169 }); 179 });
170 }, 180 },
...@@ -179,29 +189,29 @@ export default { ...@@ -179,29 +189,29 @@ export default {
179 * @author: renchao 189 * @author: renchao
180 */ 190 */
181 onSubmit() { 191 onSubmit() {
192
182 this.tableData.forEach((item, index) => { 193 this.tableData.forEach((item, index) => {
183 item["bsmBusiness"] = this.propsParam.bsmBusiness; 194 item["bsmBusiness"] = this.propsParam.bsmBusiness;
184 item["bestepid"] = this.$route.query.bestepid;
185 item["shryxm"] = this.userInfo.name;
186 item["userid"] = this.userInfo.id;
187 item["shjssj"] = item.shkssj;
188 item["czjg"] = "1"; 195 item["czjg"] = "1";
189 item["jddm"] = this.$parent.dqhj;
190 item["jdmc"] = this.jdmc;
191
192 }); 196 });
193 console.log("this.tableData", this.tableData); 197 var index = this.tableData.findIndex(
198 (item) => item.shyj === null||item.shyj === ""
199 );
200 if(index==-1){
201 this.shows = true;
194 saveSpyjBySlsq(this.tableData).then((res) => { 202 saveSpyjBySlsq(this.tableData).then((res) => {
195 if (res.code === 200) { 203 if (res.code === 200) {
196 this.$message.success("保存成功"); 204 this.$message.success("保存成功");
197 this.refresh += 1; 205 this.refresh += 1;
206 this.getShList();
198 } else { 207 } else {
199 this.$message.error(res.message); 208 this.$message.error(res.message);
200 } 209 }
201 }); 210 });
202 // } else { 211 }else{
203 // return false; 212 this.$message.error("意见不能为空");
204 // } 213 }
214
205 }, 215 },
206 //打开常用意见列表弹窗 216 //打开常用意见列表弹窗
207 /** 217 /**
......
1 <!-- 1 <!--
2 * @Description: 审批意见 2 * @Description: 审批意见
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-05-17 10:41:24 4 * @LastEditTime: 2023-08-16 14:39:55
5 --> 5 -->
6 <template> 6 <template>
7 <div class="spyj loadingtext"> 7 <div class="spyj loadingtext">
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
14 <el-form 14 <el-form
15 :model="tableData[index]" 15 :model="tableData[index]"
16 label-width="120px" 16 label-width="120px"
17 ref="ruleFormRef'" 17 ref="ruleForm'"
18 > 18 >
19 <div class="spyj_form"> 19 <div class="spyj_form">
20 <div class="item_left"> 20 <div class="item_left">
...@@ -23,9 +23,12 @@ ...@@ -23,9 +23,12 @@
23 <div class="item_right"> 23 <div class="item_right">
24 <el-row> 24 <el-row>
25 <el-col :span="24"> 25 <el-col :span="24">
26 <el-form-item label-width="0" class="opinion_item"> 26 <el-form-item
27 label-width="0"
28 class="opinion_item"
29 >
27 <el-input 30 <el-input
28 :disabled="!ableOperation || item.show" 31 :disabled="!viewEdit || item.show"
29 type="textarea" 32 type="textarea"
30 :rows="4" 33 :rows="4"
31 class="opinion" 34 class="opinion"
...@@ -35,7 +38,7 @@ ...@@ -35,7 +38,7 @@
35 <el-button 38 <el-button
36 class="opinion_btn" 39 class="opinion_btn"
37 @click="commonOpinion(index)" 40 @click="commonOpinion(index)"
38 v-if="ableOperation" 41 :disabled="!viewEdit|| item.show"
39 >常用意见</el-button 42 >常用意见</el-button
40 > 43 >
41 </el-form-item> 44 </el-form-item>
...@@ -57,8 +60,10 @@ ...@@ -57,8 +60,10 @@
57 </div> 60 </div>
58 </el-form> 61 </el-form>
59 </div> 62 </div>
60 <div class="submit_button" v-if="ableOperation"> 63 <div class="submit_button" v-if="viewEdit">
61 <el-button type="primary" @click="onSubmit()">保存</el-button> 64 <el-button type="primary" :disabled="shows" @click="onSubmit()"
65 >保存</el-button
66 >
62 </div> 67 </div>
63 </div> 68 </div>
64 <!-- <el-empty v-if="isNoData" description="暂无数据"></el-empty> --> 69 <!-- <el-empty v-if="isNoData" description="暂无数据"></el-empty> -->
...@@ -78,7 +83,7 @@ export default { ...@@ -78,7 +83,7 @@ export default {
78 currentindex: 0, 83 currentindex: 0,
79 bsmSlsq: "", 84 bsmSlsq: "",
80 refresh: 10, 85 refresh: 10,
81 ableOperation: false, 86 viewEdit: false,
82 bsmSlsq: this.$route.query.bsmSlsq, 87 bsmSlsq: this.$route.query.bsmSlsq,
83 bestepid: this.$route.query.bestepid, 88 bestepid: this.$route.query.bestepid,
84 propsParam: {}, 89 propsParam: {},
...@@ -87,6 +92,7 @@ export default { ...@@ -87,6 +92,7 @@ export default {
87 falg1: false, 92 falg1: false,
88 jdmc: "", 93 jdmc: "",
89 indexdqlc: 0, 94 indexdqlc: 0,
95 shows: false,
90 }; 96 };
91 }, 97 },
92 98
...@@ -102,8 +108,7 @@ export default { ...@@ -102,8 +108,7 @@ export default {
102 created() {}, 108 created() {},
103 mounted() { 109 mounted() {
104 this.propsParam = this.$attrs; 110 this.propsParam = this.$attrs;
105 this.ableOperation = this.$parent.currentSelectTab.ableOperation; 111 this.viewEdit = this.$parent.currentSelectTab.ableOperation;
106 // this.ableOperation = this.$parent.ableOperation;
107 this.getShList(); 112 this.getShList();
108 113
109 switch (this.$parent.dqhj) { 114 switch (this.$parent.dqhj) {
...@@ -128,7 +133,6 @@ export default { ...@@ -128,7 +133,6 @@ export default {
128 * @author: renchao 133 * @author: renchao
129 */ 134 */
130 getShList() { 135 getShList() {
131 let that = this;
132 this.$startLoading(); 136 this.$startLoading();
133 var formdata = new FormData(); 137 var formdata = new FormData();
134 formdata.append("bsmBusiness", this.propsParam.bsmBusiness); 138 formdata.append("bsmBusiness", this.propsParam.bsmBusiness);
...@@ -137,7 +141,12 @@ export default { ...@@ -137,7 +141,12 @@ export default {
137 getSpyjList(formdata).then((res) => { 141 getSpyjList(formdata).then((res) => {
138 this.$endLoading(); 142 this.$endLoading();
139 if (res.code === 200 && res.result) { 143 if (res.code === 200 && res.result) {
144 this.$nextTick(() => {
140 this.tableData = res.result; 145 this.tableData = res.result;
146 if (this.shows) {
147 this.shows = false;
148 }
149
141 var index = this.tableData.findIndex( 150 var index = this.tableData.findIndex(
142 (item) => item.jddm === this.$parent.dqhj 151 (item) => item.jddm === this.$parent.dqhj
143 ); 152 );
...@@ -165,6 +174,7 @@ export default { ...@@ -165,6 +174,7 @@ export default {
165 item.show = false; 174 item.show = false;
166 } 175 }
167 }); 176 });
177 });
168 } 178 }
169 }); 179 });
170 }, 180 },
...@@ -179,21 +189,29 @@ export default { ...@@ -179,21 +189,29 @@ export default {
179 * @author: renchao 189 * @author: renchao
180 */ 190 */
181 onSubmit() { 191 onSubmit() {
192
182 this.tableData.forEach((item, index) => { 193 this.tableData.forEach((item, index) => {
183 item["bsmBusiness"] = this.propsParam.bsmBusiness; 194 item["bsmBusiness"] = this.propsParam.bsmBusiness;
184 item["czjg"] = "1"; 195 item["czjg"] = "1";
185 }); 196 });
197 var index = this.tableData.findIndex(
198 (item) => item.shyj === null||item.shyj === ""
199 );
200 if(index==-1){
201 this.shows = true;
186 saveSpyjBySlsq(this.tableData).then((res) => { 202 saveSpyjBySlsq(this.tableData).then((res) => {
187 if (res.code === 200) { 203 if (res.code === 200) {
188 this.$message.success("保存成功"); 204 this.$message.success("保存成功");
189 this.refresh += 1; 205 this.refresh += 1;
206 this.getShList();
190 } else { 207 } else {
191 this.$message.error(res.message); 208 this.$message.error(res.message);
192 } 209 }
193 }); 210 });
194 // } else { 211 }else{
195 // return false; 212 this.$message.error("意见不能为空");
196 // } 213 }
214
197 }, 215 },
198 //打开常用意见列表弹窗 216 //打开常用意见列表弹窗
199 /** 217 /**
......