|
|
@@ -12,7 +12,7 @@
|
|
|
|
|
|
<view class="form-label-input">
|
|
|
<view class="phone-form-label"><text class="form-label-require">*</text>手机号</view>
|
|
|
- <uni-easyinput type="number" v-model="formData.userName" placeholder="请输入手机号" maxlength="11" />
|
|
|
+ <uni-easyinput type="number" :disabled="formData.userId" v-model="formData.userName" placeholder="请输入手机号" maxlength="11" />
|
|
|
</view>
|
|
|
<view class="form-label-input">
|
|
|
<view class="phone-form-label">
|
|
|
@@ -32,7 +32,6 @@
|
|
|
<button type="default" class="phone-green-btn info-btn" @click="saveBtn">保存</button>
|
|
|
|
|
|
<commonDialogVue ref="comRefAdd" :content="contentAdd" @confirm-btn="htAdd2"></commonDialogVue>
|
|
|
- <commonDialogVue ref="comRefEditor" :content="contentEditor" @confirm-btn="htAdd2"></commonDialogVue>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -45,6 +44,9 @@
|
|
|
onLoad
|
|
|
} from "@dcloudio/uni-app";
|
|
|
import * as khApi from "@/api/kehu.js"
|
|
|
+ import commonDialogVue from "@/components/dialog/commonDialog.vue"
|
|
|
+
|
|
|
+
|
|
|
const formData = reactive({
|
|
|
realName: '',
|
|
|
userName: '',
|
|
|
@@ -58,10 +60,8 @@
|
|
|
})
|
|
|
|
|
|
const contentAdd = ref('');
|
|
|
- const contentEditor = ref('');
|
|
|
|
|
|
const comRefAdd = ref(null);
|
|
|
- const comRefEditor = ref(null)
|
|
|
|
|
|
// 返回
|
|
|
function goUpPage() {
|
|
|
@@ -213,50 +213,6 @@
|
|
|
idtype: formData.idtype,
|
|
|
idcard: formData.idcard,
|
|
|
jutidizhi: formData.jutidizhi,
|
|
|
- checked: 0
|
|
|
- }
|
|
|
- khApi.getKehuUpdate(opt).then(res => {
|
|
|
- if (res.data.result) {
|
|
|
- uni.showToast({
|
|
|
- title: '编辑成功'
|
|
|
- })
|
|
|
- goUpPage();
|
|
|
- } else {
|
|
|
- contentEditor.value = res.data.message;
|
|
|
- comRefEditor.value.handleShow();
|
|
|
- }
|
|
|
- }).finally(() => {
|
|
|
- uni.hideLoading()
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- function htEditor2() {
|
|
|
- let arr = [];
|
|
|
- if (!formData.realName) {
|
|
|
- arr.push('姓名');
|
|
|
- }
|
|
|
- if (!formData.userName) {
|
|
|
- arr.push('电话');
|
|
|
- }
|
|
|
- if (!formData.realName || !formData.userName) {
|
|
|
- uni.showToast({
|
|
|
- icon: 'none',
|
|
|
- title: `请完善${arr.join('、')}信息!`
|
|
|
- })
|
|
|
- return;
|
|
|
- }
|
|
|
- uni.showLoading({
|
|
|
- title: '更新中...',
|
|
|
- mask: true
|
|
|
- });
|
|
|
- const opt = {
|
|
|
- userId: formData.userId,
|
|
|
- realName: formData.realName,
|
|
|
- userName: formData.userName,
|
|
|
- idtype: formData.idtype,
|
|
|
- idcard: formData.idcard,
|
|
|
- jutidizhi: formData.jutidizhi,
|
|
|
- checked: 1
|
|
|
}
|
|
|
khApi.getKehuUpdate(opt).then(res => {
|
|
|
if (res.data) {
|