ed22ab48 by xiaomiao

--no commit message

1 parent dd9c3579
......@@ -77,3 +77,14 @@ export function getNewDate (type = 1) {
return `${year}${month}${day}${hours}${minutes}${seconds}秒`
}
}
export function getNewDatesh () {
const now = new Date();
const year = now.getFullYear();
const month = String(now.getMonth() + 1).padStart(2, '0');
const day = String(now.getDate()).padStart(2, '0');
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`
}
......
......@@ -18,14 +18,14 @@
>
<div class="spyj_form">
<div class="item_left">
<div class="right">意见</div>
<div class="right">{{ item.jdmc }}意见</div>
</div>
<div class="item_right">
<el-row>
<el-col :span="24">
<el-form-item label-width="0" class="opinion_item">
<el-input
:disabled="!ableOperation&&item.show"
:disabled="!ableOperation || item.show"
type="textarea"
:rows="4"
class="opinion"
......@@ -35,7 +35,7 @@
<el-button
class="opinion_btn"
@click="commonOpinion(index)"
v-if="ableOperation"
v-if="ableOperation && !item.show"
>常用意见</el-button
>
</el-form-item>
......@@ -44,23 +44,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.shkssj"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd HH:mm:ss"
format="yyyy-MM-dd"
>
</el-date-picker>
<el-form-item label="审核时间" :key="refresh">
{{ item.shjssj }}
</el-form-item>
</el-col>
</el-row>
......@@ -78,6 +67,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,6 +77,7 @@ export default {
isNoData: false,
currentindex: 0,
bsmSlsq: "",
refresh: 10,
ableOperation: false,
bsmSlsq: this.$route.query.bsmSlsq,
bestepid: this.$route.query.bestepid,
......@@ -112,7 +103,7 @@ export default {
created() {},
mounted() {
this.propsParam = this.$attrs;
console.log("this.$parent.dqhj111111111111111", this.$parent.dqhj);
console.log("this.$parent.dqhj", this.$parent.dqhj);
this.ableOperation = this.$parent.currentSelectTab.ableOperation;
// this.ableOperation = this.$parent.ableOperation;
this.getShList();
......@@ -139,9 +130,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);
......@@ -150,11 +139,32 @@ export default {
this.$endLoading();
if (res.code === 200 && res.result) {
this.tableData = res.result;
if (this.tableData.length == 0) {
console.log(0);
this.tableData.push({ jdmc: "初审" });
if (this.tableData.length == 0 && this.jdmc == "初审") {
this.tableData.push({ jdmc: "初审",jddm:"cs",sxh: 1 });
} else if (
this.tableData.length == 1 &&
this.jdmc == "复审"
) {
this.tableData.push({ jdmc: "复审",jddm:"fs" ,sxh: 2 });
} else if (
this.tableData.length == 2&&
this.jdmc == "核定"
) {
this.tableData.push({ jdmc: "核定",jddm:"hd",sxh: 3 });
}
if(this.tableData){
this.tableData.forEach((item,index) => {
item.show = true;
if(this.$parent.dqhj==item.jddm){
item.show = false;
}
item.shjssj = getNewDatesh();
item.shkssj = getNewDatesh();
item["shryxm"] = this.userInfo.name;
item["userid"] = this.userInfo.id;
});
}
console.log("this.tableData", this.tableData);
}
});
},
......@@ -172,17 +182,8 @@ export default {
this.tableData.forEach((item, index) => {
item["bsmBusiness"] = this.propsParam.bsmBusiness;
item["stepid"] = this.$route.query.bestepid;
item["shryxm"] = this.userInfo.name;
item["userid"] = this.userInfo.id;
item["shjssj"] = item.shkssj;
item["czjg"] = "1";
item["jddm"] = "cs"
item["jdmc"] = "初审"
item["sxh"] = "1"
});
console.log("this.tableData", this.tableData);
saveSpyjBySlsq(this.tableData).then((res) => {
if (res.code === 200) {
this.$message.success("保存成功");
......