Commit 54c5368b by LJM

箱号截取

parent 50a5154e
...@@ -186,12 +186,13 @@ ...@@ -186,12 +186,13 @@
::v-deep .uni-drawer__content { ::v-deep .uni-drawer__content {
width: 85% !important; width: 85% !important;
height: 100%;
} }
.uni-drawer-layer { .uni-drawer-layer {
width: 100%; width: 100%;
background-color: #ffffff; background-color: #ffffff;
padding: 22rpx 22rpx 0 22rpx; padding: 22rpx 22rpx 20rpx 22rpx;
.tip { .tip {
color: red; color: red;
font-size: 17rpx; font-size: 17rpx;
...@@ -287,11 +288,8 @@ ...@@ -287,11 +288,8 @@
} }
} }
.btn { .btn {
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 100%; width: 100%;
z-index: 999;
.btn1 { .btn1 {
height: 75rpx; height: 75rpx;
background: #1969f9; background: #1969f9;
...@@ -333,12 +331,13 @@ ...@@ -333,12 +331,13 @@
.uni-textarea { .uni-textarea {
width: 100%; width: 100%;
height: 110rpx; height: 110rpx;
min-height: 110rpx;
overflow-y: auto; overflow-y: auto;
background: #ffffff; background: #ffffff;
border-radius: 5rpx; border-radius: 5rpx;
border: 1px solid #1969f9; border: 1px solid #1969f9;
font-size: 17rpx; font-size: 17rpx;
padding: 18rpx 18rpx 0 18rpx; padding: 18rpx 18rpx 10rpx 18rpx;
} }
} }
.select-box { .select-box {
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</template> </template>
<!-- fedex --> <!-- fedex -->
<template v-else-if="index == 3"> <template v-else-if="index == 3">
<input class="uni-input" placeholder="请输入箱号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.box_sn" @input="handleInput(4, $event)" /> <input class="uni-input" placeholder="请输入箱号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.box_sn" @input="handleInput(4, $event)" maxlength="8">
</template> </template>
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text> <text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
...@@ -812,7 +812,14 @@ ...@@ -812,7 +812,14 @@
this.searchParams.mobile_register_all_search = val; this.searchParams.mobile_register_all_search = val;
} else if (type == 2) { } else if (type == 2) {
// 入仓号处理逻辑 // 入仓号处理逻辑
this.searchParams.stock_in_with_stock_in_items_inhouse = val; var str = val;
if (str.startsWith('F')) {
// 如果以 'F' 开头,直接赋值给搜索参数
this.searchParams.stock_in_with_stock_in_items_inhouse = val;
} else {
// 否则去掉最后一个字符后赋值给搜索参数
this.searchParams.stock_in_with_stock_in_items_inhouse = str.slice(0, -1);
}
} else if (type == 3) { } else if (type == 3) {
//FedEx //FedEx
if (val.length > 22) { if (val.length > 22) {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" :maxlength="maxInputLength" /> <input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" :maxlength="maxInputLength" />
</template> </template>
<template v-else-if="index == 2"> <template v-else-if="index == 2">
<input class="uni-input" placeholder="请输入箱号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.box_sn" @input="handleInput(3, $event)" /> <input class="uni-input" placeholder="请输入箱号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.box_sn" @input="handleInput(3, $event)" maxlength="8" />
</template> </template>
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text> <text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
filter_id_warehouse_id: [], //过滤处理的仓库id filter_id_warehouse_id: [], //过滤处理的仓库id
detail: {}, //详情的数据 detail: {}, //详情的数据
hasMoreData: true, //是否分页加载 hasMoreData: true, //是否分页加载
maxInputLength: 8, maxInputLength: 7,
searchParams: { searchParams: {
mobile_register_all_search: '', //全量搜索 mobile_register_all_search: '', //全量搜索
stock_in_with_stock_in_items_inhouse: '', //入仓单号 stock_in_with_stock_in_items_inhouse: '', //入仓单号
...@@ -297,6 +297,12 @@ ...@@ -297,6 +297,12 @@
this.searchParams.mobile_register_all_search = val; this.searchParams.mobile_register_all_search = val;
} else if (type == 2) { } else if (type == 2) {
//入仓号 //入仓号
var str = val;
if (str.startsWith('F')) {
this.maxInputLength = 8;
} else {
this.maxInputLength = 7;
}
this.searchParams.stock_in_with_stock_in_items_inhouse = val; this.searchParams.stock_in_with_stock_in_items_inhouse = val;
} else if (type == 3) { } else if (type == 3) {
//箱号 //箱号
......
...@@ -81,104 +81,106 @@ ...@@ -81,104 +81,106 @@
</view> </view>
<!-- 新增登记 --> <!-- 新增登记 -->
<uni-drawer ref="showRight" mode="right"> <uni-drawer ref="showRight" mode="right">
<view class="uni-drawer-layer"> <scroll-view style="height: 100%;" scroll-y="true">
<view class="title row rowCenter verCenter"> <view class="uni-drawer-layer" style="height: 100%;">
<text class="iconfont icon-juxing2" @click="closeDrawer()"></text> <view class="title row rowCenter verCenter">
<text class="text">新增登记</text> <text class="iconfont icon-juxing2" @click="closeDrawer()"></text>
</view> <text class="text">新增登记</text>
<view class="input-wrap column" style="margin-top: 8rpx;">
<view class="label-title"><text style="color: red;">*</text>仓库:</view>
<view class="select-box row">
<picker @change="bindPickerChange($event,1)" :value="warehouse_index" :range="warehouse_arr" :range-key="'name'" style="width: 100%;">
<view class="row verCenter bothSide wrap">
<view class="uni-input">{{ warehouse_index == -1 ? '请选择仓库' : warehouse_arr[warehouse_index].name }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view>
</view>
<view class="input-wrap column" style="margin-top: 8rpx;">
<view class="label-title"><text style="color: red;">*</text>到货时间:</view>
<view class="select-box row">
<uni-datetime-picker v-model="formParams.register_time" type="datetime" :clear-icon="false" />
</view>
</view>
<view class="input-wrap column" style="margin-top: 8rpx;">
<view class="label-title"><text style="color: red;">*</text>类型:</view>
<view class="select-box row">
<picker @change="bindPickerChange($event,2)" :value="register_type_index" :range="register_type" style="width: 100%;">
<view class="row verCenter bothSide wrap">
<view class="uni-input">{{ register_type_index == -1 ? '请选择类型' : register_type[register_type_index] }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view> </view>
</view> <view class="input-wrap column" style="margin-top: 8rpx;">
<view class="input-wrap column" style="margin-top: 8rpx;"> <view class="label-title"><text style="color: red;">*</text>仓库:</view>
<view class="label-title"><text style="color: red;">*</text>物流公司:</view> <view class="select-box row">
<view class="select-box row"> <picker @change="bindPickerChange($event,1)" :value="warehouse_index" :range="warehouse_arr" :range-key="'name'" style="width: 100%;">
<picker @change="bindPickerChange($event,3)" :value="logistics_company_index" :range="logistics_company" style="width: 100%;"> <view class="row verCenter bothSide wrap">
<view class="row verCenter bothSide wrap"> <view class="uni-input">{{ warehouse_index == -1 ? '请选择仓库' : warehouse_arr[warehouse_index].name }}</view>
<view class="uni-input">{{ logistics_company_index == -1 ? '请选择物流公司' : logistics_company[logistics_company_index] }}</view> <view class="uni-arrow"></view>
<view class="uni-arrow"></view> </view>
</view> </picker>
</picker> </view>
</view>
</view>
<view class="input-wrap column" style="margin-top: 8rpx;">
<view class="row">
<template v-if="formParams.logistics_company != '自提' && formParams.logistics_company != '供应商配送'">
<text style="color: red;font-size: 17rpx;">*</text>
</template>
<text class="label-title">物流单号:</text>
</view> </view>
<view class="input-box"> <view class="input-wrap column" style="margin-top: 8rpx;">
<textarea class="uni-textarea" placeholder-style="color:#919399" placeholder="请输入物流单号" v-model="logistics_sn" @input="handleInputTextArea($event)" /> <view class="label-title"><text style="color: red;">*</text>到货时间:</view>
<view class="select-box row">
<uni-datetime-picker v-model="formParams.register_time" type="datetime" :clear-icon="false" />
</view>
</view> </view>
</view> <view class="input-wrap column" style="margin-top: 8rpx;">
<view class="input-wrap column" style="margin-top: 8rpx;"> <view class="label-title"><text style="color: red;">*</text>类型:</view>
<view class="row"> <view class="select-box row">
<text style="color: red;font-size: 17rpx;">*</text> <picker @change="bindPickerChange($event,2)" :value="register_type_index" :range="register_type" style="width: 100%;">
<text class="label-title">件数:</text> <view class="row verCenter bothSide wrap">
<view class="uni-input">{{ register_type_index == -1 ? '请选择类型' : register_type[register_type_index] }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view>
</view> </view>
<view class="input-box"> <view class="input-wrap column" style="margin-top: 8rpx;">
<input type="number" inputmode="numeric" class="uni-input" placeholder-style="color:#919399" placeholder="请输入件数" v-model="formParams.num" /> <view class="label-title"><text style="color: red;">*</text>物流公司:</view>
<view class="select-box row">
<picker @change="bindPickerChange($event,3)" :value="logistics_company_index" :range="logistics_company" style="width: 100%;">
<view class="row verCenter bothSide wrap">
<view class="uni-input">{{ logistics_company_index == -1 ? '请选择物流公司' : logistics_company[logistics_company_index] }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view>
</view> </view>
</view> <view class="input-wrap column" style="margin-top: 8rpx;">
<view class="input-wrap column" style="margin-top: 8rpx;"> <view class="row">
<view class="row"> <template v-if="formParams.logistics_company != '自提' && formParams.logistics_company != '供应商配送'">
<text class="label-title">其他信息:</text> <text style="color: red;font-size: 17rpx;">*</text>
</template>
<text class="label-title">物流单号:</text>
</view>
<view class="input-box">
<textarea auto-height="true" maxlength="-1" class="uni-textarea" placeholder-style="color:#919399" placeholder="请输入物流单号" v-model="logistics_sn" @input="handleInputTextArea($event)" />
</view>
</view> </view>
<view class="input-box"> <view class="input-wrap column" style="margin-top: 8rpx;">
<input type="text" class="uni-input" placeholder-style="color:#919399" placeholder="请输入其他信息" v-model="formParams.other_info" /> <view class="row">
<text style="color: red;font-size: 17rpx;">*</text>
<text class="label-title">件数:</text>
</view>
<view class="input-box">
<input type="number" inputmode="numeric" class="uni-input" placeholder-style="color:#919399" placeholder="请输入件数" v-model="formParams.num" />
</view>
</view> </view>
</view> <view class="input-wrap column" style="margin-top: 8rpx;">
<view class="pack"> <view class="row">
<view class="h2 row bothSide verCenter" style="margin-top: 10rpx;"> <text class="label-title">其他信息:</text>
<view class="row verCenter">
<text style="color: red;" v-if="formParams.register_type == 2">*</text>
<text>登记照片:</text>
<text class="tt">最多只支持{{ maxNum }}张图</text>
</view> </view>
<view class="num"> <view class="input-box">
<text class="t1">{{ image_list.length }}</text> <input type="text" class="uni-input" placeholder-style="color:#919399" placeholder="请输入其他信息" v-model="formParams.other_info" />
<text class="t2">/10</text>
</view> </view>
</view> </view>
<view class="pic-list row"> <view class="pack">
<template v-if="image_list.length > 0"> <view class="h2 row bothSide verCenter" style="margin-top: 10rpx;">
<view class="box" v-for="(item, index) in image_list" :key="index"> <view class="row verCenter">
<image :src="item" mode="aspectFill" @click="previewChange(image_list, index)"></image> <text style="color: red;" v-if="formParams.register_type == 2">*</text>
<text class="iconfont icon-a-juxing11" @click="deletePic(index)"></text> <text>登记照片:</text>
<text class="tt">最多只支持{{ maxNum }}张图</text>
</view>
<view class="num">
<text class="t1">{{ image_list.length }}</text>
<text class="t2">/10</text>
</view> </view>
</template> </view>
<view class="default row rowCenter verCenter" @click="chooseImageChange()" v-if="image_list.length < maxNum"><text class="iconfont icon-a-juxing3"></text></view> <view class="pic-list row">
<template v-if="image_list.length > 0">
<view class="box" v-for="(item, index) in image_list" :key="index">
<image :src="item" mode="aspectFill" @click="previewChange(image_list, index)"></image>
<text class="iconfont icon-a-juxing11" @click="deletePic(index)"></text>
</view>
</template>
<view class="default row rowCenter verCenter" @click="chooseImageChange()" v-if="image_list.length < maxNum"><text class="iconfont icon-a-juxing3"></text></view>
</view>
</view>
<view class="btn row rowCenter verCenter">
<view class="row btn1 row rowCenter verCenter" style="width:100%" @click="addSeparateStockInRegister()">确认登记</view>
</view> </view>
</view> </view>
<view class="btn row rowCenter verCenter"> </scroll-view>
<view class="row btn1 row rowCenter verCenter" style="width:100%" @click="addSeparateStockInRegister()">确认登记</view>
</view>
</view>
</uni-drawer> </uni-drawer>
<!-- 打印入仓号 --> <!-- 打印入仓号 -->
<uni-drawer ref="showRightPrint" mode="right"> <uni-drawer ref="showRightPrint" mode="right">
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" maxlength="8" /> <input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" maxlength="8" />
</template> </template>
<template v-else-if="index == 2"> <template v-else-if="index == 2">
<input class="uni-input" placeholder="请输入箱号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.box_sn" @input="handleInput(4, $event)" /> <input class="uni-input" placeholder="请输入箱号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.box_sn" @input="handleInput(4, $event)" maxlength="8" />
</template> </template>
<template v-else-if="index == 3"> <template v-else-if="index == 3">
<input class="uni-input" placeholder="请输入FedEx" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.tracking_no" @input="handleInput(0, $event)" /> <input class="uni-input" placeholder="请输入FedEx" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.tracking_no" @input="handleInput(0, $event)" />
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" /> <input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(2, $event)" />
</template> </template>
<template v-else-if="index == 2"> <template v-else-if="index == 2">
<input class="uni-input" placeholder="请输入箱号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.box_sn" @input="handleInput(3, $event)" /> <input class="uni-input" placeholder="请输入箱号" placeholder-style="color:#919399" :focus="is_focus" v-model="searchParams.box_sn" @input="handleInput(3, $event)" maxlength="8">
</template> </template>
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text> <text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment