ed22ab48 by xiaomiao

--no commit message

1 parent dd9c3579
...@@ -77,3 +77,14 @@ export function getNewDate (type = 1) { ...@@ -77,3 +77,14 @@ export function getNewDate (type = 1) {
77 return `${year}${month}${day}${hours}${minutes}${seconds}秒` 77 return `${year}${month}${day}${hours}${minutes}${seconds}秒`
78 } 78 }
79 } 79 }
80
81 export function getNewDatesh () {
82 const now = new Date();
83 const year = now.getFullYear();
84 const month = String(now.getMonth() + 1).padStart(2, '0');
85 const day = String(now.getDate()).padStart(2, '0');
86 const hours = String(now.getHours()).padStart(2, '0');
87 const minutes = String(now.getMinutes()).padStart(2, '0');
88 const seconds = String(now.getSeconds()).padStart(2, '0');
89 return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
90 }
......
...@@ -18,14 +18,14 @@ ...@@ -18,14 +18,14 @@
18 > 18 >
19 <div class="spyj_form"> 19 <div class="spyj_form">
20 <div class="item_left"> 20 <div class="item_left">
21 <div class="right">意见</div> 21 <div class="right">{{ item.jdmc }}意见</div>
22 </div> 22 </div>
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 label-width="0" class="opinion_item">
27 <el-input 27 <el-input
28 :disabled="!ableOperation&&item.show" 28 :disabled="!ableOperation || item.show"
29 type="textarea" 29 type="textarea"
30 :rows="4" 30 :rows="4"
31 class="opinion" 31 class="opinion"
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
35 <el-button 35 <el-button
36 class="opinion_btn" 36 class="opinion_btn"
37 @click="commonOpinion(index)" 37 @click="commonOpinion(index)"
38 v-if="ableOperation" 38 v-if="ableOperation && !item.show"
39 >常用意见</el-button 39 >常用意见</el-button
40 > 40 >
41 </el-form-item> 41 </el-form-item>
...@@ -44,23 +44,12 @@ ...@@ -44,23 +44,12 @@
44 <el-row> 44 <el-row>
45 <el-col :span="16"> 45 <el-col :span="16">
46 <el-form-item label="审查人"> 46 <el-form-item label="审查人">
47 <el-input 47 {{ item.shryxm }}
48 :disabled="!ableOperation"
49 v-model="item.shryxm"
50 ></el-input>
51 </el-form-item> 48 </el-form-item>
52 </el-col> 49 </el-col>
53 <el-col :span="8"> 50 <el-col :span="8">
54 <el-form-item class="sjxzq" label="审核时间"> 51 <el-form-item label="审核时间" :key="refresh">
55 <el-date-picker 52 {{ item.shjssj }}
56 :disabled="!ableOperation"
57 v-model="item.shkssj"
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> 53 </el-form-item>
65 </el-col> 54 </el-col>
66 </el-row> 55 </el-row>
...@@ -78,6 +67,7 @@ ...@@ -78,6 +67,7 @@
78 <script> 67 <script>
79 import { saveSpyjBySlsq, getSpyjList } from "@/api/opinion.js"; 68 import { saveSpyjBySlsq, getSpyjList } from "@/api/opinion.js";
80 import { mapGetters } from "vuex"; 69 import { mapGetters } from "vuex";
70 import { getNewDatesh } from "@/utils/util";
81 export default { 71 export default {
82 computed: { 72 computed: {
83 ...mapGetters(["userData", "yjsqOptions", "userInfo"]), 73 ...mapGetters(["userData", "yjsqOptions", "userInfo"]),
...@@ -87,6 +77,7 @@ export default { ...@@ -87,6 +77,7 @@ export default {
87 isNoData: false, 77 isNoData: false,
88 currentindex: 0, 78 currentindex: 0,
89 bsmSlsq: "", 79 bsmSlsq: "",
80 refresh: 10,
90 ableOperation: false, 81 ableOperation: false,
91 bsmSlsq: this.$route.query.bsmSlsq, 82 bsmSlsq: this.$route.query.bsmSlsq,
92 bestepid: this.$route.query.bestepid, 83 bestepid: this.$route.query.bestepid,
...@@ -112,7 +103,7 @@ export default { ...@@ -112,7 +103,7 @@ export default {
112 created() {}, 103 created() {},
113 mounted() { 104 mounted() {
114 this.propsParam = this.$attrs; 105 this.propsParam = this.$attrs;
115 console.log("this.$parent.dqhj111111111111111", this.$parent.dqhj); 106 console.log("this.$parent.dqhj", this.$parent.dqhj);
116 this.ableOperation = this.$parent.currentSelectTab.ableOperation; 107 this.ableOperation = this.$parent.currentSelectTab.ableOperation;
117 // this.ableOperation = this.$parent.ableOperation; 108 // this.ableOperation = this.$parent.ableOperation;
118 this.getShList(); 109 this.getShList();
...@@ -139,9 +130,7 @@ export default { ...@@ -139,9 +130,7 @@ export default {
139 * @author: renchao 130 * @author: renchao
140 */ 131 */
141 getShList() { 132 getShList() {
142 let that = this;
143 this.$startLoading(); 133 this.$startLoading();
144 console.log(this.userInfo);
145 var formdata = new FormData(); 134 var formdata = new FormData();
146 formdata.append("bsmBusiness", this.propsParam.bsmBusiness); 135 formdata.append("bsmBusiness", this.propsParam.bsmBusiness);
147 formdata.append("bestepid", this.$route.query.bestepid); 136 formdata.append("bestepid", this.$route.query.bestepid);
...@@ -150,11 +139,32 @@ export default { ...@@ -150,11 +139,32 @@ export default {
150 this.$endLoading(); 139 this.$endLoading();
151 if (res.code === 200 && res.result) { 140 if (res.code === 200 && res.result) {
152 this.tableData = res.result; 141 this.tableData = res.result;
153 if (this.tableData.length == 0) { 142 if (this.tableData.length == 0 && this.jdmc == "初审") {
154 console.log(0); 143 this.tableData.push({ jdmc: "初审",jddm:"cs",sxh: 1 });
155 this.tableData.push({ jdmc: "初审" }); 144 } else if (
145 this.tableData.length == 1 &&
146 this.jdmc == "复审"
147 ) {
148 this.tableData.push({ jdmc: "复审",jddm:"fs" ,sxh: 2 });
149 } else if (
150 this.tableData.length == 2&&
151 this.jdmc == "核定"
152 ) {
153 this.tableData.push({ jdmc: "核定",jddm:"hd",sxh: 3 });
156 } 154 }
157 console.log("this.tableData", this.tableData); 155
156 if(this.tableData){
157 this.tableData.forEach((item,index) => {
158 item.show = true;
159 if(this.$parent.dqhj==item.jddm){
160 item.show = false;
161 }
162 item.shjssj = getNewDatesh();
163 item.shkssj = getNewDatesh();
164 item["shryxm"] = this.userInfo.name;
165 item["userid"] = this.userInfo.id;
166 });
167 }
158 } 168 }
159 }); 169 });
160 }, 170 },
...@@ -172,17 +182,8 @@ export default { ...@@ -172,17 +182,8 @@ export default {
172 this.tableData.forEach((item, index) => { 182 this.tableData.forEach((item, index) => {
173 item["bsmBusiness"] = this.propsParam.bsmBusiness; 183 item["bsmBusiness"] = this.propsParam.bsmBusiness;
174 item["stepid"] = this.$route.query.bestepid; 184 item["stepid"] = this.$route.query.bestepid;
175 item["shryxm"] = this.userInfo.name;
176 item["userid"] = this.userInfo.id;
177 item["shjssj"] = item.shkssj;
178 item["czjg"] = "1"; 185 item["czjg"] = "1";
179 item["jddm"] = "cs"
180 item["jdmc"] = "初审"
181 item["sxh"] = "1"
182
183
184 }); 186 });
185 console.log("this.tableData", this.tableData);
186 saveSpyjBySlsq(this.tableData).then((res) => { 187 saveSpyjBySlsq(this.tableData).then((res) => {
187 if (res.code === 200) { 188 if (res.code === 200) {
188 this.$message.success("保存成功"); 189 this.$message.success("保存成功");
......