Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop-ui
						commit
						ef73a6fe94
					
				|  | @ -459,22 +459,32 @@ export const modelData = [ | ||||||
|     options: { |     options: { | ||||||
|       list: [ |       list: [ | ||||||
|         { |         { | ||||||
|  |           /** | ||||||
|  |            * 2021/12/9 | ||||||
|  |            * 新增索引(‘index’)判断商品归属分类 | ||||||
|  |            * 之前代码没有配置index也不会收到印象 | ||||||
|  |            * 新建的楼层将采用索引判断分类 | ||||||
|  |            */ | ||||||
|           titleWay: [ |           titleWay: [ | ||||||
|             { |             { | ||||||
|               title: "精选", |               title: "精选", | ||||||
|               desc: "电子推荐" |               desc: "电子推荐", | ||||||
|  |               ___index:0, | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|               title: "实惠", |               title: "实惠", | ||||||
|               desc: "便宜好货" |               desc: "便宜好货", | ||||||
|  |               ___index:1, | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|               title: "进口", |               title: "进口", | ||||||
|               desc: "国际自营" |               desc: "国际自营", | ||||||
|  |               ___index:2, | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|               title: "推荐", |               title: "推荐", | ||||||
|               desc: "喂奶推荐" |               desc: "喂奶推荐", | ||||||
|  |               ___index:3, | ||||||
|             } |             } | ||||||
|           ], |           ], | ||||||
|           listWay: [ |           listWay: [ | ||||||
|  | @ -483,50 +493,18 @@ export const modelData = [ | ||||||
|               price: "120", |               price: "120", | ||||||
|               title: |               title: | ||||||
|                 " 微软 (Microsoft) Xbox 无线控制器/手柄 湛蓝色 | 3.5mm耳机接口蓝牙连接 Xbox主机电脑平板通用", |                 " 微软 (Microsoft) Xbox 无线控制器/手柄 湛蓝色 | 3.5mm耳机接口蓝牙连接 Xbox主机电脑平板通用", | ||||||
|               type: "精选" |               type: "精选", | ||||||
|  |               ___index:0 | ||||||
|             }, |             }, | ||||||
|             { |             { | ||||||
|               img: "https://i.loli.net/2020/12/05/c9mptI5Pg8qJ6ny.png", |               img: "https://i.loli.net/2020/12/05/c9mptI5Pg8qJ6ny.png", | ||||||
|               title: |               title: | ||||||
|                 "宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米", |                 "宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米", | ||||||
|               price: "190", |               price: "190", | ||||||
|               type: "精选" |               type: "精选", | ||||||
|  |               ___index:0 | ||||||
|             }, |             }, | ||||||
|             { |              | ||||||
|               img: "https://i.loli.net/2020/12/05/QsSYIPF743Hgf8q.png", |  | ||||||
|               title: |  | ||||||
|                 "宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米", |  | ||||||
|               price: "10", |  | ||||||
|               type: "精选" |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|               img: "https://i.loli.net/2020/12/05/VTwDYcLWnukGxat.png", |  | ||||||
|               title: |  | ||||||
|                 "宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米", |  | ||||||
|               price: "190", |  | ||||||
|               type: "精选" |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|               img: "https://i.loli.net/2020/12/05/SIFwaVpE4YJAuQf.png", |  | ||||||
|               title: |  | ||||||
|                 "宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米", |  | ||||||
|               price: "10", |  | ||||||
|               type: "精选" |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|               img: "https://i.loli.net/2021/05/14/KTLSrOVJmEdX12A.png", |  | ||||||
|               title: |  | ||||||
|                 "宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米", |  | ||||||
|               price: "190", |  | ||||||
|               type: "精选" |  | ||||||
|             }, |  | ||||||
|             { |  | ||||||
|               img: "https://i.loli.net/2021/05/14/xA5FW2ubiShBdPE.jpg", |  | ||||||
|               title: |  | ||||||
|                 "宏碁(acer) DP高清线1.2版 2K*4KDisplayPort公对公接线笔记本电脑显卡连接显示器视频线1.5米", |  | ||||||
|               price: "10", |  | ||||||
|               type: "精选" |  | ||||||
|             } |  | ||||||
|           ] |           ] | ||||||
|         } |         } | ||||||
|       ] |       ] | ||||||
|  |  | ||||||
|  | @ -49,7 +49,7 @@ | ||||||
|               <div class="decorate-view-link" v-if="res.options.list[0].listWay.length != 0"> |               <div class="decorate-view-link" v-if="res.options.list[0].listWay.length != 0"> | ||||||
| 
 | 
 | ||||||
|                 <!-- 绑定商品选择器回调已选择的商品 --> |                 <!-- 绑定商品选择器回调已选择的商品 --> | ||||||
|                 <div v-if="title_item.title == bindGoods.type" v-for="(bindGoods,bindGoodsIndex) in res.options.list[0].listWay" :key="bindGoodsIndex"> |                 <div v-if="title_item.___index == bindGoods.___index ||  title_item.title == bindGoods.type" v-for="(bindGoods,bindGoodsIndex) in res.options.list[0].listWay" :key="bindGoodsIndex"> | ||||||
|                   {{bindGoods.title}}, |                   {{bindGoods.title}}, | ||||||
|                 </div> |                 </div> | ||||||
| 
 | 
 | ||||||
|  | @ -183,10 +183,13 @@ export default { | ||||||
|       if (!val) return false; |       if (!val) return false; | ||||||
|       let data = val.map((item) => { |       let data = val.map((item) => { | ||||||
|         delete item.selected; |         delete item.selected; | ||||||
|  |         delete item.intro | ||||||
|  |         delete item.mobileIntro | ||||||
|         return { |         return { | ||||||
|           img: item.thumbnail, |           img: item.thumbnail, | ||||||
|           title: item.goodsName, |           title: item.goodsName, | ||||||
|           type: this.selectedGoods.title, |           type: this.selectedGoods.title, | ||||||
|  |           ___index:this.selectedGoods.___index, | ||||||
|           ...item |           ...item | ||||||
|         }; |         }; | ||||||
|       }); |       }); | ||||||
|  |  | ||||||
|  | @ -108,6 +108,12 @@ export default { | ||||||
|   }, |   }, | ||||||
| 
 | 
 | ||||||
|   methods: { |   methods: { | ||||||
|  | 
 | ||||||
|  |     enableBindGoodsShow(){ | ||||||
|  | 
 | ||||||
|  |     }, | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|     // 初始化数据 |     // 初始化数据 | ||||||
|     init() { |     init() { | ||||||
|       if (!this.$route.query.id) return false; |       if (!this.$route.query.id) return false; | ||||||
|  | @ -156,6 +162,7 @@ export default { | ||||||
|     }, |     }, | ||||||
|     // 右侧栏回调 |     // 右侧栏回调 | ||||||
|     handleDrawer(val) { |     handleDrawer(val) { | ||||||
|  |      | ||||||
|       let newIndex = this.selected; |       let newIndex = this.selected; | ||||||
| 
 | 
 | ||||||
|       this.decorateData = ""; |       this.decorateData = ""; | ||||||
|  |  | ||||||
|  | @ -7,7 +7,7 @@ | ||||||
|       </div> |       </div> | ||||||
|     </div> |     </div> | ||||||
|     <div class="goods-list"> |     <div class="goods-list"> | ||||||
|       <div v-if="selected.val == item.type" class="goods-item" v-for="(item, item_index) in res.list[0].listWay" :key="item_index"> |       <div v-if="selected.index == item.___index || selected.val == item.type" class="goods-item" v-for="(item, item_index) in res.list[0].listWay" :key="item_index"> | ||||||
|         <div class="goods-img"> |         <div class="goods-img"> | ||||||
|           <Icon size="20" color="#e1251b" @click="closeGoods(item, item_index)" class="goods-icon" type="ios-close-circle" /> |           <Icon size="20" color="#e1251b" @click="closeGoods(item, item_index)" class="goods-icon" type="ios-close-circle" /> | ||||||
|           <img :src="item.img" alt /> |           <img :src="item.img" alt /> | ||||||
|  | @ -31,7 +31,6 @@ export default { | ||||||
|       selected: { |       selected: { | ||||||
|         // 已选数据 |         // 已选数据 | ||||||
|         index: 0, |         index: 0, | ||||||
|         val: "", |  | ||||||
|       }, |       }, | ||||||
|     }; |     }; | ||||||
|   }, |   }, | ||||||
|  |  | ||||||
|  | @ -89,6 +89,11 @@ export const getRefundGoodsAddress = () => { | ||||||
| export const saveRefundGoodsAddress = (params) => { | export const saveRefundGoodsAddress = (params) => { | ||||||
|   return putRequest(`/settings/storeAfterSaleAddress`, params) |   return putRequest(`/settings/storeAfterSaleAddress`, params) | ||||||
| } | } | ||||||
|  | //修改im商户id
 | ||||||
|  | export const updatEmerchantId = (params) => { | ||||||
|  |   return putRequest(`/settings/merchantEuid`, params) | ||||||
|  | } | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| //修改保存库存预警数
 | //修改保存库存预警数
 | ||||||
| export const updateStockWarning = (params) => { | export const updateStockWarning = (params) => { | ||||||
|  | @ -113,4 +118,3 @@ export const editShipTemplate = (id, params, headers) => { | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|  |  | ||||||
|  | @ -6,13 +6,13 @@ | ||||||
|         <TabPane label="基本信息" name="INFO"> |         <TabPane label="基本信息" name="INFO"> | ||||||
|           <Form ref="form" :model="form" :label-width="100" :rules="formValidate"> |           <Form ref="form" :model="form" :label-width="100" :rules="formValidate"> | ||||||
|             <FormItem label="店铺名称"> |             <FormItem label="店铺名称"> | ||||||
|               <Input v-model="storeName" disabled clearable style="width: 20%" /> |               <Input v-model="storeName" disabled clearable style="width: 20%"/> | ||||||
|             </FormItem> |             </FormItem> | ||||||
|             <FormItem label="店铺地址" prop="address"> |             <FormItem label="店铺地址" prop="address"> | ||||||
|               <Input v-model="form.address" @on-focus="$refs.liliMap.showMap = true" clearable style="width: 20%" /> |               <Input v-model="form.address" @on-focus="$refs.liliMap.showMap = true" clearable style="width: 20%"/> | ||||||
|             </FormItem> |             </FormItem> | ||||||
|             <FormItem label="详细地址" prop="shopAddressDetail"> |             <FormItem label="详细地址" prop="shopAddressDetail"> | ||||||
|               <Input v-model="form.storeAddressDetail" clearable style="width: 20%" maxlength="50" /> |               <Input v-model="form.storeAddressDetail" clearable style="width: 20%" maxlength="50"/> | ||||||
|             </FormItem> |             </FormItem> | ||||||
|             <FormItem label="店铺LOGO:"> |             <FormItem label="店铺LOGO:"> | ||||||
|               <upload-pic-thumb v-model="form.storeLogo" :multiple="false"></upload-pic-thumb> |               <upload-pic-thumb v-model="form.storeLogo" :multiple="false"></upload-pic-thumb> | ||||||
|  | @ -29,19 +29,20 @@ | ||||||
|         <TabPane label="退货地址" name="REFUND_GOODS_ADDRESS"> |         <TabPane label="退货地址" name="REFUND_GOODS_ADDRESS"> | ||||||
|           <Form ref="addressForm" :model="addressForm" :label-width="100" :rules="afterFormValidate"> |           <Form ref="addressForm" :model="addressForm" :label-width="100" :rules="afterFormValidate"> | ||||||
|             <FormItem label="收货人" prop="salesConsigneeName"> |             <FormItem label="收货人" prop="salesConsigneeName"> | ||||||
|               <Input v-model="addressForm.salesConsigneeName" maxlength="11" clearable style="width: 20%" /> |               <Input v-model="addressForm.salesConsigneeName" maxlength="11" clearable style="width: 20%"/> | ||||||
|             </FormItem> |             </FormItem> | ||||||
|             <FormItem label="收货人电话" prop="salesConsigneeMobile"> |             <FormItem label="收货人电话" prop="salesConsigneeMobile"> | ||||||
|               <Input v-model="addressForm.salesConsigneeMobile" maxlength="11" style="width: 20%" /> |               <Input v-model="addressForm.salesConsigneeMobile" maxlength="11" style="width: 20%"/> | ||||||
|             </FormItem> |             </FormItem> | ||||||
|             <FormItem label="售后地址"> |             <FormItem label="售后地址"> | ||||||
|               <Input v-model="region" disabled style="width: 20%" v-if="showRegion == false" /> |               <Input v-model="region" disabled style="width: 20%" v-if="showRegion == false"/> | ||||||
|               <Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary" style="margin-left:8px">修改 |               <Button v-if="showRegion == false" @click="regionClick" :loading="submitLoading" type="primary" | ||||||
|  |                       style="margin-left:8px">修改 | ||||||
|               </Button> |               </Button> | ||||||
|               <regionMap style="width: 20%" @selected="selectedRegion" v-if="showRegion == true" /> |               <regionMap style="width: 20%" @selected="selectedRegion" v-if="showRegion == true"/> | ||||||
|             </FormItem> |             </FormItem> | ||||||
|             <FormItem label="详细地址" prop="salesConsigneeDetail"> |             <FormItem label="详细地址" prop="salesConsigneeDetail"> | ||||||
|               <Input v-model="addressForm.salesConsigneeDetail" clearable style="width: 20%" maxlength="50" /> |               <Input v-model="addressForm.salesConsigneeDetail" clearable style="width: 20%" maxlength="50"/> | ||||||
|             </FormItem> |             </FormItem> | ||||||
| 
 | 
 | ||||||
|             <Form-item> |             <Form-item> | ||||||
|  | @ -54,10 +55,24 @@ | ||||||
| 
 | 
 | ||||||
|           <Form ref="stockWarningForm" :model="stockWarningForm" :label-width="100" :rules="stockWarningFormValidate"> |           <Form ref="stockWarningForm" :model="stockWarningForm" :label-width="100" :rules="stockWarningFormValidate"> | ||||||
|             <FormItem label="预警数" prop="stockWarning"> |             <FormItem label="预警数" prop="stockWarning"> | ||||||
|               <Input v-model="stockWarningForm.stockWarning" type="number" maxlength="6" clearable style="width: 20%" /> |               <Input v-model="stockWarningForm.stockWarning" type="number" maxlength="6" clearable style="width: 20%"/> | ||||||
|             </FormItem> |             </FormItem> | ||||||
|             <Form-item> |             <Form-item> | ||||||
|               <Button @click="stockWarningHandleSubmit" :loading="submitLoading" type="primary" style="margin-right:5px">修改 |               <Button @click="stockWarningHandleSubmit" :loading="submitLoading" type="primary" | ||||||
|  |                       style="margin-right:5px">修改 | ||||||
|  |               </Button> | ||||||
|  |             </Form-item> | ||||||
|  |           </Form> | ||||||
|  |         </TabPane> | ||||||
|  |         <TabPane label="客服设置" name="UDESK"> | ||||||
|  | 
 | ||||||
|  |           <Form ref="udeskForm" :model="udeskForm" :label-width="100" :rules="udeskFormValidate"> | ||||||
|  |             <FormItem label="坐席id" prop="merchantEuid"> | ||||||
|  |               <Input v-model="udeskForm.merchantEuid" maxlength="30" clearable style="width: 20%"/> | ||||||
|  |             </FormItem> | ||||||
|  |             <Form-item> | ||||||
|  |               <Button @click="merchantSubmit" :loading="submitLoading" type="primary" | ||||||
|  |                       style="margin-right:5px">修改 | ||||||
|               </Button> |               </Button> | ||||||
|             </Form-item> |             </Form-item> | ||||||
|           </Form> |           </Form> | ||||||
|  | @ -71,12 +86,13 @@ | ||||||
| 
 | 
 | ||||||
| <script> | <script> | ||||||
| import * as API_Shop from "@/api/shops"; | import * as API_Shop from "@/api/shops"; | ||||||
| import { validateMobile } from "@/libs/validate"; | import {validateMobile} from "@/libs/validate"; | ||||||
| import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb"; | import uploadPicThumb from "@/views/my-components/lili/upload-pic-thumb"; | ||||||
| import liliMap from "@/views/my-components/map/index"; | import liliMap from "@/views/my-components/map/index"; | ||||||
| import regionMap from "@/views/lili-components/region"; | import regionMap from "@/views/lili-components/region"; | ||||||
| import * as RegExp from "@/libs/RegExp.js"; | import * as RegExp from "@/libs/RegExp.js"; | ||||||
| import Cookies from "js-cookie"; | import Cookies from "js-cookie"; | ||||||
|  | 
 | ||||||
| export default { | export default { | ||||||
|   name: "shopSetting", |   name: "shopSetting", | ||||||
|   components: { |   components: { | ||||||
|  | @ -103,14 +119,23 @@ export default { | ||||||
|       stockWarningForm: { |       stockWarningForm: { | ||||||
|         stockWarning: "", // 库存预警数量 |         stockWarning: "", // 库存预警数量 | ||||||
|       }, |       }, | ||||||
|  |       //im form | ||||||
|  |       udeskForm: { | ||||||
|  |         merchantEuid: "" | ||||||
|  |       }, | ||||||
|       stockWarningFormValidate: { |       stockWarningFormValidate: { | ||||||
|         stockWarning: [ |         stockWarning: [ | ||||||
|           { required: true, message: "请输入库存预警数", trigger: "blur" }, |           {required: true, message: "请输入库存预警数", trigger: "blur"}, | ||||||
|  |         ], | ||||||
|  |       }, | ||||||
|  |       udeskFormValidate: { | ||||||
|  |         merchantEuid: [ | ||||||
|  |           {required: true, message: "请输入店铺坐席ID", trigger: "blur"}, | ||||||
|         ], |         ], | ||||||
|       }, |       }, | ||||||
|       afterFormValidate: { |       afterFormValidate: { | ||||||
|         salesConsigneeMobile: [ |         salesConsigneeMobile: [ | ||||||
|           { required: true, message: "手机号不能为空", trigger: "blur" }, |           {required: true, message: "手机号不能为空", trigger: "blur"}, | ||||||
|           { |           { | ||||||
|             pattern: RegExp.mobile, |             pattern: RegExp.mobile, | ||||||
|             trigger: "blur", |             trigger: "blur", | ||||||
|  | @ -118,10 +143,10 @@ export default { | ||||||
|           }, |           }, | ||||||
|         ], |         ], | ||||||
|         salesConsigneeName: [ |         salesConsigneeName: [ | ||||||
|           { required: true, message: "请输入收货人", trigger: "blur" }, |           {required: true, message: "请输入收货人", trigger: "blur"}, | ||||||
|         ], |         ], | ||||||
|         salesConsigneeDetail: [ |         salesConsigneeDetail: [ | ||||||
|           { required: true, message: "请输入详细地址", trigger: "blur" }, |           {required: true, message: "请输入详细地址", trigger: "blur"}, | ||||||
|         ], |         ], | ||||||
|       }, |       }, | ||||||
|       form: { |       form: { | ||||||
|  | @ -197,10 +222,13 @@ export default { | ||||||
|           this.form.storeCenter = res.result.storeCenter; |           this.form.storeCenter = res.result.storeCenter; | ||||||
|           Cookies.set("userInfoSeller", JSON.stringify(res.result)); |           Cookies.set("userInfoSeller", JSON.stringify(res.result)); | ||||||
|           //库存预警数赋值 |           //库存预警数赋值 | ||||||
| 
 |  | ||||||
|           this.$nextTick(() => { |           this.$nextTick(() => { | ||||||
|             this.stockWarningForm.stockWarning = res.result.stockWarning + ""; |             this.stockWarningForm.stockWarning = res.result.stockWarning + ""; | ||||||
|           }); |           }); | ||||||
|  |           if (res.result.merchantEuid) { | ||||||
|  |             //赋予坐席id | ||||||
|  |             this.udeskForm.merchantEuid = res.result.merchantEuid; | ||||||
|  |           } | ||||||
|         } |         } | ||||||
|       }); |       }); | ||||||
|     }, |     }, | ||||||
|  | @ -243,6 +271,21 @@ export default { | ||||||
|         } |         } | ||||||
|       }); |       }); | ||||||
|     }, |     }, | ||||||
|  |     merchantSubmit() { | ||||||
|  | 
 | ||||||
|  |       this.$refs.udeskForm.validate((valid) => { | ||||||
|  |         if (valid) { | ||||||
|  |           this.submitLoading = true; | ||||||
|  |           API_Shop.updatEmerchantId(this.udeskForm).then((res) => { | ||||||
|  |             this.submitLoading = false; | ||||||
|  |             if (res.success) { | ||||||
|  |               this.$Message.success("修改成功"); | ||||||
|  |               this.getShopInfo(); | ||||||
|  |             } | ||||||
|  |           }); | ||||||
|  |         } | ||||||
|  |       }); | ||||||
|  |     }, | ||||||
|     // 选中的地址 |     // 选中的地址 | ||||||
|     selectedRegion(val) { |     selectedRegion(val) { | ||||||
|       this.region = val[1]; |       this.region = val[1]; | ||||||
|  | @ -296,7 +339,7 @@ export default { | ||||||
|       this.$set(this.form, "address", item.addr); |       this.$set(this.form, "address", item.addr); | ||||||
|       this.form.storeAddressPath = item.addr; |       this.form.storeAddressPath = item.addr; | ||||||
|       this.form.storeAddressIdPath = item.addrId; |       this.form.storeAddressIdPath = item.addrId; | ||||||
|       this.form.storeCenter = item.position.lng + "," +  item.position.lat  |       this.form.storeCenter = item.position.lng + "," + item.position.lat | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
|   mounted() { |   mounted() { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue