Merge branch 'release'

This commit is contained in:
liufu 2023-02-03 16:50:30 +08:00
commit 8a08b450f1
9 changed files with 244 additions and 67 deletions

View file

@ -14,104 +14,104 @@ namespace ModernWMS.WMS.Entities.ViewModels
public class DispatchlistViewModel
{
#region constructor
/// <summary>
/// constructor
/// </summary>
public DispatchlistViewModel()
{
}
#endregion
#region constructor
/// <summary>
/// constructor
/// </summary>
public DispatchlistViewModel()
{
}
#endregion
#region Property
/// <summary>
/// id
/// </summary>
[Display(Name = "id")]
public int id { get; set; } = 0;
public int id { get; set; } = 0;
/// <summary>
/// dispatch_no
/// </summary>
[Display(Name = "dispatch_no")]
[MaxLength(32,ErrorMessage = "MaxLength")]
public string dispatch_no { get; set; } = string.Empty;
[MaxLength(32, ErrorMessage = "MaxLength")]
public string dispatch_no { get; set; } = string.Empty;
/// <summary>
/// dispatch_status
/// </summary>
[Display(Name = "dispatch_status")]
public byte dispatch_status { get; set; } = 0;
public byte dispatch_status { get; set; } = 0;
/// <summary>
/// customer_id
/// </summary>
[Display(Name = "customer_id")]
public int customer_id { get; set; } = 0;
public int customer_id { get; set; } = 0;
/// <summary>
/// customer_name
/// </summary>
[Display(Name = "customer_name")]
[MaxLength(256,ErrorMessage = "MaxLength")]
public string customer_name { get; set; } = string.Empty;
[MaxLength(256, ErrorMessage = "MaxLength")]
public string customer_name { get; set; } = string.Empty;
/// <summary>
/// sku_id
/// </summary>
[Display(Name = "sku_id")]
public int sku_id { get; set; } = 0;
public int sku_id { get; set; } = 0;
/// <summary>
/// qty
/// </summary>
[Display(Name = "qty")]
public int qty { get; set; } = 0;
public int qty { get; set; } = 0;
/// <summary>
/// weight
/// </summary>
[Display(Name = "weight")]
public decimal weight { get; set; } = 0;
public decimal weight { get; set; } = 0;
/// <summary>
/// volume
/// </summary>
[Display(Name = "volume")]
public decimal volume { get; set; } = 0;
public decimal volume { get; set; } = 0;
/// <summary>
/// creator
/// </summary>
[Display(Name = "creator")]
[MaxLength(64,ErrorMessage = "MaxLength")]
public string creator { get; set; } = string.Empty;
[MaxLength(64, ErrorMessage = "MaxLength")]
public string creator { get; set; } = string.Empty;
/// <summary>
/// create_time
/// </summary>
[Display(Name = "create_time")]
[DataType(DataType.DateTime, ErrorMessage = "DataType_DateTime")]
public DateTime create_time { get; set; } = UtilConvert.MinDate;
[DataType(DataType.DateTime, ErrorMessage = "DataType_DateTime")]
public DateTime create_time { get; set; } = UtilConvert.MinDate;
/// <summary>
/// damage_qty
/// </summary>
[Display(Name = "damage_qty")]
public int damage_qty { get; set; } = 0;
public int damage_qty { get; set; } = 0;
/// <summary>
/// lock_qty
/// </summary>
[Display(Name = "lock_qty")]
public int lock_qty { get; set; } = 0;
public int lock_qty { get; set; } = 0;
/// <summary>
/// picked_qty
/// </summary>
[Display(Name = "picked_qty")]
public int picked_qty { get; set; } = 0;
public int picked_qty { get; set; } = 0;
/// <summary>
/// unpicked_qty
@ -123,13 +123,13 @@ namespace ModernWMS.WMS.Entities.ViewModels
/// intrasit_qty
/// </summary>
[Display(Name = "intrasit_qty")]
public int intrasit_qty { get; set; } = 0;
public int intrasit_qty { get; set; } = 0;
/// <summary>
/// package_qty
/// </summary>
[Display(Name = "package_qty")]
public int package_qty { get; set; } = 0;
public int package_qty { get; set; } = 0;
/// <summary>
/// unpackage_qty
@ -141,7 +141,7 @@ namespace ModernWMS.WMS.Entities.ViewModels
/// weighing_qty
/// </summary>
[Display(Name = "weighing_qty")]
public int weighing_qty { get; set; } = 0;
public int weighing_qty { get; set; } = 0;
/// <summary>
/// weighing_qty
@ -153,87 +153,87 @@ namespace ModernWMS.WMS.Entities.ViewModels
/// actual_qty
/// </summary>
[Display(Name = "actual_qty")]
public int actual_qty { get; set; } = 0;
public int actual_qty { get; set; } = 0;
/// <summary>
/// sign_qty
/// </summary>
[Display(Name = "sign_qty")]
public int sign_qty { get; set; } = 0;
public int sign_qty { get; set; } = 0;
/// <summary>
/// package_no
/// </summary>
[Display(Name = "package_no")]
[MaxLength(32,ErrorMessage = "MaxLength")]
public string package_no { get; set; } = string.Empty;
[MaxLength(32, ErrorMessage = "MaxLength")]
public string package_no { get; set; } = string.Empty;
/// <summary>
/// package_person
/// </summary>
[Display(Name = "package_person")]
[MaxLength(64,ErrorMessage = "MaxLength")]
public string package_person { get; set; } = string.Empty;
[MaxLength(64, ErrorMessage = "MaxLength")]
public string package_person { get; set; } = string.Empty;
/// <summary>
/// package_time
/// </summary>
[Display(Name = "package_time")]
[DataType(DataType.DateTime, ErrorMessage = "DataType_DateTime")]
public DateTime package_time { get; set; } = UtilConvert.MinDate;
[DataType(DataType.DateTime, ErrorMessage = "DataType_DateTime")]
public DateTime package_time { get; set; } = UtilConvert.MinDate;
/// <summary>
/// weighing_no
/// </summary>
[Display(Name = "weighing_no")]
[MaxLength(32,ErrorMessage = "MaxLength")]
public string weighing_no { get; set; } = string.Empty;
[MaxLength(32, ErrorMessage = "MaxLength")]
public string weighing_no { get; set; } = string.Empty;
/// <summary>
/// weighing_person
/// </summary>
[Display(Name = "weighing_person")]
[MaxLength(64,ErrorMessage = "MaxLength")]
public string weighing_person { get; set; } = string.Empty;
[MaxLength(64, ErrorMessage = "MaxLength")]
public string weighing_person { get; set; } = string.Empty;
/// <summary>
/// weighing_weight
/// </summary>
[Display(Name = "weighing_weight")]
public decimal weighing_weight { get; set; } = 0;
public decimal weighing_weight { get; set; } = 0;
/// <summary>
/// waybill_no
/// </summary>
[Display(Name = "waybill_no")]
[MaxLength(64,ErrorMessage = "MaxLength")]
public string waybill_no { get; set; } = string.Empty;
[MaxLength(64, ErrorMessage = "MaxLength")]
public string waybill_no { get; set; } = string.Empty;
/// <summary>
/// carrier
/// </summary>
[Display(Name = "carrier")]
[MaxLength(256,ErrorMessage = "MaxLength")]
public string carrier { get; set; } = string.Empty;
[MaxLength(256, ErrorMessage = "MaxLength")]
public string carrier { get; set; } = string.Empty;
/// <summary>
/// freightfee
/// </summary>
[Display(Name = "freightfee")]
public decimal freightfee { get; set; } = 0;
public decimal freightfee { get; set; } = 0;
/// <summary>
/// last_update_time
/// </summary>
[Display(Name = "last_update_time")]
[DataType(DataType.DateTime, ErrorMessage = "DataType_DateTime")]
public DateTime last_update_time { get; set; } = UtilConvert.MinDate;
[DataType(DataType.DateTime, ErrorMessage = "DataType_DateTime")]
public DateTime last_update_time { get; set; } = UtilConvert.MinDate;
/// <summary>
/// tenant_id
/// </summary>
[Display(Name = "tenant_id")]
public long tenant_id { get; set; } = 0;
public long tenant_id { get; set; } = 0;
/// <summary>
@ -275,6 +275,17 @@ namespace ModernWMS.WMS.Entities.ViewModels
/// length_unit
/// </summary>
public byte length_unit { get; set; } = 0;
/// <summary>
/// sku_name
/// </summary>
public string sku_name { get; set; } = string.Empty;
/// <summary>
/// unit
/// </summary>
public string unit { get; set; } = string.Empty;
#endregion
}

