|
|
@@ -0,0 +1,105 @@
|
|
|
+<template>
|
|
|
+ <div class="app-content">
|
|
|
+ <div>
|
|
|
+ <form @submit="formSubmit">
|
|
|
+ <div class="module-com input-line-wrap">
|
|
|
+ <tui-list-cell class="line-cell" :arrow="true" @click="selectCustom">
|
|
|
+ <div class="tui-title">请选择:</div>
|
|
|
+ <view>{{form.customName}}</view>
|
|
|
+ </tui-list-cell>
|
|
|
+ </div>
|
|
|
+ <div class="confirm-btn">
|
|
|
+ <button class="admin-button-com big blue" formType="submit">提交</button>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import TuiListCell from "@/components/plugin/list-cell";
|
|
|
+import { skCustom,skCustomSet } from "@/api/shop";
|
|
|
+export default {
|
|
|
+ name: "sk",
|
|
|
+ components: {TuiListCell},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ form:{
|
|
|
+ customName:'',
|
|
|
+ customId:0
|
|
|
+ },
|
|
|
+ hasLoad:false
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init(){
|
|
|
+ if(this.hasLoad){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ skCustom().then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ this.hasLoad = true
|
|
|
+ this.form.customName = res.data.custom.name
|
|
|
+ this.form.customId = res.data.custom.id
|
|
|
+ this.$forceUpdate()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectCustom(){
|
|
|
+ this.$util.pageTo({ url: '/admin/custom/selectCustom?style=2'})
|
|
|
+ },
|
|
|
+ formSubmit() {
|
|
|
+ let that = this
|
|
|
+ if(that.form.customId == 0 || that.$util.isEmpty(that.form.customId)){
|
|
|
+ that.$msg('请选择门店')
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ skCustomSet({id:that.form.customId}).then(res=>{
|
|
|
+ if(res.code == 1){
|
|
|
+ that.$msg(res.msg)
|
|
|
+ setTimeout(function(){
|
|
|
+
|
|
|
+ that.$store.commit("setLoginInfo", {})
|
|
|
+ that.$util.pageTo({url: "/admin/home/workbench",type: 3})
|
|
|
+
|
|
|
+ },1000)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.app-content {
|
|
|
+ min-height: calc(100vh - 20upx);
|
|
|
+ padding-top: 20upx;
|
|
|
+}
|
|
|
+.prompt-text {
|
|
|
+ color: $fontColor3;
|
|
|
+ padding-left: 30upx;
|
|
|
+ margin-bottom: 30upx;
|
|
|
+}
|
|
|
+.module-com {
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ .member-wrap {
|
|
|
+ .member-det {
|
|
|
+ font-size: 24upx;
|
|
|
+ margin-left: 20upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .remark-wrap {
|
|
|
+ align-items: flex-start;
|
|
|
+ .remark {
|
|
|
+ height: 240upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+// 按钮
|
|
|
+.confirm-btn {
|
|
|
+ width: calc(100% - 60upx);
|
|
|
+ margin: 60upx 30upx 20upx;
|
|
|
+ .admin-button-com {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|