|
@@ -16,7 +16,7 @@
|
|
</template>
|
|
</template>
|
|
<template v-else-if="item.type.indexOf('tableList')>-1&&formData[item.key]&&formData[item.key].length">
|
|
<template v-else-if="item.type.indexOf('tableList')>-1&&formData[item.key]&&formData[item.key].length">
|
|
<view v-if="item.type.indexOf('tableList-vertical')>-1">
|
|
<view v-if="item.type.indexOf('tableList-vertical')>-1">
|
|
- <u-table>
|
|
|
|
|
|
+ <u-table align="left">
|
|
<u-tr class="u-tr">
|
|
<u-tr class="u-tr">
|
|
<u-th class="u-th"></u-th>
|
|
<u-th class="u-th"></u-th>
|
|
<u-th class="u-th" v-for="(num2,index2) in item.num"
|
|
<u-th class="u-th" v-for="(num2,index2) in item.num"
|
|
@@ -40,7 +40,7 @@
|
|
</view>
|
|
</view>
|
|
<view
|
|
<view
|
|
v-if="item.type.indexOf('tableList-horizontal')>-1&&formData[item.key]&&formData[item.key].length">
|
|
v-if="item.type.indexOf('tableList-horizontal')>-1&&formData[item.key]&&formData[item.key].length">
|
|
- <u-table>
|
|
|
|
|
|
+ <u-table align="left">
|
|
<u-tr class="u-tr">
|
|
<u-tr class="u-tr">
|
|
|
|
|
|
<u-th class="u-th" style="flex-direction: unset;" v-for="(it,index) in item.list"
|
|
<u-th class="u-th" style="flex-direction: unset;" v-for="(it,index) in item.list"
|
|
@@ -143,14 +143,14 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
- <view class="submitBtn">
|
|
|
|
- <u-button type="info" :class="{
|
|
|
|
|
|
+ <view class="submitBtn" v-if="isReady">
|
|
|
|
+ <u-button type="info" :class="{
|
|
submitBtn30:isReady
|
|
submitBtn30:isReady
|
|
}" @click="submit(0)">保存</u-button>
|
|
}" @click="submit(0)">保存</u-button>
|
|
- <u-button type="primary" v-if="isReady" class="submitBtn60" @click="submit(1)">提交</u-button>
|
|
|
|
|
|
+ <u-button type="primary" class="submitBtn60" @click="submit(1)">提交</u-button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <!-- <approve-view :activityList="activityList" :initStart="false"></approve-view -->>
|
|
|
|
|
|
+ <!-- <approve-view :activityList="activityList" :initStart="false"></approve-view -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -221,16 +221,18 @@
|
|
},
|
|
},
|
|
onLoad(op) {
|
|
onLoad(op) {
|
|
this.oatype = 11
|
|
this.oatype = 11
|
|
- if (op.id) {
|
|
|
|
- this.id = op.id
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
|
|
this.fieldInfo = dataJsGetInfo(this.oatype)
|
|
this.fieldInfo = dataJsGetInfo(this.oatype)
|
|
|
|
|
|
this.fieldList = this.fieldInfo.list;
|
|
this.fieldList = this.fieldInfo.list;
|
|
-
|
|
|
|
-
|
|
|
|
- this.getProcessDetails();
|
|
|
|
|
|
+ this.init()
|
|
|
|
+
|
|
|
|
+ if (op.id) {
|
|
|
|
+ this.id = op.id
|
|
|
|
+ this.getProcessDetails();
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -349,13 +351,13 @@
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- return
|
|
|
|
|
|
+
|
|
|
|
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: "加载中",
|
|
title: "加载中",
|
|
mask: true,
|
|
mask: true,
|
|
})
|
|
})
|
|
- submitObj.draftStatus = draftStatus
|
|
|
|
|
|
+ submitObj.status = draftStatus?0:-1
|
|
|
|
|
|
API.applyWayBill(submitObj).then((res) => {
|
|
API.applyWayBill(submitObj).then((res) => {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
@@ -379,21 +381,19 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
getProcessDetails() {
|
|
getProcessDetails() {
|
|
- this.init()
|
|
|
|
- return
|
|
|
|
|
|
+
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: "加载中",
|
|
title: "加载中",
|
|
mask: true,
|
|
mask: true,
|
|
})
|
|
})
|
|
|
|
|
|
- API.processDetails({
|
|
|
|
|
|
+ API.waybillDetails({
|
|
formId: this.oatype,
|
|
formId: this.oatype,
|
|
id: this.id
|
|
id: this.id
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
- this.activityList = res.data.activityList
|
|
|
|
|
|
|
|
- var applyContent = res.data.applyContent
|
|
|
|
|
|
+ var applyContent = res.data.waybillInfo
|
|
|
|
|
|
if (applyContent) {
|
|
if (applyContent) {
|
|
this.formData.id = applyContent.id
|
|
this.formData.id = applyContent.id
|
|
@@ -404,33 +404,32 @@
|
|
if (data == null) {
|
|
if (data == null) {
|
|
continue
|
|
continue
|
|
}
|
|
}
|
|
- if (obj.type.indexOf("upload") > -1) {
|
|
|
|
- if (data) {
|
|
|
|
-
|
|
|
|
- var sz = JSON.parse(data).map(str => {
|
|
|
|
- var item = JSON.parse(str)
|
|
|
|
- return {
|
|
|
|
- url: item.url,
|
|
|
|
- name: item.name,
|
|
|
|
- view: 1
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- this.fileList =
|
|
|
|
- sz //data.split(",").map(item=>{return {url:item,item.name=,view:1}})
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
+ console.log(obj.key,applyContent[obj.key])
|
|
|
|
+ this.formData[obj.key] = applyContent[obj.key]
|
|
|
|
+
|
|
|
|
+ if (obj.type.indexOf('tableList') > -1) {
|
|
|
|
+ //var sz = []
|
|
|
|
+
|
|
|
|
+ for (var k = this.formData[obj.key].length; k < obj.num; k++) {
|
|
|
|
+ var ob = {}
|
|
|
|
+ for (var j in obj.list) {
|
|
|
|
+ var io = obj.list[j]
|
|
|
|
+ ob[io.key] = ""
|
|
|
|
+ }
|
|
|
|
+ this.formData[obj.key].push(ob)
|
|
|
|
+ }
|
|
|
|
+ //this.formData[obj.key] = sz
|
|
|
|
+ }
|
|
|
|
+ if(applyContent.status!=-1){
|
|
|
|
+ this.isReady=false
|
|
}
|
|
}
|
|
- this.formData[obj.key] = applyContent[obj.key]
|
|
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
- //console.log("formData",this.formData)
|
|
|
|
- ////(this.formData.maintenanceDescription,res.data.applyContent.maintenanceDescription)
|
|
|
|
|
|
+
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
|
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -551,7 +550,7 @@
|
|
|
|
|
|
background: #fff;
|
|
background: #fff;
|
|
padding-top: 10rpx;
|
|
padding-top: 10rpx;
|
|
- padding-bottom: 50rpx;
|
|
|
|
|
|
+ padding-bottom: 180rpx;
|
|
margin-bottom: 40rpx;
|
|
margin-bottom: 40rpx;
|
|
display: flex;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|