Files
pda-cli/src/components/storefabric/FabricOutScanBar.vue
T

83 lines
2.0 KiB
Vue

<template>
<view>
<view v-if="canScan" class="flex-white-plr26 ptb20 bdb_f5 fabric-out-scanRow">
<text class="mr26">条码资料</text>
<input
type="text"
:value="value"
class="fabric-out-scanInput"
placeholder="扫描条码"
@input="$emit('input', $event.detail.value)"
@confirm="$emit('scan')"
/>
<view
v-if="scanning"
class="fabric-out-scanClose"
@click.stop="$emit('phone-scan')"
>
关闭扫码
</view>
<view
v-else
class="fabric-out-toolbarIcon"
@click.stop="$emit('phone-scan')"
>
<u-icon name="scan" size="44" color="#595959" />
</view>
<checkbox-group @change="$emit('delete-mode-change', $event)">
<label class="fabric-out-delCheck">
<checkbox :checked="deleteMode" />删除
</label>
</checkbox-group>
</view>
<view v-else class="fabric-out-scanTip">{{ disabledTip }}</view>
<view v-if="message" class="fabric-out-msgTip">{{ message }}</view>
</view>
</template>
<script>
export default {
props: {
canScan: { type: Boolean, default: false },
value: { type: String, default: '' },
deleteMode: { type: Boolean, default: false },
message: { type: String, default: '' },
disabledTip: { type: String, default: '当前状态不可扫码' },
scanning: { type: Boolean, default: false },
},
};
</script>
<style scoped lang="scss">
@import '@/pages/storefabric/storeFabricBusinessOutPage.scss';
@import '@/common/pda-typography.scss';
.fabric-out-toolbarIcon {
display: flex;
align-items: center;
justify-content: center;
width: 72rpx;
height: 72rpx;
margin-left: 8rpx;
border-radius: 8rpx;
border: 1rpx solid #d9d9d9;
background: #f7f7f7;
flex-shrink: 0;
}
.fabric-out-scanClose {
display: flex;
align-items: center;
justify-content: center;
margin-left: 8rpx;
padding: 0 16rpx;
height: 72rpx;
border-radius: 8rpx;
border: 1rpx solid #2979ff;
background: #eaf2ff;
color: #2979ff;
font-size: $pda-font-action;
flex-shrink: 0;
white-space: nowrap;
}
</style>