Browse Source

轮胎 附件9.20

caojunjie 1 year ago
parent
commit
ae1be9a8c5

+ 59 - 0
src/components/upload/index.vue

@@ -389,6 +389,55 @@ export default {
           }
         ]
       },
+        // 基础信息轮胎附件
+        originalOptionsTwo_LT: {
+            dialogDrag: true,
+            index: true,
+            refreshBtn: false,
+            cellBtn: false,
+            cancelBtn: false,
+            delBtn: false,
+            editBtn: false,
+            addBtn: false,
+            align: "center",
+            column: [
+                {
+                    label: "文件名称",
+                    prop: "fileName",
+                    index: 1,
+                    width: 140,
+                    cell: true,
+                    overHidden: true
+                },
+                {
+                    label: "文件地址",
+                    prop: "url",
+                    index: 2,
+                    overHidden: true
+                },{
+                    type: "select",
+                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=picture_type",
+                    props: {
+                        label: "dictValue",
+                        value: "dictKey"
+                    },
+                    label: "文件属性",
+                    prop: "mainImage",
+                    search: false,
+                    index: 3,
+                    width: 140,
+                    overHidden: true,
+                    cell: true,
+                },
+                {
+                    label: "备注",
+                    prop: "remarks",
+                    index: 4,
+                    cell: true,
+                    overHidden: true
+                }
+            ]
+        },
       originalOptionsThree: {
         dialogDrag: true,
         index: true,
@@ -432,6 +481,7 @@ export default {
      * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
      * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
      */
+    console.log(this.enumerationValue)
     if (this.enumerationValue === 160) {
       this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo);
     } else if (this.enumerationValue === 107.1) {
@@ -440,6 +490,8 @@ export default {
       this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo);
     } else if (this.enumerationValue === 35.1) {
       this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsThree);
+    }else if (this.enumerationValue === 160.1) {
+        this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo_LT);
     } else {
       this.option = await this.getColumnData(this.getColumnName(this.enumerationValue), this.originalOptions);
       this.getWorkDicts("picture_type").then(res => {
@@ -495,6 +547,13 @@ export default {
           this.$message.success("重置成功");
           this.$refs.crud.$refs.dialogColumn.columnBox = false;
         }
+      }else if (this.enumerationValue === 160.1) {
+          this.option = this.originalOptionsTwo_LT;
+          const inSave = await this.delColumnData(this.getColumnName(this.enumerationValue), this.originalOptionsTwo_LT);
+          if (inSave) {
+              this.$message.success("重置成功");
+              this.$refs.crud.$refs.dialogColumn.columnBox = false;
+          }
       } else {
         this.option = this.originalOptions;
         const inSave = await this.delColumnData(this.getColumnName(this.enumerationValue), this.originalOptions);

+ 3 - 0
src/enums/column-name.js

@@ -560,6 +560,9 @@ const columnName = [{
   code: 160,
   name: '产品信息-主图附件'
 }, {
+  code: 160.1,
+  name: '轮胎信息-主图附件'
+}, {
   code: 161.1,
   name: '仓库-收款信息'
 }, {

+ 5 - 1
src/views/tirePartsMall/basicData/commodityInformation/detailsPage.vue

@@ -65,7 +65,7 @@
             </trade-card>
             <containerTitle title="附件信息"></containerTitle>
             <c-upload :data="filesList" display deleteUrl="/api/blade-sales-part/goodsfiles/remove"
-                :enumerationValue="160" />
+                :enumerationValue="160.1" />
             <el-dialog title="设置产品分类" v-dialogDrag :visible.sync="goodsTypeVisible" class="avue-dialog" width="80%"
                 append-to-body @closed="goodsTypeClosed">
                 <span>
@@ -696,6 +696,10 @@ export default {
                 this.form.explosionProof += ''
                 // this.data = res.data.data.stockGoodsList;
                 this.filesList = res.data.data.goodsFilesList
+                // 把详情得到的主图附图状态从数值型转化成字符串型
+                for(let item of this.filesList) {
+                    item.mainImage = item.mainImage + ''
+                }
                 this.whetherChange(res.data.data.whether)
                 //如果modifiable为0则不能修改
                 if (this.form.modifiable == 0) {

+ 0 - 1
src/views/tirePartsMall/salesManagement/saleOrder/index.vue

@@ -390,7 +390,6 @@ export default {
     }
   },
   activated() {
-    console.log(213213213213);
     setTimeout(() => {
       console.log(this.$route.query.check);
       if (this.$route.query.check) {