Merge branch 'gyj' of SH-Arbitrate/miniapp into dev

This commit was merged in pull request #24.
This commit is contained in:
2024-02-06 14:40:51 +08:00
committed by Gitea
3 changed files with 38 additions and 3 deletions
+8
View File
@@ -120,4 +120,12 @@ export function updateComfire(data) {
method: "post", method: "post",
data: data, data: data,
}) })
}
/** 根据id查询案件信息 */
export function caseApplicationSelectById(data) {
return request({
url: '/caseApplication/selectById',
method: 'get',
params: data
})
} }
+7
View File
@@ -41,6 +41,7 @@
</view> </view>
</view> </view>
<view class="btn" v-if="sysType == 2"> <view class="btn" v-if="sysType == 2">
<button class="btnItem" type="primary" size="mini" @tap="modify">修改</button>
<!-- <button class="btnItem" type="primary" size="mini" @tap="clickPay">申请人缴费</button> <!-- <button class="btnItem" type="primary" size="mini" @tap="clickPay">申请人缴费</button>
<button class="btnItem" type="primary" size="mini" @tap="caseDetail">选择调解员</button> --> <button class="btnItem" type="primary" size="mini" @tap="caseDetail">选择调解员</button> -->
<button class="btnItem" type="primary" size="mini" v-for="(item) in buttonList" :key="item.id" <button class="btnItem" type="primary" size="mini" v-for="(item) in buttonList" :key="item.id"
@@ -85,6 +86,12 @@
url: `/pages/handlecase/component/payList?id=${this.defalutVal.id}` url: `/pages/handlecase/component/payList?id=${this.defalutVal.id}`
}) })
}, },
// 修改
modify(){
uni.redirectTo({
url: `/pages/handlecase/component/newlyAddedCase?id=${this.defalutVal.id}`,
})
},
/**查询按钮列表 */ /**查询按钮列表 */
getButtonList() { getButtonList() {
queryCaseFlowInfo({ queryCaseFlowInfo({
+23 -3
View File
@@ -167,7 +167,7 @@
</template> </template>
<script> <script>
import {getTemplate,getInfoByIdCard,caseApplicationInsert,updateComfire} from '../../../api/handlecase/index.js' import {getTemplate,getInfoByIdCard,caseApplicationInsert,updateComfire,caseApplicationSelectById} from '../../../api/handlecase/index.js'
import { import {
getToken getToken
} from '@/utils/auth' } from '@/utils/auth'
@@ -183,6 +183,7 @@
columnValueList: [], columnValueList: [],
caseAttachList: [], caseAttachList: [],
}, },
ids:null,
tempFilePaths: null, tempFilePaths: null,
templateList:[], templateList:[],
objectiJurisArr: [{ objectiJurisArr: [{
@@ -210,7 +211,7 @@
validateFunction: (rule, value, data, callback) => { validateFunction: (rule, value, data, callback) => {
//判断手机号格式时候正确 //判断手机号格式时候正确
if (value.length<3) { if (value.length<1) {
if(this.formData.affiliate.organizeFlag == 0){ if(this.formData.affiliate.organizeFlag == 0){
callback('请输入申请人姓名') callback('请输入申请人姓名')
}else{ }else{
@@ -257,7 +258,12 @@
}, },
submitReasont(){ submitReasont(){
this.$refs.form.validate().then(res=>{ this.$refs.form.validate().then(res=>{
this.insertFn(this.formData) if(this.ids){
this.modifyData(this.formData)
}else{
this.insertFn(this.formData)
}
}).catch(err =>{ }).catch(err =>{
}) })
@@ -271,6 +277,13 @@
}) })
}); });
}, },
/** 根据案件id获取对应信息 */
caseApplicationSelectByIdFn(data) {
caseApplicationSelectById(data).then(res=>{
res.data.affiliate.respondentSex = Number(res.data.affiliate.respondentSex)
this.formData = res.data
})
},
// 被申请人获取性别出生年月 // 被申请人获取性别出生年月
handleBlur(){ handleBlur(){
let idCards = { let idCards = {
@@ -355,6 +368,13 @@
} }
}, },
onLoad(data) { onLoad(data) {
this.ids = data.id
if(this.ids){
this.caseApplicationSelectByIdFn({id:data.id})
uni.setNavigationBarTitle({title:"案件修改"})
}else{
uni.setNavigationBarTitle({title:"案件新增"})
}
this.getTemplateFn() this.getTemplateFn()
}, },
onReady() { onReady() {