Jelajahi Sumber

Merge branch 'cheney' into dev

WanGxC 7 bulan lalu
induk
melakukan
7a003c81d1

+ 1 - 1
src/views/product-manage/competitor-monitor/component/DataTable.vue

@@ -98,7 +98,7 @@ async function fetchList() {
     goods__brand: queryParameter?.brand,
     goods__tag: queryParameter?.group,
     status: queryParameter?.status,
-    shop_id: queryParameter?.shop,
+    shop: queryParameter?.shop,
     asin: queryParameter?.asin,
     goods__sku: queryParameter?.sku,
     platform_number: queryParameter?.platformId,

+ 1 - 1
src/views/product-manage/product-list/component/DataTable.vue

@@ -94,7 +94,7 @@ async function fetchList() {
     status: queryParameter?.status,
     asin: queryParameter?.asin,
     sku: queryParameter?.sku,
-    shop_id: queryParameter?.shop
+    shop: queryParameter?.shop
   };
 
   await useTableData(api.getTableData, query, gridOptions);

+ 6 - 12
src/views/product-manage/product-monitor/component/DataTable.vue

@@ -86,23 +86,22 @@ onMounted(() => {
   fetchList();
 });
 
-// TODO: 删除goods
 async function fetchList() {
   gridOptions.data = [];
   gridOptions.columns = [];
 
   const query = {
     country_code: queryParameter?.country,
-    goods__brand: queryParameter?.brand,
-    goods__tag: queryParameter?.group,
+    brand: queryParameter?.brand,
+    tag: queryParameter?.group,
     status: queryParameter?.status,
     shop_id: queryParameter?.shop,
     asin: queryParameter?.asin,
-    goods__sku: queryParameter?.sku,
+    sku: queryParameter?.sku,
     platform_number: queryParameter?.platformId,
-    goods__all_ratings: queryParameter?.scoreNumber,
-    goods__all_reviews: queryParameter?.commentNumber,
-    goods__all_score: queryParameter?.displayScore
+    scoreNumber: queryParameter?.scoreNumber,
+    commentNumber: queryParameter?.commentNumber,
+    displayScore: queryParameter?.displayScore
   };
 
   await useTableData(api.getTableData, query, gridOptions);
@@ -146,10 +145,6 @@ async function handleDownload() {
 		}
 }
 
-function onCancel(val) {
-	// console.log('val=> ', val);
-}
-
 async function batchDelete() {
   const ids = Array.from(checkedList.value);
   const res = await useResponse(api.batchDeleteRow, { keys: ids });
@@ -265,7 +260,6 @@ defineExpose({ fetchList });
 				:icon="InfoFilled"
 				icon-color="#626AEF"
 				title="是否确认导出当前时间内所有数据项?"
-				@cancel="onCancel"
 				@confirm="handleDownload"
 			>
 				<template #reference>

+ 1 - 1
src/views/product-manage/product-monitor/component/DataTableSlot.vue

@@ -66,7 +66,7 @@ function onConfirm() {
       <div v-else>-</div>
     </div>
     <div v-else-if="field === 'price_info'">
-      <div v-if="row.goods.price > 0" class="font-medium">
+      <div v-if="row.goods.price >= 0" class="font-medium">
         <p>现 价:{{ row.goods.currency_code + '‎' + row.goods.price }}</p>
         <p>折 扣:{{ row.goods.discount > 0 ? row.goods.discount + '%' : '-' }}</p>
         <p>优惠劵:{{ !row || row.goods.coupon <= 0 ? '-' : row.goods.currency_code + '‎' + row.goods.coupon }}</p>

+ 68 - 0
src/views/sku-manage/Columns.ts

@@ -0,0 +1,68 @@
+export const AttributeColumns = [
+  { type: 'seq', title: 'No.', width: 60, align: 'center', fixed: 'left' },
+  {
+    field: 'name', title: '属性名称', minWidth: 'auto', align: 'center',fixed: 'left',
+    slots: { default: 'name' }
+  },
+  {
+    field: 'key', title: '属性标识', minWidth: 'auto', align: 'center',
+    slots: { default: 'key' }
+  },
+  {
+    field: 'update_datetime', title: '更新时间', minWidth: 'auto', align: 'center',
+    slots: { default: 'update_datetime' }
+  },
+  {
+    field: 'create_datetime', title: '创建时间', minWidth: 'auto', align: 'center',
+    slots: { default: 'create_datetime' }
+  },
+  {
+    field: 'operate', title: '操 作', minWidth: 100, align: 'center', fixed: 'right',
+    slots: { default: 'operate' }
+  }
+];
+
+export const OnlineMerchandiseColumns = [
+  { type: 'seq', title: 'No.', width: 60, align: 'center', fixed: 'left', },
+  { field: 'asin', title: 'ASIN', minWidth: 'auto', align: 'center', slots: { default: 'asin' }, fixed: 'left', },
+  { field: 'sku', title: 'SKU', minWidth: 'auto', align: 'center', slots: { default: 'sku' } },
+  { field: 'platform_number', title: '平台编号', minWidth: 'auto', align: 'center',
+    slots: { default: 'platform_number' }
+  },
+  {
+    field: 'shop_name', title: '店 铺', minWidth: 'auto', align: 'center',
+    slots: { default: 'shop_name' }
+  },
+  {
+    field: 'country_code', title: '国 家', width: 'auto', align: 'center',
+    slots: { default: 'country_code' }
+  },
+  {
+    field: 'region', title: '站 点', width: 'auto', align: 'center',
+    slots: { default: 'region' }
+  },
+  {
+    field: 'quantity', title: '可售数量', width: 'auto', align: 'center',
+    slots: { default: 'quantity' }
+  },
+  {
+    field: 'fulfillment_channel', title: '配送方式', width: 'auto', align: 'center',
+    slots: { default: 'fulfillment_channel' }
+  },
+  {
+    field: 'raw_launch_datetime', title: '上架时间', width: 'auto', align: 'center',
+    slots: { default: 'raw_launch_datetime' }
+  },
+  {
+    field: 'price', title: '价 格', width: 'auto', align: 'center',
+    slots: { default: 'price' }
+  },
+  {
+    field: 'status', title: '状 态', width: 80, align: 'center',
+    slots: { default: 'status' }
+  },
+  {
+    field: 'create_datetime', title: '创建时间', minWidth: 'auto', align: 'center',
+    slots: { default: 'create_datetime' }
+  }
+];

+ 29 - 0
src/views/sku-manage/product-attribute/api.ts

@@ -0,0 +1,29 @@
+import { request } from '/@/utils/service';
+
+
+const apiPrefix = '/api/cms/sku_attr/';
+
+export function getTableData(query: any) {
+  return request({
+    url: apiPrefix,
+    method: 'GET',
+    params: query
+  });
+}
+
+export function deleteRow(query: any) {
+  return request({
+    url: apiPrefix + query.id + '/',
+    method: 'DELETE',
+    params: query
+  });
+}
+
+export function updateRow(query: any) {
+  return request({
+    url: apiPrefix + query.id + '/',
+    method: 'PUT',
+    data: query
+  });
+}
+

+ 187 - 0
src/views/sku-manage/product-attribute/component/DataTable.vue

@@ -0,0 +1,187 @@
+<script lang="ts" setup>
+/**
+ * @Name: Table.vue
+ * @Description: 产品属性表格
+ * @Author: Cheney
+ */
+
+import { ElMessage } from 'element-plus';
+import { Download, InfoFilled, Refresh, Plus } from '@element-plus/icons-vue';
+import { usePagination } from '/@/utils/usePagination';
+import { useTableData } from '/@/utils/useTableData';
+import { useResponse } from '/@/utils/useResponse';
+import { AttributeColumns } from '/@/views/sku-manage/Columns';
+import PermissionButton from '/@/components/PermissionButton/index.vue';
+import DataTableSlot from './DataTableSlot.vue';
+import EditDrawer from './EditDrawer.vue';
+import NoticeDialog from '/src/views/product-manage/product-list/component/NoticeDialog.vue';
+import * as api from '../api';
+
+
+interface Parameter {
+  country: string,
+  shop: string,
+  region: string,
+  delivery: string,
+  status: string,
+  asin: string,
+  sku: string
+}
+
+const queryParameter: Parameter | undefined = inject('query-parameter');
+const { tableOptions, handlePageChange } = usePagination(fetchList);
+
+const gridRef = ref();
+const gridOptions: any = reactive({
+  size: 'small',
+  border: false,
+  round: true,
+  stripe: true,
+  currentRowHighLight: true,
+  height: '100%',
+  toolbarConfig: {
+    size: 'large',
+    custom: true,
+    slots: {
+      tools: 'toolbar_tools',
+      buttons: 'toolbar_buttons'
+    }
+  },
+  rowConfig: {
+    isHover: true
+  },
+  columnConfig: {
+    resizable: true
+  },
+  pagerConfig: {
+    total: tableOptions.value.total,
+    page: tableOptions.value.page,
+    limit: tableOptions.value.limit
+  },
+  loading: false,
+  loadingConfig: {
+    icon: 'vxe-icon-indicator roll',
+    text: '正在拼命加载中...'
+  },
+  columns: '',
+  data: ''
+});
+
+const editOpen = ref(false);
+const rowData = ref({});
+
+const dialogVisible = ref(false);
+
+onMounted(() => {
+  fetchList();
+});
+
+async function fetchList() {
+  gridOptions.data = [];
+  gridOptions.columns = [];
+
+  const query = {
+    asin: queryParameter?.asin,
+    sku: queryParameter?.sku,
+    country_code: queryParameter?.country,
+    shop_id: queryParameter?.shop,
+    region: queryParameter?.region,
+    delivery: queryParameter?.delivery,
+    status: queryParameter?.status
+  };
+
+  await useTableData(api.getTableData, query, gridOptions);
+  await gridRef.value.loadColumn(AttributeColumns);
+  gridOptions.showHeader = Boolean(gridOptions.data?.length);
+}
+
+function handleRefresh() {
+  fetchList();
+}
+
+function handleEdit(row: any) {
+  editOpen.value = true;
+  rowData.value = row;
+}
+
+async function singleDelete(row: any) {
+  const res = await useResponse(api.deleteRow, row);
+  if (res.code === 2000) {
+    ElMessage.success({ message: '删除成功', plain: true });
+    handleRefresh();
+  }
+}
+
+async function handleDownload() {
+}
+
+defineExpose({ fetchList });
+</script>
+
+<template>
+  <vxe-grid ref="gridRef" v-bind="gridOptions">
+    <template #toolbar_buttons>
+      <PermissionButton type="primary" :icon="Plus" plain round>新 增</PermissionButton>
+    </template>
+    <!-- 工具栏右侧 -->
+    <template #toolbar_tools>
+      <el-button circle class="toolbar-btn" @click="handleRefresh">
+        <el-icon>
+          <Refresh />
+        </el-icon>
+      </el-button>
+      <el-popconfirm
+          :icon="InfoFilled"
+          icon-color="#626AEF"
+          title="是否确认导出当前时间内所有数据项?"
+          width="220"
+          @confirm="handleDownload"
+      >
+        <template #reference>
+          <el-button circle class="mr-3 toolbar-btn">
+            <el-icon>
+              <Download />
+            </el-icon>
+          </el-button>
+        </template>
+        <template #actions="{ confirm, cancel }">
+          <el-button size="small" @click="cancel">No!</el-button>
+          <el-button
+              size="small"
+              type="danger"
+              @click="confirm"
+          >
+            Yes?
+          </el-button>
+        </template>
+      </el-popconfirm>
+    </template>
+    <template #pager>
+      <vxe-pager
+          v-model:currentPage="gridOptions.pagerConfig.page"
+          v-model:pageSize="gridOptions.pagerConfig.limit"
+          :total="gridOptions.pagerConfig.total"
+          class="mt-1.5"
+          @page-change="handlePageChange"
+      />
+    </template>
+    <!-- 自定义列插槽 -->
+    <template v-for="col in AttributeColumns" #[`${col.field}`]="{ row }">
+      <DataTableSlot :key="row.id" :field="col.field" :row="row" @edit-row="handleEdit" @handle-delete="singleDelete" />
+    </template>
+  </vxe-grid>
+  <EditDrawer v-if="editOpen" v-model="editOpen" :row-data="rowData" @refresh="handleRefresh" />
+  <NoticeDialog v-if="dialogVisible" v-model="dialogVisible" :row-data="rowData" />
+</template>
+
+<style scoped>
+.toolbar-btn {
+  width: 34px;
+  height: 34px;
+  font-size: 18px
+}
+
+:deep(.custom-el-input .el-select__wrapper) {
+  border-radius: 20px;
+}
+</style>

+ 73 - 0
src/views/sku-manage/product-attribute/component/DataTableSlot.vue

@@ -0,0 +1,73 @@
+<script lang="ts" setup>
+/**
+ * @Name: DataTableSlot.vue
+ * @Description: 产品属性-单元格插槽
+ * @Author: Cheney
+ */
+
+import { Delete, InfoFilled, Operation } from '@element-plus/icons-vue';
+import PermissionButton from '/@/components/PermissionButton/index.vue';
+
+
+const props = defineProps<{
+  row: any,
+  field: any
+}>();
+const { row, field } = props;
+
+const emit = defineEmits([ 'edit-row', 'handle-delete' ]);
+
+function handleEdit() {
+  emit('edit-row', row);
+}
+
+function onConfirm() {
+  emit('handle-delete', row);
+}
+</script>
+
+<template>
+  <div class="font-medium">
+    <div v-if="field === 'operate'">
+      <div class="flex justify-center gap-2">
+        <PermissionButton circle plain type="warning" @click="handleEdit">
+          <el-icon>
+            <Operation />
+          </el-icon>
+        </PermissionButton>
+        <el-popconfirm
+            :icon="InfoFilled"
+            icon-color="#626AEF"
+            title="你确定要删除此项吗?"
+            width="220"
+            @confirm="onConfirm"
+        >
+          <template #reference>
+            <PermissionButton circle plain type="danger">
+              <el-icon>
+                <Delete />
+              </el-icon>
+            </PermissionButton>
+          </template>
+          <template #actions="{ confirm, cancel }">
+            <el-button size="small" @click="cancel">No!</el-button>
+            <el-button
+                size="small"
+                type="danger"
+                @click="confirm"
+            >
+              Yes?
+            </el-button>
+          </template>
+        </el-popconfirm>
+      </div>
+    </div>
+    <div v-else>
+      {{ row[field] }}
+    </div>
+  </div>
+</template>
+
+<style scoped>
+
+</style>

+ 112 - 0
src/views/sku-manage/product-attribute/component/EditDrawer.vue

@@ -0,0 +1,112 @@
+<script lang="ts" setup>
+/**
+ * @Name: EditDrawer.vue
+ * @Description: 产品属性-行编辑
+ * @Author: Cheney
+ */
+
+import { ElMessage, FormInstance, FormRules } from 'element-plus';
+import { Close, Finished } from '@element-plus/icons-vue';
+import { useResponse } from '/@/utils/useResponse';
+import * as api from '../api';
+
+
+const btnLoading = ref(false);
+
+const editOpen = defineModel({ default: false });
+
+const editDrawer = <Ref>useTemplateRef('editDrawer');
+
+const props = defineProps({
+  rowData: Object
+});
+const { rowData } = props;
+const emit = defineEmits([ 'refresh' ]);
+
+interface RuleForm {
+  name: any,
+  key: any
+}
+
+const ruleFormRef = ref<FormInstance>();
+const ruleForm = reactive<RuleForm>({
+  name: rowData?.name,
+  key: rowData?.key,
+});
+
+const rules = reactive<FormRules<RuleForm>>({
+  // shop_name: [ { required: true, message: '请输入店铺', trigger: 'blur' } ],
+});
+
+const submitForm = async (formEl: FormInstance | undefined) => {
+  if (!formEl) return;
+  await formEl.validate(async (valid, fields) => {
+    if (valid) {
+      try {
+        const res = await useResponse(api.updateRow, { id: rowData?.id, ...ruleForm }, btnLoading);
+        if (res && res.code == 2000) {
+          editOpen.value = false;
+          ElMessage.success('编辑成功');
+          emit('refresh');
+        }
+      } catch (error) {
+        console.error('Error==>', error);
+      }
+    } else {
+      console.log('error submit!', fields);
+    }
+  });
+};
+
+function closeDrawer() {
+  editDrawer.value.handleClose();
+}
+
+</script>
+
+<template>
+  <div class="drawer-container">
+    <el-drawer ref="editDrawer"
+               v-model="editOpen"
+               :close-on-click-modal="false"
+               :close-on-press-escape="false"
+               :title="`竞品监控- 编辑 `"
+               size="25%">
+      <el-form
+          ref="ruleFormRef"
+          :model="ruleForm"
+          :rules="rules"
+          class="mx-2.5 mt-7"
+          label-position="top"
+          label-width="auto"
+          status-icon>
+        <el-form-item class="font-medium" label="属性名称" prop="name">
+          <el-input v-model="ruleForm.name" />
+        </el-form-item>
+        <el-form-item class="font-medium" label="属性标识" prop="key">
+          <el-input v-model="ruleForm.key" />
+        </el-form-item>
+        <el-form-item>
+          <el-divider />
+          <div class="flex flex-1 justify-end">
+            <el-button :icon="Close" @click="closeDrawer">取 消</el-button>
+            <el-button :icon="Finished" :loading="btnLoading" type="primary" @click="submitForm(ruleFormRef)">
+              确 定
+            </el-button>
+          </div>
+        </el-form-item>
+      </el-form>
+    </el-drawer>
+  </div>
+</template>
+
+<style scoped>
+.drawer-container :deep(.el-drawer__header) {
+  border-bottom: none;
+  font-weight: 500;
+}
+
+.drawer-container :deep(.el-drawer__title) {
+  font-size: 18px;
+}
+</style>

+ 85 - 0
src/views/sku-manage/product-attribute/index.vue

@@ -0,0 +1,85 @@
+<script lang="ts" setup>
+/**
+ * @Name: index.vue
+ * @Description: 产品属性
+ * @Author: Cheney
+ */
+
+import { RefreshRight, Search } from '@element-plus/icons-vue';
+import DataTable from './component/DataTable.vue';
+import VerticalDivider from '/@/components/VerticalDivider/index.vue';
+import { useTableHeight } from '/@/utils/useTableHeight';
+
+
+const titleContainer: Ref<HTMLElement | null> = useTemplateRef('titleContainer');
+const queryContainer: Ref<HTMLElement | null> = useTemplateRef('queryContainer');
+const { tableHeight } = useTableHeight(titleContainer, queryContainer);
+
+const tableRef: Ref<any> = useTemplateRef('table');
+
+const btnLoading = ref(false);
+
+const formInline = reactive<any>({
+  name: '',
+  key: ''
+});
+provide('query-parameter', formInline);
+
+async function handleQuery() {
+  btnLoading.value = true;
+  await tableRef.value?.fetchList();
+  btnLoading.value = false;
+}
+
+function resetParameter() {
+  for (const key in formInline) {
+    formInline[key] = '';
+  }
+}
+</script>
+
+<template>
+  <div class="p-5 flex-grow">
+    <el-card class="h-full" style="color: rgba(0, 0, 0, 0.88);">
+      <div ref="titleContainer" class="text-xl font-semibold pb-5">市场店铺</div>
+      <!-- 查询条件 -->
+      <div ref="queryContainer" class="flex justify-between">
+        <div class="flex flex-1">
+          <div class="w-full whitespace-nowrap">
+            <el-row :gutter="20" style="margin-bottom: 16px;">
+              <el-col :span="5">
+                <div class="flex items-center">
+                  <span class="mr-2">属性名称</span>
+                  <el-input v-model="formInline.name" clearable placeholder="请输入属性名称" />
+                </div>
+              </el-col>
+              <el-col :span="5">
+                <div class="flex items-center">
+                  <span class="mr-2">属性标识</span>
+                  <el-input v-model="formInline.key" clearable placeholder="请输入属性标识" />
+                </div>
+              </el-col>
+            </el-row>
+          </div>
+        </div>
+        <VerticalDivider />
+        <div class="flex gap-1.5 ml-5">
+          <el-button :icon="Search" :loading="btnLoading" class="mb-4" type="primary" @click="handleQuery">
+            查 询
+          </el-button>
+          <el-button :icon="RefreshRight" color="#ECECF1C9" style="width: 88px; color: #3c3c3c;" @click="resetParameter">
+            重 置
+          </el-button>
+        </div>
+      </div>
+      <el-divider ref="dividerContainer" style="margin: 20px 0 12px 0;" />
+      <div :style="{ height: tableHeight + 'px' }">
+        <DataTable ref="table" />
+      </div>
+    </el-card>
+  </div>
+</template>
+
+<style scoped>
+
+</style>

+ 8 - 8
src/views/store-manage/Columns.ts

@@ -1,7 +1,7 @@
 export const MarketStoreColumns = [
-  { type: 'seq', title: 'No.', minWidth: 60, align: 'center' },
+  { type: 'seq', title: 'No.', width: 60, align: 'center', fixed: 'left' },
   {
-    field: 'platform_number', title: '平台编号', minWidth: 'auto', align: 'center',
+    field: 'platform_number', title: '平台编号', minWidth: 'auto', align: 'center',fixed: 'left',
     slots: { default: 'platform_number' }
   },
   {
@@ -31,8 +31,8 @@ export const MarketStoreColumns = [
 ];
 
 export const OnlineMerchandiseColumns = [
-  { type: 'seq', title: 'No.', width: 60, align: 'center' },
-  { field: 'asin', title: 'ASIN', minWidth: 'auto', align: 'center', slots: { default: 'asin' } },
+  { type: 'seq', title: 'No.', width: 60, align: 'center', fixed: 'left', },
+  { field: 'asin', title: 'ASIN', minWidth: 'auto', align: 'center', slots: { default: 'asin' }, fixed: 'left', },
   { field: 'sku', title: 'SKU', minWidth: 'auto', align: 'center', slots: { default: 'sku' } },
   { field: 'platform_number', title: '平台编号', minWidth: 'auto', align: 'center',
     slots: { default: 'platform_number' }
@@ -42,11 +42,11 @@ export const OnlineMerchandiseColumns = [
     slots: { default: 'shop_name' }
   },
   {
-    field: 'country_code', title: '国 家', minWidth: 'auto', align: 'center',
+    field: 'country_code', title: '国 家', width: 'auto', align: 'center',
     slots: { default: 'country_code' }
   },
   {
-    field: 'region', title: '站 点', minWidth: 'auto', align: 'center',
+    field: 'region', title: '站 点', width: 'auto', align: 'center',
     slots: { default: 'region' }
   },
   {
@@ -58,11 +58,11 @@ export const OnlineMerchandiseColumns = [
     slots: { default: 'fulfillment_channel' }
   },
   {
-    field: 'raw_launch_datetime', title: '上架时间', minWidth: 'auto', align: 'center',
+    field: 'raw_launch_datetime', title: '上架时间', width: 'auto', align: 'center',
     slots: { default: 'raw_launch_datetime' }
   },
   {
-    field: 'price', title: '价 格', minWidth: 'auto', align: 'center',
+    field: 'price', title: '价 格', width: 'auto', align: 'center',
     slots: { default: 'price' }
   },
   {

+ 2 - 12
src/views/store-manage/market-store/component/DataTable.vue

@@ -10,8 +10,6 @@ import { usePagination } from '/@/utils/usePagination';
 import { useTableData } from '/@/utils/useTableData';
 import { MarketStoreColumns } from '/@/views/store-manage/Columns';
 import DataTableSlot from './DataTableSlot.vue';
-import EditDrawer from '/src/views/product-manage/product-list/component/EditDrawer.vue';
-import NoticeDialog from '/src/views/product-manage/product-list/component/NoticeDialog.vue';
 import * as api from '../api';
 
 
@@ -59,11 +57,6 @@ const gridOptions: any = reactive({
   data: ''
 });
 
-const editOpen = ref(false);
-const rowData = ref({});
-
-const dialogVisible = ref(false);
-
 onMounted(() => {
   fetchList();
 });
@@ -75,7 +68,7 @@ async function fetchList() {
   const query = {
     country_code: queryParameter?.country,
     region: queryParameter?.region,
-    name__icontains: queryParameter?.shop
+    shop: queryParameter?.shop
   };
 
   await useTableData(api.getTableData, query, gridOptions);
@@ -91,8 +84,7 @@ defineExpose({ fetchList });
 </script>
 
 <template>
-  <vxe-grid ref="gridRef"
-            v-bind="gridOptions">
+  <vxe-grid ref="gridRef" v-bind="gridOptions">
     <!-- 工具栏右侧 -->
     <template #toolbar_tools>
       <el-button circle class="mr-3 toolbar-btn" @click="handleRefresh">
@@ -115,8 +107,6 @@ defineExpose({ fetchList });
       <DataTableSlot :key="row.id" :field="col.field" :row="row" />
     </template>
   </vxe-grid>
-  <EditDrawer v-if="editOpen" v-model="editOpen" :row-data="rowData" @refresh="handleRefresh" />
-  <NoticeDialog v-if="dialogVisible" v-model="dialogVisible" :row-data="rowData" />
 </template>
 
 <style scoped>

+ 2 - 3
src/views/store-manage/market-store/index.vue

@@ -81,12 +81,11 @@ function resetParameter() {
           </div>
         </div>
         <VerticalDivider />
-        <div class="flex flex-col gap-1.5 items-end">
+        <div class="flex gap-1.5 ml-5">
           <el-button :icon="Search" :loading="btnLoading" class="mb-4" type="primary" @click="handleQuery">
             查 询
           </el-button>
-          <el-button :icon="RefreshRight" color="#ECECF1C9" style="width: 88px; color: #3c3c3c;"
-                     @click="resetParameter">
+          <el-button :icon="RefreshRight" color="#ECECF1C9" style="width: 88px; color: #3c3c3c;" @click="resetParameter">
             重 置
           </el-button>
         </div>

+ 3 - 12
src/views/store-manage/online-merchandise/component/DataTable.vue

@@ -10,8 +10,6 @@ import { usePagination } from '/@/utils/usePagination';
 import { useTableData } from '/@/utils/useTableData';
 import { OnlineMerchandiseColumns } from '/@/views/store-manage/Columns';
 import DataTableSlot from './DataTableSlot.vue';
-import EditDrawer from '/src/views/product-manage/product-list/component/EditDrawer.vue';
-import NoticeDialog from '/src/views/product-manage/product-list/component/NoticeDialog.vue';
 import * as api from '../api';
 import { ElMessage } from 'element-plus';
 
@@ -64,11 +62,6 @@ const gridOptions: any = reactive({
   data: ''
 });
 
-const editOpen = ref(false);
-const rowData = ref({});
-
-const dialogVisible = ref(false);
-
 onMounted(() => {
   fetchList();
 });
@@ -79,11 +72,11 @@ async function fetchList() {
 
   const query = {
     asin: queryParameter?.asin,
-    sku__startswith: queryParameter?.sku,
+    sku: queryParameter?.sku,
     country_code: queryParameter?.country,
     shop_id: queryParameter?.shop,
-    shop__region: queryParameter?.region,
-    fulfillment_channel: queryParameter?.delivery,
+    region: queryParameter?.region,
+    delivery: queryParameter?.delivery,
     status: queryParameter?.status,
   };
 
@@ -177,8 +170,6 @@ defineExpose({ fetchList });
       <DataTableSlot :key="row.id" :field="col.field" :row="row" />
     </template>
   </vxe-grid>
-  <EditDrawer v-if="editOpen" v-model="editOpen" :row-data="rowData" @refresh="handleRefresh" />
-  <NoticeDialog v-if="dialogVisible" v-model="dialogVisible" :row-data="rowData" />
 </template>
 
 <style scoped>

+ 1 - 1
src/views/store-manage/online-merchandise/component/DataTableSlot.vue

@@ -46,7 +46,7 @@ const region = countryInfoStore.Region.find(r => r.code == row.shop.region);
     </div>
     <div v-else-if="field === 'status'">
       <el-tag :disable-transitions="true"
-              :type="row.status === 'Active' ? 'success' : row.status === 'Inactive' ? 'warning' : 'danger'">
+              :type="row.status === 'Active' ? 'success' : row.status === 'Inactive' ? 'danger' : 'info'">
         {{ row.status === 'Active' ? '在售' : row.status === 'Inactive' ? '不在售' : '不完整' }}
       </el-tag>
     </div>