|
|
@@ -5,49 +5,50 @@
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<view class="tui-title">客户可看库存</view>
|
|
|
<view>
|
|
|
- <switch style="transform:scale(0.7,0.7)" :checked="form.showStock == 0 ? false : true" @change="showStockChange" /> {{form.showStock==1 ? '可以' : '不要'}}
|
|
|
+ <switch style="transform:scale(0.7,0.7)" :checked="form.showStock == 0 ? false : true" @change="showStockChange" /> {{form.showStock==1 ? '允许' : '不能'}}
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">默认新客享受</view>
|
|
|
+ <view class="tui-title">新客享受价格</view>
|
|
|
<view>
|
|
|
<switch style="transform:scale(0.7,0.7)" :checked="form.isHd == 1 ? false : true" @change="isHdChange" /> {{form.isHd == 1 ? '批发价' : '零售价'}}
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">默认允许欠款</view>
|
|
|
+ <view class="tui-title">新客允许欠款</view>
|
|
|
<view>
|
|
|
<switch style="transform:scale(0.7,0.7)" :checked="form.allowDebt == 0 ? false : true" @change="allowDebtChange" /> {{form.allowDebt==0 ? '不能' : '允许'}}
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" v-if="form.allowDebt == 1">
|
|
|
- <view class="tui-title ">默认欠款额度</view>
|
|
|
+ <view class="tui-title ">新客欠款额度</view>
|
|
|
<input type="number" v-model="form.allowDebtAmount" @focus="form.allowDebtAmount=''" placeholder-class="phcolor" class="tui-input" name="allowDebtAmount" placeholder="请填写金额" />
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">默认新客要审</view>
|
|
|
+ <view class="tui-title">线下开单超欠</view>
|
|
|
<view>
|
|
|
- <switch style="transform:scale(0.7,0.7)" :checked="form.needCheck == 0 ? false : true" @change="needCheckChange" /> {{form.needCheck==0 ? '不要' : '需要'}}
|
|
|
+ <switch style="transform:scale(0.7,0.7)" :checked="form.overAllowDebt == 0 ? false : true" @change="overAllowDebtChange" /> {{form.overAllowDebt==1 ? '可以' : '不要'}}
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">客户可看销量</view>
|
|
|
+ <view class="tui-title">新客户要审核</view>
|
|
|
<view>
|
|
|
- <switch style="transform:scale(0.7,0.7)" :checked="form.showSold == 0 ? false : true" @change="showSoldChange" /> {{form.showSold==1 ? '可以' : '不要'}}
|
|
|
+ <switch style="transform:scale(0.7,0.7)" :checked="form.needCheck == 0 ? false : true" @change="needCheckChange" /> {{form.needCheck==0 ? '不要' : '需要'}}
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
- <view class="tui-title">线下开单超欠</view>
|
|
|
+ <view class="tui-title">客户可看销量</view>
|
|
|
<view>
|
|
|
- <switch style="transform:scale(0.7,0.7)" :checked="form.overAllowDebt == 0 ? false : true" @change="overAllowDebtChange" /> {{form.overAllowDebt==1 ? '可以' : '不要'}}
|
|
|
+ <switch style="transform:scale(0.7,0.7)" :checked="form.showSold == 0 ? false : true" @change="showSoldChange" /> {{form.showSold==1 ? '可以' : '不要'}}
|
|
|
</view>
|
|
|
</tui-list-cell>
|
|
|
+
|
|
|
</view>
|
|
|
<view class="confirm-btn">
|
|
|
<button class="admin-button-com big blue" formType="submit">提交</button>
|
|
|
@@ -60,9 +61,8 @@ import TuiListCell from '@/components/plugin/list-cell'
|
|
|
import AppAvatarModule from '@/components/module/app-avatar'
|
|
|
import AppAreaSel from '@/components/app-area-sel'
|
|
|
import AppUploader from "@/components/app-uploader";
|
|
|
-import { updateShop } from '@/api/shop'
|
|
|
-import {mapActions} from "vuex";
|
|
|
-import { getDetail } from "@/api/shop"
|
|
|
+import { getDetail } from '@/api/shop'
|
|
|
+import { setChange,setCheck,setShowStock } from "@/api/custom"
|
|
|
export default {
|
|
|
name: 'set',
|
|
|
components: {
|
|
|
@@ -91,11 +91,10 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
|
- this.getSetDetail()
|
|
|
+ this.getShopInfo()
|
|
|
},
|
|
|
- getSetDetail() {
|
|
|
- let id = 0
|
|
|
- getDetail({shopId:id}).then(res=>{
|
|
|
+ getShopInfo() {
|
|
|
+ getDetail().then(res=>{
|
|
|
let data = res.data.info
|
|
|
if (this.$util.isEmpty(data)){
|
|
|
return
|
|
|
@@ -124,10 +123,8 @@ export default {
|
|
|
this.form.needCheck = e.target.value ? 1 : 0
|
|
|
},
|
|
|
toSubmit() {
|
|
|
- this.$msg('开发中')
|
|
|
- return false
|
|
|
- uni.showLoading({mask:true})
|
|
|
- updateShop(this.form).then(res => {
|
|
|
+ uni.showLoading({title: '稍等几秒...',mask:true})
|
|
|
+ setChange(this.form).then(res => {
|
|
|
uni.hideLoading()
|
|
|
this.$msg('修改成功')
|
|
|
setTimeout(() => {
|