970319330@qq.com 1 неделя назад
Родитель
Сommit
9e02fcf63f


BIN
buildAnnexation/.DS_Store


BIN
buildAnnexation/BGJ/.DS_Store


BIN
buildAnnexation/ZB/.DS_Store


BIN
buildAnnexation/ZB/assets/.DS_Store


BIN
buildAnnexation/ZB/assets/partnerlogo/.DS_Store


BIN
buildAnnexation/ZB/assets/projuct/.DS_Store


BIN
buildAnnexation/ZB/assets/timeline/.DS_Store


BIN
buildAnnexation/ZB/blog/.DS_Store


BIN
buildAnnexation/ZB/blog/img/.DS_Store


BIN
buildAnnexation/ZB/blog/img/about/.DS_Store


BIN
buildAnnexation/ZB/blog/img/box/.DS_Store


BIN
buildAnnexation/ZB/blog/img/gallery/.DS_Store


BIN
buildAnnexation/ZB/blog/img/models/.DS_Store


BIN
buildAnnexation/ZB/blog/img/partner/.DS_Store


BIN
buildAnnexation/ZB/blog/img/post/.DS_Store


BIN
buildAnnexation/ZB/blog/img/slider/.DS_Store


BIN
buildAnnexation/ZB/images/.DS_Store


BIN
buildAnnexation/ZB/vue/.DS_Store


+ 2 - 1
src/HManagement/siteManage/securityConfig/modules/serviceImprovementRule.vue

