|
@@ -44,8 +44,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template slot="xmIdForm">
|
|
|
|
|
- <project-select placeholder="请选择项目名称" v-model="form.xmId" :params="{ yearAndMonth: params.yearAndMonth }" @change="handleProjectChange"></project-select>
|
|
|
|
|
|
|
+ <template slot="wwIdForm">
|
|
|
|
|
+ <ww-project-cascader v-model="form.wwId" :params="{ yearAndMonth: params.yearAndMonth }"></ww-project-cascader>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
</avue-crud>
|
|
</avue-crud>
|
|
@@ -64,10 +64,9 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
-import { getList as getOutsourcingList } from "@/api/projectManage/outsourcingDoc";
|
|
|
|
|
import YearMonthSelect from "@/components/year-month-select";
|
|
import YearMonthSelect from "@/components/year-month-select";
|
|
|
import UploadExcelDialog from "@/components/upload-excel-dialog";
|
|
import UploadExcelDialog from "@/components/upload-excel-dialog";
|
|
|
-import projectSelect from "@/components/project-select";
|
|
|
|
|
|
|
+import wwProjectCascader from "./components/ww-project-cascader.vue";
|
|
|
import {exportBlob} from "@/api/common";
|
|
import {exportBlob} from "@/api/common";
|
|
|
import {getToken} from "@/util/auth";
|
|
import {getToken} from "@/util/auth";
|
|
|
import {downloadXls} from "@/util/util";
|
|
import {downloadXls} from "@/util/util";
|
|
@@ -77,8 +76,8 @@ import moment from "moment";
|
|
|
export default window.$crudCommon({
|
|
export default window.$crudCommon({
|
|
|
components: {
|
|
components: {
|
|
|
YearMonthSelect,
|
|
YearMonthSelect,
|
|
|
- projectSelect,
|
|
|
|
|
UploadExcelDialog,
|
|
UploadExcelDialog,
|
|
|
|
|
+ wwProjectCascader
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -102,10 +101,6 @@ export default window.$crudCommon({
|
|
|
this.page.currentPage = 1;
|
|
this.page.currentPage = 1;
|
|
|
this.getList(this.page);
|
|
this.getList(this.page);
|
|
|
},
|
|
},
|
|
|
- 'form.xmId'(newVal) {
|
|
|
|
|
- this.form.stfqcId = '';
|
|
|
|
|
- this.getOutsourcingListFunc(newVal);
|
|
|
|
|
- }
|
|
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
permissionList() {
|
|
permissionList() {
|
|
@@ -117,31 +112,19 @@ export default window.$crudCommon({
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- loadData() {},
|
|
|
|
|
- getOutsourcingListFunc(xmId) {
|
|
|
|
|
- if (!xmId) {
|
|
|
|
|
- return;
|
|
|
|
|
- }
|
|
|
|
|
- getOutsourcingList(1, 99999, { xmId, yearAndMonth: moment(this.params.yearAndMonth).format('YYYY') }).then(res => {
|
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
|
- const column = this.findObject(this.option.column, "stfqcId");
|
|
|
|
|
- column.dicData = res.data.data.records;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
getFormData() {
|
|
getFormData() {
|
|
|
- return { ...this.form, yearAndMonth: this.params.yearAndMonth };
|
|
|
|
|
|
|
+ return { ...this.form, wwId: this.form.wwId[1], yearAndMonth: this.params.yearAndMonth };
|
|
|
},
|
|
},
|
|
|
handleImport() {
|
|
handleImport() {
|
|
|
let excelParams = { yearAndMonth: this.params.yearAndMonth };
|
|
let excelParams = { yearAndMonth: this.params.yearAndMonth };
|
|
|
- this.$refs.uploadExcelDialog.open('/api/kd-scientific/direct-cost/import', excelParams);
|
|
|
|
|
|
|
+ this.$refs.uploadExcelDialog.open('/api/kd-scientific/xm/wwxm/cost/import', excelParams);
|
|
|
},
|
|
},
|
|
|
uploadAfter() {
|
|
uploadAfter() {
|
|
|
this.page.currentPage = 1;
|
|
this.page.currentPage = 1;
|
|
|
this.getList(this.page);
|
|
this.getList(this.page);
|
|
|
},
|
|
},
|
|
|
handleExport() {
|
|
handleExport() {
|
|
|
- exportBlob(`/api/kd-scientific/direct-cost/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
|
|
|
|
+ exportBlob(`/api/kd-scientific/xm/wwxm/cost/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {
|
|
|
downloadXls(res.data, `${this.params.yearAndMonth}委托外部研发费用-基本信息台账.xlsx`);
|
|
downloadXls(res.data, `${this.params.yearAndMonth}委托外部研发费用-基本信息台账.xlsx`);
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -161,6 +144,12 @@ export default window.$crudCommon({
|
|
|
// 模块路径
|
|
// 模块路径
|
|
|
name: 'yfCostManage/basicDataSetting/wwCostLedger',
|
|
name: 'yfCostManage/basicDataSetting/wwCostLedger',
|
|
|
res: ({ data }) => {
|
|
res: ({ data }) => {
|
|
|
|
|
+ data.records = data.records.map(item => {
|
|
|
|
|
+ if (item.wwId && item.xmId) {
|
|
|
|
|
+ item.wwId = [item.xmId, item.wwId];
|
|
|
|
|
+ }
|
|
|
|
|
+ return item;
|
|
|
|
|
+ })
|
|
|
return data;
|
|
return data;
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|