|
@@ -2,17 +2,32 @@
|
|
|
<view class="sign-page">
|
|
<view class="sign-page">
|
|
|
<view class="view-wrap">
|
|
<view class="view-wrap">
|
|
|
<view class="card">
|
|
<view class="card">
|
|
|
- <view class="form-item">
|
|
|
|
|
|
|
+ <!-- <view class="form-item">
|
|
|
<view class="form-item__title">
|
|
<view class="form-item__title">
|
|
|
<view class="name">区域</view>
|
|
<view class="name">区域</view>
|
|
|
<view class="extra"></view>
|
|
<view class="extra"></view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="form-item__input__wrap">
|
|
<view class="form-item__input__wrap">
|
|
|
<view class="form-item__input" @click="showArea">
|
|
<view class="form-item__input" @click="showArea">
|
|
|
- <input placeholder-class="input-placeholder" class="input" type="text" :value="form.blessingAreaName" placeholder="请选择区域" disabled />
|
|
|
|
|
|
|
+ <input placeholder-class="input-placeholder" class="input" type="text" :value="form.AreaName" placeholder="请选择区域" disabled />
|
|
|
<view class="icon"><image style="width: 16rpx;height: 16rpx;" src="/static/app/page3/arrow-down.png" mode="aspectFit"></image></view>
|
|
<view class="icon"><image style="width: 16rpx;height: 16rpx;" src="/static/app/page3/arrow-down.png" mode="aspectFit"></image></view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ </view> -->
|
|
|
|
|
+ <view class="form-item">
|
|
|
|
|
+ <view class="form-item__title">
|
|
|
|
|
+ <view class="name">经办人姓名/电话/逝者姓名</view>
|
|
|
|
|
+ <view class="extra"></view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="form-item__input__wrap">
|
|
|
|
|
+ <view class="form-item__input">
|
|
|
|
|
+ <input placeholder-class="input-placeholder" class="input" type="text" v-model="form.inputSearch" placeholder="经办人姓名或电话或逝者姓名" />
|
|
|
|
|
+ <view class="inlne-button-wrap">
|
|
|
|
|
+ <button class="u-reset-button button" type="default" @click="showPos">查询</button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <!-- <view class="icon"><image style="width: 16rpx;height: 16rpx;" src="/static/app/page3/arrow-down.png" mode="aspectFit"></image></view> -->
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="form-item">
|
|
<view class="form-item">
|
|
|
<view class="form-item__title">
|
|
<view class="form-item__title">
|
|
@@ -21,7 +36,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="form-item__input__wrap">
|
|
<view class="form-item__input__wrap">
|
|
|
<view class="form-item__input" @click="showPos">
|
|
<view class="form-item__input" @click="showPos">
|
|
|
- <input placeholder-class="input-placeholder" class="input" type="text" :value="form.blessingPositionName" placeholder="请选择阁位" disabled />
|
|
|
|
|
|
|
+ <input placeholder-class="input-placeholder" class="input" type="text" :value="form.cabinetPositionName" placeholder="请选择阁位" disabled />
|
|
|
<view class="icon"><image style="width: 16rpx;height: 16rpx;" src="/static/app/page3/arrow-down.png" mode="aspectFit"></image></view>
|
|
<view class="icon"><image style="width: 16rpx;height: 16rpx;" src="/static/app/page3/arrow-down.png" mode="aspectFit"></image></view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -30,7 +45,7 @@
|
|
|
<view class="form-item__title">
|
|
<view class="form-item__title">
|
|
|
<view class="name">经办人验证码</view>
|
|
<view class="name">经办人验证码</view>
|
|
|
<view class="extra">
|
|
<view class="extra">
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="form-item__input__wrap">
|
|
<view class="form-item__input__wrap">
|
|
@@ -74,10 +89,11 @@
|
|
|
seconds: 60,
|
|
seconds: 60,
|
|
|
send: false,
|
|
send: false,
|
|
|
form: {
|
|
form: {
|
|
|
- blessingAreaId: '',
|
|
|
|
|
- blessingAreaName: '',
|
|
|
|
|
- blessingPositionId: '',
|
|
|
|
|
- blessingPositionName: '',
|
|
|
|
|
|
|
+ inputSearch: '',
|
|
|
|
|
+ cabinetAreaId: '',
|
|
|
|
|
+ cabinetAreaName: '',
|
|
|
|
|
+ cabinetPositionId: '',
|
|
|
|
|
+ cabinetPositionName: '',
|
|
|
code: '',
|
|
code: '',
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
@@ -87,37 +103,48 @@
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
async getArea(keyWord){
|
|
async getArea(keyWord){
|
|
|
- const res = await this.$api('signs.getBlessingArea', {})
|
|
|
|
|
|
|
+ const res = await this.$api('signs.getCabinetPosition', {phone: this.form.inputSearch})
|
|
|
if(res.code != 200) {
|
|
if(res.code != 200) {
|
|
|
throw new Error("")
|
|
throw new Error("")
|
|
|
}
|
|
}
|
|
|
return res.data.map(item => {
|
|
return res.data.map(item => {
|
|
|
- return { ...item, id: item.blessingAreaId, name: item.blessingAreaName }
|
|
|
|
|
|
|
+ return { ...item, id: item.cabinetAreaId, name: item.cabinetAreaName }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ async search(){
|
|
|
|
|
+ const res = await this.$api('signs.getCabinetPosition', {phone: this.form.inputSearch})
|
|
|
|
|
+ console.log(res)
|
|
|
|
|
+ },
|
|
|
showArea() {
|
|
showArea() {
|
|
|
|
|
+ if(!this.form.inputSearch){
|
|
|
|
|
+ this.$refs.uToast.show({type: 'error', message: '请输入查询内容', position: 'top'})
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
this.$refs.area.$open().then(res => {
|
|
this.$refs.area.$open().then(res => {
|
|
|
if(res.arr && res.arr.length > 0){
|
|
if(res.arr && res.arr.length > 0){
|
|
|
- this.form.blessingAreaId = res.arr[0].blessingAreaId
|
|
|
|
|
- this.form.blessingAreaName = res.arr[0].blessingAreaName
|
|
|
|
|
|
|
+ this.form.cabinetAreaId = res.arr[0].cabinetAreaId
|
|
|
|
|
+ this.form.cabinetAreaName = res.arr[0].cabinetAreaName
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
async getPos(){
|
|
async getPos(){
|
|
|
- const res = await this.$api('signs.getBlessingPosition', {blessingAreaId: this.form.blessingAreaId})
|
|
|
|
|
|
|
+ const res = await this.$api('signs.getCabinetPosition', {phone: this.form.inputSearch})
|
|
|
if(res.code != 200) {
|
|
if(res.code != 200) {
|
|
|
throw new Error("")
|
|
throw new Error("")
|
|
|
}
|
|
}
|
|
|
return res.data.map(item => {
|
|
return res.data.map(item => {
|
|
|
- return { ...item, id: item.blessingPositionId, name: item.blessingPositionName }
|
|
|
|
|
|
|
+ return { ...item, id: item.cabinetPositionId, name: item.cabinetPositionName }
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
showPos() {
|
|
showPos() {
|
|
|
|
|
+ if(!this.form.inputSearch){
|
|
|
|
|
+ this.$refs.uToast.show({type: 'error', message: '请输入查询内容', position: 'top'})
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
this.$refs.pos.$open({}).then(res => {
|
|
this.$refs.pos.$open({}).then(res => {
|
|
|
if(res.arr && res.arr.length > 0){
|
|
if(res.arr && res.arr.length > 0){
|
|
|
- this.form.blessingPositionId = res.arr[0].blessingPositionId
|
|
|
|
|
- this.form.blessingPositionName = res.arr[0].blessingPositionName
|
|
|
|
|
|
|
+ this.form.cabinetPositionId = res.arr[0].cabinetPositionId
|
|
|
|
|
+ this.form.cabinetPositionName = res.arr[0].cabinetPositionName
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -131,21 +158,21 @@
|
|
|
this.tips = text;
|
|
this.tips = text;
|
|
|
},
|
|
},
|
|
|
getCode() {
|
|
getCode() {
|
|
|
-
|
|
|
|
|
- if(!this.form.blessingPositionId){
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if(!this.form.cabinetPositionId){
|
|
|
this.$refs.uToast.show({type: 'error', message: '请选择阁位', position: 'top'})
|
|
this.$refs.uToast.show({type: 'error', message: '请选择阁位', position: 'top'})
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if(this.$refs.uCode.canGetCode) {
|
|
if(this.$refs.uCode.canGetCode) {
|
|
|
// 模拟向后端请求验证码
|
|
// 模拟向后端请求验证码
|
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
|
type: 'loading',
|
|
type: 'loading',
|
|
|
message: '正在获取验证码',
|
|
message: '正在获取验证码',
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
- // TODO 发起请求:
|
|
|
|
|
- this.$api('signs.sendCode', {blessingPositionId: this.form.blessingPositionId}).then(res => {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ // TODO 发起请求:
|
|
|
|
|
+ this.$api('signs.sendCode', {cabinetPositionId: this.form.cabinetPositionId}).then(res => {
|
|
|
this.$refs.uToast.hide()
|
|
this.$refs.uToast.hide()
|
|
|
if(res.code == 200){
|
|
if(res.code == 200){
|
|
|
// 这里此提示会被this.start()方法中的提示覆盖
|
|
// 这里此提示会被this.start()方法中的提示覆盖
|
|
@@ -156,13 +183,13 @@
|
|
|
this.$refs.uToast.show({type: 'error', message: res.msg, position: 'top'})
|
|
this.$refs.uToast.show({type: 'error', message: res.msg, position: 'top'})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
uni.$u.toast('倒计时结束后再发送');
|
|
uni.$u.toast('倒计时结束后再发送');
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
confirm(){
|
|
confirm(){
|
|
|
- if(!this.form.blessingPositionId){
|
|
|
|
|
|
|
+ if(!this.form.cabinetPositionId){
|
|
|
this.$refs.uToast.show({type: 'error', message: '请选择阁位', position: 'top'})
|
|
this.$refs.uToast.show({type: 'error', message: '请选择阁位', position: 'top'})
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -170,13 +197,13 @@
|
|
|
this.$refs.uToast.show({type: 'error', message: '请填写经办人验证码', position: 'top'})
|
|
this.$refs.uToast.show({type: 'error', message: '请填写经办人验证码', position: 'top'})
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
|
type: 'loading',
|
|
type: 'loading',
|
|
|
message: '请稍后',
|
|
message: '请稍后',
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
- this.$api('signs.openidBinding', {blessingPositionId: this.form.blessingPositionId, code: this.form.code}).then(res => {
|
|
|
|
|
|
|
+
|
|
|
|
|
+ this.$api('signs.openidBinding', {cabinetPositionId: this.form.cabinetPositionId, code: this.form.code}).then(res => {
|
|
|
this.$refs.uToast.hide()
|
|
this.$refs.uToast.hide()
|
|
|
if(res.code == 200){
|
|
if(res.code == 200){
|
|
|
// 这里此提示会被this.start()方法中的提示覆盖
|
|
// 这里此提示会被this.start()方法中的提示覆盖
|
|
@@ -188,7 +215,7 @@
|
|
|
this.$refs.uToast.show({type: 'error', message: res.msg, position: 'top'})
|
|
this.$refs.uToast.show({type: 'error', message: res.msg, position: 'top'})
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -196,4 +223,4 @@
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
@import "./index.scss";
|
|
@import "./index.scss";
|
|
|
-</style>
|
|
|
|
|
|
|
+</style>
|