|
|
@@ -31,10 +31,6 @@
|
|
|
<span style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目申请单位
|
|
|
</td>
|
|
|
<td colspan="3">
|
|
|
- <!-- <el-input
|
|
|
- v-model="formData.xmsqdw"
|
|
|
- placeholder="请选择项目申请单位"
|
|
|
- /> -->
|
|
|
<second-unit-cascader
|
|
|
v-model="formData.xmsqdwid"
|
|
|
:yearAndMonth="yearAndMonth"
|
|
|
@@ -78,13 +74,7 @@
|
|
|
<span style="color: red; padding-right: 3px; font-size: 16px;">*</span>项目负责人
|
|
|
</td>
|
|
|
<td class="doc-input">
|
|
|
- <avue-select
|
|
|
- v-model="formData.xmfzr"
|
|
|
- placeholder="请选择"
|
|
|
- :dic="fzrList"
|
|
|
- style="width: 100%"
|
|
|
- :disabled="isEdit"
|
|
|
- ></avue-select>
|
|
|
+ <person-select v-model="formData.xmfzr" :yearAndMonth="xmStartDateYearAndMonth" valueKey="id" :disabled="isEdit" style="width: 100%" />
|
|
|
</td>
|
|
|
<td class="doc-label">
|
|
|
<span style="color: red; padding-right: 3px; font-size: 16px;">*</span>研究类型
|
|
|
@@ -197,6 +187,7 @@
|
|
|
|
|
|
<script>
|
|
|
import secondUnitCascader from "@/components/second-unit-cascader";
|
|
|
+import personSelect from "@/components/person-select";
|
|
|
import { getDictionary } from "@/api/system/dictbiz";
|
|
|
import { getList as getTechnicanRosterList } from "@/api/basicResource/technicianRoster";
|
|
|
import { add, update, getDetail } from "@/api/projectManage/projectList";
|
|
|
@@ -208,6 +199,7 @@ import { getDetail as getTenantDetail } from '@/api/system/tenant';
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
+ personSelect,
|
|
|
secondUnitCascader
|
|
|
},
|
|
|
props: {
|
|
|
@@ -247,13 +239,9 @@ export default {
|
|
|
watch: {
|
|
|
'formData.xmkssj'(newVal) {
|
|
|
this.yearList = this.getDateRangeYear(newVal, this.formData.xmjssj);
|
|
|
- if (!newVal) {
|
|
|
- return;
|
|
|
- }
|
|
|
- let cMonth = moment(newVal).format('yyyyMM');
|
|
|
+ let cMonth = newVal ? moment(newVal).format('yyyyMM') : '';
|
|
|
if (cMonth != this.xmStartDateYearAndMonth) {
|
|
|
this.xmStartDateYearAndMonth = cMonth;
|
|
|
- this.getTechnicanRosterListFunc(cMonth)
|
|
|
}
|
|
|
},
|
|
|
'formData.xmjssj'(newVal) {
|
|
|
@@ -359,11 +347,12 @@ export default {
|
|
|
return tit;
|
|
|
},
|
|
|
getXmfzrName() {
|
|
|
- if (this.formData.xmfzr) {
|
|
|
- let fzrObj = this.fzrList.find(item => item.value == this.formData.xmfzr);
|
|
|
- return fzrObj ? fzrObj.label : "";
|
|
|
- }
|
|
|
- return;
|
|
|
+ // if (this.formData.xmfzr) {
|
|
|
+ // let fzrObj = this.fzrList.find(item => item.value == this.formData.xmfzr);
|
|
|
+ // return fzrObj ? fzrObj.label : "";
|
|
|
+ // }
|
|
|
+
|
|
|
+ return this.formData.xmfzrxm;
|
|
|
},
|
|
|
getXmDateRange() {
|
|
|
if (this.formData.xmkssj && this.formData.xmjssj) {
|
|
|
@@ -406,7 +395,7 @@ export default {
|
|
|
this.loading = false;
|
|
|
if (data.code == 200) {
|
|
|
let beanData = { ...data.data };
|
|
|
- beanData.xmfzr = String(beanData.xmfzr || '');
|
|
|
+ beanData.xmfzr = beanData.xmfzr.toString();
|
|
|
beanData.yqcgxs = beanData.yqcgxs.split(",");
|
|
|
beanData.xmjsjjmb = beanData.xmjsjjmb.split(",");
|
|
|
beanData.lxpw = beanData.lxpw ? JSON.parse(beanData.lxpw) : [];
|
|
|
@@ -468,19 +457,19 @@ export default {
|
|
|
/**
|
|
|
* 获取人员花名册
|
|
|
*/
|
|
|
- getTechnicanRosterListFunc(yearAndMonth) {
|
|
|
- if (!yearAndMonth) {
|
|
|
- this.fzrList = [];
|
|
|
- return;
|
|
|
- }
|
|
|
- getTechnicanRosterList(1, 99999, { yearAndMonth }).then(res => {
|
|
|
- if (res.data.success) {
|
|
|
- this.fzrList = res.data.data.records.map(item => {
|
|
|
- return { label: item.name, value: item.id };
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
+ // getTechnicanRosterListFunc(yearAndMonth) {
|
|
|
+ // if (!yearAndMonth) {
|
|
|
+ // this.fzrList = [];
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
+ // getTechnicanRosterList(1, 99999, { yearAndMonth }).then(res => {
|
|
|
+ // if (res.data.success) {
|
|
|
+ // this.fzrList = res.data.data.records.map(item => {
|
|
|
+ // return { label: item.name, value: item.id };
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // },
|
|
|
validForm() {
|
|
|
let errorText = '';
|
|
|
if (!this.formData.xmmc) {
|