|
|
@@ -51,7 +51,7 @@
|
|
|
<print-table-btn @click="printTable" />
|
|
|
</template>
|
|
|
|
|
|
- <template slot="zcId" slot-scope="scope">
|
|
|
+ <template slot="zcbm" slot-scope="scope">
|
|
|
<span>{{ scope.row.zcmc }}</span>
|
|
|
</template>
|
|
|
|
|
|
@@ -77,6 +77,7 @@ import projectSelect from "@/components/project-select";
|
|
|
import {getToken} from "@/util/auth";
|
|
|
import {downloadXls} from "@/util/util";
|
|
|
import moment from "moment";
|
|
|
+import Decimal from "decimal.js";
|
|
|
|
|
|
|
|
|
export default window.$crudCommon({
|
|
|
@@ -107,9 +108,10 @@ export default window.$crudCommon({
|
|
|
let newOption = { ...this.option };
|
|
|
// 姓名下拉框,设置监听事件
|
|
|
newOption.column.forEach(item => {
|
|
|
- if (item.prop == "zcId") {
|
|
|
+ if (item.prop == "zcbm") {
|
|
|
item.change = ({ item }) => {
|
|
|
if (!!item) {
|
|
|
+ console.log(item)
|
|
|
this.currZcObj = item;
|
|
|
}
|
|
|
}
|
|
|
@@ -156,13 +158,13 @@ export default window.$crudCommon({
|
|
|
return;
|
|
|
}
|
|
|
this.currZcObj = {};
|
|
|
- this.option.column.forEach(item => {
|
|
|
- let yearAndMonth = this.selProject.xmkssj || new Date();
|
|
|
- if (item.prop == "zcId") {
|
|
|
- item.dicUrl = '/api/kd-scientific/zc/page';
|
|
|
- item.dicQuery.yearAndMonth = moment(yearAndMonth).format("yyyyMM");
|
|
|
- }
|
|
|
- });
|
|
|
+ // this.option.column.forEach(item => {
|
|
|
+ // let yearAndMonth = this.selProject.xmkssj || new Date();
|
|
|
+ // if (item.prop == "zcbm") {
|
|
|
+ // item.dicUrl = '/api/kd-scientific/zc/simple/list';
|
|
|
+ // item.dicQuery.yearAndMonth = moment(yearAndMonth).format("yyyyMM");
|
|
|
+ // }
|
|
|
+ // });
|
|
|
done();
|
|
|
},
|
|
|
getList() {
|
|
|
@@ -188,7 +190,7 @@ export default window.$crudCommon({
|
|
|
},
|
|
|
handleExport() {
|
|
|
exportBloByPost(`/api/kd-scientific/ys-zjfyycqdtfy/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
- downloadXls(res.data, `折旧费用与长期待摊费用.xlsx`);
|
|
|
+ downloadXls(res.data, `${this.selProject.xmmc}折旧费用与长期待摊费用.xlsx`);
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
|
@@ -197,7 +199,7 @@ export default window.$crudCommon({
|
|
|
*/
|
|
|
printTable(isLandscape) {
|
|
|
this.wideTableColumns = this.$refs.crud.columnOption;
|
|
|
- this.printTitle = `折旧费用与长期待摊费用`;
|
|
|
+ this.printTitle = `${this.selProject.xmmc}折旧费用与长期待摊费用`;
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.printWideTable.printTable(isLandscape);
|
|
|
})
|
|
|
@@ -207,6 +209,17 @@ export default window.$crudCommon({
|
|
|
// 模块路径
|
|
|
name: 'projectManage/zjfyycqdtfyCost',
|
|
|
res: ({ data }) => {
|
|
|
+ data.records = data.records.map(item => {
|
|
|
+ item.zcmc = item.zcEntity.zcmc;
|
|
|
+ item.zcbm = item.zcEntity.zcbm;
|
|
|
+ item.yzje = (item.zcEntity.yzje || 0).toFixed(2);
|
|
|
+ item.cqdtfyysje = (item.cqdtfyysje || 0).toFixed(2);
|
|
|
+
|
|
|
+ let zzscD = new Decimal(item.zzsc || 0); // 工作时长
|
|
|
+ let yzjeD = new Decimal(item.yzje || 0);
|
|
|
+ item.yshj = zzscD.mul(yzjeD).toFixed(2);
|
|
|
+ return item;
|
|
|
+ });
|
|
|
return data;
|
|
|
},
|
|
|
});
|