|
@@ -28,11 +28,13 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
|
|
|
|
|
- <el-table :data="rows" row-key="id" v-loading="loading" border stripe>
|
|
|
|
|
|
|
+ <el-table :data="rows" row-key="recId" v-loading="loading" border stripe>
|
|
|
<el-table-column prop="deliveryNo" label="发货单号" min-width="160" show-overflow-tooltip resizable />
|
|
<el-table-column prop="deliveryNo" label="发货单号" min-width="160" show-overflow-tooltip resizable />
|
|
|
<el-table-column prop="salesOrderNo" label="销售单号" min-width="160" show-overflow-tooltip resizable />
|
|
<el-table-column prop="salesOrderNo" label="销售单号" min-width="160" show-overflow-tooltip resizable />
|
|
|
<el-table-column prop="dept" label="部门" min-width="140" show-overflow-tooltip resizable />
|
|
<el-table-column prop="dept" label="部门" min-width="140" show-overflow-tooltip resizable />
|
|
|
- <el-table-column prop="deliveryDate" label="发货日期" min-width="150" resizable />
|
|
|
|
|
|
|
+ <el-table-column prop="deliveryDate" label="发货日期" min-width="150" resizable>
|
|
|
|
|
+ <template #default="{ row }">{{ fmtDate(row.deliveryDate) }}</template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="status" label="状态" min-width="110" resizable />
|
|
<el-table-column prop="status" label="状态" min-width="110" resizable />
|
|
|
<el-table-column prop="remark" label="备注" min-width="180" show-overflow-tooltip resizable />
|
|
<el-table-column prop="remark" label="备注" min-width="180" show-overflow-tooltip resizable />
|
|
|
<template #empty>
|
|
<template #empty>
|
|
@@ -47,15 +49,19 @@
|
|
|
:total="total"
|
|
:total="total"
|
|
|
:page-sizes="[10, 20, 50]"
|
|
:page-sizes="[10, 20, 50]"
|
|
|
layout="total, sizes, prev, pager, next"
|
|
layout="total, sizes, prev, pager, next"
|
|
|
|
|
+ @current-change="loadList"
|
|
|
|
|
+ @size-change="loadList"
|
|
|
/>
|
|
/>
|
|
|
</div>
|
|
</div>
|
|
|
</AidopDemoShell>
|
|
</AidopDemoShell>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts" name="aidopS7FinishedOutboundSalesShipmentNotice">
|
|
<script setup lang="ts" name="aidopS7FinishedOutboundSalesShipmentNotice">
|
|
|
-import { computed, reactive, ref } from 'vue';
|
|
|
|
|
|
|
+import { computed, onActivated, onMounted, reactive, ref } from 'vue';
|
|
|
import { useRoute } from 'vue-router';
|
|
import { useRoute } from 'vue-router';
|
|
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
import AidopDemoShell from '/@/views/aidop/components/AidopDemoShell.vue';
|
|
import AidopDemoShell from '/@/views/aidop/components/AidopDemoShell.vue';
|
|
|
|
|
+import { fetchSalesDeliveryNoticeList, type SalesDeliveryNoticeRow } from '../api/salesDeliveryNotice';
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
const pageTitle = computed(() => (route.meta?.title as string) || '销售发货通知');
|
|
const pageTitle = computed(() => (route.meta?.title as string) || '销售发货通知');
|
|
@@ -72,15 +78,46 @@ const query = reactive({
|
|
|
|
|
|
|
|
const deliveryDateRange = ref<[string, string] | null>(null);
|
|
const deliveryDateRange = ref<[string, string] | null>(null);
|
|
|
|
|
|
|
|
-// 本批次为只读 UI 骨架,尚无真实销售发货通知接口:渲染空表,不发请求、不造数据。
|
|
|
|
|
|
|
+// S7 销售发货通知 · 只读头列表(S7-SALES-DELIVERY-NOTICE-READONLY-LIST-1)。
|
|
|
|
|
+// 数据源 aidopdev.ASNBOLShipperMaster ⋈ DepartmentMaster,后端 api/S7SalesDeliveryNotice。
|
|
|
|
|
+// 只读:无新增/编辑/删除/发货确认/出库/库存扣减/打印/标签/导出/明细/详情。ASNBOLShipperMaster 0 行 → 空态先行。
|
|
|
const loading = ref(false);
|
|
const loading = ref(false);
|
|
|
-const rows = ref<Record<string, unknown>[]>([]);
|
|
|
|
|
|
|
+const rows = ref<SalesDeliveryNoticeRow[]>([]);
|
|
|
const total = ref(0);
|
|
const total = ref(0);
|
|
|
|
|
|
|
|
|
|
+function fmtDate(v?: string | null) {
|
|
|
|
|
+ if (!v) return '';
|
|
|
|
|
+ return String(v).slice(0, 10);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+async function loadList() {
|
|
|
|
|
+ loading.value = true;
|
|
|
|
|
+ try {
|
|
|
|
|
+ const data = await fetchSalesDeliveryNoticeList({
|
|
|
|
|
+ id: query.shipmentNo,
|
|
|
|
|
+ ordNbr: query.salesOrderNo,
|
|
|
|
|
+ department: query.dept,
|
|
|
|
|
+ shipDateFrom: query.deliveryDateStart,
|
|
|
|
|
+ shipDateTo: query.deliveryDateEnd,
|
|
|
|
|
+ page: query.page,
|
|
|
|
|
+ pageSize: query.pageSize,
|
|
|
|
|
+ });
|
|
|
|
|
+ rows.value = data.list || [];
|
|
|
|
|
+ total.value = data.total || 0;
|
|
|
|
|
+ } catch (e: any) {
|
|
|
|
|
+ rows.value = [];
|
|
|
|
|
+ total.value = 0;
|
|
|
|
|
+ ElMessage.error(e?.message || '加载销售发货通知列表失败');
|
|
|
|
|
+ } finally {
|
|
|
|
|
+ loading.value = false;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
function doSearch() {
|
|
function doSearch() {
|
|
|
query.deliveryDateStart = deliveryDateRange.value?.[0] || '';
|
|
query.deliveryDateStart = deliveryDateRange.value?.[0] || '';
|
|
|
query.deliveryDateEnd = deliveryDateRange.value?.[1] || '';
|
|
query.deliveryDateEnd = deliveryDateRange.value?.[1] || '';
|
|
|
query.page = 1;
|
|
query.page = 1;
|
|
|
|
|
+ loadList();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function resetQuery() {
|
|
function resetQuery() {
|
|
@@ -91,7 +128,11 @@ function resetQuery() {
|
|
|
query.deliveryDateStart = '';
|
|
query.deliveryDateStart = '';
|
|
|
query.deliveryDateEnd = '';
|
|
query.deliveryDateEnd = '';
|
|
|
query.page = 1;
|
|
query.page = 1;
|
|
|
|
|
+ loadList();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+onMounted(() => loadList());
|
|
|
|
|
+onActivated(() => loadList());
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|