|
|
@@ -0,0 +1,238 @@
|
|
|
+<template>
|
|
|
+ <div class="app-content">
|
|
|
+ <form @submit="formSubmit">
|
|
|
+ <view class="module-com">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" >
|
|
|
+ <div class="tui-title">花店1</div>
|
|
|
+ <input v-model="form.name1" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="name1" placeholder="请输入名称" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title required">手机号</div>
|
|
|
+ <input v-model="form.mobile1" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="mobile1" placeholder="申请人手机号" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title required">确认手机号</div>
|
|
|
+ <input v-model="form.confirmMobile1" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="confirmMobile1" placeholder="申请人手机号" />
|
|
|
+ </tui-list-cell>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="module-com">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" >
|
|
|
+ <div class="tui-title">花店2</div>
|
|
|
+ <input v-model="form.name2" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="name2" placeholder="请输入名称" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title required">手机号</div>
|
|
|
+ <input v-model="form.mobile2" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="mobile2" placeholder="申请人手机号" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title required">确认手机号</div>
|
|
|
+ <input v-model="form.confirmMobile2" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="confirmMobile2" placeholder="申请人手机号" />
|
|
|
+ </tui-list-cell>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="module-com">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" >
|
|
|
+ <div class="tui-title">花店3</div>
|
|
|
+ <input v-model="form.name3" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="name3" placeholder="请输入名称" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title required">手机号</div>
|
|
|
+ <input v-model="form.mobile3" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="mobile3" placeholder="申请人手机号" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title required">确认手机号</div>
|
|
|
+ <input v-model="form.confirmMobile3" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="confirmMobile3" placeholder="申请人手机号" />
|
|
|
+ </tui-list-cell>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="module-com">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" >
|
|
|
+ <div class="tui-title">花店4</div>
|
|
|
+ <input v-model="form.name4" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="name4" placeholder="请输入名称" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title required">手机号</div>
|
|
|
+ <input v-model="form.mobile4" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="mobile4" placeholder="申请人手机号" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title required">确认手机号</div>
|
|
|
+ <input v-model="form.confirmMobile4" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="confirmMobile4" placeholder="申请人手机号" />
|
|
|
+ </tui-list-cell>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="module-com">
|
|
|
+ <tui-list-cell class="line-cell" :hover="false" >
|
|
|
+ <div class="tui-title">花店5</div>
|
|
|
+ <input v-model="form.name5" type="text" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="name5" placeholder="请输入名称" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title required">手机号</div>
|
|
|
+ <input v-model="form.mobile5" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="mobile5" placeholder="申请人手机号" />
|
|
|
+ </tui-list-cell>
|
|
|
+ <tui-list-cell class="line-cell" :hover="false">
|
|
|
+ <div class="tui-title required">确认手机号</div>
|
|
|
+ <input v-model="form.confirmMobile5" type="number" placeholder-class="phcolor" placeholder-style="color:#CCCCCC" class="tui-input" name="confirmMobile5" placeholder="申请人手机号" />
|
|
|
+ </tui-list-cell>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="app-footer">
|
|
|
+ <!-- <view class="admin-button-com middle blue" style="margin-right:60upx;font-size:30upx;height:70upx;line-height:70upx;width:160upx;" @click="pageTo({url:'/admin/work/add'})">新增</view> -->
|
|
|
+ <div class="btn-wrap">
|
|
|
+ <button class="admin-button-com blue big" formType="submit">确认</button>
|
|
|
+ </div>
|
|
|
+ </view>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import TuiListCell from "@/components/plugin/list-cell";
|
|
|
+const form = require("@/utils/formValidation.js");
|
|
|
+import { createCumtomer } from '@/api/custom'
|
|
|
+export default {
|
|
|
+ name: "create-customer",
|
|
|
+ components: {
|
|
|
+ TuiListCell
|
|
|
+ },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ merchantData: {},
|
|
|
+ form: {
|
|
|
+ name1: "",
|
|
|
+ mobile1: "",
|
|
|
+ confirmMobile1: "",
|
|
|
+
|
|
|
+ name2: "",
|
|
|
+ mobile2: "",
|
|
|
+ confirmMobile2: "",
|
|
|
+
|
|
|
+ name3: "",
|
|
|
+ mobile3: "",
|
|
|
+ confirmMobile3: "",
|
|
|
+
|
|
|
+ name4: "",
|
|
|
+ mobile4: "",
|
|
|
+ confirmMobile4: "",
|
|
|
+
|
|
|
+ name5: "",
|
|
|
+ mobile5: "",
|
|
|
+ confirmMobile5: "",
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+ },
|
|
|
+ onLoad () {
|
|
|
+ },
|
|
|
+ onUnload(){
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ formSubmit (e) {
|
|
|
+ let rules = [
|
|
|
+ { name: "name1", rule: ["required"], msg: ["请填写花店1的名称"] },
|
|
|
+ { name: "mobile1", rule: ["isMobile"], msg: ["请填写花店1的手机号"] },
|
|
|
+ { name: "confirmMobile1", rule: ["isSame:mobile1"], msg: ["花店1的确认手机号有误"] },
|
|
|
+ //{ name: "name2", rule: ["required"], msg: ["请填写花店2的名称"] },
|
|
|
+ //{ name: "mobile2", rule: ["required"], msg: ["请填写花店2的手机号"] },
|
|
|
+ { name: "confirmMobile2", rule: ["isSame:mobile2"], msg: ["花店2的确认手机号有误"] },
|
|
|
+ //{ name: "name3", rule: ["required"], msg: ["请填写花店3的名称"] },
|
|
|
+ //{ name: "mobile3", rule: ["required"], msg: ["请填写花店3的手机号"] },
|
|
|
+ { name: "confirmMobile3", rule: ["isSame:mobile3"], msg: ["花店3的确认手机号有误"] },
|
|
|
+ //{ name: "name4", rule: ["required"], msg: ["请填写花店4的名称"] },
|
|
|
+ //{ name: "mobile4", rule: ["required"], msg: ["请填写花店4的手机号"] },
|
|
|
+ { name: "confirmMobile4", rule: ["isSame:mobile4"], msg: ["请花店4的确认手机号有误"] },
|
|
|
+ //{ name: "name5", rule: ["required"], msg: ["请填写花店5的名称"] },
|
|
|
+ //{ name: "mobile5", rule: ["required"], msg: ["请填写花店5的手机号"] },
|
|
|
+ { name: "confirmMobile5", rule: ["isSame:mobile5"], msg: ["花店5的确认手机号有误"] },
|
|
|
+ ];
|
|
|
+
|
|
|
+ let formData = this.form;
|
|
|
+ let checkRes = form.validation(formData, rules);
|
|
|
+
|
|
|
+ if (!checkRes) {
|
|
|
+ uni.showLoading({mask:true})
|
|
|
+ setTimeout(() => {
|
|
|
+ this.confirmFn()
|
|
|
+ })
|
|
|
+ uni.hideLoading()
|
|
|
+ } else {
|
|
|
+ this.$msg(checkRes);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ confirmFn () {
|
|
|
+ let currentMiniOpenId = uni.getStorageSync('currentMiniOpenId')
|
|
|
+ uni.showLoading({mask:true})
|
|
|
+ createCumtomer({
|
|
|
+ hdShopAdminId: this.option.hdShopAdminId,
|
|
|
+ ghsShopAdminId: this.option.ghsShopAdminId,
|
|
|
+ ...this.form,
|
|
|
+ style: this.option.style || 0,
|
|
|
+ from: this.option.from || 0,
|
|
|
+ miniOpenId:currentMiniOpenId
|
|
|
+ }).then(res => {
|
|
|
+ this.$msg(res.msg);
|
|
|
+ if(res.code == 1){
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.navigateBack();
|
|
|
+ }, 2000)
|
|
|
+ }
|
|
|
+ // this.$util.pageTo({
|
|
|
+ // url: "/admin/home/member",
|
|
|
+ // type: 2,
|
|
|
+ // query: {
|
|
|
+ // pagestatus: 3
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.app-content {
|
|
|
+ margin-bottom: 170upx;
|
|
|
+}
|
|
|
+.module-com {
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ background-color:#fff;
|
|
|
+ .module-tit {
|
|
|
+ padding: 20upx 18upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 600;
|
|
|
+ border-bottom: 1upx solid $borderColor;
|
|
|
+ }
|
|
|
+ .module-det {
|
|
|
+ padding: 0 30upx;
|
|
|
+ }
|
|
|
+}
|
|
|
+// 公共
|
|
|
+.line-cell {
|
|
|
+ .tui-title {
|
|
|
+ width: 210upx;
|
|
|
+ color: $fontColor2;
|
|
|
+ }
|
|
|
+ .tui-input {
|
|
|
+ width: calc(100% - 210upx);
|
|
|
+ font-size: 28upx;
|
|
|
+ }
|
|
|
+ .tui-placeholder {
|
|
|
+ color: #ccc;
|
|
|
+ }
|
|
|
+ .phcolor {
|
|
|
+ color: #ccc;
|
|
|
+ }
|
|
|
+}
|
|
|
+.btn-wrap {
|
|
|
+ width: 90%;
|
|
|
+ margin: 60upx auto;
|
|
|
+ .admin-button-com {
|
|
|
+ width: 100%;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|