maxiaoxiao 2 月之前
父節點
當前提交
78a205365f
共有 1 個文件被更改,包括 14 次插入13 次删除
  1. 14 13
      pages/index/common/tjDialog.vue

+ 14 - 13
pages/index/common/tjDialog.vue

@@ -1,9 +1,9 @@
 <template>
 	<view class="container">
 		<view class="example">
-			<uni-forms ref="form" :model="firm" labelWidth="80px">
+			<uni-forms ref="form" :model="tjform" labelWidth="100px">
 				<uni-forms-item label="图斑编号:" name="dkbh">
-					{{ tjform.dkbh }}
+					<uni-easyinput v-model="tjform.dkbh" disabled />
 				</uni-forms-item>
 				<div class="tit">
 					确定对该图斑数据进行提交吗?提交后无法进行修改。
@@ -13,7 +13,7 @@
 				</div>
 				<div>提交数据包括图斑核查数据、审核数据、合法性判定数据。</div>
 			</uni-forms>
-			<button type="primary" @click="submitForm">确 定</button>
+			<button type="primary" @click="submit">确 定</button>
 		</view>
 	</view>
 </template>
@@ -42,10 +42,10 @@
 		onLoad() {
 			let obj = uni.$globalData || {}
 			let pram = {
-				dkid: obj.id,
+				dkid: obj.dkjdxxId,
 				auditflowStep: 'WYTJ',
 				auditflowId: obj.auditflowId,
-				fieldworkId: obj.fieldworkId
+				fieldworkId: obj.id
 			};
 			this.getInfo(pram)
 		},
@@ -55,18 +55,19 @@
 		methods: {
 			getInfo(pram) {
 				getTjInfo(pram).then(response => {
-					this.tjform = response.data
-					// tjform.value = {
-					//       ...res.data,
-					//       dkbh: infoObj.dkbh,
-					//       auditflowStep: 'WYTJ',
-					//     };
+					if (response.data)
+						this.tjform = response.data
+					else
+						this.$modal.msgError("提交信息获取失败")
+					this.tjform.dkbh = uni.$globalData.dkbh
+					this.tjform.auditflowStep = pram.auditflowStep
 				})
 			},
 			submit(ref) {
 				this.$refs.form.validate().then(res => {
-					confirm(this.firm).then(response => {
-						this.$modal.msgSuccess("修改成功")
+					tjWork(this.tjform).then(response => {
+						this.$modal.msgSuccess("提交成功")
+						this.$tab.navigateTo('/pages/index')
 					})
 				})
 			}