|
|
@@ -14,21 +14,57 @@
|
|
|
--van-nav-bar-title-text-color: rgb(255, 255, 255);
|
|
|
--van-nav-bar-icon-color: rgb(255, 255, 255);
|
|
|
}
|
|
|
- .van-nav-bar--fixed{
|
|
|
+.blank_adopzrdd {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ >span {
|
|
|
+ display: inline-block;
|
|
|
+ width: 80px;
|
|
|
+ }
|
|
|
+
|
|
|
+ margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .van-nav-bar--fixed {
|
|
|
top: 44px;
|
|
|
}
|
|
|
</style>
|
|
|
<div id="app">
|
|
|
|
|
|
- <van-nav-bar height='100rpx' @click-left="onClickLeft" style="background-color: rgb(21, 122, 44);color: rgb(255, 255, 255);"
|
|
|
- :title="title" left-arrow :safe-area-inset-top='true' :placeholder='true' :fixed='true'></van-nav-bar>
|
|
|
- <fm-generate-vant-form style='height: 75vh !important;overflow: auto;margin-top:44px' v-if='isFlag' :data="jsonData" :value="form.valueJson" ref="generateForm" :edit='false'>
|
|
|
+ <van-nav-bar height='100rpx' @click-left="onClickLeft"
|
|
|
+ style="background-color: rgb(21, 122, 44);color: rgb(255, 255, 255);" :title="title" left-arrow
|
|
|
+ :safe-area-inset-top='true' :placeholder='true' :fixed='true'></van-nav-bar>
|
|
|
+ <fm-generate-vant-form style='height: 75vh !important;overflow: auto;margin-top:44px' v-if='isFlag'
|
|
|
+ :data="jsonData" :value="form.valueJson" ref="generateForm" :edit='false'>
|
|
|
+ <template v-slot:blank_adopzrdd="scope">
|
|
|
+ <div style="width: 100%;">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <div v-for="(item, index) in scope.model.blank_adopzrdd" :key="index" style="width: 100%;">
|
|
|
+ <div class="blank_adopzrdd">
|
|
|
+ <span>{{ index + 1 }}报销事项:</span>
|
|
|
+ <van-field rows="1" v-model="scope.model.blank_adopzrdd[index].remark" type="textarea"
|
|
|
+ autosize style="width: calc(100% - 80px)"></van-field>
|
|
|
+ </div>
|
|
|
+ <div class="blank_adopzrdd">
|
|
|
+ <span>
|
|
|
+
|
|
|
+ 金额:</span>
|
|
|
+ <van-field v-model="scope.model.blank_adopzrdd[index].price" type="number"
|
|
|
+ style="width: calc(100% - 80px)"></van-field>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</fm-generate-vant-form>
|
|
|
<div v-if="type!='view'" style='position: fixed; bottom: 0;background: #f9fafb;width:100%;height:20%'>
|
|
|
<van-form label-width='30px'>
|
|
|
<van-cell-group inset>
|
|
|
- <van-field style="background: #f9fafb;" type="textarea" v-model="form.reason" label="意见" placeholder="" rows="2" :autosize='{maxHeight: 50}'
|
|
|
- show-word-limit />
|
|
|
+ <van-field style="background: #f9fafb;" type="textarea" v-model="form.reason" label="意见"
|
|
|
+ placeholder="" rows="2" :autosize='{maxHeight: 50}' show-word-limit />
|
|
|
</van-cell-group>
|
|
|
</van-form>
|
|
|
<div
|
|
|
@@ -48,7 +84,6 @@
|
|
|
<script src="./resource/uni.webview.js"></script>
|
|
|
<script src="./vue-form-making/form-making-v3.umd.js"></script>
|
|
|
<script>
|
|
|
-
|
|
|
let EnvObj = {}
|
|
|
uni.getEnv(function(res) {
|
|
|
EnvObj = res;
|
|
|
@@ -57,9 +92,9 @@
|
|
|
Vue.createApp({
|
|
|
data() {
|
|
|
return {
|
|
|
- isFlag:false,
|
|
|
- isEdit:true,
|
|
|
- type:'',
|
|
|
+ isFlag: false,
|
|
|
+ isEdit: true,
|
|
|
+ type: '',
|
|
|
jsonData: {},
|
|
|
editData: {},
|
|
|
form: {},
|
|
|
@@ -72,8 +107,8 @@
|
|
|
this.headers = this.getQueryParams('headers');
|
|
|
let params = this.getQueryParams('params');
|
|
|
this.APIUrl = this.headers.serverInfo || 'http://192.168.1.105:18086'
|
|
|
- this.title = params.type =='view'?'查看':'审核'
|
|
|
- this.type = params.type
|
|
|
+ this.title = params.type == 'view' ? '查看' : '审核'
|
|
|
+ this.type = params.type
|
|
|
axios({
|
|
|
method: 'get',
|
|
|
url: this.APIUrl + `/bpm/process-instance/get?id=${params.processInstanceId}`,
|
|
|
@@ -84,25 +119,29 @@
|
|
|
this.form = res.data.data
|
|
|
this.form.submitId = params.id
|
|
|
this.jsonData = JSON.parse(res.data.data.formJson.makingJson);
|
|
|
- this.jsonData.list.forEach(item=>{
|
|
|
- item.options.headers = [{key:'Authorization',value:this.headers.Authorization}]
|
|
|
- if(item.type=="deptAndUserCascader"){
|
|
|
+ this.jsonData.list.forEach(item => {
|
|
|
+ item.options.headers = [{
|
|
|
+ key: 'Authorization',
|
|
|
+ value: this.headers.Authorization
|
|
|
+ }]
|
|
|
+ if (item.type == "deptAndUserCascader") {
|
|
|
item.type = 'cascader'
|
|
|
}
|
|
|
- if(item.type=="deptCascader"){
|
|
|
+ if (item.type == "deptCascader") {
|
|
|
item.type = 'cascader'
|
|
|
}
|
|
|
- if(item.type=="userSelect"){
|
|
|
+ if (item.type == "userSelect") {
|
|
|
item.type = 'select'
|
|
|
}
|
|
|
if (item.type == "imgupload") {
|
|
|
- this.form.valueJson[item.model].length && this.form.valueJson[item.model].forEach(
|
|
|
- item => {
|
|
|
- //item.objectUrl = this.APIUrl +'/kd-aiot' + item.storePath
|
|
|
- item.objectUrl = item.url
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
+ this.form.valueJson[item.model].length && this.form.valueJson[item
|
|
|
+ .model].forEach(
|
|
|
+ item => {
|
|
|
+ //item.objectUrl = this.APIUrl +'/kd-aiot' + item.storePath
|
|
|
+ item.objectUrl = item.url
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
this.jsonData.config.dataSource && this.jsonData.config.dataSource.forEach(item => {
|
|
|
@@ -111,7 +150,7 @@
|
|
|
}
|
|
|
item.url = item.url && item.url.replace('/api', this.APIUrl)
|
|
|
})
|
|
|
- this.isFlag = true
|
|
|
+ this.isFlag = true
|
|
|
}
|
|
|
});
|
|
|
},
|