3b36c139 by renchao@pashanhoo.com

style:材料明细

1 parent 9d41dfe3
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-28 11:37:31
* @LastEditTime: 2023-07-31 13:59:45
-->
<template>
<div class="clxx">
......@@ -253,7 +253,8 @@
//查看明细
viewDetail () {
this.$popupDialog("查看明细", "workflow/components/dialog/clxxDetailDialog", {
data: this.tableData
data: this.tableData,
unitData: this.$parent.unitData
}, "60%")
},
//设置tableData
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-28 09:35:42
* @LastEditTime: 2023-07-31 14:27:07
-->
<template>
<div class="clmlmx-box">
<div class="title">申请材料目录</div>
<lb-table :column="column" :key="key" :heightNumSetting="true" :pagination="false" :data="formData.data">
<lb-table :column="column" :key="key" :heightNumSetting="true" :calcHeight="600" :pagination="false" :data="tableData">
</lb-table>
<div class="text-center">
<el-button @click="$popupCacel">取消</el-button>
......@@ -14,6 +14,7 @@
</div>
</template>
<script>
import Vue from 'vue'
import store from '@/store/index.js'
import { InitClml, saveClml, deleteSjClml, moveClml } from "@/api/clxx.js";
export default {
......@@ -38,21 +39,21 @@
label: "是否必选",
width: "80",
render: (h, scope) => {
if (scope.row.sfxjcl === "1") {
if (scope.row.isrequired === "1") {
return (
<div>
<span></span>
<span></span>
</div>
);
}
else {
return (
<div>
<span></span>
<span></span>
</div>
);
)
}
}
},
},
{
prop: "sjmc",
......@@ -67,13 +68,23 @@
<div>
<span>{this.dicStatus(scope.row.sjlx, "A40")}</span>
</div>
);
},
)
}
},
{
prop: "sjsl",
label: "份数",
width: "50"
width: "50",
render: (h, scope) => {
return (
<div>
{
scope.row.sjsl ?
<span>{scope.row.sjsl}</span> : 1
}
</div>
)
}
},
{
prop: "smzt",
......@@ -147,11 +158,16 @@
tableData: []
}
},
created () {
console.log(this.formData.data, 'formData');
watch: {
'formData.data': {
handler: function (val, oldVal) {
this.tableData = val
},
immediate: true,
deep: true
}
},
methods: {
// 材料目录明细初始化
/**
* @description: 材料目录明细初始化
* @author: renchao
......@@ -160,24 +176,24 @@
return new Promise(resolve => {
this.unitData = this.$parent.unitData;
var formdata = new FormData();
formdata.append("bsmSldy", this.unitData[0]?.bsmSldy);
formdata.append("bsmSlsq", this.$route.query.bsmSlsq);
formdata.append("bsmSldy", this.formData.unitData[0]?.bsmSldy);
formdata.append("bsmSlsq", Vue.prototype.$currentRoute.query.bsmSlsq);
formdata.append("clfl", 2);
InitClml(formdata).then((res) => {
if (res.code == 200) {
resolve(res.code)
if (res.result && res.result.length > 0) {
this.data = res.result;
this.tableData = res.result;
} else {
this.data = []
this.tableData = []
}
console.log(this.tableData, 'this.tableData');
} else {
this.$message.error(res.message)
}
})
})
},
// 上移
/**
* @description: 上移
* @param {*} index
......@@ -199,14 +215,12 @@
message: '上移成功',
type: 'success'
})
this.$parent.setTableData(this.data)
}
} else {
this.$message.error(res.message);
}
})
},
// 下移
/**
* @description: 下移
* @param {*} index
......@@ -256,7 +270,6 @@
message: "删除成功",
type: "success",
})
// this.$parent.setTableData(this.data)
}
}
})
......@@ -293,7 +306,6 @@
@import "~@/styles/mixin.scss";
.clmlmx-box {
margin: 0 auto;
.title {
text-align: center;
height: 60px;
......