|
|
@@ -5,7 +5,18 @@
|
|
|
<avue-form :option="logoOption" v-model="logoForm" style="width: 320px; margin: 0;" @submit="handleSubmitLogo"></avue-form>
|
|
|
</basic-card>
|
|
|
|
|
|
- <year-month-select v-model="yearAndMonth" :showMonth="false" style="width: 120px;"></year-month-select>
|
|
|
+ <!-- <year-month-select v-model="yearAndMonth" :showMonth="false" style="width: 120px;"></year-month-select> -->
|
|
|
+ <div style="padding-left: 16px;">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="yearAndMonth"
|
|
|
+ type="year"
|
|
|
+ placeholder="选择年"
|
|
|
+ value-format="yyyy"
|
|
|
+ :clearable="false"
|
|
|
+ style="margin-bottom: 6px;"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </div>
|
|
|
|
|
|
<basic-card title="企业基础信息表">
|
|
|
<comp-info-table :yearAndMonth="yearAndMonth"></comp-info-table>
|
|
|
@@ -19,11 +30,11 @@
|
|
|
</basic-card>
|
|
|
|
|
|
<basic-card title="高企证书上传">
|
|
|
- <avue-form :option="picOption" v-model="picForm" style="width: 320px; margin: 0;"></avue-form>
|
|
|
+ <avue-form :option="picOption" v-model="picForm" style="width: 320px; margin: 0;" @submit="handleHighTecChange"></avue-form>
|
|
|
</basic-card>
|
|
|
|
|
|
<basic-card title="出勤时间设置">
|
|
|
- <avue-form :option="attendOption" v-model="attendForm" style="width: 320px; margin: 0;"></avue-form>
|
|
|
+ <avue-form :option="attendOption" v-model="attendForm" @submit="handleSubmitAtten" style="width: 320px; margin: 0;"></avue-form>
|
|
|
</basic-card>
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
@@ -31,6 +42,7 @@
|
|
|
<script>
|
|
|
import {mapGetters} from "vuex";
|
|
|
import { getDetail as getTenantDetail, update as updateTenant } from '@/api/system/tenant';
|
|
|
+import { getAttenDetail, settingAttenInfo } from "@/api/basicResource/compInfoSetting";
|
|
|
import YearMonthSelect from "@/components/year-month-select";
|
|
|
import basicCard from "@/components/basic-card";
|
|
|
import compInfoTable from "./components/comp-info-table.vue";
|
|
|
@@ -76,7 +88,7 @@ export default {
|
|
|
},
|
|
|
|
|
|
picForm: {
|
|
|
- attachment: [],
|
|
|
+ highTechUrl: [],
|
|
|
},
|
|
|
picOption: {
|
|
|
submitText: '保存',
|
|
|
@@ -84,7 +96,7 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
label: "高企证书",
|
|
|
- prop: "attachment",
|
|
|
+ prop: "highTechUrl",
|
|
|
type: "upload",
|
|
|
listType: "picture-card",
|
|
|
span: 24,
|
|
|
@@ -93,6 +105,7 @@ export default {
|
|
|
limit: 5,
|
|
|
propsHttp: {
|
|
|
res: "data",
|
|
|
+ url: 'link',
|
|
|
},
|
|
|
tip: "请上传当前年度的高企证书",
|
|
|
action: '/api/kd-resource/oss/endpoint/put-file',
|
|
|
@@ -107,7 +120,7 @@ export default {
|
|
|
column: [
|
|
|
{
|
|
|
label: '作息时间',
|
|
|
- prop: 'num',
|
|
|
+ prop: 'workHours',
|
|
|
type: 'number',
|
|
|
span: 24,
|
|
|
min: 0,
|
|
|
@@ -120,8 +133,14 @@ export default {
|
|
|
computed: {
|
|
|
...mapGetters(["userInfo"]),
|
|
|
},
|
|
|
+ watch: {
|
|
|
+ yearAndMonth(newVal) {
|
|
|
+ console.log(newVal)
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.getTenantDetailFunc(this.userInfo.tenant_id);
|
|
|
+ this.getAttenDetailFunc(this.yearAndMonth)
|
|
|
},
|
|
|
methods: {
|
|
|
getTenantDetailFunc(tenantId) {
|
|
|
@@ -141,7 +160,39 @@ export default {
|
|
|
}).catch(() => {
|
|
|
done();
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ getAttenDetailFunc(yearAndMonth) {
|
|
|
+ getAttenDetail(yearAndMonth).then(({ data }) => {
|
|
|
+ if (data.code == 200 && Object.keys(data.data).length) {
|
|
|
+ const _data = data.data;
|
|
|
+ this.picForm = { id: _data.id, yearAndMonth: _data.yearAndMonth, highTechUrl: _data.highTechUrl ? _data.highTechUrl.split(',') : [] };
|
|
|
+ this.attendForm = { id: _data.id, yearAndMonth: _data.yearAndMonth, workHours: _data.workHours };
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleHighTecChange(form, done) {
|
|
|
+ const params = { ...this.picForm, yearAndMonth: this.yearAndMonth, highTechUrl: this.picForm.highTechUrl.join(',') };
|
|
|
+ settingAttenInfo(params).then(({ data }) => {
|
|
|
+ done();
|
|
|
+ if (data.code == 200) {
|
|
|
+ this.$message.success('保存成功!');
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ done();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleSubmitAtten(form, done) {
|
|
|
+ const params = { ...this.attendForm, yearAndMonth: this.yearAndMonth };
|
|
|
+ settingAttenInfo(params).then(({ data }) => {
|
|
|
+ done();
|
|
|
+ if (data.code == 200) {
|
|
|
+ this.$message.success('保存成功!');
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ done();
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|