|
@@ -85,11 +85,15 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template slot="xmIdForm">
|
|
<template slot="xmIdForm">
|
|
|
- <project-select v-model="form.xmId" multiple :params="{ yearAndMonth: params.yearAndMonth }"></project-select>
|
|
|
|
|
|
|
+ <project-select v-model="form.xmId" :params="{ yearAndMonth: params.yearAndMonth }"></project-select>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<template slot="assetIdForm">
|
|
<template slot="assetIdForm">
|
|
|
- <asset-select v-model="form.assetId" :params="{ yearAndMonth: params.yearAndMonth, zclb: '仪器设备' }"></asset-select>
|
|
|
|
|
|
|
+ <asset-select
|
|
|
|
|
+ v-model="form.assetId"
|
|
|
|
|
+ :params="{ yearAndMonth: params.yearAndMonth, zclb: '仪器设备' }"
|
|
|
|
|
+ @change="handleAssetChange"
|
|
|
|
|
+ ></asset-select>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
</avue-crud>
|
|
</avue-crud>
|
|
@@ -158,14 +162,14 @@ export default window.$crudCommon({
|
|
|
methods: {
|
|
methods: {
|
|
|
handleImport() {
|
|
handleImport() {
|
|
|
let excelParams = { yearAndMonth: this.params.yearAndMonth };
|
|
let excelParams = { yearAndMonth: this.params.yearAndMonth };
|
|
|
- this.$refs.uploadExcelDialog.open('/api/kd-scientific/keyanyiqishebeimingxibiao/import', excelParams);
|
|
|
|
|
|
|
+ this.$refs.uploadExcelDialog.open('/api/kd-scientific/asset/keyanyiqishebeimingxibiao/import', excelParams);
|
|
|
},
|
|
},
|
|
|
uploadAfter() {
|
|
uploadAfter() {
|
|
|
this.page.currentPage = 1;
|
|
this.page.currentPage = 1;
|
|
|
this.getList(this.page);
|
|
this.getList(this.page);
|
|
|
},
|
|
},
|
|
|
handleExport() {
|
|
handleExport() {
|
|
|
- exportBloByPost(`/api/kd-scientific/keyanyiqishebeimingxibiao/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
|
|
|
|
+ exportBloByPost(`/api/kd-scientific/asset/keyanyiqishebeimingxibiao/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
downloadXls(res.data, `科研仪器设备明细表${this.params.yearAndMonth}.xlsx`);
|
|
downloadXls(res.data, `科研仪器设备明细表${this.params.yearAndMonth}.xlsx`);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -190,7 +194,14 @@ export default window.$crudCommon({
|
|
|
this.getList(this.page);
|
|
this.getList(this.page);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ handleAssetChange({ zcbm }) {
|
|
|
|
|
+ this.form = { ...this.form, zcbm };
|
|
|
|
|
+ },
|
|
|
|
|
+ getFormData() {
|
|
|
|
|
+ const { xmId, assetId, zcbm } = this.form;
|
|
|
|
|
+ return { xmId, assetId, zcbm, yearAndMonth: this.params.yearAndMonth };
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
}, {
|
|
}, {
|
|
|
// 模块路径
|
|
// 模块路径
|