|
@@ -10,26 +10,25 @@
|
|
|
highlight-current-row
|
|
|
:action-list="[
|
|
|
{
|
|
|
- text: '添加产品',
|
|
|
- action: () => clickModal(),
|
|
|
+ text: '操作日志',
|
|
|
+ action: () => viewLogs(),
|
|
|
},
|
|
|
- // {
|
|
|
- // text: '操作日志',
|
|
|
- // action: () => viewLogs(),
|
|
|
- // },
|
|
|
]"
|
|
|
@get-list="getList"
|
|
|
@clickReset="clickReset">
|
|
|
- <template #name="{ item }">
|
|
|
+ <template #code="{ item }">
|
|
|
<div>
|
|
|
- <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickName(item)">{{ item.name }}</a>
|
|
|
+ <a style="color: #409eff; cursor: pointer; word-break: break-all" @click="clickCode(item)">{{ item.code }}</a>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template #address="{ item }">
|
|
|
+ <div>{{ item.province }}, {{ item.city }}, {{ item.county }}, {{ item.detailedAddress }}</div>
|
|
|
+ </template>
|
|
|
</byTable>
|
|
|
</el-card>
|
|
|
|
|
|
<el-dialog :title="modalTitle" v-if="openDialog" v-model="openDialog" width="90%">
|
|
|
- <MakeSKU :rowData="rowData" :detailStatus="detailStatus" @clickCancel="clickCancel"></MakeSKU>
|
|
|
+ <!-- <MakeSKU :rowData="rowData" :detailStatus="detailStatus" @clickCancel="clickCancel"></MakeSKU> -->
|
|
|
</el-dialog>
|
|
|
|
|
|
<el-dialog title="操作日志" v-if="openLogs" v-model="openLogs" width="50%">
|
|
@@ -51,6 +50,7 @@
|
|
|
<script setup>
|
|
|
import byTable from "@/components/byTable/index";
|
|
|
import MakeSKU from "@/components/makeProduct/index";
|
|
|
+import { ElMessage, ElMessageBox } from "element-plus";
|
|
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const sourceList = ref({
|
|
@@ -59,26 +59,56 @@ const sourceList = ref({
|
|
|
total: 0,
|
|
|
pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
+ departmentName: "",
|
|
|
+ code: "",
|
|
|
+ wlnCode: "",
|
|
|
+ status: "",
|
|
|
+ settlementStatus: "",
|
|
|
},
|
|
|
});
|
|
|
+const settlementStatus = ref([
|
|
|
+ {
|
|
|
+ dictKey: 1,
|
|
|
+ dictValue: "未结算",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dictKey: 2,
|
|
|
+ dictValue: "已对账",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ dictKey: 3,
|
|
|
+ dictValue: "已结算",
|
|
|
+ },
|
|
|
+]);
|
|
|
const loading = ref(false);
|
|
|
const searchConfig = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
type: "input",
|
|
|
- prop: "name",
|
|
|
- label: "品名",
|
|
|
+ prop: "code",
|
|
|
+ label: "订单号",
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
|
- prop: "code",
|
|
|
- label: "品号",
|
|
|
+ prop: "wlnCode",
|
|
|
+ label: "万里牛单号",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "input",
|
|
|
+ prop: "departmentName",
|
|
|
+ label: "事业部名称",
|
|
|
},
|
|
|
{
|
|
|
type: "select",
|
|
|
- prop: "brand",
|
|
|
- dictKey: "sku_brand",
|
|
|
- label: "品牌",
|
|
|
+ prop: "status",
|
|
|
+ dictKey: "order_status",
|
|
|
+ label: "订单状态",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "select",
|
|
|
+ prop: "settlementStatus",
|
|
|
+ label: "结算状态",
|
|
|
+ data: settlementStatus.value,
|
|
|
},
|
|
|
];
|
|
|
});
|
|
@@ -86,56 +116,180 @@ const config = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "群组品号",
|
|
|
- prop: "code",
|
|
|
- width: 180,
|
|
|
+ label: "事业部",
|
|
|
+ prop: "departmentName",
|
|
|
+ width: 120,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "订单号",
|
|
|
+ slot: "code",
|
|
|
+ width: 200,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "万里牛单号",
|
|
|
+ prop: "wlnCode",
|
|
|
+ width: 160,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "快递单号",
|
|
|
+ prop: "expressDeliveryCode",
|
|
|
+ width: 140,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 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, settlementStatus.value);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "税率",
|
|
|
+ prop: "taxRate",
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return val + "%";
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ 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: "群组品名",
|
|
|
- slot: "name",
|
|
|
- "min-width": 240,
|
|
|
+ label: "快递包材费 ¥",
|
|
|
+ prop: "deliveryMaterialsFee",
|
|
|
+ width: 120,
|
|
|
+ align: "right",
|
|
|
+ },
|
|
|
+ render(val) {
|
|
|
+ return proxy.moneyFormat(val);
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "产品来源",
|
|
|
- prop: "source",
|
|
|
+ label: "包装人工费 ¥",
|
|
|
+ prop: "packingLabor",
|
|
|
width: 120,
|
|
|
+ align: "right",
|
|
|
},
|
|
|
render(val) {
|
|
|
- return val == 1 ? "MES" : "万里牛";
|
|
|
+ return proxy.moneyFormat(val);
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "品牌",
|
|
|
- prop: "brand",
|
|
|
+ label: "包材费 ¥",
|
|
|
+ prop: "packagingMaterialCost",
|
|
|
width: 120,
|
|
|
+ align: "right",
|
|
|
},
|
|
|
render(val) {
|
|
|
- return proxy.dictKeyValue(val, proxy.useUserStore().allDict["sku_brand"]);
|
|
|
+ return proxy.moneyFormat(val);
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "型号",
|
|
|
- prop: "modelNumber",
|
|
|
+ label: "交期",
|
|
|
+ prop: "deliveryTime",
|
|
|
+ width: 160,
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "发货时间",
|
|
|
+ prop: "shippingTime",
|
|
|
+ width: 160,
|
|
|
+ align: "center",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "收货人",
|
|
|
+ prop: "consignee",
|
|
|
width: 140,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "材质",
|
|
|
- prop: "material",
|
|
|
+ label: "收货人电话",
|
|
|
+ prop: "consigneeNumber",
|
|
|
width: 140,
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
+ label: "收货人地址",
|
|
|
+ slot: "address",
|
|
|
+ width: 220,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
label: "操作",
|
|
|
- width: 80,
|
|
|
+ width: 120,
|
|
|
align: "center",
|
|
|
fixed: "right",
|
|
|
},
|
|
@@ -143,13 +297,24 @@ const config = computed(() => {
|
|
|
return [
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "编辑",
|
|
|
+ label: "税率",
|
|
|
type: "primary",
|
|
|
text: true,
|
|
|
},
|
|
|
el: "button",
|
|
|
click() {
|
|
|
- clickUpdate(row);
|
|
|
+ ElMessage("暂无税率功能");
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ attrs: {
|
|
|
+ label: "删除",
|
|
|
+ type: "primary",
|
|
|
+ text: true,
|
|
|
+ },
|
|
|
+ el: "button",
|
|
|
+ click() {
|
|
|
+ clickDelete(row);
|
|
|
},
|
|
|
},
|
|
|
];
|
|
@@ -180,33 +345,42 @@ const clickReset = () => {
|
|
|
treeCategory.value.setCurrentKey(null);
|
|
|
getList("", true);
|
|
|
};
|
|
|
-const modalTitle = ref("添加SKU");
|
|
|
+const modalTitle = ref("添加订单");
|
|
|
const openDialog = ref(false);
|
|
|
const rowData = ref({});
|
|
|
const detailStatus = ref(false);
|
|
|
const clickModal = () => {
|
|
|
- modalTitle.value = "添加SKU";
|
|
|
+ modalTitle.value = "添加订单";
|
|
|
rowData.value = {};
|
|
|
detailStatus.value = false;
|
|
|
openDialog.value = true;
|
|
|
};
|
|
|
const clickUpdate = (row) => {
|
|
|
- modalTitle.value = "编辑SKU";
|
|
|
+ modalTitle.value = "编辑订单";
|
|
|
rowData.value = row;
|
|
|
detailStatus.value = false;
|
|
|
openDialog.value = true;
|
|
|
};
|
|
|
+const clickDelete = (row) => {
|
|
|
+ ElMessageBox.confirm("你是否确认此操作", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ }).then(() => {
|
|
|
+ proxy.post("/orderInfo/delete", { id: row.id }).then(() => {
|
|
|
+ ElMessage({ message: "删除成功", type: "success" });
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+ });
|
|
|
+};
|
|
|
const clickCancel = (status) => {
|
|
|
openDialog.value = false;
|
|
|
if (status) {
|
|
|
getList();
|
|
|
}
|
|
|
};
|
|
|
-const openFile = (path) => {
|
|
|
- window.open(path);
|
|
|
-};
|
|
|
-const clickName = (row) => {
|
|
|
- modalTitle.value = "SKU详情";
|
|
|
+const clickCode = (row) => {
|
|
|
+ modalTitle.value = "订单详情";
|
|
|
rowData.value = row;
|
|
|
detailStatus.value = true;
|
|
|
openDialog.value = true;
|
|
@@ -239,14 +413,14 @@ const configLogs = computed(() => {
|
|
|
{
|
|
|
attrs: {
|
|
|
label: "操作人",
|
|
|
- prop: "operator",
|
|
|
+ prop: "userName",
|
|
|
align: "center",
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
attrs: {
|
|
|
- label: "SKU品号",
|
|
|
- prop: "code",
|
|
|
+ label: "订单号",
|
|
|
+ prop: "orderCode",
|
|
|
align: "center",
|
|
|
},
|
|
|
},
|
|
@@ -272,7 +446,7 @@ const viewLogs = () => {
|
|
|
const getLogsList = async (req) => {
|
|
|
logsList.value.pagination = { ...logsList.value.pagination, ...req };
|
|
|
loadingLogs.value = true;
|
|
|
- proxy.post("/bomOperatingLog/page", logsList.value.pagination).then((res) => {
|
|
|
+ proxy.post("/orderOperatingLog/page", logsList.value.pagination).then((res) => {
|
|
|
logsList.value.data = res.rows;
|
|
|
logsList.value.pagination.total = res.total;
|
|
|
setTimeout(() => {
|