Browse Source

Merge remote-tracking branch 'origin/master'

yfh 1 day ago
parent
commit
6260344965

+ 8 - 0
src/api/course/qw/courseWatchLog.js

@@ -126,3 +126,11 @@ export function listBytrainingCampId(query) {
     params: query
   })
 }
+
+export function getSignProjectName() {
+  return request({
+    url: '/qw/course/courseWatchLog/getSignProjectName',
+    method: 'get'
+  })
+}
+

+ 7 - 0
src/api/hisStore/storeProduct.js

@@ -57,6 +57,13 @@ export function delStoreProduct(productId) {
     method: 'delete'
   })
 }
+// 复制商品
+export function copyStoreProduct(productId) {
+  return request({
+    url: '/store/store/storeProduct/copyStoreProduct?productId=' + productId,
+    method: 'get'
+  })
+}
 
 // 批量复制商品
 export function bulkCopy(productId) {

+ 493 - 0
src/components/City/indexZm.vue

@@ -0,0 +1,493 @@
+<template>
+  <el-dialog :close-on-click-modal="false"
+             :visible.sync="addressView"
+             append-to-body
+             class="modal"
+             title="选择城市" width="950px">
+    <el-row :gutter="24" type="flex">
+      <el-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24" class="item">
+        <div class="check-btn">
+          <el-checkbox v-model="iSselect" @change="allCheckbox">全选</el-checkbox>
+          <div class="empty" @click="empty">清空</div>
+        </div>
+      </el-col>
+    </el-row>
+    <el-row  :gutter="24"  :loading="loading" >
+      <el-col  :xl="6" :lg="6" :md="6" :sm="8" :xs="6" class="item"  v-for="(item,index) in cityList" :key="index">
+        <div @mouseenter="enter(index)" @mouseleave="leave()" v-if="item.level==1">
+          <el-checkbox
+            v-model="item.checked"
+            :label="item.cityName"
+            :disabled="item.disabled"
+            @change="checkedClick(index)"
+            :class="{ 'disabled-checkbox': item.disabled }"
+          >{{item.cityName}}</el-checkbox>
+          <div class="city" v-show="activeCity===index">
+            <div class="checkBox">
+              <div class="arrow"></div>
+              <div>
+                <el-checkbox
+                  v-model="subitem.checked"
+                  :label="subitem.cityName"
+                  :disabled="subitem.disabled"
+                  @change="primary(index,subindex)"
+                  class="itemn"
+                  v-for="(subitem,subindex) in item.children"
+                  :key="subindex"
+                  :class="{ 'disabled-checkbox': subitem.disabled }"
+                >{{subitem.cityName}}</el-checkbox>
+              </div>
+            </div>
+          </div>
+        </div>
+      </el-col>
+    </el-row>
+    <div slot="footer">
+      <el-button @click="close">取消</el-button>
+      <el-button type="primary" @click="confirm">确定</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import {getAllList} from "@/api/hisStore/city";
+
+export default {
+  name: 'CityZm',
+  props: {
+    type: {
+      type: Number,
+      default: 0
+    },
+    selectedCities: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      iSselect: false,
+      addressView: false,
+      cityList: [],
+      activeCity: -1,
+      loading: false
+    }
+  },
+  methods: {
+    enter(index) {
+      this.activeCity = index;
+    },
+    leave() {
+      this.activeCity = null;
+    },
+    getCityList() {
+      this.loading = true;
+      getAllList().then(res => {
+        this.loading = false;
+        console.log(res.data)
+        var data = res.data;
+        this.cityList = data.filter(item => item.level === 1)
+
+        this.cityList.forEach((item, index, arr) => {
+          // 加载市的数据
+          var subData = data.filter(subitem => subitem.parentId === item.cityId && subitem.level === 2)
+          console.log(subData)
+          item.children = subData;
+
+          // 加载县的数据到每个市下
+          item.children.forEach((city, cityIndex) => {
+            var countyData = data.filter(county => county.parentId === city.cityId && county.level === 3);
+            if (countyData && countyData.length > 0) {
+              city.children = countyData;
+            }
+          });
+
+          // 标记已选择的城市
+          this.markSelectedCities(item);
+        });
+      })
+    },
+    // 标记已选择的城市为禁用状态
+    markSelectedCities(province) {
+      let that = this;
+      if (!that.selectedCities || that.selectedCities.length === 0) {
+        return;
+      }
+
+      // 检查是否选择了整个省(children为空数组或不存在)
+      let selectedProvince = that.selectedCities.find(city => {
+        if (city.cityId === province.cityId) {
+          // 如果没有children属性,或者children是空数组,说明选择了整个省
+          return !city.children || city.children.length === 0;
+        }
+        return false;
+      });
+
+      if (selectedProvince) {
+        // 整个省已选择,禁用省和所有市
+        that.$set(province, 'disabled', true);
+        if (province.children && province.children.length > 0) {
+          province.children.forEach((city, cityIndex) => {
+            that.$set(province.children[cityIndex], 'disabled', true);
+            // 如果市下有县,也禁用所有县
+            if (city.children && city.children.length > 0) {
+              city.children.forEach((county, countyIndex) => {
+                that.$set(province.children[cityIndex].children[countyIndex], 'disabled', true);
+              });
+            }
+          });
+        }
+      } else {
+        // 检查是否有部分市被选择
+        let selectedCityMap = new Map(); // 存储已选择的市及其县信息
+        that.selectedCities.forEach(selectedCity => {
+          if (selectedCity.cityId === province.cityId && selectedCity.children && selectedCity.children.length > 0) {
+            // 该省下有选择的市
+            selectedCity.children.forEach(child => {
+              if (!selectedCityMap.has(child.cityId)) {
+                selectedCityMap.set(child.cityId, new Set());
+              }
+              // 如果市下有选择的县,记录县的ID
+              if (child.children && child.children.length > 0) {
+                child.children.forEach(county => {
+                  selectedCityMap.get(child.cityId).add(county.cityId);
+                });
+              }
+            });
+          }
+        });
+
+        if (selectedCityMap.size > 0) {
+          // 检查该省下所有市是否都被选择
+          let allCitiesSelected = true;
+          if (province.children && province.children.length > 0) {
+            province.children.forEach(city => {
+              if (!selectedCityMap.has(city.cityId)) {
+                allCitiesSelected = false;
+              }
+            });
+          } else {
+            allCitiesSelected = false;
+          }
+
+          // 如果所有市都被选择,禁用整个省
+          if (allCitiesSelected) {
+            that.$set(province, 'disabled', true);
+          }
+
+          // 标记已选择的市为禁用,并检查市下的县
+          if (province.children && province.children.length > 0) {
+            province.children.forEach((city, cityIndex) => {
+              if (selectedCityMap.has(city.cityId)) {
+                // 该市已被选择
+                let selectedCountyIds = selectedCityMap.get(city.cityId);
+
+                // 检查是否选择了整个市(没有选择具体的县,或者县列表为空)
+                let citySelectedData = null;
+                that.selectedCities.forEach(selectedCity => {
+                  if (selectedCity.cityId === province.cityId && selectedCity.children) {
+                    let foundCity = selectedCity.children.find(c => c.cityId === city.cityId);
+                    if (foundCity && (!foundCity.children || foundCity.children.length === 0)) {
+                      citySelectedData = foundCity;
+                    }
+                  }
+                });
+
+                if (citySelectedData) {
+                  // 选择了整个市,禁用该市和所有县
+                  that.$set(province.children[cityIndex], 'disabled', true);
+                  if (city.children && city.children.length > 0) {
+                    city.children.forEach((county, countyIndex) => {
+                      that.$set(province.children[cityIndex].children[countyIndex], 'disabled', true);
+                    });
+                  }
+                } else if (city.children && city.children.length > 0 && selectedCountyIds.size > 0) {
+                  // 检查该市下所有县是否都被选择
+                  let allCountiesSelected = true;
+                  city.children.forEach(county => {
+                    if (!selectedCountyIds.has(county.cityId)) {
+                      allCountiesSelected = false;
+                    }
+                  });
+
+                  // 如果所有县都被选择,禁用该市
+                  if (allCountiesSelected) {
+                    that.$set(province.children[cityIndex], 'disabled', true);
+                  }
+
+                  // 标记已选择的县为禁用
+                  city.children.forEach((county, countyIndex) => {
+                    if (selectedCountyIds.has(county.cityId)) {
+                      that.$set(province.children[cityIndex].children[countyIndex], 'disabled', true);
+                    }
+                  });
+                } else {
+                  // 选择了整个市(没有县的数据或没有选择县),禁用该市
+                  that.$set(province.children[cityIndex], 'disabled', true);
+                }
+              }
+            });
+          }
+        }
+      }
+    },
+    /**
+     * 全选或者反选
+     * @param checked
+     */
+    allCheckbox: function () {
+      let that = this, checked = this.iSselect;
+      that.cityList.forEach(function (item, key) {
+        // 跳过已禁用的省
+        if (item.disabled) {
+          return;
+        }
+        that.$set(that.cityList[key], 'checked', checked);
+        if (checked) {
+          // 只计算未禁用的市的数量
+          let enabledCount = that.cityList[key].children.filter(city => !city.disabled).length;
+          that.$set(that.cityList[key], 'count', enabledCount);
+        } else {
+          that.$set(that.cityList[key], 'count', 0);
+        }
+        that.cityList[key].children.forEach(function (val, k) {
+          // 跳过已禁用的市
+          if (!val.disabled) {
+            that.$set(that.cityList[key].children[k], 'checked', checked);
+          }
+        })
+      });
+    },
+    // 清空;
+    empty() {
+      let that = this;
+      that.cityList.forEach(function (item, key) {
+        // 跳过已禁用的省
+        if (item.disabled) {
+          return;
+        }
+        that.$set(that.cityList[key], 'checked', false);
+        that.cityList[key].children.forEach(function (val, k) {
+          // 跳过已禁用的市
+          if (!val.disabled) {
+            that.$set(that.cityList[key].children[k], 'checked', false);
+          }
+        });
+        that.$set(that.cityList[key], 'count', 0);
+      });
+      this.iSselect = false;
+    },
+    /**
+     * 点击省
+     * @param index
+     */
+    checkedClick: function (index) {
+      let that = this;
+      // 如果省被禁用,不允许操作
+      if (that.cityList[index].disabled) {
+        return;
+      }
+      if (that.cityList[index].checked) {
+        // 只选择未禁用的市
+        let enabledCount = 0;
+        that.cityList[index].children.forEach(function (item, key) {
+          if (!item.disabled) {
+            that.$set(that.cityList[index].children[key], 'checked', true);
+            enabledCount++;
+          }
+        });
+        that.$set(that.cityList[index], 'count', enabledCount);
+      } else {
+        that.$set(that.cityList[index], 'count', 0);
+        that.$set(that.cityList[index], 'checked', false);
+        that.cityList[index].children.forEach(function (item, key) {
+          // 只取消未禁用的市的选中状态
+          if (!item.disabled) {
+            that.$set(that.cityList[index].children[key], 'checked', false);
+          }
+        });
+        that.iSselect = false;
+      }
+    },
+    /**
+     * 点击市区
+     * @param index
+     * @param ind
+     */
+    primary: function (index, ind) {
+      // 如果市被禁用,不允许操作
+      if (this.cityList[index].children[ind].disabled) {
+        return;
+      }
+      let checked = false, count = 0;
+      this.cityList[index].children.forEach(function (item, key) {
+        console.log("item:" + item.checked)
+        if (item.checked) {
+          checked = true;
+          count++;
+        }
+      });
+      this.$set(this.cityList[index], 'count', count);
+      this.$set(this.cityList[index], 'checked', checked);
+    },
+    // 确定;
+    confirm() {
+      let that = this;
+      // 被选中的省市;
+      let selectList = [];
+      that.cityList.forEach(function (item, key) {
+        // 跳过已禁用的省
+        if (item.disabled) {
+          return;
+        }
+        let data = {};
+        if (item.checked) {
+          data = {
+            name: item.cityName,
+            cityId: item.cityId,
+            children: []
+          };
+
+        }
+        that.cityList[key].children.forEach(function (i, k) {
+          // 只添加未禁用且选中的市
+          if (i.checked && !i.disabled) {
+            let cityData = {
+              cityId: i.cityId
+            };
+
+            // 如果市下有县,检查是否有选中的县
+            if (i.children && i.children.length > 0) {
+              let selectedCounties = [];
+              i.children.forEach(function (county, countyIndex) {
+                if (county.checked && !county.disabled) {
+                  selectedCounties.push({
+                    cityId: county.cityId
+                  });
+                }
+              });
+
+              // 如果有选中的县,添加到市的children中
+              if (selectedCounties.length > 0) {
+                cityData.children = selectedCounties;
+              }
+            }
+
+            data.children.push(cityData);
+          }
+        });
+        if (data.cityId !== undefined) {
+          selectList.push(data);
+        }
+      });
+      console.log(selectList);
+      if (selectList.length === 0) {
+        return this.$message({
+          message: '至少选择一个省份或者城市',
+          type: 'error'
+        });
+      } else {
+        this.$emit('selectCity', selectList, this.type);
+        that.addressView = false;
+        this.cityList = []
+      }
+    },
+    close() {
+      this.addressView = false;
+      this.cityList = [];
+      // 重置选中状态
+      this.iSselect = false;
+    }
+  },
+  mounted() {
+  }
+}
+</script>
+
+<style scoped>
+
+.modal .item {
+  position: relative;
+  margin-bottom: 20px;
+}
+
+.modal .item .city {
+  position: absolute;
+  z-index: 9;
+  top: 17px;
+  width: 100%;
+  padding-top: 18px;
+}
+
+.modal .item .city .checkBox {
+  width: 97%;
+  padding: 10px;
+  border: 1px solid #eee;
+  background-color: #fff;
+  max-height: 100px;
+  overflow-x: hidden;
+  overflow-y: auto;
+}
+
+.modal .item .city .checkBox .arrow {
+  position: absolute;
+  top: 3px;
+  width: 0;
+  height: 0;
+  border: 8px solid transparent;
+  border-bottom-color: #ddd;
+}
+
+.modal .item .city .checkBox .arrow:before {
+  position: absolute;
+  bottom: -8px;
+  right: -7px;
+  content: "";
+  width: 0;
+  height: 0;
+  border: 7px solid transparent;
+  border-bottom-color: #fff;
+}
+
+.modal .item .city .checkBox .itemn {
+  margin-bottom: 10px;
+}
+
+.radio {
+  padding: 5px 0;
+  font-size: 14px !important;
+}
+
+.red {
+  color: #ff0000;
+}
+
+.empty {
+  cursor: pointer;
+  margin-left: 10px
+}
+
+.check-btn {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+/* 禁用状态的复选框样式 */
+.disabled-checkbox {
+  opacity: 0.5;
+  cursor: not-allowed !important;
+}
+
+.disabled-checkbox /deep/ .el-checkbox__input.is-disabled .el-checkbox__inner {
+  background-color: #f5f7fa;
+  border-color: #e4e7ed;
+  cursor: not-allowed;
+}
+
+.disabled-checkbox /deep/ .el-checkbox__input.is-disabled + .el-checkbox__label {
+  color: #c0c4cc;
+  cursor: not-allowed;
+}
+</style>

+ 139 - 0
src/components/Editor/wangZm.vue

@@ -0,0 +1,139 @@
+<template>
+  <div>
+    <div ref='editor1' class="myedit"></div>
+  </div>
+</template>
+
+<script>
+import E from 'wangeditor'
+export default {
+  name: 'editoritem',
+  data() {
+    return {
+      uploadUrl: process.env.VUE_APP_BASE_API + "/common/uploadWang",
+      editor: null,
+      selectedImageCount: 0, // 记录选择的图片数量
+      uploadedImageCount: 0  // 记录已上传的图片数量
+    }
+  },
+  beforeDestroy() {
+    if (this.editor != null) {
+      this.editor.destroy()
+      this.editor = null
+    }
+  },
+  methods: {
+    initEditor() {
+      const that = this;
+      if (this.editor == null) {
+        this.editor = new E(that.$refs.editor1)
+        this.editor.config.uploadImgServer = this.uploadUrl;
+        this.editor.config.uploadImgMaxSize = 6 * 1024 * 1024 // 2M
+        this.editor.config.uploadImgAccept = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp']
+        this.editor.config.uploadFileName = 'fileName'
+        this.editor.config.zIndex = 1
+
+        // 关键配置:允许多选,串行上传
+        this.editor.config.uploadImgMultiple = true;
+        this.editor.config.uploadImgMaxLength = 15;
+        this.editor.config.uploadImgConcurrent = 1;
+
+        this.editor.config.customUploadImg = function (files, insertImgFn) {
+          // 获取选择的图片数量
+          that.selectedImageCount = files.length;
+          that.uploadedImageCount = 0;
+          console.log(`已选择 ${that.selectedImageCount} 张图片,准备开始上传`);
+
+          that.$emit('image-selected', that.selectedImageCount);
+
+          const uploadNext = (index) => {
+            if (index >= files.length) {
+              console.log(`所有 ${files.length} 张图片上传处理完毕`);
+              that.$emit('all-images-uploaded', that.uploadedImageCount);
+              return;
+            }
+
+            const formData = new FormData();
+            formData.append(that.editor.config.uploadFileName, files[index]);
+
+            const xhr = new XMLHttpRequest();
+            xhr.open('POST', that.uploadUrl);
+
+            xhr.onload = function () {
+              if (xhr.status >= 200 && xhr.status < 300) {
+                const result = JSON.parse(xhr.responseText);
+                if (result.errno === 0 && result.data && result.data[0] && result.data[0].url) {
+                  insertImgFn(result.data[0].url);
+                  that.uploadedImageCount++;
+                  that.$emit('image-uploaded', that.uploadedImageCount, that.selectedImageCount);
+                } else {
+                  console.error(`第 ${index+1} 张图片上传失败:`, result);
+                  that.$emit('image-upload-error', index+1);
+                }
+              } else {
+                console.error(`第 ${index+1} 张图片上传请求失败:`, xhr.statusText);
+                that.$emit('image-upload-error', index+1);
+              }
+              uploadNext(index + 1);
+            };
+
+            xhr.onerror = function () {
+              console.error(`第 ${index+1} 张图片上传出错`);
+              that.$emit('image-upload-error', index+1);
+              uploadNext(index + 1);
+            };
+
+            // 发送请求
+            xhr.send(formData);
+          };
+
+          // 开始上传第一张
+          uploadNext(0);
+        };
+
+        this.editor.config.menus = [
+          'head', 'bold', 'fontSize', 'fontName', 'italic', 'underline',
+          'strikeThrough', 'indent', 'lineHeight', 'foreColor', 'backColor',
+          'link', 'list', 'todo', 'justify', 'quote', 'emoticon', 'image',
+          'table', 'code', 'splitLine', 'undo', 'redo'
+        ]
+
+        this.editor.config.onchange = function (newHtml) {
+          that.$emit("on-text-change", newHtml);
+        }
+
+        this.editor.config.pasteFilterStyle = false
+        this.editor.config.onchangeTimeout = 500
+
+        this.editor.create()
+      }
+      this.editor.txt.html("");
+    },
+
+    setText(text) {
+      if (this.editor == null) {
+        this.initEditor()
+      }
+      this.editor.txt.html(text || "");
+    },
+
+    getSelectedImageCount() {
+      return this.selectedImageCount;
+    },
+
+    getUploadedImageCount() {
+      return this.uploadedImageCount;
+    }
+  }
+}
+</script>
+
+<style scoped>
+.myedit {
+  min-height: 300px;
+  z-index: 1 !important;
+}
+.w-e-toolbar, .w-e-text-container {
+  z-index: 1 !important;
+}
+</style>

+ 41 - 1
src/views/course/coursePlaySourceConfig/index.vue

@@ -204,6 +204,28 @@
               :value="item.dictValue"
             />
           </el-select>
+        </el-form-item>
+         <el-form-item label="可查看设置公司" prop="setCompanyIdList">
+          <el-select
+            v-model="form.setCompanyIdList"
+            filterable
+            multiple
+            remote
+            reserve-keyword
+            placeholder="请输入公司名称搜索"
+            :remote-method="searchCompanies"
+            :loading="companySearchLoading"
+            style="width: 220px"
+            clearable
+            size="small"
+          >
+            <el-option
+              v-for="item in companyOptions"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+            />
+          </el-select>
         </el-form-item>
         <el-form-item label="是否是互医/商城小程序" prop="isMall">
           <el-select
@@ -308,7 +330,9 @@ export default {
       ],
       title: null,
       open: false,
-      form: {},
+      form: {
+        setCompanyIdList: []
+      },
       rules: {
         name: [
           { required: true, message: "名称不能为空", trigger: "blur" }
@@ -460,6 +484,15 @@ export default {
           ...response.data,
           type: response.data.type.toString()
         }
+        if(!!this.form.setCompanyIds){
+           this.$set(
+            this.form, 
+            "setCompanyIdList", 
+            this.form.setCompanyIds.split(",").map(str => parseInt(str, 10))
+          );
+          // this.form.setCompanyIdList = this.form.setCompanyIds.split(",").map(str => parseInt(str, 10));
+        }
+        console.log( this.form);
         this.searchCompanies("");
         this.open = true
         this.title = "修改小程序配置"
@@ -486,6 +519,12 @@ export default {
     submitForm() {
       this.$refs["form"].validate(valid => {
         if (valid) {
+          if(!!this.form.setCompanyIdList && this.form.setCompanyIdList.length > 0){
+            this.form.setCompanyIds = this.form.setCompanyIdList.join(',')
+          }else{
+            this.form.setCompanyIds = "";
+          }
+          console.log(this.form);
           if (this.form.id != null) {
             update(this.form).then(response => {
               const {code, msg} = response
@@ -524,6 +563,7 @@ export default {
         secret: null,
         img: null,
         originalId: null,
+        setCompanyIdList: [],
         token: 'cbnd7lJvkripVOpyTFAna6NAWCxCrvC',
         aesKey: 'HlEiBB55eaWUaeBVAQO3cWKWPYv1vOVQSq7nFNICw4E',
         msgDataFormat: 'JSON',

+ 56 - 2
src/views/course/courseWatchLog/qw/statistics.vue

@@ -50,7 +50,24 @@
       </el-form-item>
     </el-form>
 
-    <el-table border v-loading="loading" :data="courseWatchLogList" @selection-change="handleSelectionChange"  show-summary>
+    <el-table v-if="'济南联志健康' == this.signProjectName" border v-loading="loading" :data="courseWatchLogList" @selection-change="handleSelectionChange"  show-summary :summary-method="getSummaries">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="企微员工名称" align="center" prop="qwUserName" />
+      <el-table-column label="发课时间" align="center" prop="createTime"/>
+      <el-table-column label="课程名称" align="center" prop="courseName" />
+      <el-table-column label="小节名称" align="center" prop="videoName" />
+      <el-table-column label="待看课" align="center" prop="type3" />
+      <el-table-column label="看课中" align="center" prop="type1" />
+      <el-table-column label="已完课" align="center" prop="type2" />
+      <el-table-column label="看课中断" align="center" prop="type4" />
+      <el-table-column label="注册用户待看课数" align="center" prop="isUserWaitNumber" />
+      <el-table-column label="未注册用户待看课数" align="center" prop="noUserWaitNumber" />
+      <el-table-column label="上线率" align="center" prop="onLineRate" />
+      <el-table-column label="完课率" align="center" prop="finishedRate" />
+      <el-table-column label="消耗红包金额" align="center" prop="redAmount" />
+    </el-table>
+
+    <el-table v-else border v-loading="loading" :data="courseWatchLogList" @selection-change="handleSelectionChange"  show-summary>
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="企微员工名称" align="center" prop="qwUserName" />
       <el-table-column label="发课时间" align="center" prop="createTime"/>
@@ -79,13 +96,14 @@
 </template>
 
 <script>
-import { listCourseWatchLog, getCourseWatchLog, delCourseWatchLog, addCourseWatchLog, updateCourseWatchLog, exportCourseWatchLog,statisticsList } from "@/api/course/qw/courseWatchLog";
+import { listCourseWatchLog, getCourseWatchLog, delCourseWatchLog, addCourseWatchLog, updateCourseWatchLog, exportCourseWatchLog,statisticsList,getSignProjectName } from "@/api/course/qw/courseWatchLog";
 import { courseList,videoList } from '@/api/course/courseRedPacketLog'
 import {getCompanyList} from "@/api/company/company";
 export default {
   name: "CourseWatchLog",
   data() {
     return {
+      signProjectName:"",
       companys:[],
       activeName:"00",
       createTime:null,
@@ -140,6 +158,11 @@ export default {
     };
   },
   created() {
+    getSignProjectName().then(res=>{
+      this.signProjectName = res.signProjectName;
+      console.log(this.signProjectName);
+    }).catch(res=>{});
+
     getCompanyList().then(response => {
       this.companys = response.data;
       if(this.companys!=null&&this.companys.length>0){
@@ -156,6 +179,37 @@ export default {
     });
   },
   methods: {
+   getSummaries(param) {
+        const { columns, data } = param;
+        const sums = [];
+         // 关键改动:创建一个不包含最后一行的新数据数组
+        // 如果数据长度大于1,则截取掉最后一行;否则,使用空数组避免错误
+        const dataToSum = data.length > 1 ? data.slice(0, -1) : [];
+        columns.forEach((column, index) => {
+          
+          if (index === 0) {
+            sums[index] = '页总计';
+            return;
+          }
+          const values = dataToSum.map(item => Number(item[column.property]));
+          
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr);
+              if (!isNaN(value)) {
+                return prev + curr;
+              } else {
+                return prev;
+              }
+            }, 0);
+            sums[index] += ' ';
+          } else {
+            sums[index] = 'N/A';
+          }
+        });
+
+        return sums;
+      },
     courseChange(row){
       this.queryParams.videoId=null;
       if(row === ''){

+ 23 - 6
src/views/hisStore/shippingTemplates/index.vue

@@ -131,7 +131,7 @@
                 </el-table-column>
                 <el-table-column  label="操作">
                   <template slot-scope="scope">
-                    <a v-if="scope.row.regionName!=='默认全国'" @click="delCity(scope.row.index,1)">删除</a>
+                    <a  @click="delCity(scope.$index,1)">删除</a>
                   </template>
                 </el-table-column>
 
@@ -175,7 +175,7 @@
                 </el-table-column>
                 <el-table-column  label="操作">
                   <template slot-scope="scope">
-                    <a v-if="scope.row.regionName!=='默认全国'" @click="delCity(scope.row.index,2)">删除</a>
+                    <a  @click="delCity(scope.$index ,2)">删除</a>
                   </template>
                 </el-table-column>
 
@@ -197,17 +197,17 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-    <city ref="city" @selectCity="selectCity" :type="type"></city>
+    <CityZm ref="city" @selectCity="selectCity" :type="type"></CityZm>
   </div>
 </template>
 
 <script>
 import { listShippingTemplates, getShippingTemplates, delShippingTemplates, addShippingTemplates, updateShippingTemplates, exportShippingTemplates } from "@/api/hisStore/shippingTemplates";
-import City from '@/components/City'
+import CityZm from '@/components/City/indexZm'
 export default {
   name: "ShippingTemplates",
   components: {
-    City
+    CityZm
   },
   data() {
     return {
@@ -267,7 +267,6 @@ export default {
   },
   methods: {
     delCity (index,type) {
-      console.log(index)
       if (type === 1) {
         this.templateList.splice(index, 1);
       } else {
@@ -301,8 +300,26 @@ export default {
     },
     // 单独添加配送区域
     addCity (type) {
+      // 获取已选择的城市数据
+      let selectedCities = [];
+      if (type === 1) {
+        // 配送区域
+        this.templateList.forEach(item => {
+          if (item.region && item.region.length > 0) {
+            selectedCities = selectedCities.concat(item.region);
+          }
+        });
+      } else {
+        // 指定包邮
+        this.appointList.forEach(item => {
+          if (item.place && item.place.length > 0) {
+            selectedCities = selectedCities.concat(item.place);
+          }
+        });
+      }
       this.$refs.city.addressView = true;
       this.type = type;
+      this.$refs.city.selectedCities = selectedCities;
       this.$refs.city.getCityList()
     },
     /** 查询运费模板列表 */

+ 1799 - 0
src/views/hisStore/storeProduct/indexZm.vue

@@ -0,0 +1,1799 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+
+      <el-form-item label="商品分类" prop="cateId">
+        <treeselect  v-model="queryParams.cateId"  style="width:205.4px" :options="categoryOptions" :normalizer="normalizer" placeholder="请选择分类" />
+      </el-form-item>
+
+      <el-form-item label="商品名称" prop="productName">
+        <el-input
+          v-model="queryParams.productName"
+          placeholder="请输入商品名称"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="商品编号" prop="barCode">
+        <el-input
+          v-model="queryParams.barCode"
+          placeholder="请输入商品编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+
+      <el-form-item label="商品类型" prop="productType">
+        <el-select   v-model="queryParams.productType" placeholder="请选择商品类型" clearable size="small" >
+          <el-option
+            v-for="item in productTypeOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="所属公司">
+        <el-select style="width: 240px" v-model="companyId" multiple placeholder="请选择企业" clearable size="small" >
+          <el-option
+            v-for="item in companyOptions"
+            :key="item.companyId"
+            :label="item.companyName"
+            :value="item.companyId"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="所属店铺" v-if="this.isStores">
+        <el-select style="width: 240px" v-model="queryParams.storeIds" placeholder="请选择店铺" clearable size="small" >
+          <el-option
+            v-for="item in storeOptions"
+            :key="item.storeId"
+            :label="item.storeName"
+            :value="item.storeId"
+          />
+        </el-select>
+      </el-form-item>
+      <div v-if="this.isMedicalMall">
+      <el-form-item label="审核状态">
+        <el-select style="width: 240px" v-model="queryParams.isAudit" placeholder="请选择审核状态" size="small" >
+          <el-option value="0" label="待审核" key="isAudit0">待审核</el-option>
+          <el-option value="1" label="审核通过" key="isAudit1">审核通过</el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="药品注册证书编号" prop="drugRegCertNo">
+        <el-input
+          v-model="queryParams.drugRegCertNo"
+          placeholder="请输入药品注册证书编号"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="通用名称" prop="commonName">
+        <el-input
+          v-model="queryParams.commonName"
+          placeholder="请输入通用名称"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="剂型" prop="dosageForm">
+        <el-input
+          v-model="queryParams.dosageForm"
+          placeholder="请输入剂型"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="单价" prop="unitPrice">
+        <el-input
+          v-model="queryParams.unitPrice"
+          placeholder="请输入单价"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="批号" prop="batchNumber">
+        <el-input
+          v-model="queryParams.batchNumber"
+          placeholder="请输入批号"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="上市许可持有人" prop="mah">
+        <el-input
+          v-model="queryParams.mah"
+          placeholder="请输入上市许可持有人"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="持有人地址" prop="mahAddress">
+        <el-input
+          v-model="queryParams.mahAddress"
+          placeholder="请输入持有人地址"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="生产企业" prop="manufacturer">
+        <el-input
+          v-model="queryParams.manufacturer"
+          placeholder="请输入生产企业"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="生产企业地址" prop="manufacturerAddress">
+        <el-input
+          v-model="queryParams.manufacturerAddress"
+          placeholder="请输入生产企业地址"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="功能主治" prop="indications">
+        <el-input
+          v-model="queryParams.indications"
+          placeholder="请输入功能主治"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="用法用量" prop="dosage">
+        <el-input
+          v-model="queryParams.dosage"
+          placeholder="请输入用法用量"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="不良反应" prop="adverseReactions">
+        <el-input
+          v-model="queryParams.adverseReactions"
+          placeholder="请输入不良反应"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="禁忌" prop="contraindications">
+        <el-input
+          v-model="queryParams.contraindications"
+          placeholder="请输入禁忌"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+
+      <el-form-item label="注意事项" prop="precautions">
+        <el-input
+          v-model="queryParams.precautions"
+          placeholder="请输入注意事项"
+          clearable
+          size="small"
+
+        />
+      </el-form-item>
+      </div>
+      <!-- <el-form-item label="状态" prop="isShow">
+         <el-select style="width: 240px" v-model="queryParams.isShow" placeholder="请选择状态" clearable size="small" >
+         <el-option
+                v-for="item in isShowOptions"
+                :key="item.dictValue"
+                :label="item.dictLabel"
+                :value="item.dictValue"
+              />
+        </el-select>
+      </el-form-item> -->
+
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['store:storeProduct:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="multiple"
+          @click="handleUpdate"
+          v-hasPermi="['store:storeProduct:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['store:storeProduct:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-upload2"
+          size="mini"
+          @click="handleImport"
+          v-hasPermi="['store:storeProduct:import']"
+        >导入</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['store:storePayment:export']"
+        >导出</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="multiple"
+          @click="bulkCopy"
+          v-hasPermi="['store:storeProduct:bulkCopy']"
+        >批量复制</el-button>
+      </el-col>
+
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-tabs type="card" v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="出售中" name="1"></el-tab-pane>
+      <el-tab-pane label="待上架" name="0"></el-tab-pane>
+    </el-tabs>
+
+    <el-table  height="500" border v-loading="loading" :data="storeProductList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="ID" align="center" prop="productId" />
+      <el-table-column label="商品图片" align="center" width="120">
+        <template slot-scope="scope">
+          <el-popover
+            placement="right"
+            title=""
+            trigger="hover">
+            <img slot="reference" :src="scope.row.image" width="100">
+            <img :src="scope.row.image" style="max-width: 150px;">
+          </el-popover>
+        </template>
+      </el-table-column>
+      <el-table-column label="商品名称" show-overflow-tooltip align="center" prop="productName" />
+      <el-table-column label="分类" align="center" prop="cateName" />
+      <el-table-column label="所属公司" align="center" prop="companyName" />
+      <el-table-column label="所属店铺" align="center" prop="storeName" v-if="this.isStores"/>
+      <el-table-column label="售价" align="center" prop="price" >
+        <template slot-scope="scope" >
+          <span v-if="scope.row.price!=null">{{scope.row.price.toFixed(2)}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="原价" align="center" prop="otPrice" >
+        <template slot-scope="scope" >
+          <span v-if="scope.row.otPrice!=null">{{scope.row.otPrice.toFixed(2)}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="销量" align="center" prop="sales" />
+      <el-table-column label="库存" align="center" prop="stock" />
+      <el-table-column label="类型" align="center" prop="productType" >
+        <template slot-scope="scope">
+          <el-tag prop="productType" v-for="(item, index) in productTypeOptions"    v-if="scope.row.productType==item.dictValue">{{item.dictLabel}}</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="isShow" >
+        <template slot-scope="scope">
+          <el-tag :type="getStatusType(scope.row)" prop="status">
+            {{ getStatusText(scope.row) }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['store:storeProduct:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleCopy(scope.row)"
+            v-hasPermi="['store:storeProduct:copy']"
+          >复制</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="showOperLog(scope.row)"
+            v-hasPermi="['store:storeProduct:list']"
+            v-if="scope.row.isAudit===1"
+          >审核记录</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['store:storeProduct:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <el-dialog :title="title" :visible.sync="open1" width="580px" append-to-body>
+      <el-form ref="form1" :model="form1" :rules="rules" label-width="80px">
+        <el-form-item label="商品状态" prop="status">
+          <el-radio-group v-model="form1.isShow">
+            <el-radio :label="item.dictValue" v-for="item in isShowOptions" >{{item.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="商城展示" prop="isDisplay">
+          <el-radio-group v-model="form1.isDisplay">
+            <el-radio :label="item.dictValue" v-for="item in isDisplayOptions" >{{item.dictLabel}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="所属公司" prop="companyId">
+          <el-select style="width: 220px" filterable multiple v-model="form1.companyId" placeholder="请选择公司名" clearable size="small">
+            <el-option
+              v-for="item in companyOptions"
+              :key="item.companyId"
+              :label="item.companyName"
+              :value="item.companyId"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm1">确 定</el-button>
+        <el-button @click="cancel1">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 添加或修改商品对话框 -->
+    <el-dialog :title="title" v-if="open" :fullscreen="isFullscreen" :visible.sync="open" width="1000px" append-to-body :show-close="false">
+      <template v-slot:title>
+        <div style="display: flex; justify-content: space-between; align-items: center;">
+          <span>{{ title }}</span>
+          <div>
+            <!-- 全屏按钮 -->
+            <el-button type="text" @click="handleFullScreen" size="middle">
+              <i class="el-icon-full-screen"></i>
+            </el-button>
+            <!--关闭按钮-->
+            <el-button type="text" @click="open = false">
+              <i class="el-icon-close"></i>
+            </el-button>
+          </div>
+        </div>
+      </template>
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <el-row >
+          <el-col :span="12">
+            <el-form-item label="商品名称" prop="productName">
+              <el-input v-model="form.productName" placeholder="请输入商品名称" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="商品分类" prop="cateId">
+              <treeselect v-model="form.cateId" :options="categoryOptions" :normalizer="normalizer" placeholder="请选择上级分类" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="关键字" prop="keyword">
+              <el-input v-model="form.keyword" placeholder="请输入关键字" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="单位名" prop="unitName">
+              <el-input v-model="form.unitName" placeholder="请输入单位名" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="品牌" prop="brand">
+              <el-input v-model="form.brand" placeholder="请输入品牌" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="食品生产许可证编码" prop="unitName">
+              <el-input v-model="form.foodProductionLicenseCode" placeholder="请输入食品生产许可证编码" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="生产企业名称" prop="manufacturer">
+              <el-input v-model="form.manufacturer" placeholder="请输入生产企业名称" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="产地" prop="originPlace">
+              <el-input v-model="form.originPlace" placeholder="请输入产地" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="净含量" prop="netContent">
+              <el-input v-model="form.netContent" placeholder="请输入净含量" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="保质期" prop="shelfLife">
+              <el-date-picker value-format="yyyy-MM-dd HH:mm:ss" type="date" v-model="form.shelfLife" placeholder="请输入保质期" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="国产或进口" prop="domesticImported">
+              <el-select v-model="form.domesticImported" style="width: 23%;">
+                <el-option v-for="(item, index) in domesticImportedOptions"
+                           :value="item.dictValue" :key="item.dictValue" :label="item.dictLabel"/>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+        <el-row :gutter="10" v-show="false">
+          <el-col :span="12">
+            <el-form-item label="是否药品" prop="isDrug">
+              <el-radio-group v-model="form.isDrug">
+                <el-radio
+                  v-for="item in isDrugOptions"
+                  :key="item.dictValue"
+                  :label="item.dictValue"
+                >{{ item.dictLabel }}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <div v-if="form.isDrug === '1' ">
+          <el-form-item label="药品展示图" prop="drugImage">
+            <Material v-model="drugImageArr" type="image" :num="1" :width="150" :height="150" />
+          </el-form-item>
+          <div v-if="this.isMedicalMall">
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="药品注册证书编号" prop="drugRegCertNo">
+                <el-input v-model="form.drugRegCertNo" placeholder="请输入药品注册证书编号" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="通用名称" prop="commonName">
+                <el-input v-model="form.commonName" placeholder="请输入通用名称" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="剂型" prop="dosageForm">
+                <el-input v-model="form.dosageForm" placeholder="请输入剂型" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="单价" prop="unitPrice">
+                <el-input v-model="form.unitPrice" placeholder="请输入单价" type="number" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="批号" prop="batchNumber">
+                <el-input v-model="form.batchNumber" placeholder="请输入批号" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="规格" prop="prescribeSpec">
+                <el-input v-model="form.prescribeSpec" placeholder="请输入规格" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="上市许可持有人" prop="mah">
+                <el-input v-model="form.mah" placeholder="请输入上市许可持有人" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="持有人地址" prop="mahAddress">
+                <el-input v-model="form.mahAddress" placeholder="请输入上市许可持有人地址" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <el-col :span="12">
+              <el-form-item label="生产企业" prop="manufacturer">
+                <el-input v-model="form.manufacturer" placeholder="请输入生产企业" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="企业地址" prop="manufacturerAddress">
+                <el-input v-model="form.manufacturerAddress" placeholder="请输入生产企业地址" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-form-item label="功能主治" prop="indications">
+            <el-input v-model="form.indications" type="textarea" placeholder="请输入功能主治" />
+          </el-form-item>
+
+          <el-form-item label="用法用量" prop="dosage">
+            <el-input v-model="form.dosage" type="textarea" placeholder="请输入用法用量" />
+          </el-form-item>
+
+          <el-form-item label="不良反应" prop="adverseReactions">
+            <el-input v-model="form.adverseReactions" type="textarea" placeholder="请输入不良反应" />
+          </el-form-item>
+
+          <el-form-item label="禁忌" prop="contraindications">
+            <el-input v-model="form.contraindications" type="textarea" placeholder="请输入禁忌" />
+          </el-form-item>
+
+          <el-form-item label="注意事项" prop="precautions">
+            <el-input v-model="form.precautions" type="textarea" placeholder="请输入注意事项" />
+          </el-form-item>
+        </div>
+        </div>
+<!--        <el-row>-->
+<!--          <el-col :span="24">-->
+<!--            <el-form-item label="商品简介" prop="productInfo">-->
+<!--              <el-input v-model="form.productInfo" type="textarea" :rows="2" placeholder="请输入商品简介" />-->
+<!--            </el-form-item>-->
+<!--          </el-col>-->
+<!--        </el-row>-->
+        <el-form-item label="商品图片" prop="image">
+          <Material v-model="imageArr" type="image" :num="1" :width="150" :height="150" />
+        </el-form-item>
+        <!--        <el-form-item label="商品视频" prop="video">
+                  <div>
+                    <el-upload
+                      ref="upload"
+                      class="upload-demo"
+                      :action="uploadUrl"
+                      :on-success="handleSuccess"
+                      :before-upload="beforeUpload"
+                      :limit="1"
+                      :accept="videoAccept"
+                    >
+                      <el-button size="small" type="primary">点击上传视频</el-button>
+                    </el-upload>
+                    <video v-if="form.video" :src="form.video" controls style="max-width: 300px; max-height: 300px; margin-top: 10px"></video>
+                  </div>
+                </el-form-item>-->
+        <el-form-item label="轮播图" prop="sliderImage">
+          <Material v-model="photoArr" type="image" :num="10" :width="150" :height="150" />
+        </el-form-item>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="商品规格:" props="specType">
+              <el-radio-group v-model="form.specType" >
+                <el-radio :label="0" class="radio">单规格</el-radio>
+                <el-radio :label="1">多规格</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <!-- 多规格添加-->
+          <el-col :span="24" v-if="form.specType === 1" class="noForm" >
+            <el-col :span="24">
+              <el-form-item label="选择规格:" prop="">
+                <div  class="acea-row row-middle">
+                  <el-select v-model="form.selectRule" style="width: 23%;">
+                    <el-option v-for="(item, index) in ruleList" :value="item.ruleName" :key="index">{{ item.ruleName }}</el-option>
+                  </el-select>
+                  <el-button style="margin-left:10px;" type="primary" class="mr20" @click="confirm">确认</el-button>
+                </div>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="24">
+              <el-form-item v-if="attrs!=null&&attrs.length!==0">
+                <div  v-for="(item, index) in attrs" :key="index">
+                  <div class="acea-row row-middle"><span class="mr5">{{item.value}}</span>
+                    <i class="el-icon-circle-close"  @click="handleRemoveRole(index)"></i>
+                  </div>
+                  <div class="rulesBox">
+                    <el-tag type="dot" closable color="primary" v-for="(j, indexn) in item.detail" :key="indexn" :name="j" class="mr20" @close="handleRemove2(item.detail,indexn)">{{j}}</el-tag>
+                    <el-input placeholder="请输入属性名称" v-model="item.detail.attrsVal"
+                              style="width: 200px">
+                      <el-button slot="append" type="primary" @click="createAttr(item.detail.attrsVal,index)">添加</el-button>
+                    </el-input>
+                  </div>
+                </div>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="24" v-if="createBnt">
+              <el-form-item>
+                <el-button type="primary" size="small" icon="md-add" @click="addBtn" class="mr15">添加新规格</el-button>
+                <el-button type="success" size="small"  @click="generate">立即生成</el-button>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24" v-if="showIput">
+              <el-col  :xl="6" :lg="9" :md="10" :sm="24" :xs="24" >
+                <el-form-item label="规格:">
+                  <el-input  placeholder="请输入规格" v-model="formDynamic.attrsName"  />
+                </el-form-item>
+              </el-col>
+              <el-col  :xl="6" :lg="9" :md="10" :sm="24" :xs="24">
+                <el-form-item label="规格值:">
+                  <el-input v-model="formDynamic.attrsVal" placeholder="请输入规格值"  />
+                </el-form-item>
+              </el-col>
+              <el-col :xl="6" :lg="5" :md="10" :sm="24" :xs="24" >
+                <el-button type="primary"    @click="createAttrName">确定</el-button>
+                <el-button type="danger" @click="closeAttrName" >取消</el-button>
+              </el-col>
+            </el-col>
+            <!-- 多规格设置-->
+            <el-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24" v-if="manyFormValidate!=null&&manyFormValidate.length">
+              <!-- 多规格表格-->
+              <el-col :span="24">
+                <el-form-item label="商品属性:" class="labeltop">
+
+                  <el-table :data="manyFormValidate" size="small" style="width: 90%;" border>
+                    <el-table-column type="myindex" v-for="(item,index) in form.header" :key="index"  :width="item.minWidth" :label="item.title" :property="item.slot" align="center">
+                      <template slot-scope="scope">
+                        <div v-if="scope.column.property == 'image'" align="center">
+                          <single-img v-model="scope.row[scope.column.property]" type="image" :num="1" :width="60" :height="60" />
+                        </div>
+                        <div v-else-if="scope.column.property.indexOf('value') != -1" align="center">
+                          {{ scope.row[scope.column.property] }}
+                        </div>
+                        <div v-else-if="scope.column.property == 'action'" align="center" >
+                          <a @click="delAttrTable(scope.$index)" align="center">删除</a>
+                        </div>
+                        <div v-else align="center">
+                          <el-input  v-model="scope.row[scope.column.property]" align="center" />
+                        </div>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+
+                </el-form-item>
+              </el-col>
+            </el-col>
+          </el-col>
+
+          <!-- 单规格表格-->
+          <el-col :xl="23" :lg="24" :md="24" :sm="24" :xs="24" v-if="form.specType === 0" style="">
+            <el-form-item >
+              <el-table :data="oneFormValidate"  size="small" border>
+                <el-table-column prop="image" label="图片" align="center">
+                  <template slot-scope="scope">
+                    <single-img v-model="scope.row.image" type="image" :num="1" :width="60" :height="60" />
+                  </template>
+                </el-table-column>
+                <el-table-column prop="price" label="售价" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.price"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="agentPrice" label="代理价" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.agentPrice"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="cost" label="成本价" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.cost"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="otPrice" label="原价" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.otPrice"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="stock" label="库存" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.stock" maxlength="7"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="barCode" label="商品编号" width="130px" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.barCode"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="barCode" label="组合编号" width="130px" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.groupBarCode"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="weight" label="重量(KG)" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.weight"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="volume" label="体积(m³)" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.volume"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="volume" label="所需积分" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.integral"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="volume" label="一级返佣" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.brokerage"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="volume" label="二级返佣" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.brokerageTwo"/>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="volume" label="三级返佣" align="center">
+                  <template slot-scope="scope">
+                    <el-input type="text" v-model="scope.row.brokerageThree"/>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="运费模板:" prop="tempId">
+              <div class="acea-row">
+                <el-select v-model="form.tempId"  class="mr20">
+                  <el-option v-for="(item,index) in templateList" :value="item.id" :key="index" :label="item.name">
+                  </el-option>
+                </el-select>
+              </div>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-form-item label="商品详情" prop="description">
+          <editor ref="myeditor"   @on-text-change="updateText" />
+        </el-form-item>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="商品状态" prop="isShow">
+              <el-radio-group v-model="form.isShow">
+                <el-radio :label="item.dictValue" v-for="item in isShowOptions" >{{item.dictLabel}}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="是否热卖" prop="isHot">
+              <el-radio-group v-model="form.isHot">
+                <el-radio :label="item.dictValue" v-for="item in isHotOptions" >{{item.dictLabel}}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="猜你喜欢" prop="isGood">
+              <el-radio-group v-model="form.isGood">
+                <el-radio :label="item.dictValue" v-for="item in isGoodOptions" >{{item.dictLabel}}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="精品推荐" prop="isBest">
+              <el-radio-group v-model="form.isBest">
+                <el-radio :label="item.dictValue" v-for="item in isBestOptions" >{{item.dictLabel}}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="新品首发" prop="isNew">
+              <el-radio-group v-model="form.isNew">
+                <el-radio :label="item.dictValue" v-for="item in isNewOptions" >{{item.dictLabel}}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="返还积分">
+              <el-input-number  v-model="form.giveIntegral" :min="0" placeholder="请输入积分" />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="商城展示" prop="isDisplay">
+              <el-radio-group v-model="form.isDisplay">
+                <el-radio :label="item.dictValue" v-for="item in isDisplayOptions" >{{item.dictLabel}}</el-radio>
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+
+            <el-form-item label="排序" prop="sort">
+              <el-input-number :min="0"  v-model="form.sort" placeholder="请输入排序" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="销量" prop="sales">
+              <el-input-number :min="0"  v-model="form.sales" placeholder="请输入销量" />
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+        <el-form-item label="推广分类" prop="tuiCateId">
+          <el-select style="width: 240px" v-model="form.tuiCateId" placeholder="请选择推广分类" clearable size="small" >
+            <el-option
+              v-for="item in productTuiCateOptions"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="商品类型" prop="productType">
+          <el-select style="width: 240px" v-model="form.productType" placeholder="请选择商品类型" clearable size="small">
+            <el-option
+              v-for="item in productTypeOptions"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="所属公司">
+          <el-select style="width: 240px" v-model="form.companyIds" multiple placeholder="请选择企业" clearable size="small" >
+            <el-option
+              v-for="item in companyOptions"
+              :key="item.companyId"
+              :label="item.companyName"
+              :value="item.companyId"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="所属店铺" prop="storeId" v-if="this.isStores">
+          <el-select style="width: 240px" v-model="form.storeId" placeholder="请选择店铺" clearable size="small" >
+            <el-option
+              v-for="item in storeOptions"
+              :key="item.storeId"
+              :label="item.storeName"
+              :value="item.storeId"
+            />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="退货地址" prop="returnAddress">
+          <el-input v-model="form.returnAddress" type="textarea" :rows="1" placeholder="请输入退货地址" />
+        </el-form-item>
+        <el-form-item label="国药准字" v-if="form.productType==2" prop="prescribeCode">
+          <el-input v-model="form.prescribeCode" placeholder="请输入国药准字" />
+        </el-form-item>
+        <el-form-item label="规格" v-if="form.productType==2" prop="prescribeSpec">
+          <el-input v-model="form.prescribeSpec" placeholder="请输入规格" />
+        </el-form-item>
+        <el-form-item label="生产厂家" v-if="form.productType==2" prop="prescribeFactory">
+          <el-input v-model="form.prescribeFactory" placeholder="请输入生产厂家" />
+        </el-form-item>
+        <el-form-item label="处方名" v-if="form.productType==2" prop="prescribeName">
+          <el-input v-model="form.prescribeName" placeholder="请输入处方名" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+        <div class="el-upload__tip text-center" slot="tip">
+          <div class="el-upload__tip" slot="tip">
+            <!--     <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的数据 -->
+          </div>
+          <span>仅允许导入xls、xlsx格式文件。</span>
+          <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
+        </div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import {
+  genFormatAttr,
+  listStoreProduct,
+  getStoreProduct,
+  delStoreProduct,
+  copyStoreProduct,
+  addOrEdit,
+  exportStoreProduct,
+  importTemplate,
+  batchModify,bulkCopy
+} from "@/api/hisStore/storeProduct";
+import { getAllStoreProductCategory } from "@/api/hisStore/storeProductCategory";
+import { getAllStoreProductRule } from "@/api/hisStore/storeProductRule";
+import { getAllShippingTemplates } from "@/api/hisStore/shippingTemplates";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import Editor from '@/components/Editor/wangZm';
+import Material from '@/components/Material'
+import singleImg from '@/components/Material/single'
+import { getCompanyList } from "@/api/company/company";
+import { listStore } from '@/api/hisStore/store'
+export default {
+  name: "HisStoreProduct",
+  components: {
+    Treeselect,
+    Editor,
+    Material,
+    singleImg,
+  },
+  watch: {
+    imageArr: function(val) {
+      this.form.image = val.join(',')
+    },
+    photoArr: function(val) {
+      this.form.sliderImage = val.join(',')
+    },
+    drugImageArr: function(val) {
+      this.form.drugImage = val.join(',');
+    }
+  },
+  data() {
+    return {
+      isMedicalMall: this.$store.state.user.medicalMallConfig.medicalMall,
+      // isStores: this.$store.state.user.medicalMallConfig.stores,
+      isStores: true,
+      companyId: null,
+      storeId: null,
+      isAudit: null,
+      uploadUrl:process.env.VUE_APP_BASE_API+"/common/uploadOSS",
+      //videoAccept:"video/*",
+      upload: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/store/storeProduct/importData"
+      },
+      // 添加药品相关字段
+      isDrugOptions: [
+        { dictValue: "0", dictLabel: "否" },
+        { dictValue: "1", dictLabel: "是" }
+      ],
+      // 添加药品相关字段
+      domesticImportedOptions: [
+        { dictValue: "0", dictLabel: "国产" },
+        { dictValue: "1", dictLabel: "进口" }
+      ],
+
+      // 药品展示图
+      drugImageArr: [],
+
+      productTuiCateOptions:[],
+      showIput: false,
+      createBnt:true,
+      // 规格数据
+      formDynamic: {
+        attrsName: '',
+        attrsVal: ''
+      },
+      open1: false,
+      form1: {},
+      isBtn: false,
+      columns: [],
+      attrs:[],
+      templateList:[],
+      ruleList:[],
+      // 多规格表格data
+      manyFormValidate: [],
+      // 单规格表格data
+      oneFormValidate: [
+        {
+          image: '',
+          price: 0,
+          cost: 0,
+          agentPrice: 0,
+          otPrice: 0,
+          stock: 0,
+          barCode: '',
+          weight: 0,
+          volume: 0,
+          integral: 0
+        }
+      ],
+      photoArr:[],
+      imageArr:[],
+      activeName:"1",
+      productTypeOptions:[],
+      isDisplayOptions:[],
+      isGoodOptions:[],
+      isNewOptions:[],
+      isBestOptions:[],
+      isHotOptions:[],
+      isShowOptions:[],
+      categoryOptions:[],
+      // 企业列表
+      companyOptions:[],
+      storeOptions:[],
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: false,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      isFullscreen: false,
+      // 总条数
+      total: 0,
+      // 商品表格数据
+      storeProductList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        productName: null,
+        productType: null,
+        isShow: "1",
+        barCode:null,
+        companyIds: null,
+        storeIds: null,
+        drugRegCertNo: null,
+        commonName: null,
+        dosageForm: null,
+        unitPrice: null,
+        batchNumber: null,
+        mah: null,
+        mahAddress: null,
+        manufacturer: null,
+        manufacturerAddress: null,
+        indications: null,
+        dosage: null,
+        adverseReactions: null,
+        contraindications: null,
+        precautions: null
+      },
+      // 表单参数
+      form: {},
+      storeForm: {isAudit:1,status:1},
+      // 表单校验
+      rules: {
+        image: [
+          { required: true, message: "商品图片不能为空", trigger: "blur" }
+        ],
+        sliderImage: [
+          { required: true, message: "轮播图不能为空", trigger: "blur" }
+        ],
+        productName: [
+          { required: true, message: "商品名称不能为空", trigger: "blur" }
+        ],
+        // productInfo: [
+        //   { required: true, message: "商品简介不能为空", trigger: "blur" }
+        // ],
+        // unitName: [
+        //   { required: true, message: "单位名不能为空", trigger: "blur" }
+        // ],
+        // keyword: [
+        //   { required: true, message: "关键字不能为空", trigger: "blur" }
+        // ],
+        cateId: [
+          { required: true, message: "分类id不能为空", trigger: "blur" }
+        ],
+        price: [
+          { required: true, message: "商品价格不能为空", trigger: "blur" }
+        ],
+        prescribeCode: [
+          { required: true, message: "国药准字不能为空", trigger: "blur" }
+        ],
+        prescribeSpec: [
+          { required: true, message: "规格不能为空", trigger: "blur" }
+        ],
+        prescribeFactory: [
+          { required: true, message: "生产厂家不能为空", trigger: "blur" }
+        ],
+        prescribeName: [
+          { required: true, message: "处方药不能为空", trigger: "blur" }
+        ],
+        companyIds: [
+          { required: true, message: "销售公司不能为空", trigger: "blur" }
+        ],
+        // 药品相关字段校验(仅在是药品时必填)
+        drugImage: [
+          { required: true, message: "药品展示图不能为空", trigger: "blur" }
+        ],
+        drugRegCertNo: [
+          { required: true, message: "药品注册证书编号不能为空", trigger: "blur" }
+        ],
+        commonName: [
+          { required: true, message: "通用名称不能为空", trigger: "blur" }
+        ],
+        dosageForm: [
+          { required: true, message: "剂型不能为空", trigger: "blur" }
+        ],
+        unitPrice: [
+          { required: true, message: "单价不能为空", trigger: "blur" }
+        ],
+        batchNumber: [
+          { required: true, message: "批号不能为空", trigger: "blur" }
+        ],
+        mah: [
+          { required: true, message: "上市许可持有人不能为空", trigger: "blur" }
+        ],
+        mahAddress: [
+          { required: true, message: "上市许可持有人地址不能为空", trigger: "blur" }
+        ],
+        // manufacturer: [
+        //   { required: true, message: "生产企业不能为空", trigger: "blur" }
+        // ],
+        manufacturerAddress: [
+          { required: true, message: "生产企业地址不能为空", trigger: "blur" }
+        ],
+        indications: [
+          { required: true, message: "功能主治不能为空", trigger: "blur" }
+        ],
+        dosage: [
+          { required: true, message: "用法用量不能为空", trigger: "blur" }
+        ],
+        adverseReactions: [
+          { required: true, message: "不良反应不能为空", trigger: "blur" }
+        ],
+        contraindications: [
+          { required: true, message: "禁忌不能为空", trigger: "blur" }
+        ],
+        precautions: [
+          { required: true, message: "注意事项不能为空", trigger: "blur" }
+        ],
+        // storeId :[
+        //   { required: true, message: "所属店铺不能为空", trigger: "blur"}
+        // ],
+      }
+    };
+  },
+  created() {
+    this.getDicts("store_product_tui_cate").then((response) => {
+      this.productTuiCateOptions = response.data;
+    });
+    this.getDicts("store_product_enable").then((response) => {
+      this.isNewOptions = response.data;
+      this.isBestOptions = response.data;
+      this.isHotOptions = response.data;
+      this.isGoodOptions=response.data;
+      this.isDisplayOptions=response.data;
+    });
+    this.getDicts("store_product_type").then((response) => {
+      this.productTypeOptions = response.data;
+      if(!this.isMedicalMall &&
+      this.productTypeOptions.length === 4){
+        //删除后两项
+        this.productTypeOptions.splice(2,2);
+      }
+    });
+    this.getDicts("store_product_is_show").then((response) => {
+      this.isShowOptions = response.data;
+    });
+    getAllShippingTemplates().then(response => {
+      this.templateList =response.data;
+    });
+    getAllStoreProductRule().then(response => {
+      this.ruleList =response.data;
+    });
+    getCompanyList().then(response => {
+      this.companyOptions = response.data;
+    });
+    listStore(this.storeForm).then(response => {
+      this.storeOptions = response.rows;
+    });
+    this.getTreeselect();
+    this.getList();
+  },
+  methods: {
+    getStatusText(row) {
+      console.log()
+      if (row.isAudit == 0) {
+        return '待审核';
+      }
+      const option = this.isShowOptions.find(item => item.dictValue == row.isShow);
+      return option ? option.dictLabel : '未知状态';
+    },
+
+    getStatusType(row) {
+      console.log(row)
+      if (row.isAudit == 0) {
+        return 'warning';
+      }
+      // 根据你的业务逻辑返回不同的类型,如:success, danger, info等
+      return row.isShow == 1 ? 'success' : 'info';
+    },
+    cancel1(){
+      this.open1 = false;
+    },
+    submitForm1(){
+      let param = {}
+      param.productId = this.ids;
+      param.goodsStatus = this.form1.isShow;
+      param.goodsIsShow = this.form1.isDisplay;
+      param.companyIds = this.form1.companyId.join(',');
+      batchModify(param).then(res=>{
+        if(res.code === 200){
+          this.$message.success("批量修改成功");
+          this.getList();
+        }
+      }).finally(()=>{
+        this.open1 = false;
+        this.form1.isShow = null;
+        this.form1.isDisplay = null;
+        this.form1.companyId = null;
+      })
+    },
+    handleFullScreen(){
+      this.isFullscreen = !this.isFullscreen;
+    },
+    handleSuccess(response, file) {
+      // 上传成功后的回调函数
+      this.myloading.close();
+      //this.form.video = response.url;
+      this.$refs.upload.clearFiles();
+    },
+    beforeUpload(file) {
+      // 上传前的钩子函数,可以在这里对文件进行处理
+      // 返回 false 则取消上传
+
+      // 例如限制文件大小
+      const isLt2M = file.size / 1024 / 1024 < 200;
+      if (!isLt2M) {
+        this.$message.error('上传视频文件大小不能超过 200MB!');
+        return false;
+      }
+      this.myloading = this.$loading({
+        lock: true,
+        text: '上传中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
+      this.getList();
+    },
+    handleImport() {
+      this.upload.title = "商品导入";
+      this.upload.open = true;
+    },
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 删除表格中的属性
+    delAttrTable (index) {
+      this.manyFormValidate.splice(index, 1);
+    },
+    addBtn () {
+      this.clearAttr();
+      this.createBnt = false;
+      this.showIput = true;
+    },
+    //生成SKU
+    generate () {
+      var prodoct = this.form.productId?this.form.productId:0;
+      genFormatAttr(prodoct, { attrs: this.attrs }).then(res => {
+        if(this.form.specType === 0){
+          this.oneFormValidate = res.value;
+          this.form.header = res.header;
+          let header = res.header;
+          header.pop();
+          this.oneFormValidate.map((item) => {
+            if(this.imageArr.length>0){
+              item.image = this.imageArr[0]
+            }
+          });
+        }else if(this.form.specType === 1) {
+          this.manyFormValidate = res.value;
+          let headerdel = {
+            title: '操作',
+            slot: 'action',
+            fixed: 'right',
+            width: 220
+          };
+          res.header.push(headerdel);
+          this.form.header = res.header;
+          let header = res.header;
+          header.pop();
+          // this.manyFormValidate.map((item) => {
+          //   if(this.imageArr.length>0){
+          //     item.image = this.imageArr[0]
+          //   }
+          // });
+        }
+
+      }).catch(res => {
+      })
+    },
+    // 取消添加新规格
+    closeAttrName () {
+      this.showIput = false;
+      this.createBnt = true;
+    },
+    clearAttr () {
+      this.formDynamic.attrsName = '';
+      this.formDynamic.attrsVal = '';
+    },
+    // 删除规格
+    handleRemoveRole (index) {
+      this.attrs.splice(index, 1);
+      this.manyFormValidate.splice(index, 1);
+    },
+    // 删除属性
+    handleRemove2 (item, index) {
+      item.splice(index, 1);
+    },
+    // 添加规则名称
+    createAttrName () {
+      if (this.formDynamic.attrsName && this.formDynamic.attrsVal) {
+        let data = {
+          value: this.formDynamic.attrsName,
+          detail: [
+            this.formDynamic.attrsVal
+          ]
+        };
+        this.attrs.push(data);
+        var hash = {};
+        this.attrs = this.attrs.reduce(function (item, next) {
+          hash[next.value] ? '' : hash[next.value] = true && item.push(next);
+          return item
+        }, [])
+        this.clearAttr();
+        this.showIput = false;
+        this.createBnt = true;
+      } else {
+        this.$message.warning('请添加完整的规格!');
+      }
+    },
+    // 添加属性
+    createAttr (num, idx) {
+      if (num) {
+        this.attrs[idx].detail.push(num);
+        var hash = {};
+        this.attrs[idx].detail = this.attrs[idx].detail.reduce(function (item, next) {
+          hash[next] ? '' : hash[next] = true && item.push(next);
+          return item
+        }, [])
+      } else {
+        this.$message.warning('请添加属性!');
+      }
+    },
+    confirm () {
+      let that = this;
+      that.createBnt = true;
+      if (that.form.selectRule==null||that.form.selectRule.trim().length <= 0) {
+        return this.$message({
+          message:'请选择属性',
+          type: 'error'
+        });
+      }
+      that.ruleList.forEach(function (item, index) {
+        if (item.ruleName === that.form.selectRule) {
+          that.attrs =JSON.parse( item.ruleValue);
+
+        }
+      });
+
+    },
+    updateText(text){
+      this.form.description=text
+    },
+    handleClick(tab, event) {
+      this.queryParams.isShow=tab.name;
+      this.getList();
+    },
+    /** 转换商品分类数据结构 */
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.cateId,
+        label: node.cateName,
+        children: node.children
+      };
+    },
+    getTreeselect() {
+      getAllStoreProductCategory().then(response => {
+        this.categoryOptions = [];
+        const data = this.handleTree(response.data, "cateId", "pid");
+        this.categoryOptions=data;
+      });
+    },
+    /** 查询商品列表 */
+    getList() {
+      this.loading = true;
+      listStoreProduct(this.queryParams).then(response => {
+        this.storeProductList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        productId: null,
+        image: null,
+        video: null,
+        sliderImage: null,
+        productName: null,
+        productInfo: null,
+        keyword: null,
+        barCode: null,
+        cateId: null,
+        price: null,
+        vipPrice: null,
+        otPrice: null,
+        postage: null,
+        unitName: null,
+        sort: null,
+        sales: null,
+        stock: null,
+        isShow: "0",
+        isHot: "0",
+        isBenefit: "0",
+        isBest: "0",
+        isNew: "0",
+        description: null,
+        createTime: null,
+        updateTime: null,
+        isPostage: null,
+        foodProductionLicenseCode: null,
+        brand: null,
+        isDel: null,
+        giveIntegral: null,
+        cost: null,
+        isGood: "0",
+        browse: null,
+        codePath: null,
+        tempId: "",
+        specType: 0,
+        isIntegral: null,
+        integral: null,
+        productType: "1",
+        prescribeCode: null,
+        prescribeSpec: null,
+        prescribeFactory: null,
+        prescribeName: null,
+        isDisplay:"1",
+        companyIds:[],
+        returnAddress: "", // 退货地址
+        isDrug: "0", // 是否药品
+        originPlace: "", // 原产地
+        netContent: "", // 净含量
+        shelfLife: "", // 有效日期
+        domesticImported: "", // 国产或进口
+        drugImage: null, // 药品展示图
+        drugRegCertNo: null, // 药品注册证书编号
+        commonName: null, // 通用名称
+        dosageForm: null, // 剂型
+        unitPrice: null, // 单价
+        batchNumber: null, // 批号
+        mah: null, // 上市许可持有人
+        mahAddress: null, // 上市许可持有人地址
+        manufacturer: null, // 生产企业
+        manufacturerAddress: null, // 生产企业地址
+        indications: null, // 功能主治
+        dosage: null, // 用法用量
+        adverseReactions: null, // 不良反应
+        contraindications: null, // 禁忌
+        precautions: null // 注意事项
+      };
+      // 重置药品展示图
+      this.drugImageArr = [];
+      this.resetForm("form");
+      this.oneFormValidate = [
+        {
+          image: '',
+          price: 0,
+          agentPrice: 0,
+          cost: 0,
+          otPrice: 0,
+          stock: 0,
+          barCode: '',
+          weight: 0,
+          volume: 0,
+          integral: 0,
+          brokerage:0,
+          brokerageTwo:0
+        }
+      ]
+      this.attrs=[];
+      this.photoArr=[];
+      this.imageArr=[];
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.queryParams.companyIds = this.companyId +''
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.productId)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+
+      this.open = true;
+      this.title = "添加商品";
+      setTimeout(() => {
+        this.$refs.myeditor.setText("");
+      }, 500);
+
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      if(this.ids.length > 1){
+        this.title = "批量修改商品";
+        this.open1 = true;
+        return;
+      }
+      var that=this;
+      this.reset();
+      const productId = row.productId || this.ids
+      getStoreProduct(productId).then(response => {
+        this.form = response.data;
+        this.form.isShow = response.data.isShow.toString();
+        this.form.isHot = response.data.isHot.toString();
+        this.form.isGood = response.data.isGood.toString();
+        this.form.isBest = response.data.isBest.toString();
+        this.form.isNew = response.data.isNew.toString();
+        this.form.productType = response.data.productType.toString();
+        this.form.isDisplay = response.data.isDisplay.toString();
+        if(this.form.tuiCateId!=null){
+          this.form.tuiCateId = response.data.tuiCateId.toString();
+        }
+        // this.form.isDrug = response.data.isDrug ? response.data.isDrug.toString() : "1";
+        this.form.isDrug = response.data.isDrug === 0 ? "0" : (response.data.isDrug ? response.data.isDrug.toString() : "1");
+        if (this.form.drugImage != null) {
+          this.drugImageArr = this.form.drugImage.split(",");
+        }
+
+        //组装attrs数据
+        if(response.attrs!=null){
+          this.attrs=[];
+          response.attrs.forEach(function (item, index) {
+            var data={value:item.attrName,detail:item.attrValues.split(',')}
+            that.attrs.push(data);
+          });
+        }
+        // 组装companyIds
+        if (response.data.companyIds != null && response.data.companyIds != undefined && response.data.companyIds.length > 0) {
+          this.form.companyIds = response.data.companyIds.split(',').map(Number);
+        }
+        setTimeout(() => {
+          that.generate();
+        }, 200);
+        if(this.form.specType === 0){
+          that.manyFormValidate = [];
+        }else {
+          that.createBnt = true;
+          that.oneFormValidate = [
+            {
+              image: '',
+              price: 0,
+              agentPrice: 0,
+              cost: 0,
+              otPrice: 0,
+              stock: 0,
+              barCode: '',
+              weight: 0,
+              volume: 0,
+              integral: 0,
+              brokerage:0,
+              brokerageTwo:0
+            }
+          ]
+        }
+        setTimeout(() => {
+          if(this.form.description==null){
+            this.$refs.myeditor.setText("");
+          }
+          else{
+            this.$refs.myeditor.setText(this.form.description);
+          }
+        }, 200);
+        if(this.form.image!=null){
+          this.imageArr=this.form.image.split(",");
+        }
+        if(this.form.sliderImage!=null){
+          this.photoArr=this.form.sliderImage.split(",");
+        }
+        this.open = true;
+        this.title = "修改商品";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if(this.form.specType ===0 ){
+            this.form.items = [];
+            this.form.values = this.oneFormValidate;
+          }else{
+            this.form.items = this.attrs;
+            this.form.values = this.manyFormValidate;
+          }
+          if(this.form.specType === 1 && this.manyFormValidate.length===0){
+            return this.$message.warning('请点击生成规格!');
+          }
+          // 组装companyIds
+          if (this.form.companyIds != null && this.form.companyIds != undefined) {
+            this.form.companyIds = this.form.companyIds.join(',');
+          }
+          addOrEdit(this.form).then(response => {
+            if (response.code === 200) {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            }
+          }).catch(error => {
+            this.$message.error('请求失败: ' + error.message)
+          });
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const productIds = row.productId || this.ids;
+      this.$confirm('是否确认删除商品编号为"' + productIds + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return delStoreProduct(productIds);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      }).catch(function() {});
+    },
+    /** 复制按钮操作 */
+    handleCopy(row) {
+      const productIds = row.productId || this.ids;
+      this.$confirm('是否确认复制商品编号为"' + productIds + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return copyStoreProduct(productIds);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("复制成功");
+      }).catch(function() {});
+    },
+    /** 复制按钮操作 */
+    bulkCopy(row) {
+      const productIds = row.productId || this.ids;
+      this.$confirm('是否确认复制商品编号为"' + productIds + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return bulkCopy(productIds);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("复制成功");
+      }).catch(function() {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有商品数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function() {
+        return exportStoreProduct(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      }).catch(function() {});
+    }
+  }
+};
+</script>

+ 1 - 2
src/views/hisStore/storeProductPackage/index.vue

@@ -215,7 +215,7 @@
             </el-select>
         </el-form-item>
         <el-form-item label="所属公司" prop="companyId">
-          <el-select style="width: 240px" v-model="form.companyId" placeholder="请选择企业" clearable size="small" @change="handleCompanyChange">
+          <el-select style="width: 240px" v-model="form.companyId"  placeholder="请选择企业" clearable size="small" @change="handleCompanyChange">
             <el-option
               v-for="item in companyOptions"
               :key="item.companyId"
@@ -403,7 +403,6 @@ export default {
       },
       // 表单参数
       form: {
-        companyId: null
       },
        // 表单参数
       form1: {},

+ 41 - 9
src/views/live/liveOrder/index.vue

@@ -25,6 +25,25 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item label="订单号" prop="orderCode">
+        <el-input
+          v-model="queryParams.orderCode"
+          placeholder="请输入订单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+
+      <el-form-item label="收货人电话" prop="userPhone">
+        <el-input
+          v-model="queryParams.userPhone"
+          placeholder="请输入收货人电话"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
 
       <el-form-item label="商品规格" prop="productSpec">
         <el-input
@@ -100,11 +119,11 @@
       <el-form-item label="下单时间" prop="orderTimeRange">
         <el-date-picker
           v-model="orderTimeRange"
-          type="daterange"
+          type="datetimerange"
           range-separator="至"
           start-placeholder="开始日期"
           end-placeholder="结束日期"
-          value-format="yyyy-MM-dd"
+          value-format="yyyy-MM-dd HH:mm:ss"
           size="small"
           @change="handleOrderTimeChange"
         />
@@ -157,6 +176,7 @@
 
     <el-table border v-loading="loading" :data="liveOrderList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="订单号" align="center" prop="orderCode" />
       <el-table-column label="销售ID" align="center" prop="companyUserId" >
         <template slot-scope="scope">
           <span v-if="scope.row.companyUserId > 0" >{{ scope.row.companyUserId }}</span>
@@ -196,7 +216,9 @@
       <el-table-column label="商品规格" align="center" prop="productSpec" width="120" />
       <el-table-column label="商品数量" align="center" prop="totalNum" />
       <el-table-column label="销售价格" align="center" prop="totalPrice" />
-<!--      <el-table-column label="成本价格" align="center" prop="costPrice" />-->
+      <el-table-column label="成本价格" align="center" prop="costPrice" v-if="showFinanceTableField"/>
+      <el-table-column label="结算价格" align="center" prop="fprice"  v-if="showFinanceTableField"/>
+      <el-table-column label="成交价" align="center" prop="payMoney"/>
       <el-table-column label="收货地址" align="center" prop="userAddress" width="200" />
       <el-table-column label="对应供应商" align="center" prop="supplierName" width="120" />
       <el-table-column label="下单时间" align="center" prop="createTime" width="180">
@@ -295,6 +317,7 @@ import {treeselect} from "@/api/company/companyDept";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { getToken } from '@/utils/auth'
 import {parseTime} from "../../../utils/common";
+import { checkPermi } from "@/utils/permission";
 
 export default {
   name: "LiveOrder",
@@ -397,6 +420,7 @@ export default {
           { required: true, message: '发货小程序不能为空' }
         ],
       },
+      showFinanceTableField: false,
     };
   },
   created() {
@@ -407,20 +431,25 @@ export default {
         this.getTreeselect();
       }
     });
+    if (checkPermi(['live:liveOrder:finance'])) {
+      this.showFinanceTableField = true;
+    }
     this.queryParams.liveId = this.$route.query.liveId
     this.getList();
     this.getDicts("sys_live_order_status").then(response => {
       this.orderStatusOptions = response.data;
+      this.orderOptions = this.orderStatusOptions;
     });
-    this.getDicts("sys_order_status").then(response => {
-      this.orderOptions = response.data;
-    });
+    // this.getDicts("sys_order_status").then(response => {
+
+    // });
     this.getDicts("sys_user_level").then(response => {
       this.memberLevelOptions = response.data;
     });
     this.getDicts("sys_customer_status").then(response => {
       this.customerStatusOptions = response.data;
     });
+
   },
   computed: {
 
@@ -428,7 +457,10 @@ export default {
       return process.env.VUE_APP_BASE_API +
         '/live/liveOrder/importDeliveryNoteExpress?miniAppId=' +
         this.ruleForm.miniAppId;
-    }
+    },
+    userId() {
+      return this.$store.state.user.user.userId
+    },
   },
   methods: {
     // 提交发货单
@@ -479,8 +511,8 @@ export default {
     // 下单时间范围选择变化处理
     handleOrderTimeChange(value) {
       if (value && value.length === 2) {
-        this.queryParams.createTimeStart = value[0] + ' 00:00:00';
-        this.queryParams.createTimeEnd = value[1] + ' 23:59:59';
+        this.queryParams.createTimeStart = value[0];
+        this.queryParams.createTimeEnd = value[1];
       } else {
         this.queryParams.createTimeStart = null;
         this.queryParams.createTimeEnd = null;

+ 52 - 52
src/views/live/liveOrder/liveOrderDetails.vue

@@ -6,7 +6,7 @@
     <div class="contentx" v-if="item!=null">
       <div class="desct"></div>
       <div class="order-status" v-if="item!=null" >
-        <el-steps  :active="item.status==4?item.status:item.status" align-center finish-status="success">
+        <el-steps  :active="item.status==3?item.status+1:item.status" align-center>
           <el-step title="待支付"></el-step>
           <el-step title="待发货"></el-step>
           <el-step title="待收货"></el-step>
@@ -76,57 +76,57 @@
         </el-descriptions>
       </el-card>
     </div>
-    <div class="contentx" v-if="item!=null" style="padding-bottom: 70px;">
-      <div style="margin-top: 20px">
-        <div class="desct">
-          物流信息
-        </div>
-        &nbsp;
-        <el-link  type="primary" @click="editDelivery(null)">添加物流信息</el-link>
-      </div>
-      <el-table
-        border
-        :data="deliverList"
-        size="small"
-        style="width: 100%;margin-top: 20px" >
-        <el-table-column label="物流公司编码" width="150" align="center">
-          <template slot-scope="scope">
-            <p>{{scope.row.deliverSn}}</p>
-          </template>
-        </el-table-column>
-        <el-table-column label="物流公司名称" width="300" align="center">
-          <template slot-scope="scope">
-            <p>{{scope.row.deliverName}}</p>
-          </template>
-        </el-table-column>
-        <el-table-column label="物流单号" width="300" align="center">
-          <template slot-scope="scope">
-            <p>{{scope.row.deliverId}}</p>
-          </template>
-        </el-table-column>
-        <el-table-column label="物流状态" width="300" align="center">
-          <template slot-scope="scope">
-              <span>
-              <el-tag v-for="(item, index) in deliveryStatusOptions"    v-if="scope.row!=null&&scope.row.status==item.dictValue">
-              {{item.dictLabel}}
-              </el-tag>
-              </span>
-          </template>
-        </el-table-column>
-        <el-table-column label="发货时间" width="240" align="center">
-          <template slot-scope="scope">
-            {{scope.row.deliverySendTime}}
-          </template>
-        </el-table-column>
-        <el-table-column label="操作" width="240" align="center">
-          <template slot-scope="scope">
-            <el-link  type="primary" @click="showExpress(scope)">查看物流跟踪</el-link>
-            &nbsp;&nbsp;
-            <el-link  type="primary" @click="editDelivery(scope)">修改物流</el-link>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
+<!--    <div class="contentx" v-if="item!=null" style="padding-bottom: 70px;">-->
+<!--      <div style="margin-top: 20px">-->
+<!--        <div class="desct">-->
+<!--          物流信息-->
+<!--        </div>-->
+<!--        &nbsp;-->
+<!--        <el-link  type="primary" @click="editDelivery(null)">添加物流信息</el-link>-->
+<!--      </div>-->
+<!--      <el-table-->
+<!--        border-->
+<!--        :data="deliverList"-->
+<!--        size="small"-->
+<!--        style="width: 100%;margin-top: 20px" >-->
+<!--        <el-table-column label="物流公司编码" width="150" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <p>{{scope.row.deliverSn}}</p>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="物流公司名称" width="300" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <p>{{scope.row.deliverName}}</p>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="物流单号" width="300" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <p>{{scope.row.deliverId}}</p>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="物流状态" width="300" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--              <span>-->
+<!--              <el-tag v-for="(item, index) in deliveryStatusOptions"    v-if="scope.row!=null&&scope.row.status==item.dictValue">-->
+<!--              {{item.dictLabel}}-->
+<!--              </el-tag>-->
+<!--              </span>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="发货时间" width="240" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            {{scope.row.deliverySendTime}}-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--        <el-table-column label="操作" width="240" align="center">-->
+<!--          <template slot-scope="scope">-->
+<!--            <el-link  type="primary" @click="showExpress(scope)">查看物流跟踪</el-link>-->
+<!--            &nbsp;&nbsp;-->
+<!--            <el-link  type="primary" @click="editDelivery(scope)">修改物流</el-link>-->
+<!--          </template>-->
+<!--        </el-table-column>-->
+<!--      </el-table>-->
+<!--    </div>-->
     <div class="contentx" v-if="item!=null" style="padding-bottom: 70px;">
       <div class="desct">
         商品信息