d1283421 by renchao@pashanhoo.com

Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev

2 parents 5cbf0dd7 ff0ec5d7
......@@ -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"
......@@ -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 disabled 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,
......@@ -102,7 +93,6 @@ export default {
watch: {
yjsqOptions: {
handler(val) {
console.log("val", val);
this.add(val);
},
deep: true,
......@@ -112,7 +102,6 @@ export default {
created() {},
mounted() {
this.propsParam = this.$attrs;
console.log("this.$parent.dqhj111111111111111", this.$parent.dqhj);
this.ableOperation = this.$parent.currentSelectTab.ableOperation;
// this.ableOperation = this.$parent.ableOperation;
this.getShList();
......@@ -141,7 +130,6 @@ export default {
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 +138,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: "初审" });
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;
}
}
console.log("this.tableData", this.tableData);
this.tableData.forEach((item) => {
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;
});
}
});
},
......@@ -172,17 +181,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("保存成功");
......