|
@@ -1,56 +1,74 @@
|
|
|
<template>
|
|
|
- <div class="app-container">
|
|
|
- <byTable
|
|
|
- :source="sourceList.data"
|
|
|
- :pagination="sourceList.pagination"
|
|
|
- :config="config"
|
|
|
- :loading="loading"
|
|
|
- :selectConfig="selectConfig"
|
|
|
- highlight-current-row
|
|
|
- @get-list="getList">
|
|
|
- <template #amount="{ item }">
|
|
|
- <div>
|
|
|
- <span style="padding-right: 4px">{{ item.currency }}</span>
|
|
|
- <span>{{ moneyFormat(item.amount, 2) }}</span>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </byTable>
|
|
|
+ <div>
|
|
|
+ <el-card class="box-card">
|
|
|
+ <byTable
|
|
|
+ :source="sourceList.data"
|
|
|
+ :pagination="sourceList.pagination"
|
|
|
+ :config="config"
|
|
|
+ :loading="loading"
|
|
|
+ :searchConfig="searchConfig"
|
|
|
+ highlight-current-row
|
|
|
+ @get-list="getList"
|
|
|
+ @clickReset="clickReset">
|
|
|
+ <template #code="{ item }">
|
|
|
+ <div>
|
|
|
+ <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickCode(item)">{{ item.code }}</a>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #blueprint="{ item }">
|
|
|
+ <div>图片</div>
|
|
|
+ </template>
|
|
|
+ </byTable>
|
|
|
+ </el-card>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import byTable from "@/components/byTable/index";
|
|
|
-import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
-const accountCurrency = ref([]);
|
|
|
const sourceList = ref({
|
|
|
data: [],
|
|
|
pagination: {
|
|
|
total: 0,
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- keyword: "",
|
|
|
+ departmentName: "",
|
|
|
+ code: "",
|
|
|
+ wlnCode: "",
|
|
|
status: "",
|
|
|
- payStatus: "",
|
|
|
+ settlementStatus: "",
|
|
|
},
|
|
|
});
|
|
|
-const selectConfig = computed(() => {
|
|
|
+const loading = ref(false);
|
|
|
+const searchConfig = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
- label: "质检状态",
|
|
|
- prop: "status",
|
|
|
- data: [],
|
|
|
+ type: "input",
|
|
|
+ prop: "code",
|
|
|
+ label: "订单号",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "wlnCode",
|
|
|
+ label: "万里牛单号",
|
|
|
},
|
|
|
{
|
|
|
- label: "订单类型",
|
|
|
- prop: "payStatus",
|
|
|
- data: [],
|
|
|
+ type: "input",
|
|
|
+ prop: "departmentName",
|
|
|
+ label: "事业部名称",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "status",
|
|
|
+ dictKey: "order_status",
|
|
|
+ label: "订单状态",
|
|
|
},
|
|
|
{
|
|
|
- label: "结论",
|
|
|
- prop: "payStatus",
|
|
|
- data: [],
|
|
|
+ type: "select",
|
|
|
+ prop: "settlementStatus",
|
|
|
+ label: "结算状态",
|
|
|
+ data: proxy.useUserStore().allDict["settlement_status"],
|
|
|
},
|
|
|
];
|
|
|
});
|
|
@@ -58,58 +76,204 @@ const config = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "采购单号",
|
|
|
- prop: "code",
|
|
|
- "min-width": 180,
|
|
|
+ label: "设计图",
|
|
|
+ slot: "blueprint",
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "产品规格编码",
|
|
|
+ prop: "skuSpecCode",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "产品规格名称",
|
|
|
+ prop: "skuSpecName",
|
|
|
+ width: 180,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "BOM规格编码",
|
|
|
+ prop: "bomSpecCode",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "BOM规格名称",
|
|
|
+ prop: "bomSpecName",
|
|
|
+ width: 220,
|
|
|
},
|
|
|
},
|
|
|
- // {
|
|
|
- // attrs: {
|
|
|
- // label: "供应商",
|
|
|
- // prop: "sellCorporationId",
|
|
|
- // "min-width": 220,
|
|
|
- // },
|
|
|
- // render(type) {
|
|
|
- // return proxy.dictValueLabel(type, supplierList.value);
|
|
|
- // },
|
|
|
- // },
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "操作",
|
|
|
+ label: "事业部",
|
|
|
+ prop: "departmentName",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "订单号",
|
|
|
+ slot: "code",
|
|
|
+ width: 200,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "万里牛单号",
|
|
|
+ prop: "wlnCode",
|
|
|
width: 160,
|
|
|
- align: "center",
|
|
|
- fixed: "right",
|
|
|
},
|
|
|
- renderHTML(row) {
|
|
|
- return [];
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "订单状态",
|
|
|
+ prop: "status",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.dictKeyValue(val, proxy.useUserStore().allDict["order_status"]);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "结算状态",
|
|
|
+ prop: "settlementStatus",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.dictKeyValue(val, proxy.useUserStore().allDict["settlement_status"]);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "数量",
|
|
|
+ prop: "quantity",
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "订单总金额 ¥",
|
|
|
+ prop: "totalAmount",
|
|
|
+ width: 120,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.moneyFormat(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "产品总金额 ¥",
|
|
|
+ prop: "productTotalAmount",
|
|
|
+ width: 120,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.moneyFormat(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "定制加工费 ¥",
|
|
|
+ prop: "customProcessingFee",
|
|
|
+ width: 120,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.moneyFormat(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "代发费 ¥",
|
|
|
+ prop: "lssueFee",
|
|
|
+ width: 120,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.moneyFormat(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "快递包材费 ¥",
|
|
|
+ prop: "deliveryMaterialsFee",
|
|
|
+ width: 120,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.moneyFormat(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "包装人工费 ¥",
|
|
|
+ prop: "packingLabor",
|
|
|
+ width: 120,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.moneyFormat(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "包材费 ¥",
|
|
|
+ prop: "packagingMaterialCost",
|
|
|
+ width: 120,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.moneyFormat(val);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "下单时间",
|
|
|
+ prop: "wlnCreateTime",
|
|
|
+ width: 160,
|
|
|
},
|
|
|
},
|
|
|
];
|
|
|
});
|
|
|
-const getDict = () => {
|
|
|
- // proxy.getDictOne(["account_currency"]).then((res) => {
|
|
|
- // accountCurrency.value = res["account_currency"].map((x) => ({
|
|
|
- // label: x.dictValue,
|
|
|
- // value: x.dictKey,
|
|
|
- // }));
|
|
|
- // });
|
|
|
-};
|
|
|
-const getList = async (req) => {
|
|
|
- console.log(req);
|
|
|
- // sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
- // loading.value = true;
|
|
|
- // proxy.post("/ehsdPurchase/page", sourceList.value.pagination).then((res) => {
|
|
|
- // console.log(res);
|
|
|
- // sourceList.value.data = res.rows;
|
|
|
- // sourceList.value.pagination.total = res.total;
|
|
|
- // setTimeout(() => {
|
|
|
- // loading.value = false;
|
|
|
- // }, 200);
|
|
|
- // });
|
|
|
+const getList = async (req, status) => {
|
|
|
+ if (status) {
|
|
|
+ sourceList.value.pagination = {
|
|
|
+ pageNum: sourceList.value.pagination.pageNum,
|
|
|
+ pageSize: sourceList.value.pagination.pageSize,
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
|
|
|
+ }
|
|
|
+ loading.value = true;
|
|
|
+ proxy.post("/orderInfo/page", sourceList.value.pagination).then((res) => {
|
|
|
+ sourceList.value.data = res.rows;
|
|
|
+ sourceList.value.pagination.total = res.total;
|
|
|
+ setTimeout(() => {
|
|
|
+ loading.value = false;
|
|
|
+ }, 200);
|
|
|
+ });
|
|
|
};
|
|
|
-getDict();
|
|
|
getList();
|
|
|
+const clickReset = () => {
|
|
|
+ treeCategory.value.setCurrentKey(null);
|
|
|
+ getList("", true);
|
|
|
+};
|
|
|
+const clickCode = (row) => {
|
|
|
+ console.log(row, "订单详情");
|
|
|
+};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+:deep(.el-dialog) {
|
|
|
+ margin-top: 10px !important;
|
|
|
+ margin-bottom: 10px !important;
|
|
|
+}
|
|
|
</style>
|