|
@@ -38,10 +38,10 @@
|
|
|
padding: 0 12px;
|
|
|
}
|
|
|
.layout-container {
|
|
|
- margin-top: 0;
|
|
|
+ margin-top: 0!important;
|
|
|
}
|
|
|
> div:not(.group__title,:last-child) {
|
|
|
- border-bottom: 1px solid rgba(255, 151, 151, 0.3);
|
|
|
+ border-bottom: 1px solid rgba(255, 151, 151, 0.2)!important;
|
|
|
}
|
|
|
}
|
|
|
.btnbox {
|
|
@@ -65,20 +65,20 @@
|
|
|
|
|
|
<script>
|
|
|
// components
|
|
|
-import CSelect from './components/CSelect.vue';
|
|
|
-import CInput from './components/CInput.vue';
|
|
|
-import CFiles from './components/CFiles.vue';
|
|
|
-import CFlowPath from './components/CFlowPath.vue';
|
|
|
-import CDate from './components/CDate.vue';
|
|
|
-import Peers from './components/Peers.vue';
|
|
|
-
|
|
|
-import bizCont from '@/components/jsapi/biz.contact.complexPicker'
|
|
|
-
|
|
|
-// utils
|
|
|
-import { formatTime } from '@/utils/formatTime';
|
|
|
+import bizCont from '@/components/jsapi/biz.contact.complexPicker' // useless
|
|
|
|
|
|
// components
|
|
|
+import IndexType1 from './components/IndexType1.vue';
|
|
|
+import IndexType2 from './components/IndexType2.vue';
|
|
|
+import IndexType3 from './components/IndexType3.vue';
|
|
|
+import IndexType4 from './components/IndexType4.vue';
|
|
|
import IndexType5 from './components/IndexType5.vue';
|
|
|
+import IndexType6 from './components/IndexType6.vue';
|
|
|
+import IndexType7 from './components/IndexType7.vue';
|
|
|
+import IndexType8 from './components/IndexType8.vue';
|
|
|
+import IndexType9 from './components/IndexType9.vue';
|
|
|
+import IndexType10 from './components/IndexType10.vue';
|
|
|
+import IndexType11 from './components/IndexType11.vue';
|
|
|
|
|
|
// Api
|
|
|
import * as approveInfoApi from '@/api/approveinfo'
|
|
@@ -87,126 +87,53 @@ import * as approveApi from '@/api/approve'
|
|
|
export default {
|
|
|
name: 'Applyfor',
|
|
|
components: {
|
|
|
- CSelect,
|
|
|
- CInput,
|
|
|
- CFiles,
|
|
|
- CFlowPath,
|
|
|
- CDate,
|
|
|
- Peers,
|
|
|
+ IndexType1,
|
|
|
+ IndexType2,
|
|
|
+ IndexType3,
|
|
|
+ IndexType4,
|
|
|
IndexType5,
|
|
|
+ IndexType6,
|
|
|
+ IndexType7,
|
|
|
+ IndexType8,
|
|
|
+ IndexType9,
|
|
|
+ IndexType10,
|
|
|
+ IndexType11,
|
|
|
bizCont
|
|
|
},
|
|
|
computed: {
|
|
|
// 获取需要渲染的组件
|
|
|
renderComponent () {
|
|
|
const TYPE = this.formType
|
|
|
- let cname = ''
|
|
|
- switch (TYPE) {
|
|
|
- case 5:
|
|
|
- cname = 'IndexType5'
|
|
|
- break
|
|
|
-
|
|
|
- }
|
|
|
- return cname
|
|
|
- },
|
|
|
- renderFormList () {
|
|
|
- const TYPE = this.formType
|
|
|
- let VNODE = null
|
|
|
- switch (TYPE) {
|
|
|
- case 1:
|
|
|
- VNODE = this.handleRenderType1()
|
|
|
- break
|
|
|
- case 2:
|
|
|
- VNODE = this.handleRenderType2()
|
|
|
- break
|
|
|
- case 3:
|
|
|
- VNODE = this.handleRenderType3()
|
|
|
- break
|
|
|
- case 4:
|
|
|
- VNODE = this.handleRenderType4()
|
|
|
- break
|
|
|
- case 5:
|
|
|
- VNODE = this.handleRenderType5()
|
|
|
- break
|
|
|
- case 6:
|
|
|
- VNODE = this.handleRenderType6()
|
|
|
- break
|
|
|
- case 7:
|
|
|
- VNODE = this.handleRenderType7()
|
|
|
- break
|
|
|
- case 8:
|
|
|
- VNODE = this.handleRenderType8()
|
|
|
- break
|
|
|
- case 9:
|
|
|
- VNODE = this.handleRenderType9()
|
|
|
- break
|
|
|
- case 10:
|
|
|
- VNODE = this.handleRenderType10()
|
|
|
- break
|
|
|
- case 11:
|
|
|
- VNODE = this.handleRenderType11()
|
|
|
- break
|
|
|
- }
|
|
|
- return VNODE
|
|
|
+ return `IndexType${TYPE}`
|
|
|
},
|
|
|
},
|
|
|
- created () {
|
|
|
- console.log('apply for created>', this.$route.query);
|
|
|
|
|
|
+ created () {
|
|
|
+ console.log('%c Apply for crated >>>', 'background: blue; color: #fff', this.$route.query);
|
|
|
+
|
|
|
if (this.$route.query.type) this.formType = Number(this.$route.query.type)
|
|
|
|
|
|
// check is edit
|
|
|
if (this.$route.query.edit == 1) {
|
|
|
- this.editId = this.$route.query.id
|
|
|
+ this.editId = Number(this.$route.query.id)
|
|
|
this.isEdit = true
|
|
|
this.flag = this.$route.query.flag
|
|
|
}
|
|
|
|
|
|
this.init ()
|
|
|
},
|
|
|
+
|
|
|
data () {
|
|
|
return {
|
|
|
- flag: '',
|
|
|
- isEdit: false,
|
|
|
- editId: '',
|
|
|
- formType: 5, // 代表某申请类型
|
|
|
- editData: null,
|
|
|
-
|
|
|
- formData1: {
|
|
|
- reason: '',
|
|
|
- selVal: '',
|
|
|
- money: '',
|
|
|
- playmethod: ''
|
|
|
- },
|
|
|
- formData2: {
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
- formData5: {
|
|
|
- id: undefined,
|
|
|
- module: 5,
|
|
|
- reason: '', // 申请理由
|
|
|
- start_time: '', // 开始时间
|
|
|
- end_time: '', // 结束时间
|
|
|
- type: undefined,
|
|
|
+ formType: -1, // 代表某申请类型
|
|
|
|
|
|
- document: '', // 附件
|
|
|
- images: '', // 图片
|
|
|
- remark: '', // 备注
|
|
|
- is_who: undefined,
|
|
|
- peer_user: [ // 同行人员信息
|
|
|
- // {
|
|
|
- // is_who: '',
|
|
|
- // user_id: '',
|
|
|
- // name: '',
|
|
|
- // desc: ''
|
|
|
- // }
|
|
|
- ],
|
|
|
- approve_user: '',
|
|
|
- copy_user: ''
|
|
|
- }
|
|
|
+ flag: '', // [info, approve] // 页面状态 info: 申请 approve: 审核
|
|
|
+ isEdit: false, // 是否编辑
|
|
|
+ editId: -1, // 编辑Id
|
|
|
+ editData: null, // 编辑时存放数据
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
methods: {
|
|
|
init () {
|
|
|
// NOTE: 判断
|
|
@@ -232,508 +159,12 @@ export default {
|
|
|
} catch (error) {
|
|
|
console.log('aplyof error >>>', error)
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
|
|
|
handleSubmitData () {
|
|
|
let callback = this.$refs.rendeRef.handleSubmitData
|
|
|
callback && callback()
|
|
|
- },
|
|
|
- handleConfig (val) {
|
|
|
- const utilDingtail = require("@/utils/dingtalk")
|
|
|
- console.log('conf??', val, utilDingtail.isAuthSDKSupport());
|
|
|
- },
|
|
|
- handleConfig2(val) {
|
|
|
- console.log('conf2', val);
|
|
|
- },
|
|
|
-
|
|
|
- // 申购渲染详情
|
|
|
- handleRenderType1 () {
|
|
|
- // const RMethods = require('./renderType1');
|
|
|
- // const THAT = this
|
|
|
- const formData = this.formData1
|
|
|
- return (<div>
|
|
|
- <c-input
|
|
|
- title="申请事由"
|
|
|
- required={true}
|
|
|
- value={formData.reason}
|
|
|
- input-type="textarea"
|
|
|
- onInput={value => (formData.reason = value)}
|
|
|
- />
|
|
|
-
|
|
|
- <c-select
|
|
|
- title="采购类型"
|
|
|
- required={true}
|
|
|
- value={formData.selval}
|
|
|
- onConfig={value => (formData.selval = value)}
|
|
|
- onCancel={() => (formData.selval = '')}
|
|
|
- />
|
|
|
-
|
|
|
- {/* 根据采购类型。这个地方 渲染不同的采购明细框 */}
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="总金额(元)"
|
|
|
- required={true}
|
|
|
- modelValue={formData.money}
|
|
|
- />
|
|
|
-
|
|
|
- <div>
|
|
|
- 此处是日期组件占位
|
|
|
- </div>
|
|
|
-
|
|
|
- <c-files />
|
|
|
-
|
|
|
- <c-files
|
|
|
- ctype="images"
|
|
|
- />
|
|
|
-
|
|
|
- <c-select
|
|
|
- title="支付方式"
|
|
|
- required={true}
|
|
|
- modelValue={formData.playmethod}
|
|
|
- />
|
|
|
-
|
|
|
- <c-flow-path />
|
|
|
-
|
|
|
- </div>)
|
|
|
- },
|
|
|
-
|
|
|
- // 申请审批
|
|
|
- handleRenderType2 () {
|
|
|
- const formData = this.formData2
|
|
|
- return (<div>
|
|
|
- <c-input
|
|
|
- title="呈批类型"
|
|
|
- required={true}
|
|
|
- value={formData.reason}
|
|
|
- onInput={value => (formData.reason = value)}
|
|
|
- />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="发文字号"
|
|
|
- required={true}
|
|
|
- value={formData.reason}
|
|
|
- onInput={value => (formData.reason = value)}
|
|
|
- />
|
|
|
-
|
|
|
- <c-select
|
|
|
- title="缓急程度"
|
|
|
- required={true}
|
|
|
- value={formData.selval}
|
|
|
- onConfig={value => (formData.selval = value)}
|
|
|
- onCancel={() => (formData.selval = '')}
|
|
|
- />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="印制份数"
|
|
|
- value={formData.money}
|
|
|
- />
|
|
|
-
|
|
|
- {/* 根据采购类型。这个地方 渲染不同的采购明细框 */}
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="申请标题"
|
|
|
- required={true}
|
|
|
- value={formData.money}
|
|
|
- />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="申请内容"
|
|
|
- value={formData.money}
|
|
|
- input-type="textarea"
|
|
|
- />
|
|
|
-
|
|
|
- <c-files />
|
|
|
-
|
|
|
- <c-flow-path />
|
|
|
- </div>)
|
|
|
- },
|
|
|
-
|
|
|
- // 入库申请
|
|
|
- handleRenderType3 () {
|
|
|
- const formData = this.formData2
|
|
|
- return (<div>
|
|
|
- <c-input
|
|
|
- title="采购审批单"
|
|
|
- required={true}
|
|
|
- value={formData.reason}
|
|
|
- onInput={value => (formData.reason = value)}
|
|
|
- />
|
|
|
-
|
|
|
- <div>
|
|
|
- <span>入库明细组件</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <c-files />
|
|
|
- <c-files ctype="images" />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="其他补充说明"
|
|
|
- value={formData.money}
|
|
|
- input-type="textarea"
|
|
|
- />
|
|
|
-
|
|
|
- <c-flow-path />
|
|
|
- </div>)
|
|
|
- },
|
|
|
-
|
|
|
- // 领用申请
|
|
|
- handleRenderType4 () {
|
|
|
- const formData = this.formData2
|
|
|
- return (<div>
|
|
|
- <c-input
|
|
|
- title="物品用途"
|
|
|
- value={formData.reason}
|
|
|
- onInput={value => (formData.reason = value)}
|
|
|
- />
|
|
|
-
|
|
|
- <div>
|
|
|
- <span>领用明细组件</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <c-files />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="其他补充说明"
|
|
|
- value={formData.money}
|
|
|
- input-type="textarea"
|
|
|
- />
|
|
|
-
|
|
|
- <c-flow-path />
|
|
|
- </div>)
|
|
|
- },
|
|
|
-
|
|
|
- // 出差申请
|
|
|
- handleRenderType5 () {
|
|
|
- const formData = this.formData5
|
|
|
- return (<div>
|
|
|
- {/* TODO:
|
|
|
- 发起人默认当前用户 是否可以选择其他人
|
|
|
- 出差理论上来讲默认自己申请 (不应该代人申请)
|
|
|
- */}
|
|
|
-
|
|
|
- {/* <c-input
|
|
|
- title="发起人"
|
|
|
- required={true}
|
|
|
- value={formData.reason}
|
|
|
- onInput={value => (formData.reason = value)}
|
|
|
- /> */}
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="填写事由"
|
|
|
- required={true}
|
|
|
- value={formData.reason}
|
|
|
- onInput={val => (formData.reason = val)}
|
|
|
- />
|
|
|
-
|
|
|
- <peers
|
|
|
- value={formData.peer_user}
|
|
|
- onInput={arrs => (formData.peer_user = arrs)}
|
|
|
- />
|
|
|
-
|
|
|
- <c-date
|
|
|
- title="出差开始时间"
|
|
|
- required={true}
|
|
|
- onInput={obj => {
|
|
|
- formData.start_time = `${formatTime(obj.date, '-')} ${obj.time}`
|
|
|
- }}
|
|
|
- />
|
|
|
-
|
|
|
- <c-date
|
|
|
- title="出差结束时间"
|
|
|
- required={true}
|
|
|
- onInput={obj => {
|
|
|
- formData.end_time = `${formatTime(obj.date, '-')} ${obj.time}`
|
|
|
- }}
|
|
|
- />
|
|
|
-
|
|
|
- <c-files />
|
|
|
-
|
|
|
- <c-files ctype="images" />
|
|
|
-
|
|
|
- <c-select
|
|
|
- title="类型"
|
|
|
- required={true}
|
|
|
- list={this.awayArr}
|
|
|
- pickerValueKey="name"
|
|
|
- pickerValueId="id"
|
|
|
- config={val => (formData.type = val)}
|
|
|
- />
|
|
|
- {/* is_who 是否跨关内关外:0=否,1=是 */}
|
|
|
-
|
|
|
-
|
|
|
- {/* 根据type === 2(省外) 判断关内外 */}
|
|
|
- {
|
|
|
- formData.type === 2 ? <c-select
|
|
|
- title="是否跨关内外"
|
|
|
- required={true}
|
|
|
- list={[{name: '是', id: 1}, {name: '否', id: 0}]}
|
|
|
- pickerValueKey="name"
|
|
|
- pickerValueId="id"
|
|
|
- onInput={val => (formData.type = val)}
|
|
|
- /> : null
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- <c-flow-path
|
|
|
- approve={this.approvePeople}
|
|
|
- copy={this.copyPeople}
|
|
|
- isAllowCopy={(this.isCopy)}
|
|
|
- />
|
|
|
- </div>)
|
|
|
- },
|
|
|
-
|
|
|
- // 请假申请
|
|
|
- handleRenderType6 () {
|
|
|
- const formData = this.formData2
|
|
|
- return (<div>
|
|
|
- {/* TODO:
|
|
|
- 发起人默认当前用户 是否可以选择其他人
|
|
|
- 出差理论上来讲默认自己申请 (不应该代人申请)
|
|
|
- */}
|
|
|
- <c-input
|
|
|
- title="发起人"
|
|
|
- required={true}
|
|
|
- value={formData.reason}
|
|
|
- onInput={value => (formData.reason = value)}
|
|
|
- />
|
|
|
-
|
|
|
- {/* NOTE: 请假类型 需要通过前置页面选中 */}
|
|
|
- <c-select
|
|
|
- title="请假类型"
|
|
|
- required={true}
|
|
|
- />
|
|
|
-
|
|
|
- <div>
|
|
|
- <span>请假开始时间</span>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <span>请假结束时间</span>
|
|
|
- </div>
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="请假时长"
|
|
|
-
|
|
|
- />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="原因"
|
|
|
- required={true}
|
|
|
- input-type="textarea"
|
|
|
- />
|
|
|
-
|
|
|
- <c-files />
|
|
|
-
|
|
|
- <c-files ctype="images" />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="是否离“深”"
|
|
|
- required={true}
|
|
|
- input-type="textarea"
|
|
|
- placeholder="需写清目的地(到街道)、是否涉疫、出行方式及班次"
|
|
|
- />
|
|
|
-
|
|
|
- <c-flow-path />
|
|
|
- </div>)
|
|
|
- },
|
|
|
- // 用车申请
|
|
|
- handleRenderType7 () {
|
|
|
- const formData = this.formData2
|
|
|
- return (<div>
|
|
|
- {/* TODO:
|
|
|
- 发起人默认当前用户 是否可以选择其他人
|
|
|
- 出差理论上来讲默认自己申请 (不应该代人申请)
|
|
|
- */}
|
|
|
- <c-input
|
|
|
- title="发起人"
|
|
|
- required={true}
|
|
|
- value={formData.reason}
|
|
|
- onInput={value => (formData.reason = value)}
|
|
|
- />
|
|
|
-
|
|
|
- <dv>用车信息</dv>
|
|
|
- <div class="group-box">
|
|
|
- <c-input
|
|
|
- title="出发地点"
|
|
|
- required={true}
|
|
|
- />
|
|
|
- <div>
|
|
|
- start time
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="group-box">
|
|
|
- <c-input
|
|
|
- title="到达地点"
|
|
|
- required={true}
|
|
|
- />
|
|
|
- <div>
|
|
|
- endtime
|
|
|
- </div>
|
|
|
- <c-input
|
|
|
- title="返回地点"
|
|
|
- />
|
|
|
- </div>
|
|
|
-
|
|
|
- <c-files ctype="images" />
|
|
|
-
|
|
|
- <c-files />
|
|
|
-
|
|
|
- <c-flow-path />
|
|
|
- </div>)
|
|
|
- },
|
|
|
- // 维修申请
|
|
|
- handleRenderType8() {
|
|
|
- // const formData = this.formData2
|
|
|
- return (<div>
|
|
|
- <div class="group-box">
|
|
|
- <div class="group__title">
|
|
|
- 维修信息
|
|
|
- </div>
|
|
|
- <dv></dv>
|
|
|
- <c-select
|
|
|
- title="维修分类"
|
|
|
- required={true}
|
|
|
- />
|
|
|
- <c-input
|
|
|
- title="维修地点"
|
|
|
- required={true}
|
|
|
- placeholder="请选填维修地点"
|
|
|
- />
|
|
|
- </div>
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="具体内容"
|
|
|
- required={true}
|
|
|
- input-type="textarea"
|
|
|
- />
|
|
|
-
|
|
|
- <c-files
|
|
|
- ctype="images"
|
|
|
- placeholder="最多9张"
|
|
|
- />
|
|
|
-
|
|
|
- <c-flow-path />
|
|
|
- </div>)
|
|
|
- },
|
|
|
- // 合同呈批
|
|
|
- handleRenderType9() {
|
|
|
- let a = "本合同已经法律顾问审核同意,详见附件《法律意见》"
|
|
|
- return (<div>
|
|
|
- <c-select
|
|
|
- title="合同类型"
|
|
|
- />
|
|
|
- <c-input
|
|
|
- title="合同编号"
|
|
|
- required={true}
|
|
|
- />
|
|
|
- <c-select
|
|
|
- title="缓急程度"
|
|
|
- required={true}
|
|
|
- />
|
|
|
- <c-input
|
|
|
- title="印制份数"
|
|
|
- />
|
|
|
- <c-input
|
|
|
- title="发放范围"
|
|
|
- placeholder="请输入发放范围,比如合同双方"
|
|
|
- />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="法务意见"
|
|
|
- value={a}
|
|
|
- />
|
|
|
-
|
|
|
- <c-files />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="备注说明"
|
|
|
- input-type="textarea"
|
|
|
- />
|
|
|
-
|
|
|
- <c-flow-path />
|
|
|
- </div>)
|
|
|
- },
|
|
|
- // 批阅申请
|
|
|
- handleRenderType10() {
|
|
|
- return (<div>
|
|
|
- <c-input
|
|
|
- title="创建人"
|
|
|
- />
|
|
|
- <c-input
|
|
|
- title="来文单位名称"
|
|
|
- required={true}
|
|
|
- />
|
|
|
- <c-input
|
|
|
- title="收文序号"
|
|
|
- required={true}
|
|
|
- />
|
|
|
- <c-input
|
|
|
- title="文件名称"
|
|
|
- />
|
|
|
-
|
|
|
- <div>
|
|
|
- 收文日期组件
|
|
|
- </div>
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="内容摘要"
|
|
|
- input-type="textarea"
|
|
|
- />
|
|
|
-
|
|
|
- <c-select
|
|
|
- title="缓急程度"
|
|
|
- required={true}
|
|
|
- />
|
|
|
-
|
|
|
- <c-files />
|
|
|
-
|
|
|
- <c-flow-path />
|
|
|
- </div>)
|
|
|
- },
|
|
|
-
|
|
|
- // 学校文件
|
|
|
- handleRenderType11() {
|
|
|
- return (<div>
|
|
|
- <c-select
|
|
|
- title="拟稿部门"
|
|
|
- required={true}
|
|
|
- />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="文件名称"
|
|
|
- required={true}
|
|
|
- />
|
|
|
-
|
|
|
- <c-select
|
|
|
- title="落款"
|
|
|
- required={true}
|
|
|
- />
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="上会情况"
|
|
|
- input-type="textarea"
|
|
|
- />
|
|
|
-
|
|
|
- <c-files />
|
|
|
-
|
|
|
- <c-select
|
|
|
- title="缓急程度"
|
|
|
- required={true}
|
|
|
- />
|
|
|
-
|
|
|
- <div>
|
|
|
- 拟文发送时间
|
|
|
- </div>
|
|
|
-
|
|
|
- <c-input
|
|
|
- title="文件号"
|
|
|
- required={true}
|
|
|
- />
|
|
|
-
|
|
|
- <c-flow-path />
|
|
|
- </div>)
|
|
|
- },
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|