cgp 5 روز پیش
والد
کامیت
72feb12a09

+ 756 - 0
src/views/qw/companyCustomer/CreateOrderDialog.vue

@@ -0,0 +1,756 @@
+<template>
+  <el-dialog
+    title="创建订单"
+    :visible.sync="dialogVisible"
+    width="1000px"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="handleClose"
+  >
+    <!-- 处方图片展示区域(与原制单完全一致) -->
+    <div
+      v-if="scrmPrescribeInfo"
+      style="
+        margin-bottom: 20px;
+        border-bottom: 1px solid #ebeef5;
+        padding-bottom: 15px;
+      "
+    >
+      <div style="font-weight: bold; margin-bottom: 10px">处方图片</div>
+      <div
+        :style="getImageLayoutStyle(scrmPrescribeInfo.prescribeType)"
+        style="
+          display: flex;
+          gap: 20px;
+          justify-content: flex-start;
+          flex-wrap: wrap;
+        "
+      >
+        <!-- 西药图片 -->
+        <div
+          v-if="shouldShowWesternImage(scrmPrescribeInfo.prescribeType)"
+          style="text-align: center; flex: 1"
+        >
+          <div style="margin-bottom: 5px">西药处方</div>
+          <el-image
+            v-if="scrmPrescribeInfo.prescribeImgStoreUrl"
+            :src="scrmPrescribeInfo.prescribeImgStoreUrl"
+            :preview-src-list="[scrmPrescribeInfo.prescribeImgStoreUrl]"
+            style="
+              width: 200px;
+              height: auto;
+              max-height: 200px;
+              object-fit: contain;
+              border: 1px solid #ddd;
+              border-radius: 4px;
+              cursor: pointer;
+            "
+            fit="contain"
+          />
+          <div v-else style="color: #909399">暂无西药处方图</div>
+        </div>
+        <!-- 中药图片 -->
+        <div
+          v-if="shouldShowChineseImage(scrmPrescribeInfo.prescribeType)"
+          style="text-align: center; flex: 1"
+        >
+          <div style="margin-bottom: 5px">中药处方</div>
+          <el-image
+            v-if="scrmPrescribeInfo.prescribeImgUrl"
+            :src="scrmPrescribeInfo.prescribeImgUrl"
+            :preview-src-list="[scrmPrescribeInfo.prescribeImgUrl]"
+            style="
+              width: 200px;
+              height: auto;
+              max-height: 200px;
+              object-fit: contain;
+              border: 1px solid #ddd;
+              border-radius: 4px;
+              cursor: pointer;
+            "
+            fit="contain"
+          />
+          <div v-else style="color: #909399">暂无中药处方图</div>
+        </div>
+      </div>
+    </div>
+
+    <el-form
+      ref="form"
+      :model="form"
+      :rules="rules"
+      label-width="120px"
+    >
+      <el-form-item label="收货人姓名" prop="realName" required>
+        <el-input v-model="form.realName" placeholder="请输入收货人姓名" />
+      </el-form-item>
+      <el-form-item label="收货人电话" prop="phone" required>
+        <el-input v-model="form.phone" placeholder="请输入收货人电话" />
+      </el-form-item>
+      <el-form-item label="收货地址">
+        <el-cascader
+          ref="citySelect"
+          v-model="kdnCityIds"
+          :options="kdnCitys"
+          @change="handleKdnCityChange"
+        />
+      </el-form-item>
+      <el-form-item label="详细地址" prop="detail" required>
+        <el-input v-model="form.detail" placeholder="请输入收货人详细地址" />
+      </el-form-item>
+      <el-form-item label="商品列表" prop="products">
+        <!-- 产品来源下拉 —— 与原制单完全一致 -->
+        <el-select
+          v-model="form.erpType"
+          placeholder="请选择ERP类型"
+          clearable
+          size="small"
+          filterable
+          @change="changeErp"
+        >
+          <el-option
+            v-for="dict in erpList"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+        <div style="float: right">
+          <el-button
+            plain
+            type="primary"
+            icon="el-icon-plus"
+            @click="handleAddProduct"
+          >添加商品</el-button>
+        </div>
+        <el-table
+          border
+          :key="tablekey"
+          width="100%"
+          style="margin-top: 5px"
+          :data="products"
+        >
+          <el-table-column label="商品编号" align="center" prop="barCode" />
+          <el-table-column label="商品图片" align="center" width="100">
+            <template slot-scope="scope">
+              <el-popover placement="right" title="" trigger="hover">
+                <img slot="reference" :src="scope.row.image" width="50" />
+                <img :src="scope.row.image" style="max-width: 50px" />
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="商品名称"
+            show-overflow-tooltip
+            align="center"
+            prop="productName"
+          />
+          <el-table-column label="商品规格" align="center" prop="sku" />
+          <el-table-column label="库存" align="center" prop="stock" />
+          <el-table-column label="单价" align="center" prop="price" />
+          <el-table-column
+            label="数量"
+            align="center"
+            prop="count"
+            width="200px"
+          >
+            <template slot-scope="scope">
+              <el-input-number
+                v-model="scope.row.count"
+                @change="handleProductCountChange(scope.row)"
+                size="mini"
+                :min="1"
+                :max="scope.row.stock"
+              />
+            </template>
+          </el-table-column>
+          <el-table-column label="小计" align="center" prop="money" />
+          <el-table-column label="操作" align="center" width="100px">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="removeProduct(scope.row)"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <el-row>
+          <el-col>
+            <span>商品合计:{{ products.length }}</span>
+            <span style="margin-left: 10px">商品总价:{{ totalMoney.toFixed(2) }}</span>
+          </el-col>
+        </el-row>
+      </el-form-item>
+
+      <el-form-item label="赠品列表">
+        <div style="float: right">
+          <el-button
+            plain
+            type="primary"
+            icon="el-icon-plus"
+            @click="handleAddGiftProduct"
+          >添加赠品</el-button>
+        </div>
+        <el-table
+          border
+          width="100%"
+          style="margin-top: 5px"
+          :data="giftProducts"
+        >
+          <el-table-column label="商品编号" align="center" prop="barCode" />
+          <el-table-column label="商品图片" align="center" width="100">
+            <template slot-scope="scope">
+              <el-popover placement="right" title="" trigger="hover">
+                <img slot="reference" :src="scope.row.image" width="50" />
+                <img :src="scope.row.image" style="max-width: 50px" />
+              </el-popover>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="商品名称"
+            show-overflow-tooltip
+            align="center"
+            prop="productName"
+          />
+          <el-table-column label="商品规格" align="center" prop="sku" />
+          <el-table-column label="库存" align="center" prop="stock" />
+          <el-table-column label="单价" align="center" prop="price" />
+          <el-table-column
+            label="数量"
+            align="center"
+            prop="count"
+            width="200px"
+          >
+            <template slot-scope="scope">
+              <el-input-number
+                v-model="scope.row.count"
+                @change="handleGiftProductCountChange(scope.row)"
+                size="mini"
+                :min="1"
+                :max="scope.row.stock"
+              />
+            </template>
+          </el-table-column>
+          <el-table-column label="小计" align="center" prop="money" />
+          <el-table-column label="操作" align="center" width="100px">
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                @click="removeGiftProduct(scope.row)"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-form-item>
+
+      <el-form-item label="支付方式" prop="payType" required>
+        <el-select
+          v-model="form.payType"
+          placeholder="请选择支付方式"
+          clearable
+          size="small"
+          @change="handlePayTypeChange"
+        >
+          <el-option
+            v-for="item in payTypeOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        v-if="form.payType != 5"
+        label="收款记录"
+        prop="receiveMoneyId"
+      >
+        <el-select
+          v-model="form.receiveMoneyId"
+          placeholder="请选择收款记录"
+          @change="handleReceiptChange"
+          clearable
+        >
+          <el-option
+            v-for="item in receiptList"
+            :key="item.id"
+            :label="getReceiptLabel(item)"
+            :value="item.id"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item
+        v-if="form.payType != 5"
+        label="抵扣金额"
+        prop="reduceAmount"
+      >
+        <el-input v-model="form.reduceAmount" disabled />
+      </el-form-item>
+      <el-form-item
+        v-if="form.payType == 5"
+        label="预付金额"
+        prop="prepaidAmount"
+      >
+        <el-input v-model="form.prepaidAmount" />
+      </el-form-item>
+    </el-form>
+
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="submitForm">确 定</el-button>
+      <el-button @click="dialogVisible = false">取 消</el-button>
+    </div>
+
+    <!-- 商品选择弹窗(完全复用原 product-select 组件) -->
+    <el-dialog
+      :title="product.title"
+      :visible.sync="product.open"
+      width="1000px"
+      append-to-body
+    >
+      <product-select ref="Details" @selectProduct="selectProduct" />
+    </el-dialog>
+
+    <!-- 赠品选择弹窗 -->
+    <el-dialog
+      :title="giftProduct.title"
+      :visible.sync="giftProduct.open"
+      width="1000px"
+      append-to-body
+    >
+      <product-select ref="GiftDetails" @selectProduct="selectGiftProduct" />
+    </el-dialog>
+  </el-dialog>
+</template>
+
+<script>
+import { getCustomer, getCanUsePayReceiptList, getScrmPrescribeInfo, updateScrmPrescriptionDocumentSuccess, addBuyTimes } from "@/api/qw/companyCustomer";
+import { createUserOrder } from "@/api/hisStore/storeOrder";
+import { getCitys as getKdnCitys } from "@/api/store/city";
+import { getDicts } from "@/api/system/dict/data";
+import productSelect from "../../hisStore/components/erpProductSelect"; // 请根据实际路径调整
+import { getAddress } from "@/api/qw/companyCustomer";
+
+export default {
+  name: "CreateOrderDialog",
+  components: { productSelect },
+  props: {
+    visible: {
+      type: Boolean,
+      default: false,
+    },
+    customerRow: {
+      type: Object,
+      default: null,
+    },
+  },
+  data() {
+    const validatePhone = (rule, value, callback) => {
+      if (!value) {
+        callback(new Error("电话号码不能为空"));
+        return;
+      }
+      const phone = String(value).trim();
+      if (phone.length !== 11) {
+        callback(new Error("电话号码必须为11个字符"));
+        return;
+      }
+      callback();
+    };
+    const validateAddress = (rule, value, callback) => {
+      if (!this.form.province || !this.form.city || !this.form.district) {
+        callback(new Error("请完整选择省/市/区"));
+      } else if (!this.form.detail) {
+        callback(new Error("请填写详细地址"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      dialogVisible: false,
+      // 表单数据
+      form: {
+        realName: "",
+        phone: "",
+        provinceId: null,
+        cityId: null,
+        districtId: null,
+        province: "",
+        city: "",
+        district: "",
+        detail: "",
+        erpType: "",      // ERP类型,与原制单一致
+        payType: "",
+        reduceAmount: 0,
+        receiveMoneyId: null,
+        prepaidAmount: null,
+        companyCustomerId: null,
+      },
+      rules: {
+        realName: [
+          { required: true, message: "收货人姓名不能为空", trigger: "blur" },
+        ],
+        phone: [
+          { required: true, message: "收货人电话不能为空", trigger: "blur" },
+          { validator: validatePhone, trigger: "blur" },
+        ],
+        detail: [
+          { required: true, message: "详细地址不能为空", trigger: "blur" },
+        ],
+        payType: [
+          { required: true, message: "请选择支付方式", trigger: "change" },
+        ],
+        address: [{ validator: validateAddress, trigger: "change" }],
+      },
+      // 与原制单完全相同的ERP列表
+      erpList: [
+        { dictLabel: "聚水潭", dictValue: "1" },
+        { dictLabel: "兔灵", dictValue: "2" },
+        { dictLabel: "京东云仓", dictValue: "3" },
+      ],
+      payTypeOptions: [],
+      receiptList: [],
+      kdnCitys: [],
+      kdnCityIds: null,
+      products: [],
+      giftProducts: [],
+      totalMoney: 0,
+      tablekey: false,
+      product: { open: false, title: "商品选择" },
+      giftProduct: { open: false, title: "赠品选择" },
+      scrmPrescribeInfo: null,
+      currentCustomerId: null,
+    };
+  },
+  watch: {
+    visible(val) {
+      this.dialogVisible = val;
+      if (val && this.customerRow) {
+        this.initDialog();
+      }
+    },
+    dialogVisible(val) {
+      if (!val) {
+        this.$emit('update:visible', false);
+      }
+    },
+  },
+  created() {
+    getDicts("sys_store_pay_type").then((response) => {
+      this.payTypeOptions = response.data || [];
+    });
+    getKdnCitys().then((res) => {
+      this.kdnCitys = res.data || [];
+    });
+  },
+  methods: {
+    initDialog() {
+      const row = this.customerRow;
+      if (!row) return;
+      this.currentCustomerId = row.id;
+      this.form.realName = row.customerName || '';
+      this.form.phone = row.phone || '';
+      this.form.companyCustomerId = row.id;
+      // 若row无电话,可调用接口获取(但一般已有)
+      if (!this.form.phone) {
+        getCustomer(row.id).then(res => {
+          if (res.data && res.data.phone) {
+            this.form.phone = res.data.phone;
+          }
+        });
+      }
+      if (row.address) {
+        this.sAddress(row);
+      }
+      this.fetchReceiptList();
+      getScrmPrescribeInfo(row.id).then((response) => {
+        if (response.code === 200 && response.data) {
+          this.scrmPrescribeInfo = response.data;
+        }
+      }).catch(() => {});
+      this.products = [];
+      this.giftProducts = [];
+      this.totalMoney = 0;
+      this.form.erpType = '';
+      this.form.payType = '';
+      this.form.reduceAmount = 0;
+      this.form.receiveMoneyId = null;
+      this.form.prepaidAmount = null;
+      this.kdnCityIds = null;
+      this.form.detail = '';
+    },
+
+    sAddress(row) {
+      getAddress(row.address).then((response) => {
+        const addressJson = response.data;
+        if (!addressJson || !addressJson.data || !addressJson.data.provinceName) {
+          this.$message.error("地址解析失败:未找到有效的省市区信息");
+          return;
+        }
+        this.form.province = addressJson.data.provinceName;
+        this.form.city = addressJson.data.cityName;
+        this.form.district = addressJson.data.expAreaName;
+        this.form.detail = (addressJson.data.streetName || '') + (addressJson.data.address || '');
+
+        const province = this.kdnCitys.find(o => o.label === addressJson.data.provinceName);
+        if (!province) {
+          this.$message.error(`未找到省份:${addressJson.data.provinceName}`);
+          return;
+        }
+        const city = province.children.find(o => o.label === addressJson.data.cityName);
+        if (!city) {
+          this.$message.error(`未找到城市:${addressJson.data.cityName}`);
+          return;
+        }
+        const district = city.children.find(o => o.label === addressJson.data.expAreaName);
+        if (!district) {
+          this.$message.error(`未找到区县:${addressJson.data.expAreaName}`);
+          return;
+        }
+        this.form.provinceId = province.value;
+        this.form.cityId = city.value;
+        this.form.districtId = district.value;
+        this.kdnCityIds = [province.value, city.value, district.value];
+      }).catch((error) => {
+        console.error("地址解析接口错误:", error);
+        this.$message.error(error?.msg || error?.message || "地址智能识别失败,请手动选择");
+      });
+    },
+
+    handleKdnCityChange(value) {
+      const nodes = this.$refs.citySelect.getCheckedNodes();
+      this.kdnCityIds = value.toString();
+      if (nodes && nodes.length > 0) {
+        const selectedNode = nodes[0];
+        if (selectedNode.pathValues && selectedNode.pathValues.length >= 3) {
+          this.form.provinceId = selectedNode.pathValues[0];
+          this.form.cityId = selectedNode.pathValues[1];
+          this.form.districtId = selectedNode.pathValues[2];
+        }
+        if (selectedNode.pathLabels && selectedNode.pathLabels.length >= 3) {
+          this.form.province = selectedNode.pathLabels[0];
+          this.form.city = selectedNode.pathLabels[1];
+          this.form.district = selectedNode.pathLabels[2];
+        }
+      }
+    },
+
+    fetchReceiptList() {
+      getCanUsePayReceiptList().then((res) => {
+        if (res.code === 200) {
+          this.receiptList = res.data || [];
+        } else {
+          this.receiptList = [];
+          this.$message.error(res.msg || "获取收款记录失败");
+        }
+      }).catch(() => {
+        this.receiptList = [];
+        this.$message.error("获取收款记录失败,请稍后重试");
+      });
+    },
+
+    getReceiptLabel(item) {
+      if (!item.saleTime) return `无时间 - ${item.totalFee}元`;
+      const date = new Date(item.saleTime);
+      if (isNaN(date.getTime())) return `无效时间 - ${item.totalFee}元`;
+      const year = date.getFullYear();
+      const month = String(date.getMonth() + 1).padStart(2, "0");
+      const day = String(date.getDate()).padStart(2, "0");
+      const hours = String(date.getHours()).padStart(2, "0");
+      const minutes = String(date.getMinutes()).padStart(2, "0");
+      const seconds = String(date.getSeconds()).padStart(2, "0");
+      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds} - ${item.totalFee}元`;
+    },
+
+    handleReceiptChange(selectedId) {
+      const selected = this.receiptList.find((item) => item.id === selectedId);
+      if (selected) {
+        this.form.reduceAmount = selected.totalFee;
+      } else {
+        this.form.reduceAmount = 0;
+      }
+    },
+
+    handlePayTypeChange(val) {
+      this.form.receiveMoneyId = null;
+      this.form.reduceAmount = null;
+      if (val != 5) {
+        this.form.prepaidAmount = null;
+      } else {
+        this.form.reduceAmount = null;
+      }
+    },
+
+    changeErp() {
+      this.products = [];
+      this.giftProducts = [];
+      this.totalMoney = 0;
+    },
+
+    handleAddProduct() {
+      if (!this.form.erpType) {
+        this.$message.warning("请先选择ERP类型");
+        return;
+      }
+      setTimeout(() => {
+        if (this.$refs.Details) {
+          this.$refs.Details.getDetails(this.form.erpType, 0);
+        }
+      }, 1);
+      this.product.open = true;
+    },
+
+    handleAddGiftProduct() {
+      if (!this.form.erpType) {
+        this.$message.warning("请先选择ERP类型");
+        return;
+      }
+      setTimeout(() => {
+        if (this.$refs.GiftDetails) {
+          this.$refs.GiftDetails.getDetails(this.form.erpType, 1);
+        }
+      }, 1);
+      this.giftProduct.open = true;
+    },
+
+    selectProduct(row) {
+      for (let i = 0; i < this.products.length; i++) {
+        if (this.products[i].id === row.id) return;
+      }
+      const newRow = { ...row, count: 1, money: row.price };
+      this.products.push(newRow);
+      this.$message.success("商品 " + row.productName + " 添加成功");
+      this.computeTotalMoney();
+    },
+
+    selectGiftProduct(row) {
+      for (let i = 0; i < this.giftProducts.length; i++) {
+        if (this.giftProducts[i].id === row.id) return;
+      }
+      const newRow = { ...row, count: 1, money: row.price };
+      this.giftProducts.push(newRow);
+      this.$message.success("赠品 " + row.productName + " 添加成功");
+    },
+
+    removeProduct(row) {
+      const index = this.products.findIndex((item) => item.id === row.id);
+      if (index !== -1) this.products.splice(index, 1);
+      this.computeTotalMoney();
+    },
+
+    removeGiftProduct(row) {
+      const index = this.giftProducts.findIndex((item) => item.id === row.id);
+      if (index !== -1) this.giftProducts.splice(index, 1);
+    },
+
+    handleProductCountChange(row) {
+      this.tablekey = !this.tablekey;
+      row.money = row.count * row.price;
+      this.computeTotalMoney();
+      this.$forceUpdate();
+    },
+
+    handleGiftProductCountChange(row) {
+      row.money = row.count * row.price;
+      this.$forceUpdate();
+    },
+
+    computeTotalMoney() {
+      this.totalMoney = 0;
+      this.products.forEach((item) => {
+        this.totalMoney += item.money || 0;
+      });
+    },
+
+    submitForm() {
+      this.$refs.form.validate((valid) => {
+        if (!this.form.province || !this.form.city || !this.form.district) {
+          this.$message.error("请完整选择省/市/区");
+          return;
+        }
+        if (this.products.length === 0) {
+          this.$message.error("请至少添加一个商品");
+          return;
+        }
+        if (valid) {
+          const params = {
+            ...this.form,
+            products: this.products,
+            giftProducts: this.giftProducts,
+            totalAmount: this.totalMoney,
+          };
+          createUserOrder(params)
+            .then((response) => {
+              if (response.code === 200) {
+                const order = response.order;
+                this.$message.success("订单创建成功");
+                this.dialogVisible = false;
+                this.$emit('success');
+                if (this.currentCustomerId) {
+                  addBuyTimes(this.currentCustomerId).catch(() => {});
+                  updateScrmPrescriptionDocumentSuccess(this.currentCustomerId).catch(() => {});
+                }
+              }
+            })
+            .catch((err) => {
+              this.$message.error(err.message || "创建订单失败");
+            });
+        }
+      });
+    },
+
+    handleClose() {
+      this.dialogVisible = false;
+      this.resetForm();
+    },
+
+    resetForm() {
+      this.form = {
+        realName: "",
+        phone: "",
+        provinceId: null,
+        cityId: null,
+        districtId: null,
+        province: "",
+        city: "",
+        district: "",
+        detail: "",
+        erpType: "",
+        payType: "",
+        reduceAmount: 0,
+        receiveMoneyId: null,
+        prepaidAmount: null,
+        companyCustomerId: null,
+      };
+      this.products = [];
+      this.giftProducts = [];
+      this.totalMoney = 0;
+      this.kdnCityIds = null;
+      this.scrmPrescribeInfo = null;
+      this.currentCustomerId = null;
+      this.$refs.form && this.$refs.form.clearValidate();
+    },
+
+    // 处方图片显示判断
+    shouldShowWesternImage(prescribeType) {
+      return prescribeType === 1 || prescribeType === 3;
+    },
+    shouldShowChineseImage(prescribeType) {
+      return prescribeType === 2 || prescribeType === 3;
+    },
+    getImageLayoutStyle(prescribeType) {
+      const showWestern = this.shouldShowWesternImage(prescribeType);
+      const showChinese = this.shouldShowChineseImage(prescribeType);
+      if ((showWestern && !showChinese) || (!showWestern && showChinese)) {
+        return {justifyContent: "flex-start"};
+      }
+      return {justifyContent: "space-between"};
+    },
+  },
+};
+</script>
+
+<style scoped>
+</style>

+ 23 - 3
src/views/qw/companyCustomer/index.vue

@@ -509,6 +509,14 @@
             @click="handleCreateOrder(scope.row)"
             >制单</el-button
           >
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-folder-add"
+            v-if="scope.row.myCustomerFlag && scope.row.processStatus == 9"
+            @click="handleCreateOrderNew(scope.row)"
+          >创建订单</el-button
+          >
           <el-button
             size="mini"
             type="text"
@@ -1558,7 +1566,12 @@
         <el-button type="primary" @click="submitTemplateForm">确 定</el-button>
       </div>
     </el-dialog>
-
+    <!-- "药食同源"的创建订单弹窗组件 -->
+    <create-order-dialog
+      :visible.sync="createOrderDialogVisible"
+      :customer-row="currentCreateOrderRow"
+      @success="getList"
+    />
     <!-- ========== 生成收集手机号二维码 - 素材列表弹窗 ========== -->
     <el-dialog
       title="选择分享素材"
@@ -1690,6 +1703,7 @@ import {
 import { treeselect } from "@/api/company/companyDept";
 import { parseTime } from "@/utils/common";
 import { getCitys } from "@/api/hisStore/city";
+import CreateOrderDialog from './CreateOrderDialog.vue';//"创建订单"组件
 import CollectionInfoDialog from "./CollectionInfoDialog.vue";
 import productSelect from "../../hisStore/components/erpProductSelect";
 import { createUserOrder } from "@/api/hisStore/storeOrder";
@@ -1709,7 +1723,7 @@ import { shareMaterialOptions } from "@/api/his/shareMaterial";
 
 export default {
   name: "Customer",
-  components: { CollectionInfoDialog, productSelect, ImageUpload },
+  components: { CollectionInfoDialog, productSelect, ImageUpload,CreateOrderDialog },
   data() {
     // 自定义校验:手机号
     const validatePhone = (rule, value, callback) => {
@@ -1778,6 +1792,8 @@ export default {
       }
     };
     return {
+      createOrderDialogVisible: false,   // 控制新弹窗显示
+      currentCreateOrderRow: null,       // 当前要创建订单的客户数据
       // 快捷认领弹窗
       isQuickClaimMode: false,
       deptOptions: [], // 树形部门数据
@@ -2080,7 +2096,11 @@ export default {
       });
   },
   methods: {
-
+    /** 打开"药食同源"的创建订单弹窗 */
+    handleCreateOrderNew(row) {
+      this.currentCreateOrderRow = row;
+      this.createOrderDialogVisible = true;
+    },
     downloadShareMaterialWxCodeImage(imageSrc, fileName) {
       const link = document.createElement('a');
       link.href = imageSrc;

+ 2 - 1
src/views/qw/sopLogs/sopLogsList.vue

@@ -184,6 +184,7 @@
                 <span v-if="item.contentType == 16">素材分享</span>
                 <span v-if="item.contentType == 17">手机授权</span>
                 <span v-if="item.contentType == 18">飞书看课</span>
+                <span v-if="item.contentType == 20">新飞书看课</span>
                 <span v-if="item.contentType == 19">文档2</span>
                 <span v-if="item.contentType == 21">发看课短信</span>
               </div>
@@ -202,7 +203,7 @@
                 fit="contain"
                 @click.prevent="openImageViewer(item.imgUrl)" />
             </div>
-            <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18 || item.contentType == 19" class="message-style">
+            <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18 || item.contentType == 19|| item.contentType == 20" class="message-style">
               <div
                 style="background-color: white; padding: 10px; width: 100%"
                 @click="openLink(item.linkUrl)">

+ 3 - 3
src/views/qw/sopTemp/updateSopTemp.vue

@@ -312,7 +312,7 @@
                                               <el-radio
                                                 :key="item.dictValue"
                                                 :label="item.dictValue"
-                                                :disabled="(content.type!=2 && (item.dictValue === '9' || item.dictValue == 18 || item.dictValue === '19')) || (content.isOfficial==1 && ['5','6','7','8','9'].includes(item.dictValue))"
+                                                :disabled="(content.type!=2 && (item.dictValue === '9' || item.dictValue == '18' || item.dictValue === '19'|| item.dictValue === '20')) || (content.isOfficial==1 && ['5','6','7','8','9'].includes(item.dictValue))"
                                                 v-for="item in sysQwSopAiContentType"
                                                 v-if="courseTypeList.includes(item.dictValue)">{{ item.dictLabel }}
                                               </el-radio>
@@ -350,7 +350,7 @@
                                                        v-model="setList.imgUrl"
                                                        type="image" :num="1" :width="150" :height="150"/>
 
-                                          <div v-if="setList.contentType == 3 || setList.contentType == 18 || setList.contentType == 19 || (setList.contentType == 9 && content.type==2 )">
+                                          <div v-if="setList.contentType == 3 || setList.contentType == 18 || setList.contentType == 19|| setList.contentType == 20 || (setList.contentType == 9 && content.type==2 )">
                                             <el-card class="box-card">
                                               <el-form-item label="链接标题:" label-width="100px" required>
                                                 <el-input :disabled="formType == 3 || (form.sendType == 11 && contentIndex != 0 && setIndex == 0)" v-model="setList.linkTitle"
@@ -846,7 +846,7 @@ export default {
       ruleList: [],
       ids: [],
       startTimeRange: [],
-      courseTypeList: ['1','2', '4','5','6', '7','8','9','10','18','19'],
+      courseTypeList: ['1','2', '4','5','6', '7','8','9','10','18','19','20'],
       sysFsSopWatchStatus: [],
       //消息内容类型 企微版
       sysQwSopContentType: [],

+ 9 - 9
src/views/qw/sopUserLogsInfo/sendMsgOpenTool.vue

@@ -63,7 +63,7 @@
                     <ImageUpload v-if="item.contentType == 2" v-model="item.imgUrl" type="image" :num="1" :width="150"
                       :height="150" />
 
-                    <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18 || item.contentType == 19">
+                    <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18 || item.contentType == 19|| item.contentType == 20">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:" label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;" />
@@ -531,7 +531,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && this.msgForm.courseId != null) {
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 || this.setting[i].contentType == 19) {
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20) {
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -557,7 +557,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的描述上值
           if (selectedVideo && this.msgForm.videoId != null) {
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19) {
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20) {
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
 
@@ -778,7 +778,7 @@ export default {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && this.msgForm.courseId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 || this.setting[i].contentType == 19) {
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20) {
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -800,7 +800,7 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo && this.msgForm.videoId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 || this.setting[i].contentType == 19) {
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20) {
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
             if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10) {
@@ -863,16 +863,16 @@ export default {
               if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
                 return this.$message.error("图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 || this.setting[i].contentType == 19) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
                 return this.$message.error("链接标题不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
                 return this.$message.error("链接描述不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
                 return this.$message.error("链接图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19) && this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20) && this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
                 return this.$message.error("链接地址不能为空")
               }
 

+ 9 - 9
src/views/qw/sopUserLogsInfo/sendMsgSopOpenTool.vue

@@ -88,7 +88,7 @@
 
                       <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1"  :width="150" :height="150" />
 
-                      <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18">
+                      <div v-if="item.contentType == 3 || item.contentType == 9 || item.contentType == 18|| item.contentType == 20">
                         <el-card class="box-card">
                           <el-form-item label="链接标题:"  label-width="100px">
                             <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -460,7 +460,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && this.msgForm.courseId != null) {
-            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ){
+            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18|| this.setting[i].contentType == 20 ){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -486,7 +486,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的描述上值
           if (selectedVideo && this.msgForm.videoId != null) {
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18|| this.setting[i].contentType == 20 ){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
 
@@ -707,7 +707,7 @@ export default {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse  && this.msgForm.courseId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18|| this.setting[i].contentType == 20){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -729,7 +729,7 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo  && this.msgForm.videoId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18|| this.setting[i].contentType == 20){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
             if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10){
@@ -792,16 +792,16 @@ export default {
               if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
                 return this.$message.error("图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18  ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18|| this.setting[i].contentType == 20  ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
                 return this.$message.error("链接标题不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18|| this.setting[i].contentType == 20 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
                 return this.$message.error("链接描述不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18|| this.setting[i].contentType == 20 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
                 return this.$message.error("链接图片不能为空")
               }
-              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
+              if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType == 18|| this.setting[i].contentType == 20 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
                 return this.$message.error("链接地址不能为空")
               }
 

+ 9 - 9
src/views/qw/sopUserLogsInfo/sopUserLogsInfoDetails.vue

@@ -309,7 +309,7 @@
 
                     <ImageUpload v-if="item.contentType == 2 " v-model="item.imgUrl" type="image" :num="1"  :width="150" :height="150" />
 
-                    <div v-if="item.contentType == 3 || item.contentType ==9 || item.contentType ==18 || item.contentType == 19">
+                    <div v-if="item.contentType == 3 || item.contentType ==9 || item.contentType ==18 || item.contentType == 19 || item.contentType == 20">
                       <el-card class="box-card">
                         <el-form-item label="链接标题:"  label-width="100px">
                           <el-input v-model="item.linkTitle" placeholder="请输入链接标题" style="width: 90%;"/>
@@ -1031,7 +1031,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && this.msgForm.courseId != null) {
-            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19){
+            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -1057,7 +1057,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的描述上值
           if (selectedVideo && this.msgForm.videoId != null) {
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType ==18 || this.setting[i].contentType == 19){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9 || this.setting[i].contentType ==18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
 
@@ -1272,7 +1272,7 @@ export default {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse  && this.msgForm.courseId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19 || this.setting[i].contentType == 20){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -1294,7 +1294,7 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo  && this.msgForm.videoId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19 || this.setting[i].contentType == 20){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
             if (this.setting[i].contentType == 4){
@@ -1443,16 +1443,16 @@ export default {
             if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
               return this.$message.error("图片不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
               return this.$message.error("链接标题不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19 || this.setting[i].contentType == 20) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
               return this.$message.error("链接描述不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
               return this.$message.error("链接图片不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19)&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 || this.setting[i].contentType == 19|| this.setting[i].contentType == 20)&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
               return this.$message.error("链接地址不能为空")
             }
 

+ 8 - 8
src/views/qw/sopUserLogsInfo/sopUserLogsInfoDetailsOld.vue

@@ -795,7 +795,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse && this.msgForm.courseId != null) {
-            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 ){
+            if ( this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18|| this.setting[i].contentType == 20 ){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -821,7 +821,7 @@ export default {
         for (let i = 0; i < this.setting.length; i++) {
           //响应式直接给链接的描述上值
           if (selectedVideo && this.msgForm.videoId != null) {
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 ){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18|| this.setting[i].contentType == 20 ){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
 
@@ -1036,7 +1036,7 @@ export default {
           //响应式直接给链接的标题/封面上值
           if (selectedCourse  && this.msgForm.courseId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18|| this.setting[i].contentType == 20){
               this.$set(this.setting[i], 'linkTitle', selectedCourse.dictLabel);
               this.$set(this.setting[i], 'linkImageUrl', selectedCourse.dictImgUrl);
             }
@@ -1058,7 +1058,7 @@ export default {
           //响应式直接给链接的描述上值
           if (selectedVideo  && this.msgForm.videoId != null) {
 
-            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18){
+            if (this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18|| this.setting[i].contentType == 20){
               this.$set(this.setting[i], 'linkDescribe', selectedVideo.dictLabel);
             }
             if (this.setting[i].contentType == 4 || this.setting[i].contentType == 10){
@@ -1221,16 +1221,16 @@ export default {
             if (this.setting[i].contentType == 2 && (this.setting[i].imgUrl == null || this.setting[i].imgUrl == "")) {
               return this.$message.error("图片不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18  ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18|| this.setting[i].contentType == 20  ) && (this.setting[i].linkTitle == null || this.setting[i].linkTitle == "")) {
               return this.$message.error("链接标题不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18|| this.setting[i].contentType == 20 ) && (this.setting[i].linkDescribe == null || this.setting[i].linkDescribe == "")) {
               return this.$message.error("链接描述不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18|| this.setting[i].contentType == 20 ) && (this.setting[i].linkImageUrl == null || this.setting[i].linkImageUrl == "")) {
               return this.$message.error("链接图片不能为空")
             }
-            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
+            if ((this.setting[i].contentType == 3 || this.setting[i].contentType == 9|| this.setting[i].contentType == 18|| this.setting[i].contentType == 20 )&& this.setting[i].type == 1 && (this.setting[i].linkUrl == null || this.setting[i].linkUrl == "")) {
               return this.$message.error("链接地址不能为空")
             }