Browse Source

修改商品管理

pangqijun 1 year ago
parent
commit
5e35f4e7ba
1 changed files with 50 additions and 22 deletions
  1. 50 22
      src/views/store/storegoods/index.vue

+ 50 - 22
src/views/store/storegoods/index.vue

@@ -227,20 +227,34 @@
               },
               dataType: "string",
             },
+            // {
+            //   label: "折扣",
+            //   prop: "discount",
+            //   hide: true,
+            //   precision: 2,
+            //   type: "number",
+            //   rules: [{
+            //     required: true,
+            //     message: "请输入折扣",
+            //     trigger: "blur"
+            //   },{ validator: validatePass, trigger: 'blur' }],
+            // },
             {
-              label: "折扣",
-              prop: "discount",
-              hide: true,
+              label: "售价",
+              prop: "discountPrice",
               precision: 2,
               type: "number",
+              formatter:(val,value)=>{
+                return Number(value).toFixed(2);
+              },
               rules: [{
                 required: true,
-                message: "请输入折扣",
+                message: "请输入售价",
                 trigger: "blur"
-              },{ validator: validatePass, trigger: 'blur' }],
+              }],
             },
             {
-              label: "价",
+              label: "划线价",
               prop: "salePrice",
               precision: 2,
               type: "number",
@@ -249,7 +263,7 @@
               },
               rules: [{
                 required: true,
-                message: "请输入销售价",
+                message: "请输入划线价",
                 trigger: "blur"
               }],
             },
@@ -370,24 +384,38 @@
               },
               action: "/api/blade-resource/oss/endpoint/put-file-attach"
             },
+            // {
+            //   label: '图文详情',
+            //   prop: 'detailImgUrlList',
+            //   type: 'upload',
+            //   dataType: 'array',
+            //   listType: 'picture-card',
+            //   loadText: '上传中,请稍等',
+            //   accept: 'image/png, image/jpeg',
+            //   fileSize: 2048,
+            //   tip: '只能上传jpg/png文件,且不超过2M',
+            //   limit: 25,
+            //   span: 24,
+            //   hide: true,
+            //   propsHttp: {
+            //     res: 'data',
+            //     url: 'link',
+            //   },
+            //   action: "/api/blade-resource/oss/endpoint/put-file-attach"
+            // },
             {
-              label: '图文详情',
-              prop: 'detailImgUrlList',
-              type: 'upload',
-              dataType: 'array',
-              listType: 'picture-card',
-              loadText: '上传中,请稍等',
-              accept: 'image/png, image/jpeg',
-              fileSize: 2048,
-              tip: '只能上传jpg/png文件,且不超过2M',
-              limit: 25,
-              span: 24,
+              label: "图文详情",
+              prop: "detailContent",
               hide: true,
-              propsHttp: {
-                res: 'data',
-                url: 'link',
+              span: 24,
+              component: 'AvueUeditor',
+              options: {
+                action: '/api/blade-resource/oss/endpoint/put-file',
+                props: {
+                  res: "data",
+                  url: "link",
+                }
               },
-              action: "/api/blade-resource/oss/endpoint/put-file-attach"
             },
           ]
         },