Commit 54c5368b by LJM

箱号截取

parent 50a5154e
......@@ -186,12 +186,13 @@
::v-deep .uni-drawer__content {
width: 85% !important;
height: 100%;
}
.uni-drawer-layer {
width: 100%;
background-color: #ffffff;
padding: 22rpx 22rpx 0 22rpx;
padding: 22rpx 22rpx 20rpx 22rpx;
.tip {
color: red;
font-size: 17rpx;
......@@ -287,11 +288,8 @@
}
}
.btn {
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 100%;
z-index: 999;
.btn1 {
height: 75rpx;
background: #1969f9;
......@@ -333,12 +331,13 @@
.uni-textarea {
width: 100%;
height: 110rpx;
min-height: 110rpx;
overflow-y: auto;
background: #ffffff;
border-radius: 5rpx;
border: 1px solid #1969f9;
font-size: 17rpx;
padding: 18rpx 18rpx 0 18rpx;
padding: 18rpx 18rpx 10rpx 18rpx;
}
}
.select-box {
......
......@@ -63,7 +63,7 @@
</template>
<!-- fedex -->
<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>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -812,7 +812,14 @@
this.searchParams.mobile_register_all_search = val;
} 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) {
//FedEx
if (val.length > 22) {
......
......@@ -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" />
</template>
<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>
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
......@@ -193,7 +193,7 @@
filter_id_warehouse_id: [], //过滤处理的仓库id
detail: {}, //详情的数据
hasMoreData: true, //是否分页加载
maxInputLength: 8,
maxInputLength: 7,
searchParams: {
mobile_register_all_search: '', //全量搜索
stock_in_with_stock_in_items_inhouse: '', //入仓单号
......@@ -297,6 +297,12 @@
this.searchParams.mobile_register_all_search = val;
} 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;
} else if (type == 3) {
//箱号
......
......@@ -81,104 +81,106 @@
</view>
<!-- 新增登记 -->
<uni-drawer ref="showRight" mode="right">
<view class="uni-drawer-layer">
<view class="title row rowCenter verCenter">
<text class="iconfont icon-juxing2" @click="closeDrawer()"></text>
<text class="text">新增登记</text>
</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,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>
<scroll-view style="height: 100%;" scroll-y="true">
<view class="uni-drawer-layer" style="height: 100%;">
<view class="title row rowCenter verCenter">
<text class="iconfont icon-juxing2" @click="closeDrawer()"></text>
<text class="text">新增登记</text>
</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,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 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 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-box">
<textarea class="uni-textarea" placeholder-style="color:#919399" placeholder="请输入物流单号" v-model="logistics_sn" @input="handleInputTextArea($event)" />
<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>
<view class="input-wrap column" style="margin-top: 8rpx;">
<view class="row">
<text style="color: red;font-size: 17rpx;">*</text>
<text class="label-title">件数:</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,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 class="input-box">
<input type="number" inputmode="numeric" class="uni-input" placeholder-style="color:#919399" placeholder="请输入件数" v-model="formParams.num" />
<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,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 class="input-wrap column" style="margin-top: 8rpx;">
<view class="row">
<text class="label-title">其他信息:</text>
<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 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 class="input-box">
<input type="text" class="uni-input" placeholder-style="color:#919399" placeholder="请输入其他信息" v-model="formParams.other_info" />
<view class="input-wrap column" style="margin-top: 8rpx;">
<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 class="pack">
<view class="h2 row bothSide verCenter" style="margin-top: 10rpx;">
<view class="row verCenter">
<text style="color: red;" v-if="formParams.register_type == 2">*</text>
<text>登记照片:</text>
<text class="tt">最多只支持{{ maxNum }}张图</text>
<view class="input-wrap column" style="margin-top: 8rpx;">
<view class="row">
<text class="label-title">其他信息:</text>
</view>
<view class="num">
<text class="t1">{{ image_list.length }}</text>
<text class="t2">/10</text>
<view class="input-box">
<input type="text" class="uni-input" placeholder-style="color:#919399" placeholder="请输入其他信息" v-model="formParams.other_info" />
</view>
</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 class="pack">
<view class="h2 row bothSide verCenter" style="margin-top: 10rpx;">
<view class="row verCenter">
<text style="color: red;" v-if="formParams.register_type == 2">*</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>
</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 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 class="btn row rowCenter verCenter">
<view class="row btn1 row rowCenter verCenter" style="width:100%" @click="addSeparateStockInRegister()">确认登记</view>
</view>
</view>
</scroll-view>
</uni-drawer>
<!-- 打印入仓号 -->
<uni-drawer ref="showRightPrint" mode="right">
......
......@@ -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" />
</template>
<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 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)" />
......
......@@ -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)" />
</template>
<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>
</view>
<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