Browse Source

字典替换

lxf 1 year ago
parent
commit
59eb7fe4a6
2 changed files with 16 additions and 48 deletions
  1. 1 1
      src/components/makeProduct/index.vue
  2. 15 47
      src/views/group/order/management/index.vue

+ 1 - 1
src/components/makeProduct/index.vue

@@ -274,7 +274,7 @@ const formConfig = computed(() => {
       type: "select",
       label: "品牌",
       prop: "brand",
-      data: proxy.useUserStore().allDict["sku_brand"],
+      data: proxy.useUserStore().allDict["wlnBrand"],
       itemWidth: 50,
     },
     {

+ 15 - 47
src/views/group/order/management/index.vue

@@ -10,6 +10,10 @@
         highlight-current-row
         :action-list="[
           {
+            text: '新建订单',
+            action: () => clickAddOrder(),
+          },
+          {
             text: '操作日志',
             action: () => viewLogs(),
           },
@@ -27,10 +31,6 @@
       </byTable>
     </el-card>
 
-    <el-dialog :title="modalTitle" v-if="openDialog" v-model="openDialog" width="90%">
-      <!-- <MakeSKU :rowData="rowData" :detailStatus="detailStatus" @clickCancel="clickCancel"></MakeSKU> -->
-    </el-dialog>
-
     <el-dialog title="操作日志" v-if="openLogs" v-model="openLogs" width="50%">
       <byTable
         :source="logsList.data"
@@ -49,7 +49,6 @@
 
 <script setup>
 import byTable from "@/components/byTable/index";
-import MakeSKU from "@/components/makeProduct/index";
 import { ElMessage, ElMessageBox } from "element-plus";
 
 const { proxy } = getCurrentInstance();
@@ -66,20 +65,6 @@ const sourceList = ref({
     settlementStatus: "",
   },
 });
-const settlementStatus = ref([
-  {
-    dictKey: 1,
-    dictValue: "未结算",
-  },
-  {
-    dictKey: 2,
-    dictValue: "已对账",
-  },
-  {
-    dictKey: 3,
-    dictValue: "已结算",
-  },
-]);
 const loading = ref(false);
 const searchConfig = computed(() => {
   return [
@@ -108,7 +93,7 @@ const searchConfig = computed(() => {
       type: "select",
       prop: "settlementStatus",
       label: "结算状态",
-      data: settlementStatus.value,
+      data: proxy.useUserStore().allDict["settlement_status"],
     },
   ];
 });
@@ -159,7 +144,7 @@ const config = computed(() => {
         width: 120,
       },
       render(val) {
-        return proxy.dictKeyValue(val, settlementStatus.value);
+        return proxy.dictKeyValue(val, proxy.useUserStore().allDict["settlement_status"]);
       },
     },
     {
@@ -345,21 +330,16 @@ const clickReset = () => {
   treeCategory.value.setCurrentKey(null);
   getList("", true);
 };
-const modalTitle = ref("添加订单");
-const openDialog = ref(false);
-const rowData = ref({});
-const detailStatus = ref(false);
-const clickModal = () => {
-  modalTitle.value = "添加订单";
-  rowData.value = {};
-  detailStatus.value = false;
-  openDialog.value = true;
+const clickAddOrder = () => {
+  proxy.$router.replace({
+    path: "/addOrder",
+    query: {
+      random: proxy.random(),
+    },
+  });
 };
-const clickUpdate = (row) => {
-  modalTitle.value = "编辑订单";
-  rowData.value = row;
-  detailStatus.value = false;
-  openDialog.value = true;
+const clickCode = (row) => {
+  console.log(row, "订单详情");
 };
 const clickDelete = (row) => {
   ElMessageBox.confirm("你是否确认此操作", "提示", {
@@ -373,18 +353,6 @@ const clickDelete = (row) => {
     });
   });
 };
-const clickCancel = (status) => {
-  openDialog.value = false;
-  if (status) {
-    getList();
-  }
-};
-const clickCode = (row) => {
-  modalTitle.value = "订单详情";
-  rowData.value = row;
-  detailStatus.value = true;
-  openDialog.value = true;
-};
 const openLogs = ref(false);
 const loadingLogs = ref(false);
 const logsList = ref({