fix: 功能优化完善。
This commit is contained in:
@@ -52,6 +52,8 @@
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
</view>
|
||||
<!-- 悬停按钮返回工作台-->
|
||||
<suspend></suspend>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
@@ -65,6 +65,7 @@ const datePickShow = ref(false)
|
||||
const showTeam = ref(false)
|
||||
const title = ref("征信记录查询")
|
||||
const typeList = ref([])
|
||||
const flag = ref('add')
|
||||
const data = reactive({
|
||||
form: {},
|
||||
rules: {
|
||||
@@ -76,12 +77,17 @@ const data = reactive({
|
||||
const { form, rules} = toRefs(data)
|
||||
|
||||
onLoad((option) => {
|
||||
form.value.id = option.id
|
||||
if(form.value.id!=null){
|
||||
title.value="征信记录查询-修改"
|
||||
}else{
|
||||
title.value="征信记录查询-新增"
|
||||
}
|
||||
form.value.id = option.id
|
||||
flag.value = option.flag
|
||||
if(flag.value==null){
|
||||
if(form.value.id!=null){
|
||||
title.value="征信记录查询-修改"
|
||||
}else{
|
||||
title.value="征信记录查询-新增"
|
||||
}
|
||||
}else{
|
||||
title.value="征信记录查询-复制"
|
||||
}
|
||||
getDict()
|
||||
})
|
||||
onReady(() => {
|
||||
@@ -141,13 +147,24 @@ onLoad((option) => {
|
||||
function submit() {
|
||||
proxy.$refs['uForm'].validate().then(() => {
|
||||
if (form.value.id != null) {
|
||||
if(flag.value==null){
|
||||
updateCreditQueryRecord(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/list` })
|
||||
}
|
||||
})
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '修改成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}else {
|
||||
form.value.id == null
|
||||
addCreditQueryRecord(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '新增成功', complete() {
|
||||
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/list` })
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
}else {
|
||||
addCreditQueryRecord(form.value).then(res => {
|
||||
proxy.$refs['uToast'].show({
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
<view class="operate" >
|
||||
<!-- <view class="btn filling" @click="enterDetails(item)">查看</view > -->
|
||||
<view class="btn filling" @click="handleEdit(item)">修改</view>
|
||||
<view class="btn filling" @click="handleCopy(item)">复制</view>
|
||||
<view class="btn filling" @click="handleDelete(item)">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -215,6 +216,10 @@ function selectStatus(item) {
|
||||
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/addEdit?id=${item.id}` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleCopy(item) {
|
||||
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/addEdit?flag=copy&id=${item.id}` })
|
||||
isShow.value = true
|
||||
}
|
||||
function handleAdd() {
|
||||
uni.navigateTo({ url: `/pages/work/bill/creditQueryRecord/addEdit` })
|
||||
isShow.value = true
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
</view>
|
||||
<!-- 悬停按钮返回工作台-->
|
||||
<suspend></suspend>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
|
||||
Reference in New Issue
Block a user