View file

@ -195,7 +195,9 @@ namespace ModernWMS.WMS.Services
spu_description = spu.spu_description,
spu_name = spu.spu_name,
bar_code = spu.bar_code,
unpicked_qty = d.qty - d.picked_qty
unpicked_qty = d.qty - d.picked_qty,
sku_name = sku.sku_name,
unit = sku.unit
}).ToListAsync();
return datas;
}
@ -358,8 +360,8 @@ namespace ModernWMS.WMS.Services
customer_id = dg.Key.customer_id,
customer_name = dg.Key.customer_name,
qty = dg.Sum(t => t.d.qty),
volume = dg.Sum(t =>t.spu.volume_unit==1? t.d.volume:(t.spu.volume_unit==0?t.d.volume/1000:t.d.volume*1000)),
weight = dg.Sum(t =>t.spu.weight_unit==0?t.d.weight/1000000:(t.spu.weight_unit==1? t.d.weight/1000:t.d.weight)),
volume = dg.Sum(t => t.spu.volume_unit == 1 ? t.d.volume : (t.spu.volume_unit == 0 ? t.d.volume / 1000 : t.d.volume * 1000)),
weight = dg.Sum(t => t.spu.weight_unit == 0 ? t.d.weight / 1000000 : (t.spu.weight_unit == 1 ? t.d.weight / 1000 : t.d.weight)),
creator = dg.Key.creator,
};
query = query.Where(queries.AsExpression<PreDispatchlistViewModel>());
@ -568,7 +570,7 @@ namespace ModernWMS.WMS.Services
join spu in spu_DBSet on sku.spu_id equals spu.id
join owner in owner_DBSet.AsNoTracking() on sg.goods_owner_id equals owner.id into owner_left
from owner in owner_left.DefaultIfEmpty()
join gl in location_DBSet.Where(t=>t.warehouse_area_property != 5).AsNoTracking() on sg.goods_location_id equals gl.id into gl_left
join gl in location_DBSet.Where(t => t.warehouse_area_property != 5).AsNoTracking() on sg.goods_location_id equals gl.id into gl_left
from gl in gl_left.DefaultIfEmpty()
where dl.dispatch_no == dispatch_no && dl.tenant_id == currentUser.tenant_id && (dl.dispatch_status == 0 || dl.dispatch_status == 1)
select new
@ -655,9 +657,9 @@ namespace ModernWMS.WMS.Services
pick.pick_qty = (r.qty <= (pick_qty + pick.qty_available)) ? (r.qty - pick_qty) : pick.qty_available;
pick_qty += pick.pick_qty;
}
r.pick_list = picklist.Where(t=>t.qty_available>0).ToList();
r.pick_list = picklist.Where(t => t.qty_available > 0).ToList();
}
return res;
}

