|
@@ -13,7 +13,8 @@
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
|
<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="请填写金额" />
|
|
|
|
|
|
|
+ <input type="number" v-model="form.allowDebtAmount" style="width:240upx;" @focus="form.allowDebtAmount=''" placeholder-class="phcolor" class="tui-input" name="allowDebtAmount" placeholder="请填写金额" />
|
|
|
|
|
+ <button class="admin-button-com middle blue" @click="allSetDebt" style="margin-left:10upx;">已有客户生效</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -21,6 +22,7 @@
|
|
|
<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>
|
|
</view>
|
|
|
|
|
+ <button class="admin-button-com middle blue" @click="allLookStock" style="margin-left:80upx;">已有客户生效</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
<tui-list-cell class="line-cell" :hover="false">
|
|
@@ -48,7 +50,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<view class="btn-row">
|
|
<view class="btn-row">
|
|
|
- <button class="admin-button-com middle blue" @click="submitHomeDelivery">已有客户全部设置</button>
|
|
|
|
|
|
|
+ <button class="admin-button-com middle blue" @click="submitHomeDelivery">已有客户生效</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
@@ -58,6 +60,7 @@
|
|
|
<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.showSold == 0 ? false : true" @change="showSoldChange" /> {{form.showSold==1 ? '可以' : '禁止'}}
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <button class="admin-button-com middle blue" @click="allLookSale" style="margin-left:80upx;">已有客户生效</button>
|
|
|
</tui-list-cell>
|
|
</tui-list-cell>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -73,7 +76,7 @@ import AppAvatarModule from '@/components/module/app-avatar'
|
|
|
import AppAreaSel from '@/components/app-area-sel'
|
|
import AppAreaSel from '@/components/app-area-sel'
|
|
|
import AppUploader from "@/components/app-uploader";
|
|
import AppUploader from "@/components/app-uploader";
|
|
|
import { getDetail } from '@/api/shop'
|
|
import { getDetail } from '@/api/shop'
|
|
|
-import { setChange,setCheck,setShowStock,modifyAllHomeAmount } from "@/api/custom"
|
|
|
|
|
|
|
+import { setChange,setCheck,setShowStock,modifyAllHomeAmount,allCredit,allSetLookStock,allSetLookSale } from "@/api/custom"
|
|
|
export default {
|
|
export default {
|
|
|
name: 'set',
|
|
name: 'set',
|
|
|
components: {
|
|
components: {
|
|
@@ -131,14 +134,43 @@ export default {
|
|
|
homeChange(e){
|
|
homeChange(e){
|
|
|
this.form.home = e.target.value ? 1 : 0
|
|
this.form.home = e.target.value ? 1 : 0
|
|
|
},
|
|
},
|
|
|
|
|
+ allLookSale(){
|
|
|
|
|
+ this.$util.confirmModal({content:'确认全部设置?'},() => {
|
|
|
|
|
+ allSetLookSale({showSold:this.form.showSold}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.$msg('设置成功')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ allSetDebt(){
|
|
|
|
|
+ this.$util.confirmModal({content:'确认全部客户授信?'},() => {
|
|
|
|
|
+ allCredit({amount:this.form.allowDebtAmount}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.$msg('设置成功')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ allLookStock(){
|
|
|
|
|
+ this.$util.confirmModal({content:'确认全部设置?'},() => {
|
|
|
|
|
+ allSetLookStock({showStock:this.form.showStock}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ this.$msg('设置成功')
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
submitHomeDelivery() {
|
|
submitHomeDelivery() {
|
|
|
const homeData = {
|
|
const homeData = {
|
|
|
homeType: this.form.homeType,
|
|
homeType: this.form.homeType,
|
|
|
homeAmount: this.form.homeAmount
|
|
homeAmount: this.form.homeAmount
|
|
|
}
|
|
}
|
|
|
- modifyAllHomeAmount(homeData).then(res => {
|
|
|
|
|
- uni.hideLoading()
|
|
|
|
|
- this.$msg('设置成功')
|
|
|
|
|
|
|
+ this.$util.confirmModal({content:'确认全部生效?'},() => {
|
|
|
|
|
+ modifyAllHomeAmount(homeData).then(res => {
|
|
|
|
|
+ uni.hideLoading()
|
|
|
|
|
+ this.$msg('设置成功')
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
toSubmit() {
|
|
toSubmit() {
|