@@ -210,7 +210,8 @@ export default {
         }).then(async () => {
           await this.$api.requested({
             "content": {
-              "hrid": row.hrid
+              "hrid": row.hrid,
+              "model":row.models
             },
             "id": 2026011710014002,
           });

+ 3 - 1
src/HManagement/siteManage/securityConfig/modules/setServiceSet.vue

@@ -108,6 +108,7 @@ export default {
     },
     numChange(){},
     async onSubmit(){
+      console.log(this.data.models)
       this.tableData.forEach(item => {
         if (item.class2){
           item.isClass = false
@@ -134,7 +135,8 @@ export default {
           "content": {
             "hrid": this.data.hrid,
             "userid": this.data.userid,
-            "class2s": class2s
+            "class2s": class2s,
+            "model":this.data.models
           },
           "id": 2026031115464102,
         })

BIN
src/WebsiteManagement/marketproductMag/modules/.DS_Store


+ 30 - 16
src/WebsiteManagement/marketproductMag/modules/edit.vue

@@ -137,7 +137,7 @@
                   size="small"
                   style="width: 100%"
                   :placeholder="$t(form.class || '分类')"
-                  v-model="form.classmx"
+                  v-model="form.class"
                   :options="classData"
                   filterable
                   :props="{
@@ -360,6 +360,7 @@ export default {
           content: this.form,
         });
         await this.$refs.upload.rebinding("sa_fad", res.data.sa_fadid);
+        await this.saveMultiLangContent(res.data.sa_fadid);
         this.$refs.upload.linksids.length
           ? await this.$refs.upload.deleteAllTemporaryFiles(
               this.$refs.upload.linksids
@@ -385,26 +386,39 @@ export default {
       this.form.itemid = data.itemid;
       this.form.itemno = data.itemno;
     },
+    async saveMultiLangContent(ownerid) {
+      const fields = [
+        { key: "technicalparam", columnname: "technicalparam" },
+        { key: "materialdescription", columnname: "materialdescription" },
+        { key: "content", columnname: "content" },
+      ];
+      const defaultLang = this.form.langTabs[0]?.languagecode || "";
+      for (const tab of this.form.langTabs) {
+        if (tab.languagecode === defaultLang) continue;
+        const langContent = this.langData[tab.languagecode];
+        if (!langContent) continue;
+        for (const field of fields) {
+          const value = langContent[field.key];
+          if (!value) continue;
+          await this.$api.requested({
+            id: 10027001,
+            content: {
+              ownertable: "sa_fad",
+              ownerid: ownerid,
+              languagecode: tab.languagecode,
+              columnname: field.columnname,
+              value_translate: value,
+            },
+          });
+        }
+      }
+    },
     async queryClass() {
       const res = await this.$store.dispatch(
         "optiontypeselect",
         "marketproductclass"
       );
-      this.classData = [];
-      this.classData = res.data.map((item) => {
-        let data = {
-          value: item.value,
-          remarks: item.remarks,
-        };
-        if (item.subvalues.length)
-          data.subvalues = item.subvalues.map((k) => {
-            return {
-              value: k,
-              remarks: k,
-            };
-          });
-        return data;
-      });
+      this.classData = res.data
     },
     onClose() {
       this.loading = false;

+ 322 - 0
src/WebsiteManagement/marketproductMag/modules/edit_副本.vue

@@ -0,0 +1,322 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="editBtn">{{
+      $t(`编 辑`)
+    }}</el-button>
+    <el-drawer
+      :title="$t(`编辑营销产品`)"
+      :visible.sync="dialogFormVisible"
+      :wrapperClosable="false"
+      size="60%"
+      direction="rtl"
+      append-to-body
+      :show-close="false"
+      @close="onClose"
+    >
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules" ref="form" size="mini">
+            <el-col :span="24">
+              <el-form-item :label="$t(`商品`)" prop="itemname">
+                <el-popover
+                  placement="bottom-start"
+                  width="700"
+                  trigger="click"
+                  v-model="dialogPopover"
+                >
+                  <productTemplate
+                    :sa_fadid="form.sa_fadid"
+                    @selectPro="selectPro"
+                  ></productTemplate>
+                  <el-input
+                    slot="reference"
+                    v-model="form.itemname"
+                    :placeholder="$t(`选择商品`)"
+                  ></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item>
+                <p style="font-size: 14px; margin-top: 10px">
+                  {{ $t("技术参数") }}
+                </p>
+                <div style="margin-top: 10px; min-height: 200px !important">
+                  <myEditor
+                    ref="technicalparam"
+                    height="360px"
+                    :content="form.technicalparam"
+                    :id="form.sa_fadid"
+                  ></myEditor>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item>
+                <p style="font-size: 14px; margin-top: 10px">
+                  {{ $t("材质说明") }}
+                </p>
+                <div style="margin-top: 10px; min-height: 200px !important">
+                  <myEditor
+                    ref="materialdescription"
+                    height="360px"
+                    :content="form.materialdescription"
+                    :id="form.sa_fadid"
+                  ></myEditor>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item>
+                <p style="font-size: 14px; margin-top: 10px">
+                  {{ $t("产品概述") }}
+                </p>
+                <div style="margin-top: 10px; min-height: 200px !important">
+                  <myEditor
+                    ref="contentstr"
+                    height="360px"
+                    :content="form.contentstr"
+                    :id="form.sa_fadid"
+                  ></myEditor>
+                </div>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('分类')" prop="class">
+                <el-cascader
+                  ref="selectdep"
+                  size="small"
+                  style="width: 100%"
+                  :placeholder="$t(form.class || '分类')"
+                  v-model="form.class"
+                  :options="classData"
+                  filterable
+                  :props="{
+                    emitPath: false,
+                    expandTrigger: 'hover',
+                    checkStrictly: false,
+                    label: 'remarks',
+                    value: 'value',
+                    children: 'subvalues',
+                  }"
+                  clearable
+                ></el-cascader>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <div class="upload-box">
+                <div class="label" style="margin-top: 3px">
+                  {{ $t("产品资料") }}
+                </div>
+
+                <upload
+                  :classType="['image', 'video', 'document', 'pdf']"
+                  @oploadIng="oploadIng"
+                  ref="upload"
+                >
+                  <div style="width: 400px; text-align: left">
+                    <el-button size="small" type="primary">
+                      <span
+                        class="icon iconfont"
+                        style="margin-right: 5px; font-size: 14px"
+                        >&#xe63b;</span
+                      >
+                      {{ $t("点击上传") }}
+                    </el-button>
+                  </div>
+                </upload>
+              </div>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('状态')" prop="status">
+                <el-radio-group v-model="form.isonsale" style="width: 100%">
+                  <el-radio label="0">{{ $t("新建") }}</el-radio>
+                  <el-radio label="1">{{ $t(`发布`) }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button
+          size="small"
+          @click="onClose"
+          plain
+          class="normal-btn-width"
+          :disabled="loading || disabled"
+          >{{ $t(`取 消`) }}</el-button
+        >
+        <el-button
+          size="small"
+          type="primary"
+          @click="onSubmit"
+          class="normal-btn-width"
+          :disabled="disabled"
+          :loading="loading"
+          >{{ $t(`确 定`) }}</el-button
+        >
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import productTemplate from "@/WebsiteManagement/marketproductMag/compents/productTemplate";
+import myEditor from "@/components/my-editor/Editor.vue";
+import upload from "../compents/upload";
+
+export default {
+  name: "edit",
+  components: { productTemplate, myEditor, upload },
+  props: ["data"],
+  data() {
+    return {
+      dialogFormVisible: false,
+      dialogPopover: false,
+      loading: false,
+      disabled: false,
+      classData: [],
+      form: {
+        siteid: JSON.parse(sessionStorage.getItem("active_account")).siteid,
+        sa_fadid: 0, //sa_brandid<=0时 为新增
+        itemid: "",
+        itemname: "",
+        itemno: "",
+        class: "",
+        materialdescription: "",
+        technicalparam: "",
+        contentstr: "",
+        isonsale: "1",
+        classmx: "",
+      },
+      rules: {
+        itemname: [
+          { required: true, message: this.$t("请选择商品"), trigger: "change" },
+        ],
+        classmx: [
+          { required: true, message: this.$t("请选择分类"), trigger: "change" },
+        ],
+      },
+    };
+  },
+  updated() {
+    if (this.$refs.technicalparam)
+      this.$refs.technicalparam.innerHTML = this.form.technicalparam;
+    if (this.$refs.materialdescription)
+      this.$refs.materialdescription.innerHTML = this.form.materialdescription;
+    if (this.$refs.contentstr)
+      this.$refs.contentstr.innerHTML = this.form.contentstr;
+    try {
+      if (!this.$refs.upload.filelist.length)
+        this.$refs.upload.filelist = this.fileType
+          .fileList(this.data.attinfos)
+          .map((v) => {
+            v.progress = 100;
+            v.type = v.postfix;
+            v.uid = v.attachmentid;
+            return v;
+          });
+    } catch (error) {}
+  },
+  methods: {
+    oploadIng(e) {
+      this.disabled = e;
+    },
+    async editBtn() {
+      this.queryClass();
+      const res = await this.$api.requested({
+        id: "20240920101403",
+        content: {
+          siteid: JSON.parse(sessionStorage.getItem("active_account")).siteid,
+          sa_fadid: this.data.sa_fadid,
+        },
+      });
+      if (res.code == 0) {
+        this.tool.showMessage(res, () => {});
+      } else {
+        this.dialogFormVisible = true;
+        this.form = res.data;
+        console.log("this.form",this.form)
+        this.form.contentstr = res.data.content;
+        this.form.isonsale = res.data.isonsale == 1 ? "1" : "0";
+        /*this.$refs.technicalparam.innerHTML = res.data.technicalparam;
+        this.$refs.materialdescription.innerHTML = res.data.materialdescription;
+        this.$refs.contentstr.innerHTML = res.data.contentstr;*/
+      }
+    },
+    onSubmit() {
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false;
+        this.loading = true;
+        this.form.technicalparam = this.$refs.technicalparam.html;
+        this.form.materialdescription = this.$refs.materialdescription.html;
+        this.form.contentstr = this.$refs.contentstr.html;
+        const selectdep = this.$refs.selectdep._data.inputValue.split(" / ");
+        this.form.class = selectdep[0] || "";
+        this.form.classmx = selectdep[1] || "";
+        const res = await this.$api.requested({
+          id: "20240920101303",
+          content: this.form,
+        });
+        await this.$refs.upload.rebinding("sa_fad", res.data.sa_fadid);
+        this.$refs.upload.linksids.length
+          ? await this.$refs.upload.deleteAllTemporaryFiles(
+              this.$refs.upload.linksids
+            )
+          : "";
+        this.tool.showMessage(res, async () => {
+          const res1 = await this.$api.requested({
+            id: "20240920101603",
+            content: {
+              siteid: this.form.siteid,
+              sa_fadids: [res.data.sa_fadid],
+              isonsale: this.form.isonsale,
+            },
+          });
+          this.dialogFormVisible = false;
+          this.onClose();
+        });
+      });
+    },
+    selectPro(data) {
+      this.dialogPopover = false;
+      this.form.itemname = data.itemname;
+      this.form.itemid = data.itemid;
+      this.form.itemno = data.itemno;
+    },
+    async queryClass() {
+      const res = await this.$store.dispatch(
+        "optiontypeselect",
+        "marketproductclass"
+      );
+      this.classData = res.data
+    },
+    onClose() {
+      this.loading = false;
+      this.dialogFormVisible = false;
+      this.$refs.form.resetFields();
+      this.$refs.technicalparam.html = this.form.technicalparam;
+      this.$refs.materialdescription.html = this.form.materialdescription;
+      this.$refs.contentstr.html = this.form.contentstr;
+      this.$emit("onSuccess");
+    },
+  },
+  mounted() {},
+};
+</script>
+
+<style scoped>
+.upload-box {
+  width: 100%;
+  display: flex;
+  padding: 10px 0 13px;
+}
+
+.upload-box .label {
+  font-size: 14px;
+  margin-right: 20px;
+  margin-top: 3px;
+  color: #606266;
+}
+</style>