View file

@ -219,3 +219,12 @@ export const viewInventoryDetails = (dispatch_id: number) => http({
dispatch_id
}
})
// Set carrier
export const viewDeliveryMainDetail = (dispatch_no: string) => http({
url: '/dispatchlist/by-dispatch_no',
method: 'get',
params: {
dispatch_no
}
})

View file

@ -486,6 +486,8 @@ export default {
spu_code: '商品编码',
spu_name: '商品名称',
sku_code: '规格编码',
sku_name: '规格名称',
unit: '商品单位',
creator: '创建人',
create_time: '创建时间',
confirmOrder: '确认发货单',

View file

@ -486,6 +486,8 @@ export default {
spu_code: 'Commodity Code',
spu_name: 'Commodity Name',
sku_code: 'Specification Code',
sku_name: 'Specification Name',
unit: 'Commodity Unit',
creator: 'Created By',
create_time: 'Creation Time',
confirmOrder: 'Confirm Shipment Doc',

View file

@ -0,0 +1,84 @@
<template>
<v-dialog v-model="isShow" :width="'70%'" transition="dialog-top-transition" :persistent="true">
<template #default>
<v-card class="formCard">
<v-toolbar color="white" :title="`${$t('wms.deliveryManagement.ViewInventoryDetails')}`"></v-toolbar>
<v-card-text>
<vxe-table
ref="detailXTable"
keep-source
:column-config="{ minWidth: '100px' }"
:data="data.tableData"
:height="'500px'"
align="center"
:edit-config="{ trigger: 'click', mode: 'cell' }"
>
<template #empty>
{{ i18n.global.t('system.page.noData') }}
</template>
<vxe-column type="seq" width="60"></vxe-column>
<vxe-column field="spu_code" :title="$t('wms.deliveryManagement.spu_code')"></vxe-column>
<vxe-column field="spu_name" :title="$t('wms.deliveryManagement.spu_name')"></vxe-column>
<vxe-column field="spu_description" :title="$t('wms.deliveryManagement.spu_description')"></vxe-column>
<vxe-column field="bar_code" :title="$t('wms.deliveryManagement.bar_code')"></vxe-column>
<vxe-column field="sku_code" :title="$t('wms.deliveryManagement.sku_code')"></vxe-column>
<vxe-column field="sku_name" :title="$t('wms.deliveryManagement.sku_name')"></vxe-column>
<vxe-column field="unit" :title="$t('wms.deliveryManagement.unit')"></vxe-column>
<vxe-column field="qty" :title="$t('wms.deliveryManagement.qty')"></vxe-column>
</vxe-table>
</v-card-text>
<v-card-actions class="justify-end">
<v-btn variant="text" @click="method.closeDialog">{{ $t('system.page.close') }}</v-btn>
</v-card-actions>
</v-card>
</template>
</v-dialog>
</template>
<script lang="ts" setup>
import { reactive, computed, defineEmits, watch } from 'vue'
import { hookComponent } from '@/components/system/index'
import { viewDeliveryMainDetail } from '@/api/wms/deliveryManagement'
import i18n from '@/languages/i18n'
const emit = defineEmits(['close', 'submit'])
const props = defineProps<{
showDialog: boolean
dispatchNo: string
}>()
const isShow = computed(() => props.showDialog)
const data = reactive({
tableData: []
})
const method = reactive({
getTableData: async () => {
const { data: res } = await viewDeliveryMainDetail(props.dispatchNo)
if (!res.isSuccess) {
hookComponent.$message({
type: 'error',
content: res.errorMessage
})
return
}
data.tableData = res.data
},
closeDialog: () => {
emit('close')
}
})
watch(
() => isShow.value,
(val) => {
if (val) {
method.getTableData()
}
}
)
</script>
<style scoped lang="less"></style>

View file

@ -72,8 +72,14 @@
field="create_time"
width="170px"
:title="$t('wms.deliveryManagement.create_time')"
></vxe-column> -->
<vxe-column field="operate" :title="$t('system.page.operate')" width="60" :resizable="false" show-overflow>
<template #default="{ row }">
<div style="width: 100%; display: flex; justify-content: center">
<tooltip-btn :flat="true" icon="mdi-eye-outline" :tooltip-text="$t('system.page.view')" @click="method.viewRow(row)"></tooltip-btn>
</div>
</template>
</vxe-column>
</vxe-table>
<custom-pager
:current-page="data.tablePage.pageIndex"
@ -85,6 +91,12 @@
@page-change="method.handlePageChange"
>
</custom-pager>
<!-- View order details -->
<SearchDeliveredMainDetail
:dispatch-no="data.showDeliveredMainDetailNo"
:show-dialog="data.showDeliveredMainDetail"
@close="method.closeDeliveredDetail"
/>
</div>
</template>
@ -104,10 +116,13 @@ import { setSearchObject } from '@/utils/common'
import { TablePage } from '@/types/System/Form'
import { exportData } from '@/utils/exportTable'
import { DEBOUNCE_TIME } from '@/constant/system'
import SearchDeliveredMainDetail from './search-delivered-main-detail.vue'
const xTable = ref()
const data = reactive({
showDeliveredMainDetailNo: '',
showDeliveredMainDetail: false,
showDialog: false,
searchForm: {
dispatch_no: '',
@ -125,6 +140,15 @@ const data = reactive({
})
const method = reactive({
viewRow: (row: DeliveryManagementVO) => {
if (row.dispatch_no) {
data.showDeliveredMainDetailNo = row.dispatch_no
data.showDeliveredMainDetail = true
}
},
closeDeliveredDetail: () => {
data.showDeliveredMainDetail = false
},
// Refresh data
refresh: () => {
method.getNewShipment()

View file

@ -72,8 +72,14 @@
field="create_time"
width="170px"
:title="$t('wms.deliveryManagement.create_time')"
></vxe-column> -->
<vxe-column field="operate" :title="$t('system.page.operate')" width="70" :resizable="false" show-overflow>
<template #default="{ row }">
<div style="width: 100%; display: flex; justify-content: center">
<tooltip-btn :flat="true" icon="mdi-eye-outline" :tooltip-text="$t('system.page.view')" @click="method.viewRow(row)"></tooltip-btn>
</div>
</template>
</vxe-column>
</vxe-table>
<custom-pager
:current-page="data.tablePage.pageIndex"
@ -85,6 +91,12 @@
@page-change="method.handlePageChange"
>
</custom-pager>
<!-- View order details -->
<SearchDeliveredMainDetail
:dispatch-no="data.showDeliveredMainDetailNo"
:show-dialog="data.showDeliveredMainDetail"
@close="method.closeDeliveredDetail"
/>
</div>
</template>
@ -104,10 +116,13 @@ import { setSearchObject } from '@/utils/common'
import { TablePage } from '@/types/System/Form'
import { exportData } from '@/utils/exportTable'
import { DEBOUNCE_TIME } from '@/constant/system'
import SearchDeliveredMainDetail from './search-delivered-main-detail.vue'
const xTable = ref()
const data = reactive({
showDeliveredMainDetailNo: '',
showDeliveredMainDetail: false,
showDialog: false,
dialogForm: {
id: 0
@ -128,6 +143,15 @@ const data = reactive({
})
const method = reactive({
viewRow: (row: DeliveryManagementVO) => {
if (row.dispatch_no) {
data.showDeliveredMainDetailNo = row.dispatch_no
data.showDeliveredMainDetail = true
}
},
closeDeliveredDetail: () => {
data.showDeliveredMainDetail = false
},
// Refresh data
refresh: () => {
method.getPreShipment()
@ -152,13 +176,13 @@ const method = reactive({
}),
exportTable: () => {
const $table = xTable.value
exportData({
table: $table,
filename: i18n.global.t('wms.deliveryManagement.preShipment'),
columnFilterMethod({ column }: any) {
return !['checkbox'].includes(column?.type) && !['operate'].includes(column?.field)
}
})
exportData({
table: $table,
filename: i18n.global.t('wms.deliveryManagement.preShipment'),
columnFilterMethod({ column }: any) {
return !['checkbox'].includes(column?.type) && !['operate'].includes(column?.field)
}
})
},
sureSearch: () => {
data.tablePage.searchObjects = setSearchObject(data.searchForm)

View file

@ -87,9 +87,10 @@
<vxe-column field="customer_name" :title="$t('wms.deliveryManagement.customer_name')"></vxe-column>
<vxe-column field="creator" :title="$t('wms.deliveryManagement.creator')"></vxe-column>
<!-- <vxe-column field="create_time" width="170px" :title="$t('wms.deliveryManagement.create_time')"></vxe-column> -->
<vxe-column field="operate" :title="$t('system.page.operate')" width="240" :resizable="false" show-overflow>
<vxe-column field="operate" :title="$t('system.page.operate')" width="290" :resizable="false" show-overflow>
<template #default="{ row }">
<div style="width: 100%; display: flex; justify-content: center">
<tooltip-btn :flat="true" icon="mdi-eye-outline" :tooltip-text="$t('system.page.view')" @click="method.viewRow(row)"></tooltip-btn>
<tooltip-btn
:disabled="row.dispatch_status !== 0 && row.dispatch_status !== 1"
:flat="true"
@ -142,6 +143,12 @@
@close="method.closeConfirmOrder"
@save-success="method.confirmSuccess"
/>
<!-- View order details -->
<SearchDeliveredMainDetail
:dispatch-no="data.showDeliveredMainDetailNo"
:show-dialog="data.showDeliveredMainDetail"
@close="method.closeDeliveredDetail"
/>
</div>
</template>
@ -164,10 +171,13 @@ import { setSearchObject } from '@/utils/common'
import { TablePage } from '@/types/System/Form'
import { exportData } from '@/utils/exportTable'
import { DEBOUNCE_TIME } from '@/constant/system'
import SearchDeliveredMainDetail from './search-delivered-main-detail.vue'
const xTable = ref()
const data = reactive({
showDeliveredMainDetailNo: '',
showDeliveredMainDetail: false,
showDialog: false,
dialogForm: {
id: 0,
@ -231,6 +241,15 @@ const data = reactive({
})
const method = reactive({
viewRow: (row: DeliveryManagementVO) => {
if (row.dispatch_no) {
data.showDeliveredMainDetailNo = row.dispatch_no
data.showDeliveredMainDetail = true
}
},
closeDeliveredDetail: () => {
data.showDeliveredMainDetail = false
},
// Confirm picking
confirmPicking: async (row: DeliveryManagementVO) => {
hookComponent.$dialog({