Browse Source

Merge branch 'cheney' into dev

WanGxC 5 months ago
parent
commit
7881bd8be9

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

@@ -245,7 +245,6 @@ function goto() {
             </template>
           </el-popconfirm>
         </div>
-
       </div>
     </div>
     <div v-else>

+ 1 - 1
src/views/sku-manage/Columns.ts

@@ -67,7 +67,7 @@ export const ProductCategoryColumns = [
 export const CompanySkuColumns = [
   { type: 'checkbox', width: 50, align: 'center', fixed: 'left' },
   {
-    field: 'sku', title: 'SKU', align: 'center', minWidth: 200, fixed: 'left',
+    field: 'sku', title: 'SKU', align: 'center', minWidth: 220, fixed: 'left',
     slots: { default: 'sku' }
   },
   {

+ 1 - 1
src/views/sku-manage/company-sku/component/DataTableSlot.vue

@@ -118,7 +118,7 @@ function showDetail() {
       </el-tag>
     </div>
     <div v-else>
-      {{ row[field] }}
+      {{ row[field] || '-' }}
     </div>
   </div>
 </template>

+ 40 - 45
src/views/sku-manage/product-attribute/component/DataTableSlot.vue

@@ -11,70 +11,65 @@ import { hasPermission } from '/@/utils/hasPermission';
 
 
 const props = defineProps<{
-	row: any;
-	field: any;
+  row: any;
+  field: any;
 }>();
 const { row, field } = props;
 
-const emit = defineEmits(['edit-row', 'handle-delete', 'handle-manage','show-detail']);
+const emit = defineEmits([ 'edit-row', 'handle-delete', 'handle-manage', 'show-detail' ]);
 
 function handleView() {
-	emit('show-detail', row);
+  emit('show-detail', row);
 }
 
 function handleEdit() {
-	emit('edit-row', row);
+  emit('edit-row', row);
 }
 
 function onConfirm() {
-	emit('handle-delete', row);
+  emit('handle-delete', row);
 }
 
 function handleManage() {
-	emit('handle-manage', row);
+  emit('handle-manage', row);
 }
 </script>
 
 <template>
   <div class="font-medium">
     <div v-if="field === 'operate'">
-      <div class="font-medium">
-        <div v-if="field === 'operate'">
-          <div class="flex justify-center gap-2">
-            <div v-if="hasPermission('SkuAttrUpdate')">
-              <PermissionButton circle plain type="warning" @click="handleEdit">
+      <div class="flex justify-center gap-2">
+        <div v-if="hasPermission('SkuAttrUpdate')">
+          <PermissionButton circle plain type="warning" @click="handleEdit">
+            <el-icon>
+              <Operation />
+            </el-icon>
+          </PermissionButton>
+        </div>
+        <div v-if="hasPermission('SkuAttrDelete')">
+          <el-popconfirm :icon="InfoFilled" icon-color="#626AEF" title="你确定要删除此项吗?" width="220"
+                         @confirm="onConfirm">
+            <template #reference>
+              <PermissionButton circle plain type="danger">
                 <el-icon>
-                  <Operation />
+                  <Delete />
                 </el-icon>
               </PermissionButton>
-            </div>
-            <div v-if="hasPermission('SkuAttrDelete')">
-              <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>
-              <el-tooltip :enterable="false" :show-arrow="false" content="管理枚举" placement="top" popper-class="custom-btn-tooltip-2">
-                <el-button :icon="Key" circle color="#8d87e8" plain @click="handleManage"> </el-button>
-              </el-tooltip>
-            </div>
-						<div>
-							<el-button circle plain type="success" :icon="View" @click="handleView"></el-button>
-						</div>
-          </div>
+            </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>
+          <el-tooltip :enterable="false" :show-arrow="false" content="管理枚举" placement="top"
+                      popper-class="custom-btn-tooltip-2">
+            <el-button :icon="Key" circle color="#8d87e8" plain @click="handleManage"></el-button>
+          </el-tooltip>
         </div>
-        <div v-else>
-          {{ row[field] }}
+        <div>
+          <el-button :icon="View" circle plain type="success" @click="handleView"></el-button>
         </div>
       </div>
     </div>
@@ -82,14 +77,14 @@ function handleManage() {
       {{ row[field] }}
     </div>
   </div>
-	
+
 </template>
 
 <style lang="scss">
 .custom-btn-tooltip-2 {
-	background-color: #f0f0fe !important;
-	color: #606266 !important;
-	border: 1px solid #8d87e8 !important;
-	font-size: 14px;
+  background-color: #f0f0fe !important;
+  color: #606266 !important;
+  border: 1px solid #8d87e8 !important;
+  font-size: 14px;
 }
 </style>

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

@@ -73,7 +73,7 @@ function onConfirm() {
       </div>
     </div>
     <div v-else>
-      {{ row[field] }}
+      {{ row[field] || '-' }}
     </div>
   </div>
 </template>

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

@@ -91,7 +91,7 @@ function onConfirm() {
       </el-tag>
     </div>
     <div v-else>
-      {{ row[field] }}
+      {{ row[field] || '-' }}
     </div>
   </div>
 </template>