|
@@ -12,7 +12,7 @@
|
|
|
<view class="card-box" v-if="detailData">
|
|
|
<view class="card-row flex align_center justify_between">
|
|
|
<view class="label">货架名称:</view>
|
|
|
- <view class="text flex align_center justify_end"@click="editShelf">
|
|
|
+ <view class="text flex align_center justify_end" @click="editShelf">
|
|
|
<text>{{detailData.shelfName}}</text>
|
|
|
<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
|
|
|
</view>
|
|
@@ -95,13 +95,17 @@
|
|
|
<u-image :src="`../../static/${$config('themePath')}/def_no_data@3x.png`" width="180"
|
|
|
height="180" border-radius="10"></u-image>
|
|
|
</view>
|
|
|
+ <view>暂无货位信息,请点击</view>
|
|
|
<view class="flex">
|
|
|
- 暂无货位信息,请点击
|
|
|
<view>
|
|
|
<text @click="toPlRacking">批量上架</text>
|
|
|
<u-badge :offset="[-6,-10]" v-if="showDot" :is-dot="true" size="mini"
|
|
|
type="error"></u-badge>
|
|
|
</view>
|
|
|
+ <view>
|
|
|
+ <text></text>或
|
|
|
+ <text @click="toImportTpl">导入模板</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="nodata" v-else>
|
|
@@ -145,6 +149,27 @@
|
|
|
<view @click="showCancelShelf=false" style="border: 1px solid #eee;border-bottom:0;width: 50%;padding: 0.6rem 0;">取消</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
+ <!-- 导入模板 -->
|
|
|
+ <u-popup v-model="showImportTpl" mode="center" border-radius="14" length="80%">
|
|
|
+ <view style="padding: 1rem;text-align: center;font-size: 1rem;">请选择货架模板</view>
|
|
|
+ <scroll-view
|
|
|
+ scroll-y
|
|
|
+ class="slot-content"
|
|
|
+ style="padding: 0 1rem 1rem;text-align: center;height: 30vh;">
|
|
|
+ <u-radio-group v-model="templateSn" :wrap="true">
|
|
|
+ <u-radio
|
|
|
+ v-for="(item, index) in templateList" :key="item.id"
|
|
|
+ :name="item.templateSn"
|
|
|
+ >
|
|
|
+ {{item.templateName}}
|
|
|
+ </u-radio>
|
|
|
+ </u-radio-group>
|
|
|
+ </scroll-view>
|
|
|
+ <view class="flex align_center justify_between" style="text-align: center;font-size: 1rem;">
|
|
|
+ <view @click="toImportTplOk" style="border: 1px solid #eee;border-right:0;border-bottom:0;width: 50%;padding: 0.6rem 0;color: dodgerblue;">确定</view>
|
|
|
+ <view @click="toImportTpCancel" style="border: 1px solid #eee;border-bottom:0;width: 50%;padding: 0.6rem 0;">取消</view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -156,7 +181,9 @@
|
|
|
getProductPlace,
|
|
|
getShelfPriceShow,
|
|
|
updateShelfPriceShow,
|
|
|
- shelfModifState
|
|
|
+ shelfModifState,
|
|
|
+ shelfTemplateList,
|
|
|
+ importShelfTemplate
|
|
|
} from '@/api/shelf'
|
|
|
import {
|
|
|
shelfCartNotEmpty
|
|
@@ -174,6 +201,9 @@
|
|
|
switchVal: false,
|
|
|
showMenus: false,
|
|
|
scrollH: 400,
|
|
|
+ showImportTpl: false,
|
|
|
+ templateSn: null,
|
|
|
+ templateList: [],
|
|
|
popData: [{
|
|
|
title: '快速补货',
|
|
|
val: '0'
|
|
@@ -258,6 +288,51 @@
|
|
|
this.shelfPlaceList = null
|
|
|
this.getShelfPlace(true)
|
|
|
},
|
|
|
+ // 导入模板弹框
|
|
|
+ toImportTpl(){
|
|
|
+ if(this.templateList.length == 0){
|
|
|
+ uni.showLoading({
|
|
|
+ mask: true,
|
|
|
+ title: '加载中...'
|
|
|
+ })
|
|
|
+ shelfTemplateList({pageNo:1,pageSize:100}).then(res=>{
|
|
|
+ this.templateList = res.data&&res.data.list||[]
|
|
|
+ if(this.templateList.length){
|
|
|
+ this.showImportTpl = true
|
|
|
+ uni.hideLoading()
|
|
|
+ }else{
|
|
|
+ this.toashMsg(res.message)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.showImportTpl = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 导入模板弹框确定
|
|
|
+ toImportTplOk(){
|
|
|
+ if(this.templateSn){
|
|
|
+ uni.showLoading({
|
|
|
+ mask: true,
|
|
|
+ title: '导入模板弹...'
|
|
|
+ })
|
|
|
+ importShelfTemplate({ shelfSn: this.shelfSn, templateSn: this.templateSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.toashMsg(res.message)
|
|
|
+ this.toImportTpCancel()
|
|
|
+ this.getShelfDetal()
|
|
|
+ this.updateHw()
|
|
|
+ }
|
|
|
+ uni.hideLoading()
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.toashMsg('请选择模板')
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 关闭模板导入
|
|
|
+ toImportTpCancel(){
|
|
|
+ this.showImportTpl = false
|
|
|
+ this.templateSn = null
|
|
|
+ },
|
|
|
// 批量上架
|
|
|
toPlRacking() {
|
|
|
const url = this.showDot ? '/pages/batchShelves/cartList' : '/pages/batchShelves/index'
|