|
|
@@ -72,7 +72,13 @@
|
|
|
<el-table-column prop="goods_vo.name" label="商品名称" />
|
|
|
<el-table-column prop="product_vo.sku" label="SKU" />
|
|
|
<el-table-column prop="orderNum" label="订单数量" />
|
|
|
- <el-table-column prop="num" :style="{ color: 'red' }" label="出库数量" />
|
|
|
+ <el-table-column prop="num" label="出库数量">
|
|
|
+ <template #default="scope">
|
|
|
+ <span :style="{ color: scope.row.num > 0 ? 'red' : 'black' }">
|
|
|
+ {{ scope.row.num }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
@@ -81,12 +87,14 @@
|
|
|
width="90%" style="height: 200px" :before-close="handleClose">
|
|
|
<el-form :model="snCodeForm" label-width="auto" style="max-width: 600px">
|
|
|
<el-form-item label="SKU">
|
|
|
- <el-input class="hidden-input" v-model="snCodeForm.bar_code" @keyup.enter="toSearch()" clearable :inputmode="inputmode" ref="inputRef">
|
|
|
- <template #append> <img src="../../assets/images/JP.png" @click="inputmode='text'" class="w-8 h-8" /> </template>
|
|
|
+ <el-input class="hidden-input" v-model="snCodeForm.bar_code" @keyup.enter="toSearch()" clearable
|
|
|
+ :inputmode="inputmode" ref="inputRef">
|
|
|
+ <template #append> <img src="../../assets/images/JP.png" @click="getInfo" class="w-8 h-8" />
|
|
|
+ </template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="序列号">
|
|
|
- <el-input v-model="snCodeForm.sn_code" clearable inputmode="none" ref="snInputRef"
|
|
|
+ <el-input v-model="snCodeForm.sn_code" clearable :inputmode="inputmode" ref="snInputRef"
|
|
|
@keyup.enter="toSnCode()" />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -99,7 +107,7 @@
|
|
|
</div>
|
|
|
</template> -->
|
|
|
</el-dialog>
|
|
|
- <div class="flex justify-center pt-2 pb-2 mt-4 w-full fixed bottom-0 bg-white left-0"
|
|
|
+ <div class="flex justify-center pt-2 pb-2 mt-4 w-full fixed bottom-0 bg-white left-0 z-50"
|
|
|
v-if="send_type.value !== 'EXPRESS_DELIVERY'">
|
|
|
<el-button type="primary" size="large" @click="scanCode">扫码出库</el-button>
|
|
|
<el-button type="primary" size="large"
|
|
|
@@ -107,7 +115,7 @@
|
|
|
@click="getOrderNumber">获取运单号</el-button>
|
|
|
<el-button type="primary" size="large" v-else @click="ship">发货</el-button>
|
|
|
</div>
|
|
|
- <div class="flex justify-center pt-2 pb-2 mt-4 w-full fixed bottom-0 bg-white left-0" v-else>
|
|
|
+ <div class="flex justify-center pt-2 pb-2 mt-4 w-full fixed bottom-0 bg-white left-0 z-50" v-else>
|
|
|
<el-button type="primary" size="large" @click="scanCode">扫码出库</el-button>
|
|
|
<el-button type="primary" size="large" @click="ship">发货</el-button>
|
|
|
</div>
|
|
|
@@ -115,7 +123,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
-import { ref, onMounted, watch, reactive, nextTick } from 'vue';
|
|
|
+import { ref, onMounted, watch, reactive, nextTick, onBeforeUnmount } from 'vue';
|
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
|
import { orderApi, infoApi, dictionaryAPI } from '@/api/api'
|
|
|
import { regionData, codeToText } from 'element-china-area-data'
|
|
|
@@ -219,8 +227,13 @@ const enableVirtualKeyboard = (event) => {
|
|
|
event.target.readOnly = false;
|
|
|
};
|
|
|
const getInfo = () => {
|
|
|
- inputmode.value = 'text'
|
|
|
- inputRef.value.focus();
|
|
|
+ if (inputmode.value == 'none') {
|
|
|
+ inputmode.value = 'text'
|
|
|
+ inputRef.value.focus();
|
|
|
+ } else {
|
|
|
+ inputmode.value = 'none'
|
|
|
+ inputRef.value.focus();
|
|
|
+ }
|
|
|
}
|
|
|
/* 扫sku */
|
|
|
const toSearch = async () => {
|
|
|
@@ -280,7 +293,7 @@ const toSearch = async () => {
|
|
|
};
|
|
|
//扫描序列号
|
|
|
const toSnCode = async () => {
|
|
|
- alert(snCodeForm.sn_code);
|
|
|
+ if(!sku.value) return ElMessage.error('请先扫描sku!')
|
|
|
try {
|
|
|
const res: any = await orderApi.getsnCode(
|
|
|
"out",
|
|
|
@@ -344,7 +357,7 @@ const scanCode = () => {
|
|
|
// 首先,让输入框失去焦点,这会阻止键盘的唤起
|
|
|
//inputRef.value.removeAttribute('readonly');
|
|
|
inputRef.value.focus();
|
|
|
- inputmode.value='none'
|
|
|
+ inputmode.value = 'none'
|
|
|
}
|
|
|
}, 100);
|
|
|
} catch (error) {
|
|
|
@@ -581,6 +594,7 @@ const getInforList = async () => {
|
|
|
.p-4 {
|
|
|
padding: 1rem;
|
|
|
}
|
|
|
+
|
|
|
.hidden-input .el-input__inner {
|
|
|
width: 0;
|
|
|
padding: 0;
|