将单据中仓库的新增和批量选择挪动位置

This commit is contained in:
季圣华 2023-05-18 23:31:52 +08:00
parent 4099262313
commit 084c047b6c
13 changed files with 97 additions and 129 deletions

View File

@ -60,7 +60,10 @@
class="td"
:key="col.key"
:style="buildTdStyle(col)">
<span style="padding: 0 5px;">{{ col.title }}</span>
<span style="padding: 0 5px;">
{{ col.title }}
<slot name="depotBatchSet" v-if="col.key === 'depotId'" :target="getVM()"/>
</span>
</div>
</template>
</div>
@ -208,7 +211,10 @@
@blur="(v)=>handleBlurSearch(v,id,row,col)"
allowClear
>
<div slot="dropdownRender" slot-scope="menu">
<v-nodes :vnodes="menu" />
<slot name="depotAdd" v-if="col.key === 'depotId'" :target="getVM()"/>
</div>
<!--<template v-for="(opt,optKey) in col.options">-->
<!--<a-select-option :value="opt.value" :key="optKey">{{ opt.title }}</a-select-option>-->
<!--</template>-->
@ -779,7 +785,13 @@
export default {
name: 'JEditableTable',
components: { JDate, Draggable, JInputPop, JFilePop, JSelectList },
components: {
JDate, Draggable, JInputPop, JFilePop, JSelectList,
VNodes: {
functional: true,
render: (h, ctx) => ctx.props.vnodes,
}
},
provide() {
return {
parentIsJEditableTable: true,

View File

@ -260,7 +260,7 @@ export const BillModalMixin = {
},
handleBatchSetDepot() {
this.$refs.batchSetDepotModalForm.add();
this.$refs.batchSetDepotModalForm.title = "批量设置仓库";
this.$refs.batchSetDepotModalForm.title = "批量切换仓库";
this.$refs.batchSetDepotModalForm.disableSubmit = false;
},
addDepot() {

View File

@ -58,17 +58,13 @@
<a-button @click="stopScan">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">

View File

@ -57,17 +57,13 @@
<a-button @click="stopScan">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">

View File

@ -57,17 +57,13 @@
<a-button @click="stopScan">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">

View File

@ -73,17 +73,13 @@
<a-button @click="stopScan">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">

View File

@ -73,17 +73,13 @@
<a-button @click="stopScan">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">

View File

@ -77,17 +77,13 @@
<a-button @click="stopScan" style="margin-right: 8px">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button>仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">

View File

@ -77,30 +77,26 @@
<a-col v-if="scanStatus" :md="6" :sm="24">
<a-button @click="scanEnter" style="margin-right: 8px">扫码录入</a-button>
</a-col>
<a-col v-if="!scanStatus" :md="16" :sm="24" style="padding: 0 6px 0 12px">
<a-col v-if="!scanStatus" :md="16" :sm="24" style="padding: 0 8px 0 12px">
<a-input placeholder="请扫码商品条码并回车" v-model="scanBarCode" @pressEnter="scanPressEnter" ref="scanBarCode"/>
</a-col>
<a-col v-if="!scanStatus" :md="6" :sm="24" style="padding: 0px 12px 0 0">
<a-col v-if="!scanStatus" :md="6" :sm="24" style="padding: 0px 24px 0 0">
<a-button @click="stopScan" style="margin-right: 8px">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button>仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;">
<a-col :md="24" :sm="24">
<a-button style="margin-left: 8px" @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
<a-button @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">

View File

@ -79,17 +79,13 @@
<a-button @click="stopScan" style="margin-right: 8px">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button>仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">

View File

@ -89,17 +89,13 @@
<a-button @click="stopScan">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">

View File

@ -77,17 +77,13 @@
<a-button @click="stopScan" style="margin-right: 8px">收起扫码</a-button>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button>仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">

View File

@ -87,21 +87,17 @@
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;">
<a-col :md="24" :sm="24">
<a-dropdown>
<a-menu slot="overlay">
<a-menu-item key="1" @click="handleBatchSetDepot"><a-icon type="setting"/>批量设置</a-menu-item>
<a-menu-item v-if="isTenant" key="2" @click="addDepot"><a-icon type="plus"/>新增仓库</a-menu-item>
</a-menu>
<a-button>仓库操作 <a-icon type="down" /></a-button>
</a-dropdown>
</a-col>
</a-row>
<a-row :gutter="24" style="float:left;padding-bottom: 5px;">
<a-col :md="24" :sm="24">
<a-button style="margin-left: 8px" @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
<a-button @click="handleHistoryBillList"><a-icon type="history" />历史单据</a-button>
</a-col>
</a-row>
</template>
<template #depotBatchSet>
<a-icon type="down" @click="handleBatchSetDepot" />
</template>
<template #depotAdd>
<a-divider v-if="isTenant" style="margin: 4px 0;" />
<div v-if="isTenant" style="padding: 4px 8px; cursor: pointer;" @click="addDepot"><a-icon type="plus" /> 新增仓库</div>
</template>
</j-editable-table>
<a-row class="form-row" :gutter="24">
<a-col :lg="24" :md="24" :sm="24">