更新订单列表详情,更新商品管理,更新代客下单
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="u-p-30 safe-page">
|
||||
<up-sticky v-if="option.type==='edit'" offset-top="20" zIndex="99">
|
||||
<myTabs :list="tabsList" @change="tabsChange"></myTabs>
|
||||
<myTabs :list="tabsList" v-model="tabsCurrent"></myTabs>
|
||||
</up-sticky>
|
||||
|
||||
<view class="box">
|
||||
@@ -11,19 +11,30 @@
|
||||
err-show-type="toast" validateTrigger="submit" label-width="350" ref="Forms">
|
||||
<view class="block">
|
||||
<uni-forms-item label="商品类型" required showRequired>
|
||||
<view class="u-flex u-flex-wrap types " :class="{disabled:option.productId!==''}">
|
||||
<up-radio-group
|
||||
:disabled="option.type=='edit'"
|
||||
v-model="FormData.typeEnum"
|
||||
placement="row"
|
||||
>
|
||||
<up-radio
|
||||
:customStyle="{marginRight: '30px'}"
|
||||
v-for="(item, index) in pageData.types"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:name="item.value"
|
||||
>
|
||||
</up-radio>
|
||||
</up-radio-group>
|
||||
<!-- <view class="u-flex u-flex-wrap types " :class="{disabled:option.productId!==''}">
|
||||
<view class="item" @tap="changeFormData('typeEnum',item.value)"
|
||||
:class="{active:FormData.typeEnum===item.value}"
|
||||
v-for="(item,index) in pageData.types" :key="index">
|
||||
<!-- <view class="gou u-flex u-row-right u-col-top u-p-t-4 u-p-r-4">
|
||||
<uni-icons type="checkmarkempty" :size="8" color="#fff"></uni-icons>
|
||||
</view> -->
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="u-font-24 color-999 u-m-t-10">
|
||||
{{item.desc}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</uni-forms-item>
|
||||
<uni-forms-item ref="fileItem" label="图片">
|
||||
@@ -38,11 +49,6 @@
|
||||
</uni-forms-item>
|
||||
<template v-if="FormData.typeEnum!='group'">
|
||||
<uni-forms-item label="所属分类" required showRequired name="categoryId">
|
||||
<!-- <picker @change="bindPickerChange"
|
||||
range-key="name"
|
||||
:value="pageData.category" :range="pageData.category">
|
||||
<view class="uni-input">请选择分类</view>
|
||||
</picker> -->
|
||||
<uni-data-picker :clear-icon="false" :map="{text:'name',value:'id'}"
|
||||
placeholder="请选择分类" popup-title="请选择分类" :localdata="pageData.category"
|
||||
v-model="FormData.categoryId">
|
||||
@@ -50,10 +56,6 @@
|
||||
</uni-forms-item>
|
||||
</template>
|
||||
|
||||
<!-- <uni-forms-item label="产品编码">
|
||||
<uni-easyinput :paddingNone="inputPaddingNone" :placeholderStyle="placeholderStyle"
|
||||
:inputBorder="inputBorder" v-model="FormData.goodsCode" placeholder="请输入商品编码" />
|
||||
</uni-forms-item> -->
|
||||
<view class="border-top-0">
|
||||
<uni-forms-item label="商品描述">
|
||||
<uni-easyinput :paddingNone="inputPaddingNone" :placeholderStyle="placeholderStyle"
|
||||
@@ -726,161 +728,27 @@
|
||||
|
||||
</uni-forms>
|
||||
<view style="height: 200rpx;"></view>
|
||||
<view style="padding-left: 110rpx;padding-right: 110rpx;" class="u-m-t-20" v-if="option.type==='edit'" @click="delModelShow">
|
||||
<my-button bgColor="#F9F9F9" shape="circle" type="cancel" >
|
||||
<view class="color-red">删除该商品</view>
|
||||
</my-button>
|
||||
</view>
|
||||
<view class="bootom">
|
||||
<view class="save-btn-box">
|
||||
<my-button shape="circle" @tap="save">保存</my-button>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-20" v-if="option.type==='edit'" @click="delModelShow">
|
||||
<my-button shape="circle" type="cancel" bgColor="#fff">
|
||||
<!-- <view class="u-m-t-20" v-if="option.type==='edit'" @click="delModelShow">
|
||||
<my-button bgColor="#fff" shape="circle" type="cancel" >
|
||||
<view class="color-red">删除该商品</view>
|
||||
</my-button>
|
||||
<!-- <text>删除该商品</text> -->
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<template v-if="tabsCurrent===1">
|
||||
<view class="stock">
|
||||
<uni-forms :border="false" err-show-type="toast" validateTrigger="submit" ref="Forms1">
|
||||
<!-- <view class="block ">
|
||||
<uni-forms-item label="" required>
|
||||
<view class="u-flex">
|
||||
<view class="label-title">库存模式</view>
|
||||
<view class="u-flex-1 u-p-l-100">
|
||||
<uni-data-checkbox v-model="stockData.inventoryMode"
|
||||
:localdata="InventoryModeData"></uni-data-checkbox>
|
||||
</view>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view> -->
|
||||
<view class="block ">
|
||||
<uni-forms-item label="">
|
||||
<view class="u-flex u-row-between">
|
||||
<view class="label-title">库存开关</view>
|
||||
<my-switch v-model="FormData.isStock"
|
||||
@change="updateProductStatus(FormData.id,'isStock')"></my-switch>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="block ">
|
||||
<uni-forms-item label="">
|
||||
<view class="u-flex u-row-between">
|
||||
<view class="label-title">共享库存</view>
|
||||
<my-switch v-model="FormData.isDistribute"
|
||||
@change="updateProductStatus(FormData.id,'isDistribute')"></my-switch>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="block ">
|
||||
<uni-forms-item label="">
|
||||
<view class="u-flex u-row-between">
|
||||
<view class="label-title">售罄</view>
|
||||
<my-switch v-model="FormData.isPauseSale"
|
||||
@change="updateProductStatus(FormData.id,'isPauseSale')"></my-switch>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
|
||||
<template v-if="FormData.typeEnum!=='sku'">
|
||||
<view class="block ">
|
||||
<uni-forms-item label="">
|
||||
<view class="u-flex u-row-between">
|
||||
<view class="label-title">上架</view>
|
||||
<my-switch v-model="FormData.isGrounding"
|
||||
@change="updateProductStatus(FormData.id,'isGrounding')"></my-switch>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
<view class="block default-box-padding">
|
||||
<view class="u-flex">
|
||||
<view class="">
|
||||
<my-button @tap="toRecoders" :height="60">库存记录</my-button>
|
||||
</view>
|
||||
<view class="u-m-l-40">
|
||||
<my-button :height="60" @tap="toCheck">库存盘点</my-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-else>
|
||||
<view class="block default-box-padding">
|
||||
<view class="u-flex">
|
||||
<view class="">
|
||||
<my-button @tap="toRecoders" :height="60">库存记录</my-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-text-center block">
|
||||
<view class="u-flex font-bold u-m-t-30 u-m-b-20">
|
||||
<!-- <view class="u-flex-1">商品信息</view> -->
|
||||
<view class="u-flex-1">规格</view>
|
||||
<view class="u-flex-1">库存</view>
|
||||
<view class="u-flex-1">售罄</view>
|
||||
<view class="u-flex-1">上架</view>
|
||||
<view class="u-flex-1">操作</view>
|
||||
</view>
|
||||
<view class="" v-for="(item,index) in pageData.skuList" :key="index">
|
||||
<view class="u-flex u-p-b-12 u-p-t-12 ">
|
||||
<view class="u-flex-1">{{item.specSnap}}</view>
|
||||
<!-- <view class="u-flex-1">{{item.salePrice}}</view> -->
|
||||
<view class="u-flex-1">{{item.stockNumber}}{{item.unitName}}</view>
|
||||
<view class="u-flex-1 u-flex u-row-center"><my-switch v-model="item.isPauseSale"
|
||||
@change="updateProductStatus(item.skuId,'isPauseSale')"></my-switch>
|
||||
</view>
|
||||
<view class="u-flex-1 u-flex u-row-center"><my-switch v-model="item.isGrounding"
|
||||
@change="updateProductStatus(item.skuId,'isGrounding')"></my-switch>
|
||||
</view>
|
||||
<view class="u-flex u-row-center">
|
||||
<my-button @tap="skuToCheck(item)" :width="120" :height="40">
|
||||
<view class="u-font-24 no-wrap">库存盘点</view>
|
||||
</my-button>
|
||||
<!-- <my-button @tap="moreShow(item,index)" :width="100" :height="40">
|
||||
<view class="u-font-24 no-wrap">更多</view>
|
||||
</my-button> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<!-- <view class="block ">
|
||||
<uni-forms-item label="" required>
|
||||
<view class="u-flex">
|
||||
<view class="label-title">剩余库存数量</view>
|
||||
<view class="u-flex-1 u-p-l-40">
|
||||
<uni-easyinput :paddingNone="inputPaddingNone"
|
||||
:placeholderStyle="placeholderStyle" type="number"
|
||||
:inputBorder="inputBorder" v-model="FormData.stockNumber"
|
||||
placeholder="填写库存" />
|
||||
</view>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view> -->
|
||||
<!-- <view class="block ">
|
||||
<uni-forms-item label="" required>
|
||||
<view class="u-flex">
|
||||
<view class="label-title">库存模式</view>
|
||||
<view class="u-flex-1 u-p-l-100">
|
||||
<uni-data-checkbox v-model="stockData.inventoryReset"
|
||||
:localdata="InventoryReset"></uni-data-checkbox>
|
||||
</view>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
</view> -->
|
||||
</uni-forms>
|
||||
|
||||
<view class="btns">
|
||||
<my-button shape="circle">保存</my-button>
|
||||
<my-button shape="circle" type="default" @tap="back">取消</my-button>
|
||||
</view>
|
||||
</view>
|
||||
<edit-haocai :goods="FormData" @cancel="changeTabsCurrent(0)"></edit-haocai>
|
||||
</template>
|
||||
</view>
|
||||
|
||||
@@ -894,11 +762,8 @@
|
||||
</template>
|
||||
</my-model>
|
||||
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- 删除弹窗 -->
|
||||
<my-model @confirm="delmodelConfirm" ref="delModel" desc="确认删除">
|
||||
</my-model>
|
||||
@@ -906,6 +771,9 @@
|
||||
<choose-goods ref="refChooseGoods" @confirm="refChooseGoodsConfirm" :category="pageData.category"></choose-goods>
|
||||
<!-- 更多操作 -->
|
||||
<my-action-sheet @itemClick="actionSheetClick" ref="refMoreSheet" :list="actionSheet.list"></my-action-sheet>
|
||||
</view>
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -922,6 +790,7 @@
|
||||
|
||||
import myModel from '@/components/my-components/my-model'
|
||||
import chooseGoods from './components/choose-goods'
|
||||
import editHaocai from './components/edit-haocai.vue'
|
||||
import chooseGroupCategory from './components/choose-coupon-category'
|
||||
import myRadio from '@/components/my-components/my-radio'
|
||||
import myUploadFile from '@/components/my-components/my-upload-file'
|
||||
@@ -929,6 +798,7 @@
|
||||
import myButton from '@/components/my-components/my-button'
|
||||
import mySwitch from '@/components/my-components/my-switch.vue'
|
||||
import infoBox from "@/commons/utils/infoBox.js"
|
||||
|
||||
import {
|
||||
$types,
|
||||
$defaultSku
|
||||
@@ -1274,7 +1144,13 @@
|
||||
}
|
||||
|
||||
|
||||
const tabsList = ['基础设置', '库存设置']
|
||||
const tabsList = ['基础设置', '耗材绑定']
|
||||
let tabsCurrent = ref(0)
|
||||
function changeTabsCurrent(newval){
|
||||
tabsCurrent.value=newval
|
||||
}
|
||||
|
||||
|
||||
const Forms = ref(null)
|
||||
|
||||
|
||||
@@ -1545,7 +1421,11 @@
|
||||
//页面全部数据
|
||||
const pageData = reactive({
|
||||
// 商品类型
|
||||
types: $types,
|
||||
// types: $types,
|
||||
types: [
|
||||
{name:'单规格',value:'normal'},
|
||||
{name:'多规格',value:'sku'}
|
||||
],
|
||||
// 单位
|
||||
units: [],
|
||||
// 分类
|
||||
@@ -1597,14 +1477,7 @@
|
||||
|
||||
|
||||
|
||||
let tabsCurrent = ref(0)
|
||||
|
||||
function tabsChange(i) {
|
||||
tabsCurrent.value = i
|
||||
// if (tabsCurrent.value === 1 && option.type === 'add') {
|
||||
// showModel('stockTips')
|
||||
// }
|
||||
}
|
||||
|
||||
let timer = null
|
||||
|
||||
@@ -1809,7 +1682,7 @@
|
||||
watchTimerSave(false)
|
||||
})
|
||||
onReady(() => {
|
||||
Forms.value.setRules(rules)
|
||||
Forms.value&&Forms.value.setRules(rules)
|
||||
})
|
||||
watch(() => pageData.types, (newval) => {
|
||||
Forms.value.setRules(rules)
|
||||
@@ -1884,13 +1757,13 @@
|
||||
position: fixed;
|
||||
left: 110rpx;
|
||||
right: 110rpx;
|
||||
bottom: 110rpx;
|
||||
bottom: 140rpx;
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
}
|
||||
|
||||
.box {
|
||||
margin-top: 70rpx;
|
||||
margin-top: 36rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
.block {
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
Reference in New Issue
Block a user