Commit e0b8b1b1 by wuqian

Merge branch 'wq' into zzq_bill_order

parents 90c52e7c fb737ac7
......@@ -233,7 +233,7 @@ export function deleteWarehouseInventory(ids: string) {
// 入库单
export function warehouseInRecordListPage(
export function warehouseInRecordListPageApi(
data: warehouseSearchForm,
currentPage: number,
pageSize: number,
......@@ -259,8 +259,7 @@ export function updateInRecordApi(form: InRecordEditForm) {
...form,
})
}
export function getWarehouseInRecordDetail(id: number) {
export function getWarehouseInRecordDetailApi(id: number) {
return axios.get<never, BaseRespData<never>>(
'factory/warehouseInRecord/get',
{
......@@ -270,8 +269,7 @@ export function getWarehouseInRecordDetail(id: number) {
},
)
}
export function getBySku(warehouseId: number, sku: string | null) {
export function getBySkuApi(warehouseId: number, sku: string | null) {
return axios.get<never, BaseRespData<InterskuList[]>>(
'customProductItem/getBySku',
{
......@@ -282,8 +280,7 @@ export function getBySku(warehouseId: number, sku: string | null) {
},
)
}
export function getByWareHouseIdAndCode(wareHouseId: number, code: string | null) {
export function getByWareHouseIdAndCodeApi(wareHouseId: number, code: string | null) {
return axios.get<never, BaseRespData<ILocation[]>>(
'factoryWarehouseLocation/getByWareHouseIdAndCode',
{
......@@ -294,8 +291,7 @@ export function getByWareHouseIdAndCode(wareHouseId: number, code: string | null
},
)
}
export function getWarehouseStatusTree() {
export function getInRecordStatusTree() {
return axios.get<never, BaseRespData<InterWarehouseTree[]>>(
'factory/warehouseInRecord/status_tree',
)
......@@ -306,3 +302,39 @@ export function getWarehouseListApi() {
'factoryWarehouseInfo/getAll',
)
}
export function deleteWarehouseInRecordApi(ids: string) {
return axios.get<never, BaseRespData<never>>(
'factory/warehouseInRecord/delete',
{
params: { ids },
},
)
}
// 出库单
export function getOutRecordStatusTree() {
return axios.get<never, BaseRespData<InterWarehouseTree[]>>(
'factory/warehouseOutRecord/status_tree',
)
}
export function warehouseOutRecordListPage(
data: warehouseSearchForm,
currentPage: number,
pageSize: number,
) {
return axios.post<never, BasePaginationData<InterWarehousePage>>(
'factory/warehouseOutRecord/list_page',
{
...data,
currentPage,
pageSize,
},
)
}
export function deleteWarehouseOutRecordApi(ids: string) {
return axios.get<never, BaseRespData<never>>(
'factory/warehouseOutRecord/delete',
{
params: { ids },
},
)
}
\ No newline at end of file
......@@ -9,14 +9,17 @@
:highlight-current="true"
node-key="code"
:data="treeData"
:props="{ children: 'children', label: 'remark' }"
:props="{ children: 'children', label: 'name' }"
@node-click="nodeClick"
>
<template #default="{ data }">
<div class="tree-node">
<div class="tree-node-label">{{ data.remark }}</div>
<div v-if="data.count || data.count === 0" class="tree-node-count">
{{ `(${data.count})` }}
<div class="tree-node-label">{{ data.name }}</div>
<div
v-if="data.countQuantity || data.countQuantity === 0"
class="tree-node-count"
>
{{ `(${data.countQuantity})` }}
</div>
</div>
</template>
......@@ -28,9 +31,25 @@
<template #top>
<div class="header-filter-form">
<ElForm :model="searchForm" inline>
<ElFormItem label="账期">
<ElFormItem label="采购仓库">
<ElSelect
v-model="searchForm.warehouseId"
clearable
placeholder="请选择仓库"
style="width: 160px"
>
<ElOption
v-for="item in warehouseList"
:key="item.id"
:label="item.name"
:value="item.id"
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem label="入库时间">
<el-date-picker
v-model="dateRange"
v-model="tradingTime"
:shortcuts="pickerOptions.shortcuts"
:default-time="[
new Date(0, 0, 0, 0, 0, 0),
new Date(0, 0, 0, 23, 59, 59),
......@@ -44,28 +63,27 @@
value-format="YYYY-MM-DD HH:mm:ss"
/>
</ElFormItem>
<ElFormItem label="对账单号">
<ElFormItem label="单号">
<ElInput
v-model="searchForm.recNumber"
v-model="searchForm.orderNumber"
clearable
placeholder="对账单号"
placeholder="请输入入库单号"
style="width: 160px"
/>
</ElFormItem>
<ElFormItem label="货单号">
<ElFormItem label="货单号">
<ElInput
v-model="searchForm.billNumber"
v-model="searchForm.batchNumber"
clearable
placeholder="货单号"
placeholder="请输入交货单号"
style="width: 160px"
/>
</ElFormItem>
<ElFormItem style="margin-right: 10px" label="订单号">
<ElFormItem style="margin-right: 10px" label="SKU">
<ElInput
v-model="searchForm.orderNumber"
v-model="searchForm.sku"
clearable
placeholder="订单号"
placeholder="请输入SKU"
style="width: 160px"
/>
</ElFormItem>
......@@ -79,26 +97,22 @@
</ElForm>
</div>
<div class="btn-list">
<el-button
v-if="nodeId === 10"
type="primary"
@click="confirmOrder"
>
确认对账单
</el-button>
<el-button
v-if="nodeId === 10"
type="warning"
@click="rejectOrder"
>
驳回
<el-button type="primary" @click="addDialog(1)"> 新增 </el-button>
<el-button type="danger" @click="rejectOrder"> 驳回 </el-button>
<el-button type="danger" @click="handleBatchDelete">
删除
</el-button>
<el-button type="warning" @click="importExcel"> 导入 </el-button>
<el-button type="success" @click="exportExcel"> 导出 </el-button>
<el-button
v-if="nodeId === 30"
type="danger"
@click="auditOrder('archive')"
>
<el-button type="primary" @click="exportExcel">
打印SKU标签
</el-button>
<el-button type="warning" @click="exportExcel"> 审核 </el-button>
<el-button type="success" @click="exportExcel">
提交审核
</el-button>
<el-button type="danger" @click="rejectOrder"> 作废 </el-button>
<el-button type="success" @click="auditOrder('archive')">
归档
</el-button>
</div>
......@@ -110,8 +124,6 @@
ref="singleTableRef"
highlight-current-row
:data="tableData"
show-summary
:summary-method="getSummaries"
default-expand-all
size="small"
style="width: 100%; height: 100%"
......@@ -134,164 +146,91 @@
align="center"
></ElTableColumn>
<ElTableColumn
label="编码"
label="入库单号"
show-overflow-tooltip
prop="name"
width="200"
prop="inNo"
width="110"
header-align="center"
align="center"
></ElTableColumn>
<!-- <ElTableColumn
label="客户"
<ElTableColumn
label="单据状态"
show-overflow-tooltip
prop="user_mark"
width="200"
prop="billStatus"
width="80"
header-align="center"
align="center"
></ElTableColumn> -->
></ElTableColumn>
<ElTableColumn
label="对账单号"
label="仓库名称"
show-overflow-tooltip
prop="rec_number"
min-width="200"
prop="warehouseName"
min-width="100"
header-align="center"
align="center"
></ElTableColumn>
<!-- <ElTableColumn
label="订单号"
<ElTableColumn
label="工厂编号"
show-overflow-tooltip
prop="order_number"
width="200"
prop="factoryCode"
min-width="100"
header-align="center"
align="center"
></ElTableColumn> -->
<!-- <ElTableColumn
label="ERP总价格"
></ElTableColumn>
<ElTableColumn
label="物流单号"
show-overflow-tooltip
width="130"
prop="erp_total_amount"
header-align="center"
align="center"
></ElTableColumn> -->
<el-table-column
label="账期"
header-align="center"
align="center"
min-width="340"
>
<template #default="scope">
{{ scope.row.start_time }} - {{ scope.row.end_time }}
</template>
</el-table-column>
<el-table-column
label="商品总价格(¥)"
prop="shipmentNumber"
width="200"
header-align="center"
prop="product_total_amount"
width="130"
align="center"
></ElTableColumn>
<ElTableColumn
label="总金额(¥)"
show-overflow-tooltip
>
</el-table-column>
<!-- <el-table-column
label="ERP总价格"
header-align="center"
prop="erp_total_amount"
width="120"
align="center"
show-overflow-tooltip
>
</el-table-column> -->
<el-table-column
label="物流总价(¥)"
prop="totalPrice"
header-align="center"
prop="carriage_total_amount"
width="130"
align="center"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="应付金额(¥)"
header-align="center"
width="130"
align="center"
show-overflow-tooltip
>
<template #default="{ row }">
<span>{{
row.carriage_total_amount + row.product_total_amount
}}</span>
</template>
</el-table-column>
<el-table-column
label="实付金额(¥)"
></ElTableColumn>
<ElTableColumn
label="SKU数量"
header-align="center"
prop="actual_amount"
prop="skuAmount"
width="130"
align="center"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="水单"
header-align="center"
prop="water_list"
width="100"
align="center"
show-overflow-tooltip
>
<template #default="{ row }">
<ImageView :src="row.water_list" />
</template>
</el-table-column>
</ElTableColumn>
<ElTableColumn
label="发货数量(件)"
show-overflow-tooltip
width="100"
prop="carriage_total_amount"
label="总数量"
header-align="center"
prop="total"
width="120"
align="center"
></ElTableColumn>
<ElTableColumn
label="总发货数量(件)"
show-overflow-tooltip
prop="num"
width="130"
header-align="center"
align="center"
></ElTableColumn>
>
</ElTableColumn>
<ElTableColumn
label="质检通过数量(件)"
label="备注"
show-overflow-tooltip
prop="pass_num"
width="130"
width="240"
prop="remark"
header-align="center"
align="center"
></ElTableColumn>
<!-- <ElTableColumn
label="ERP状态"
show-overflow-tooltip
width="130"
prop="erp_status"
header-align="center"
align="center"
></ElTableColumn> -->
<ElTableColumn
label="质检未通过数量(件)"
show-overflow-tooltip
width="140"
prop="not_pass_num"
header-align="center"
width="100"
align="center"
></ElTableColumn>
<ElTableColumn
label="创建时间"
show-overflow-tooltip
width="200"
prop="create_time"
header-align="center"
align="center"
></ElTableColumn>
label="操作"
>
<template #default="{ row }">
<ElButton type="primary" link @click="addDialog(2, row)"
>编辑
</ElButton>
</template>
</ElTableColumn>
</ElTable>
</div>
<ElPagination
......@@ -309,39 +248,7 @@
</template>
<template #bottom>
<el-tabs v-model="tabsValue" @tab-click="tabsClick">
<el-tab-pane name="0" label="发货单详情">
<el-form :model="detailForm" inline>
<el-form-item label="发货单号">
<el-input
v-model="detailForm.billNumber"
placeholder="请输入发货单号"
clearable
style="width: 130px"
/>
</el-form-item>
<el-form-item label="订单号">
<el-input
v-model="detailForm.orderNumber"
placeholder="请输入订单号"
clearable
style="width: 130px"
/>
</el-form-item>
<el-form-item label="生产单号">
<el-input
v-model="detailForm.subOrderNumber"
placeholder="请输入订单号"
clearable
style="width: 130px"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="searchDetail"
>查询</el-button
>
</el-form-item>
</el-form>
<el-tab-pane name="0" label="入库商品">
<div class="table-wrap">
<ElTable size="small" :data="detailList" height="100%" border>
<ElTableColumn
......@@ -354,77 +261,74 @@
<ElTableColumn
show-overflow-tooltip
align="center"
label="单号"
label="SKU图片"
prop="factory_order_number"
>
<template #default="{ row }">
<ImageView
:src="row.skuImage"
width="80px"
height="80px"
/>
<!-- <ElTableColumn
show-overflow-tooltip
align="center"
label="ERP单号"
prop="erp_order_number"
/> -->
</template>
</ElTableColumn>
<ElTableColumn
show-overflow-tooltip
align="center"
label="发货单号"
prop="bill_number"
label="商品SKU"
prop="warehouseSku"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="发货数(件)"
prop="num"
label="SKU名称"
prop="skuName"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="质检通过(件)"
prop="pass_num"
label="入库数量"
prop="buyStored"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="质检不通过(件)"
prop="not_pass_num"
label="总成本(¥)"
prop="buyStored"
/>
<!-- <ElTableColumn
<ElTableColumn
show-overflow-tooltip
align="center"
label="ERP价格"
prop="erp_price"
/> -->
label="不良品数量"
prop="rejectsAmount"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="成本价(¥)"
prop="price"
label="不良品原因"
prop="rejectsAeason"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="物流价格(¥)"
prop="carriage_amount"
width="240"
label="备注"
prop="remark"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="发货时间"
prop="shipment_time"
label="创建时间"
prop="createTime"
/>
<ElTableColumn
width="100"
show-overflow-tooltip
align="center"
header-align="center"
label="操作"
>
<template #default="{ row }">
<ElButton type="primary" link @click="onDetail(row)"
>查看详情
</ElButton>
</template>
</ElTableColumn>
label="更新时间"
prop="updateTime"
/>
</ElTable>
</div>
......@@ -440,7 +344,7 @@
@current-change="handleCurrentChange"
></ElPagination>
</el-tab-pane>
<el-tab-pane name="1" label="操作日志">
<!-- <el-tab-pane name="1" label="操作日志">
<ul
style="
color: #333;
......@@ -455,125 +359,515 @@
style="display: flex"
>
<span style="display: inline-block">
{{ item.create_time }}
{{ item.createdTime }}
</span>
<span style="margin: 0 5px 0 20px">{{
item.employee_account
}}</span>
<span style="display: inline-block">{{
item.description
}}</span>
</li>
</ul>
</el-tab-pane>
<el-tab-pane name="2" label="物流轨迹">
<ul
v-if="logisticsData.length > 0"
style="
color: #333;
font-size: 12px;
height: 100%;
overflow: auto;
"
>
<li v-for="(item, index) in logisticsData" :key="index">
<span class="log-desc">
{{ item.time + ' ' + item.context }}
</span>
</li>
</ul>
<div v-else class="empty">{{ $t('暂无数据') }}</div>
</el-tab-pane> -->
</el-tabs>
</template>
</splitDiv>
</div>
</div>
</splitDiv>
</div>
</div>
</div>
<ElDialog
v-model="importDialogVisible"
title="导入"
width="500px"
:close-on-click-modal="false"
>
<div class="import-dialog">
<div class="import-header">
<el-button type="primary" link @click="downloadTemplate">
<el-icon><Download /></el-icon>
下载模板
</el-button>
</div>
<div class="import-content">
<UploadExcel v-model="importedFileUrl" />
</div>
</div>
<template #footer>
<span class="dialog-footer">
<el-button @click="importDialogVisible = false">取消</el-button>
<el-button type="primary" @click="submitConfirmOrder">确认</el-button>
</span>
</template>
</ElDialog>
<ElDialog
v-model="newDialogVisible"
:title="formId ? '编辑' : '新增'"
width="80%"
:close-on-click-modal="false"
>
<div class="dialog-form">
<ElForm
ref="editFormRef"
:model="editForm"
:rules="rules"
inline
label-width="90px"
>
<ElFormItem label="入库单号" prop="account">
<ElInput v-model="editForm.inNo" clearable disabled />
</ElFormItem>
<ElFormItem label="仓库" prop="warehouseId" required>
<ElSelect
v-model="editForm.warehouseId"
clearable
placeholder="请选择仓库"
style="width: 160px"
>
<ElOption
v-for="item in warehouseList"
:key="item.id"
:label="item.name"
:value="item.id"
></ElOption>
</ElSelect>
</ElFormItem>
<ElFormItem label="工厂:" prop="factoryCode">
<span>{{ editForm.factoryCode }}</span>
</ElFormItem>
<ElFormItem label="备注" prop="remark" style="width: 45%">
<ElInput
v-model="editForm.remark"
placeholder="请输入备注"
clearable
/>
</ElFormItem>
</ElForm>
<ElTable
size="small"
:data="otherPurchaseData"
height="500px"
border
@selection-change="productSelectionChange"
>
<ElTableColumn
type="selection"
width="70"
header-align="center"
align="center"
></ElTableColumn>
<ElTableColumn
show-overflow-tooltip
align="center"
width="100"
label="SKU图片"
prop="skuImage"
>
<template #default="{ row }">
<ImageView :src="row.skuImage" width="40px" height="40px" />
</template>
</ElTableColumn>
<ElTableColumn
show-overflow-tooltip
align="center"
label="商品SKU"
prop="warehouseSku"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="SKU名称"
prop="skuName"
/>
<ElTableColumn align="center" label="入库数量" prop="buyStored">
<template #default="{ row }">
<el-input
v-model.number="row.buyStored"
placeholder="入库数量"
style="width: 120px"
clearable
size="small"
@input="setCostPrice(row)"
></el-input>
</template>
</ElTableColumn>
<ElTableColumn
width="100"
align="center"
label="成本价(¥)"
prop="costPrice"
/>
<ElTableColumn
align="center"
width="100"
label="总成本(¥)"
prop="totalPrice"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="不良品数量"
prop="rejectsAmount"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="不良品原因"
prop="rejectsAeason"
/>
<ElTableColumn align="center" label="库位" prop="loacationCode">
<template #default="{ row }">
<!-- +后有就正常展示,没有则通过搜索接口自己添加 -->
<span v-if="row.loacationCode">{{ row.loacationCode }}</span>
<ElSelect
v-else
v-model="row.locationId"
clearable
placeholder="请输入库位"
style="width: 120px"
filterable
remote
:remote-method="(query) => handleLocationSearch(query, row)"
:loading="locationLoading"
@change="(val) => handleLocationChange(val, row)"
>
<ElOption
v-for="item in locationList"
:key="item.locationId"
:label="item.locationCode"
:value="item.locationId"
></ElOption>
</ElSelect>
</template>
</ElTableColumn>
<ElTableColumn
show-overflow-tooltip
align="center"
width="240"
label="备注"
prop="remark"
/>
</ElTable>
</div>
<template #footer>
<div class="product-dialog-footer">
<div>
<el-input
v-model="selectSku"
placeholder="商品SKU"
style="width: 200px; margin: 0 10px"
clearable
size="small"
></el-input>
<el-popover placement="top-start" width="900" trigger="click">
<div v-if="skuData.length > 0" style="height: 50vh">
<ElTable size="small" :data="skuData" height="100%" border>
<ElTableColumn
show-overflow-tooltip
width="60"
align="center"
label="序号"
type="index"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="SKU图片"
width="100"
prop="image"
>
<template #default="{ row }">
<ImageView :src="row.image" width="40px" height="40px" />
</template>
</ElTableColumn>
<ElTableColumn
show-overflow-tooltip
align="center"
label="商品SKU"
width="200"
prop="skuName"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
width="200"
label="SKU名称"
prop="sku"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="成本价(¥)"
width="100"
prop="factoryPrice"
/>
<ElTableColumn
show-overflow-tooltip
align="center"
label="库位"
prop="loacationCode"
/>
<ElTableColumn
width="100"
align="center"
header-align="center"
label="操作"
>
<template #default="{ row }">
<el-icon :size="32" color="#67C23A"
><CirclePlusFilled @click="skudblclick(row)"
/></el-icon>
</template>
</ElTableColumn>
</ElTable>
</div>
<ElDrawer
v-model="shipmentOrderDetailDrawerVisible"
title="发货单详情"
size="50%"
<template #reference>
<el-button
type="primary"
size="small"
style="width: 90px"
@click="selectbySku()"
>
<shipmentOrderDetailInfo :detail="shipmentOrderDetail" />
</ElDrawer>
<ElDialog
v-model="confirmOrderVisible"
title="确认对账单"
width="500px"
:close-on-click-modal="false"
查询
</el-button>
</template>
</el-popover>
<el-button
style="margin-left: 6px"
type="success"
size="small"
@click="addPurchase"
>
<ElForm ref="auditFormRef" :model="auditForm" label-width="80px">
<ElFormItem
label="意见"
prop="pass"
:rules="[{ required: true, message: '请选择' }]"
批量新增
</el-button>
<el-button
type="danger"
style="margin-left: 10px"
size="small"
@click="deleteOtherWarehousing()"
>
<ElRadioGroup v-model="auditForm.pass">
<ElRadio :label="1">通过</ElRadio>
<ElRadio :label="0">不通过</ElRadio>
</ElRadioGroup>
</ElFormItem>
<ElFormItem
label="审核意见"
prop="description"
:rules="
auditForm.pass === 0
? [{ required: true, message: '请输入审核意见' }]
: []
"
删除
</el-button>
<el-button
type="primary"
style="margin-left: 10px"
size="small"
@click="importData"
>
<ElInput v-model="auditForm.description" type="textarea" />
</ElFormItem>
</ElForm>
<template #footer>
<span class="dialog-footer">
<el-button @click="confirmOrderVisible = false">取消</el-button>
<el-button type="primary" @click="submitConfirmOrder">确认</el-button>
</span>
导入
</el-button>
</div>
<div>
<el-button
size="small"
style="margin-left: 10px"
@click="newDialogVisible = false"
>
取消
</el-button>
<el-button type="primary" size="small" @click="addOtherCurrency()">
保存
</el-button>
</div>
</div>
</template>
</ElDialog>
</template>
<script setup lang="ts">
import { ElMessage, ElRadioGroup, ElTree, TableColumnCtx } from 'element-plus'
import { Download, CirclePlusFilled } from '@element-plus/icons-vue'
import splitDiv from '@/components/splitDiv/splitDiv.vue'
import { ElTable } from 'element-plus'
import usePageList from '@/utils/hooks/usePageList'
import { useValue } from '@/utils/hooks/useValue'
import {
customJomallReconciliation,
getReconciliationAmount,
getShipmentDetailsById,
auditOrderApi,
getShipmentOrderDetailById,
confirmOrderApi,
rejectOrderApi,
getLogListApi,
exportExcelApi,
} from '@/api/order'
import {
getOutRecordStatusTree,
warehouseOutRecordListPage,
getWarehouseInRecordDetailApi,
getBySkuApi,
getWarehouseListApi,
getByWareHouseIdAndCodeApi,
addInRecordApi,
updateInRecordApi,
deleteWarehouseOutRecordApi,
} from '@/api/warehouse'
import BigNumber from 'bignumber.js'
import { ref, onMounted, watch, nextTick } from 'vue'
import 'element-plus/dist/index.css'
import { LogList } from '@/types/api/billOrder.ts'
import {
CountStatus,
AccountStatementNote,
ItemList,
LogList,
AccountStatementNoteSearchForm,
} from '@/types/api/billOrder.ts'
import { DetailForm, ShipmentOrderDetailData } from '@/types/api/deliveryNote'
import shipmentOrderDetailInfo from '@/components/ShipmentOrderDetail.vue'
warehouseSearchForm,
InterWarehousePage,
InterWarehouseDetail,
InterWarehouseTree,
InterProductList,
InterskuList,
InterWarehouseList,
ILocation,
} from '@/types/api/warehouse'
import ImageView from '@/components/ImageView.vue'
import { showConfirm } from '@/utils/ui'
// import { getUserMarkList } from '@/api/auth.ts'
interface Tree {
remark?: string
count?: number
code?: string
children?: Tree[]
import UploadExcel from '@/components/UploadExcel.vue'
import { debounce } from 'lodash-es'
// import UploadExcel from '@/components/INgoVopy.vue'
const warehouseList = ref<InterWarehouseList[]>([])
const pickerOptions = {
shortcuts: [
{
text: '今日',
value: () => {
const start = new Date(new Date(getStartTime()).getTime())
const end = new Date()
return [start, end]
},
},
{
text: '昨天',
value: () => {
const start = new Date()
const end = new Date(new Date(getStartTime()).getTime() - 1)
start.setTime(end.getTime() - 3600 * 1000 * 24 * 1 + 1)
return [start, end]
},
},
{
text: '最近7天',
value: () => {
const end = new Date()
const start = new Date(getStartTime())
start.setTime(start.getTime() - 3600 * 1000 * 24 * 6)
return [start, end]
},
},
{
text: '最近14天',
value: () => {
const end = new Date()
const start = new Date(getStartTime())
start.setTime(start.getTime() - 3600 * 1000 * 24 * 13)
return [start, end]
},
},
{
text: '最近30天',
value: () => {
const end = new Date()
const start = new Date(getStartTime())
start.setTime(start.getTime() - 3600 * 1000 * 24 * 29)
return [start, end]
},
},
{
text: '本星期',
value: () => {
const end = new Date()
const start = new Date()
const nowDay = new Date().getDay() - 1
start.setTime(
new Date(getStartTime()).getTime() - 3600 * 1000 * 24 * nowDay,
)
return [start, end]
},
},
{
text: '上星期',
value: () => {
const end = new Date()
const start = new Date()
const nowDay = new Date().getDay() - 1
end.setTime(
new Date(getStartTime()).getTime() - 3600 * 1000 * 24 * nowDay - 1,
)
start.setTime(end.getTime() - 3600 * 1000 * 24 * 7 + 1)
return [start, end]
},
},
{
text: '这个月',
value: () => {
const end = new Date()
const start = new Date()
const nowDate = new Date().getDate() - 1
start.setTime(
new Date(getStartTime()).getTime() - 3600 * 1000 * 24 * nowDate,
)
return [start, end]
},
},
{
text: '上个月',
value: () => {
const date = new Date()
let year = date.getFullYear()
let month = date.getMonth()
const end = new Date(
new Date(`${year}-${month + 1}-1 00:00:00`).getTime() - 1,
)
if (month === 0) {
month = 12
year = year - 1
}
const start = new Date(
new Date(`${year}-${month}-1 00:00:00`).getTime(),
)
return [start, end]
},
},
{
text: '历史',
value: () => {
return ['', '']
},
},
],
}
interface SummaryMethodProps<T = AccountStatementNote> {
columns: TableColumnCtx<T>[]
data: T[]
function getStartTime() {
const date = new Date()
const year = date.getFullYear()
const month = date.getMonth() + 1
const day = date.getDate()
return `${year}-${month}-${day} 00:00:00`
}
// const nameSpaceList = ref<string[]>([])
const treeData = ref<CountStatus[]>()
const [searchForm, resetSearchForm] = useValue<AccountStatementNoteSearchForm>(
{},
)
const selectSku = ref('')
const treeData = ref<InterWarehouseTree[]>()
const [searchForm, resetSearchForm] = useValue<warehouseSearchForm>({})
const dateRange = ref<string[]>([])
const selections = ref<AccountStatementNote[]>([])
const detailList = ref<ItemList[]>([])
const tradingTime = ref<string[]>([])
const selections = ref<InterWarehousePage[]>([])
const detailList = ref<InterWarehouseDetail[]>([])
const tabsValue = ref<string>('0')
const singleTableRef = ref<InstanceType<typeof ElTable>>()
const currentRow = ref<AccountStatementNote | null>(null)
const currentRow = ref<InterWarehousePage | null>(null)
const logList = ref<LogList[]>([])
const rules = {
warehouseId: [{ required: true, message: '请选择仓库', trigger: 'change' }],
}
const nodeId = ref<number | string>(10)
const treeRef = ref<InstanceType<typeof ElTree>>()
......@@ -587,36 +881,31 @@ const {
onPageSizeChange: handleSizeChange,
} = usePageList({
query: (page, pageSize) =>
customJomallReconciliation(
warehouseOutRecordListPage(
{
...searchForm.value,
status: nodeId.value === -1 ? null : nodeId.value,
start_time: dateRange.value && dateRange.value[0],
end_time: dateRange.value && dateRange.value[1],
// status: nodeId.value === -1 ? null : nodeId.value,
createTimeStart: tradingTime.value && tradingTime.value[0],
createTimeEnd: tradingTime.value && tradingTime.value[1],
},
page,
pageSize,
).then((res) => res.data) as never,
})
onMounted(() => {
// getNameSpaceList()
})
// const dialogVisible = ref<boolean>(false)
// const getNameSpaceList = async () => {
// try {
// const res = await getUserMarkList()
// nameSpaceList.value = res.data
// } catch (e) {
// // showError(e)
// }
// }
const setCostPrice = (item: InterProductList) => {
if (!item.costPrice) {
ElMessage.warning('商品成本价为空,请完善商品成本价')
return
}
const amount = new BigNumber(item.buyStored)
.multipliedBy(item.costPrice)
.toFixed(2)
item.totalPrice = Number(amount)
}
const getTreeNum = async () => {
try {
const res = await getReconciliationAmount()
res.data = [{ code: -1, remark: '全部', children: res.data }]
const res = await getOutRecordStatusTree()
res.data = [{ code: -1, name: '全部', children: res.data }]
treeData.value = res.data
await nextTick(() => {
treeRef.value!.setCurrentKey(nodeId.value, true)
......@@ -625,14 +914,68 @@ const getTreeNum = async () => {
console.error(e)
}
}
const rowClick = (row: AccountStatementNote) => {
const getWarehouseList = async () => {
try {
const res = await getWarehouseListApi()
warehouseList.value = res.data
await nextTick(() => {
treeRef.value!.setCurrentKey(nodeId.value, true)
})
} catch (e) {
console.error(e)
}
}
const rowClick = (row: InterWarehousePage) => {
if (!row) {
currentRow.value = null
}
currentRow.value = row
tabsClick()
}
const skuData = ref<InterskuList[]>([])
const selectbySku = async () => {
if (!editForm.value.warehouseId) return ElMessage.error('请选择仓库')
try {
const res = await getBySkuApi(editForm.value.warehouseId, selectSku.value)
skuData.value = res.data || []
fetchLocationList('') //获取该仓库下的所有库位
} catch (e) {
console.error(e)
}
}
const skudblclick = (val: InterskuList) => {
// 使用可选链和空值合并运算符处理可能的null值
const {
locationCode = '',
factoryPrice = 0,
productNo = '',
sku = '',
skuName = '',
image = '',
locationId = '',
} = val || {}
otherPurchaseData.value = [
...otherPurchaseData.value,
{
skuImage: image,
warehouseSku: sku,
skuName,
productNo,
locationCode: locationCode ?? '', // 确保空值处理
locationId: locationId ?? '', // 确保空值处理
costPrice: factoryPrice, ////添加时成本价字段是啥?要提交吗?
buyStored: null,
totalPrice: null,
},
]
// 使用filter代替forEach+splice,时间复杂度从O(n^2)降到O(n)
const skuSet = new Set(
otherPurchaseData.value.map((item: InterProductList) => item.warehouseSku),
)
skuData.value = skuData.value.filter(
(item: InterskuList) => !skuSet.has(item.sku),
)
}
const tabsClick = async () => {
if (!currentRow.value) {
detailList.value = []
......@@ -642,49 +985,72 @@ const tabsClick = async () => {
await nextTick()
if (tabsValue.value === '0') {
searchDetail()
} else {
} else if (tabsValue.value === '1') {
getLogList()
} else {
getLogisticsData()
}
}
const handleSelectionChange = (v: AccountStatementNote[]) => {
selections.value = v
}
const getSummaries = (param: SummaryMethodProps) => {
const { columns, data } = param
const sums: string[] = []
columns.forEach(
(column: TableColumnCtx<AccountStatementNote>, index: number) => {
if (index === 0) {
sums[index] = '合计'
return
const [editForm, resetEditForm] = useValue({
inNo: '',
warehouseId: '',
remark: '',
factoryCode: '',
factoryId: '',
})
const newDialogVisible = ref(false)
const editFormRef = ref()
const editForm2 = ref({})
const formId = ref<number | undefined>(undefined)
const otherPurchaseData = ref<InterProductList[]>([])
const addDialog = async (i: number, v: InterWarehousePage) => {
if (i === 2) {
if (v) formId.value = v.id
// getProduct(v.id)
if (!formId.value) return ElMessage('请勾选至少一条记录')
// v.inWarehouseId = v.warehouseId
// v.inType = v.type
// v.handleUserId = v.makerUserId
editForm.value = JSON.parse(JSON.stringify(v))
} else {
await nextTick()
editForm.value = JSON.parse(JSON.stringify(editForm2.value))
resetEditForm()
const userJson = localStorage.getItem('user')
if (userJson) {
try {
const userData = JSON.parse(userJson)
editForm.value.factoryCode = userData.factoryCode || ''
editForm.value.factoryId = userData.factoryId || 0
} catch {
// ignore
}
const values = data.map((item: AccountStatementNote) => {
return Number(item[column.property as keyof AccountStatementNote])
})
if (!values.every((value: number) => !isNaN(value))) {
return
}
sums[index] = values
.reduce((prev: number, curr: number) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
otherPurchaseData.value = []
formId.value = undefined
}
}, 0)
.toString()
},
)
return sums
newDialogVisible.value = true
}
// const getProduct = (id: number) => {
// let url = `otherInWarehouseProductDetails/getProductList?otherOutWarehouseId=${id}`
// get(url).then((res) => {
// if (res.code == 200) {
// otherPurchaseData.value = res.data;
// productData.value = res.data;
// } else {
// this.$alert(res.message, this.$t('错误提示'), {
// dangerouslyUseHTMLString: true,
// })
// }
// })
// }
const handleSelectionChange = (v: InterWarehousePage[]) => {
selections.value = v
}
const otherWarehouseSelection = ref<InterProductList[]>([])
const productSelectionChange = (v: InterProductList[]) => {
otherWarehouseSelection.value = v
}
const confirmOrderVisible = ref<boolean>(false)
const auditForm = ref({
pass: 1,
description: '',
})
const auditFormRef = ref()
const auditOrder = (key: string) => {
let url = ''
let text = ''
......@@ -737,93 +1103,156 @@ const rejectOrder = () => {
}
})
}
const confirmOrder = async () => {
if (selections.value.length === 0) {
return ElMessage.warning('请选择要操作的数据')
watch(
() => tableData.value,
() => {
if (tableData.value && tableData.value.length > 0) {
if (singleTableRef.value) {
singleTableRef.value!.setCurrentRow(tableData.value[0])
currentRow.value = (tableData.value as never)[0]
}
} else {
detailList.value = []
}
},
{ immediate: true },
)
const addOtherCurrency = async () => {
try {
await showConfirm('是否确认对账单?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
await editFormRef.value?.validate()
} catch {
return
}
const ids = selections.value.map((el) => el.id).join(',')
const arr = otherPurchaseData.value
if (arr.length === 0) {
ElMessage.error('请至少选择一条数据')
return
}
for (let i = 0; i < arr.length; i++) {
if (!arr[i].buyStored) {
ElMessage.error('请输入入库数量')
return
}
if (!arr[i].locationId) {
ElMessage.error('请选择库位')
return
}
}
// 看新增后要不要打印标签
// try {
// if (!editId.value) {
// await addUserApi({
// ...editForm.value,
// supperMark: Number(editForm.value.supperMark),
// status: Number(editForm.value.status),
// })
// } else {
// await updateUserApi({
// ...editForm.value,
// supperMark: Number(editForm.value.supperMark),
// status: Number(editForm.value.status),
// })
// }
// ElMessage({
// message: '保存成功',
// type: 'success',
// offset: window.innerHeight / 2,
// })
// newDialogVisible.value = false
// search()
// } catch (e) {
// return
// }
if (!formId.value) {
addSection()
} else {
upSection()
}
}
const addSection = async () => {
const params = { ...editForm.value }
params.productList = otherPurchaseData.value
try {
await confirmOrderApi({
ids,
})
confirmOrderVisible.value = false
ElMessage.success('操作成功')
await addInRecordApi(params)
ElMessage.success('保存成功')
newDialogVisible.value = false
search()
await getTreeNum()
} catch (e) {
console.error(e)
}
// confirmOrderVisible.value = true
// auditForm.value = {
// pass: 1,
// description: '',
// post(url, params).then((res: any) => {
// if (res.code === 200) {
// otherDialogVisible.value = false;
// ElConfirm('保存成功,是否打印标签?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning',
// })
// .then(() => {
// if (res.message) {
// getPrintData(res.message, true);
// } else {
// ElMessage.warning('入口单号为空,无法打印');
// }
// await nextTick()
// auditFormRef.value!.clearValidate()
// })
// .catch((e: any) => {
// console.error(e);
// });
// getList();
// getStatusAmount();
// } else {
// ElAlert(res.message, '错误提示', {
// dangerouslyUseHTMLString: true,
// });
// }
// });
}
const submitConfirmOrder = async () => {
const upSection = async () => {
const params = { ...editForm.value }
params.productList = otherPurchaseData.value
try {
await auditFormRef.value?.validate()
} catch {
return
}
const ids = selections.value.map((el) => el.id).join(',')
await confirmOrderApi({
...auditForm.value,
pass: auditForm.value.pass === 0 ? 0 : undefined,
description:
auditForm.value.description === ''
? undefined
: auditForm.value.description,
ids,
})
confirmOrderVisible.value = false
ElMessage.success('操作成功')
await updateInRecordApi(params)
newDialogVisible.value = false
ElMessage.success('修改成功')
search()
await getTreeNum()
if (singleTableRef.value) {
singleTableRef.value!.setCurrentRow(currentRow.value)
} catch (e) {
console.error(e)
}
}
watch(
() => tableData.value,
() => {
if (tableData.value && tableData.value.length > 0) {
if (singleTableRef.value) {
singleTableRef.value!.setCurrentRow(tableData.value[0])
currentRow.value = (tableData.value as never)[0]
}
} else {
detailList.value = []
const addPurchase = async () => {
if (!editForm.value.warehouseId) return ElMessage.error('请选择仓库')
}
const deleteOtherWarehousing = () => {
const arr = otherWarehouseSelection.value
if (arr.length === 0) return
const idList = arr.map((v: InterProductList) => v.warehouseSku)
otherPurchaseData.value = otherPurchaseData.value.filter(
(item: InterProductList) => !idList.includes(item.warehouseSku),
)
}
const importData = async () => {
if (!editForm.value.warehouseId) return ElMessage.error('请选择仓库')
}
const handleBatchDelete = async () => {
if (!selections.value.length) {
return ElMessage.warning('请选择要删除的数据')
}
},
{ immediate: true },
)
const nodeClick = (data: Tree) => {
await ElMessageBox.confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
const str = selections.value.map((el: InterWarehousePage) => el.id).join(',')
await deleteWarehouseOutRecordApi(str)
ElMessage.success('删除成功')
await search()
}
const nodeClick = (data: InterWarehouseTree) => {
nodeId.value = data.code ?? ''
search()
}
const shipmentOrderDetailDrawerVisible = ref(false)
const shipmentOrderDetail = ref({} as ShipmentOrderDetailData)
const onDetail = async (row: ItemList) => {
try {
const res = await getShipmentOrderDetailById(row.shipment_id)
shipmentOrderDetail.value = res.data
shipmentOrderDetailDrawerVisible.value = true
} catch (e) {
console.error(e)
}
}
const detailForm = ref({} as DetailForm)
const detailPager = ref({
page: 1,
rows: 100,
......@@ -831,15 +1260,9 @@ const detailPager = ref({
})
const searchDetail = async () => {
try {
const res = await getShipmentDetailsById({
...detailForm.value,
page: detailPager.value.page,
rows: detailPager.value.rows,
infoId: currentRow.value?.id,
})
const res = await getWarehouseInRecordDetailApi(currentRow.value?.id)
detailList.value = res.data.records || []
detailPager.value.total = res.data.total
// logList.value = res.data.logList || []
} catch (e) {
console.error(e)
}
......@@ -848,11 +1271,31 @@ const getLogList = async () => {
try {
const res = await getLogListApi(currentRow.value?.id)
logList.value = res.data
// logList.value = res.data.logList || []
} catch (e) {
console.error(e)
}
}
// const logisticsData = ref([])
const getLogisticsData = async () => {
// try {
// const res = await getLogisticsDataApi(currentRow.value?.id)
// logisticsData.value = res.data
// } catch (e) {
// console.error(e)
// }
}
const importDialogVisible = ref(false)
const importedFileUrl = ref('')
const importExcel = () => {
importDialogVisible.value = true
}
const downloadTemplate = () => {
// TODO: 实现下载模板功能
window.open('/api/template/download')
}
const exportExcel = async () => {
if (selections.value.length === 0) {
return ElMessage.warning('请选择要操作的数据')
......@@ -865,19 +1308,64 @@ const exportExcel = async () => {
console.error(e)
}
}
const locationList = ref<ILocation[]>([])
const locationLoading = ref(false)
const fetchLocationList = async (query: string) => {
// if (!query) {
// locationList.value = []
// return
// }
locationLoading.value = true
try {
const res = await getByWareHouseIdAndCodeApi(
editForm.value.warehouseId,
query,
)
const result = res.data || []
locationList.value = result.map((item: ILocation) => {
return {
locationId: item.id,
locationCode: item.locationCode,
}
})
} catch (e) {
locationList.value = []
} finally {
locationLoading.value = false
}
}
// 输入2秒后再调用接口(节流)
const handleLocationSearch = debounce(fetchLocationList, 2000)
const handleLocationChange = (val: number, row: InterProductList) => {
const found = locationList.value.find(
(item: InterProductList) => item.locationId === val,
)
row.locationCode = found ? found.locationCode : ''
}
onMounted(() => {
getTreeNum()
getWarehouseList()
})
</script>
<style lang="scss" scoped>
.dialog-footer {
display: inline-block;
width: 500px;
text-align: center;
}
.header-filter-form {
:deep(.el-form-item) {
margin-right: 14px;
margin-bottom: 10px;
}
}
.product-dialog-footer {
display: flex;
justify-content: space-between;
margin: 8px 0;
}
$border: solid 1px #ddd;
.send-order-list {
......@@ -917,10 +1405,6 @@ $border: solid 1px #ddd;
width: 100px;
}
.dialog-footer {
text-align: center;
}
.delivery-note-list {
:deep(.vertical-align-top) {
vertical-align: top;
......@@ -1060,4 +1544,42 @@ $border: solid 1px #ddd;
height: 100%;
}
}
.import-dialog {
.import-header {
display: flex;
justify-content: flex-end;
}
.import-content {
padding: 20px 0;
}
}
.import-success {
text-align: center;
padding: 20px 0;
.success-icon {
font-size: 48px;
margin-bottom: 16px;
}
.success-text {
font-size: 16px;
color: #67c23a;
margin-bottom: 16px;
}
.file-link {
a {
color: #409eff;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
}
</style>
......@@ -99,7 +99,9 @@
<div class="btn-list">
<el-button type="primary" @click="addDialog(1)"> 新增 </el-button>
<el-button type="danger" @click="rejectOrder"> 驳回 </el-button>
<el-button type="danger" @click="rejectOrder"> 删除 </el-button>
<el-button type="danger" @click="handleBatchDelete">
删除
</el-button>
<el-button type="warning" @click="importExcel"> 导入 </el-button>
<el-button type="success" @click="exportExcel"> 导出 </el-button>
<el-button type="primary" @click="exportExcel">
......@@ -498,11 +500,11 @@
<template #default="{ row }">
<el-input
v-model.number="row.buyStored"
@input="setCostPrice(row)"
placeholder="入库数量"
style="width: 120px"
clearable
size="small"
@input="setCostPrice(row)"
></el-input>
</template>
</ElTableColumn>
......@@ -631,7 +633,7 @@
label="操作"
>
<template #default="{ row }">
<el-icon :size="32" color="#67C23A"
<el-icon :size="32" color="#67C23A" class="cursor-pointer"
><CirclePlusFilled @click="skudblclick(row)"
/></el-icon>
</template>
......@@ -705,14 +707,15 @@ import {
exportExcelApi,
} from '@/api/order'
import {
getWarehouseStatusTree,
warehouseInRecordListPage,
getWarehouseInRecordDetail,
getBySku,
getInRecordStatusTree,
warehouseInRecordListPageApi,
getWarehouseInRecordDetailApi,
getBySkuApi,
getWarehouseListApi,
getByWareHouseIdAndCode,
getByWareHouseIdAndCodeApi,
addInRecordApi,
updateInRecordApi,
deleteWarehouseInRecordApi,
} from '@/api/warehouse'
import BigNumber from 'bignumber.js'
import { ref, onMounted, watch, nextTick } from 'vue'
......@@ -851,12 +854,6 @@ function getStartTime() {
const day = date.getDate()
return `${year}-${month}-${day} 00:00:00`
}
interface Tree {
remark?: string
count?: number
code?: string
children?: Tree[]
}
const selectSku = ref('')
const treeData = ref<InterWarehouseTree[]>()
const [searchForm, resetSearchForm] = useValue<warehouseSearchForm>({})
......@@ -884,7 +881,7 @@ const {
onPageSizeChange: handleSizeChange,
} = usePageList({
query: (page, pageSize) =>
warehouseInRecordListPage(
warehouseInRecordListPageApi(
{
...searchForm.value,
// status: nodeId.value === -1 ? null : nodeId.value,
......@@ -907,7 +904,7 @@ const setCostPrice = (item: InterProductList) => {
}
const getTreeNum = async () => {
try {
const res = await getWarehouseStatusTree()
const res = await getInRecordStatusTree()
res.data = [{ code: -1, name: '全部', children: res.data }]
treeData.value = res.data
await nextTick(() => {
......@@ -939,7 +936,7 @@ const skuData = ref<InterskuList[]>([])
const selectbySku = async () => {
if (!editForm.value.warehouseId) return ElMessage.error('请选择仓库')
try {
const res = await getBySku(editForm.value.warehouseId, selectSku.value)
const res = await getBySkuApi(editForm.value.warehouseId, selectSku.value)
skuData.value = res.data || []
fetchLocationList('') //获取该仓库下的所有库位
} catch (e) {
......@@ -1039,7 +1036,6 @@ const addDialog = async (i: number, v: InterWarehousePage) => {
// get(url).then((res) => {
// if (res.code == 200) {
// otherPurchaseData.value = res.data;
// productData.value = res.data;
// } else {
// this.$alert(res.message, this.$t('错误提示'), {
// dangerouslyUseHTMLString: true,
......@@ -1050,9 +1046,9 @@ const addDialog = async (i: number, v: InterWarehousePage) => {
const handleSelectionChange = (v: InterWarehousePage[]) => {
selections.value = v
}
const productSelection = ref<InterProductList[]>([])
const otherWarehouseSelection = ref<InterProductList[]>([])
const productSelectionChange = (v: InterProductList[]) => {
productSelection.value = v
otherWarehouseSelection.value = v
}
const auditOrder = (key: string) => {
let url = ''
......@@ -1224,12 +1220,35 @@ const upSection = async () => {
console.error(e)
}
}
const addPurchase = async () => {}
const deleteOtherWarehousing = async () => {}
const addPurchase = async () => {
if (!editForm.value.warehouseId) return ElMessage.error('请选择仓库')
}
const deleteOtherWarehousing = () => {
const arr = otherWarehouseSelection.value
if (arr.length === 0) return
const idList = arr.map((v: InterProductList) => v.warehouseSku)
otherPurchaseData.value = otherPurchaseData.value.filter(
(item: InterProductList) => !idList.includes(item.warehouseSku),
)
}
const importData = async () => {
if (!editForm.value.warehouseId) return ElMessage.error('请选择仓库')
}
const nodeClick = (data: Tree) => {
const handleBatchDelete = async () => {
if (!selections.value.length) {
return ElMessage.warning('请选择要删除的数据')
}
await ElMessageBox.confirm('确定要删除吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
})
const str = selections.value.map((el: InterWarehousePage) => el.id).join(',')
await deleteWarehouseInRecordApi(str)
ElMessage.success('删除成功')
await search()
}
const nodeClick = (data: InterWarehouseTree) => {
nodeId.value = data.code ?? ''
search()
}
......@@ -1240,7 +1259,7 @@ const detailPager = ref({
})
const searchDetail = async () => {
try {
const res = await getWarehouseInRecordDetail(currentRow.value?.id)
const res = await getWarehouseInRecordDetailApi(currentRow.value?.id)
detailList.value = res.data.records || []
detailPager.value.total = res.data.total
} catch (e) {
......@@ -1255,7 +1274,7 @@ const getLogList = async () => {
console.error(e)
}
}
const logisticsData = ref([])
// const logisticsData = ref([])
const getLogisticsData = async () => {
// try {
// const res = await getLogisticsDataApi(currentRow.value?.id)
......@@ -1298,7 +1317,10 @@ const fetchLocationList = async (query: string) => {
// }
locationLoading.value = true
try {
const res = await getByWareHouseIdAndCode(editForm.value.warehouseId, query)
const res = await getByWareHouseIdAndCodeApi(
editForm.value.warehouseId,
query,
)
const result = res.data || []
locationList.value = result.map((item: ILocation) => {
return {
......@@ -1332,6 +1354,9 @@ onMounted(() => {
width: 500px;
text-align: center;
}
.cursor-pointer {
cursor: pointer;
}
.header-filter-form {
:deep(.el-form-item) {
margin-right: 14px;
......
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 to comment