ソースを参照

Merge branch 'sit'

xiaodai2022 2 年 前
コミット
d72281b6d5

ファイルの差分が大きいため隠しています
+ 0 - 0
dist/index.html


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/chunk-40deb130.0cb17a33.css


BIN
dist/static/css/chunk-40deb130.0cb17a33.css.gz


BIN
dist/static/css/chunk-8f4534d2.462a2d92.css.gz


BIN
dist/static/js/app.c6fe643a.js.gz


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.dacd4b7c.js


BIN
dist/static/js/app.dacd4b7c.js.gz


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-40deb130.f53e3122.js


BIN
dist/static/js/chunk-40deb130.f53e3122.js.gz


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/chunk-8f4534d2.04e6ed2a.js


BIN
dist/static/js/chunk-8f4534d2.04e6ed2a.js.gz


+ 36 - 0
src/apis/service/youzan/othOrder/detail.js

@@ -0,0 +1,36 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "salecreate", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "saledelect", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "saleinfo", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "saleedit", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + "salestatus", data, "post", params),
+  // 获取仓库商品列表
+  getGoodStock: (data, params) => http(api + "checkflist", data, "post", params),
+  // 采购反馈物流费用
+  salefee: (data, params) => http(api + "salefee", data, "post", params),
+  // 新建发货申请单
+  saleout: (data, params) => http(api + "saleoutadd", data, "post", params),
+  //延时发货追加地址
+  saleaddr: (data, params) => http(api + "saleaddr", data, "post", params),
+
+
+
+  // 新建入库单详情
+  orderininfo: (data, params) => http(api + "orderininfo", data, "post", params),
+  // 异常原因列表
+  resultlist: (data, params) => http(api + "resultlist", data, "post", params),
+  // 入库单验货
+  orderincheck: (data, params) => http(api + "orderincheck", data, "post", params),
+  // 入库单退货换货
+  orderinreturn: (data, params) => http(api + "orderinreturn", data, "post", params),
+  // 发货单状态修改
+  orderinstatus: (data, params) => http(api + "orderinstatus", data, "post", params),
+};

+ 33 - 0
src/apis/service/youzan/othOrder/index.js

@@ -0,0 +1,33 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 添加
+  add: (data, params) => http(api + "salecreate", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "delete", data, "post", params),
+  // 分页查询
+  list: (data, params) => http(api + "salelist", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "detail", data, "post", params),
+  // 更新
+  update: (data, params) => http(api + "update", data, "post", params),
+  // 修改状态
+  status: (data, params) => http(api + "accountstatus", data, "post", params),
+  //验证售价
+  salegetprice: (data, params) => http(api + "salegetprice", data, "post", params),
+  // 线上商品详情
+  goods_detail: (data, params) => http(api + "goodinfo", data, "post", params),
+  // 线上商品获取活动
+  goods_active: (data, params) => http(api + "actquery", data, "post", params),
+  //订单用途绑定
+  saleuse: (data, params) => http(api + "saleuse", data, "post", params),
+  //订单用途列表
+  uselist: (data, params) => http(api + "uselist", data, "post", params),
+  //添加其他业管、PO、承诺回款时间
+  saleaddother: (data, params) => http(api + "saleaddother", data, "post", params),
+  //延时发货追加地址
+  saleaddr: (data, params) => http(api + "saleaddr", data, "post", params),
+  // 区编码获取省市区汉字
+  addrall: (data, params) => http(api + "addrall", data, "post", params),
+};

+ 51 - 0
src/apis/service/youzan/othgoodsOnline/index.js

@@ -0,0 +1,51 @@
+// 物业管理员
+import http from "@/apis/axios";
+const api = "admin/";
+export default {
+  // 分页查询
+  list: (data, params) => http(api + "goodlist", data, "post", params),
+  // 添加
+  add: (data, params) => http(api + "gooduponline", data, "post", params),
+  // 详情
+  detail: (data, params) => http(api + "goodinfo", data, "post", params),
+  // 产品部门审核
+  goodupexam: (data, params) => http(api + "goodupexam", data, "post", params),
+  // 更新状态
+  status: (data, params) => http(api + "goodupexam", data, "post", params),
+
+  // 定价岗定价
+  ladderOne: (data, params) => http(api + "goodupeditladder", data, "post", params),
+  // 删除
+  delete: (data, params) => http(api + "gooddel", data, "post", params),
+  // 重新发起审核流程
+  againonline: (data, params) => http(api + "againonline", data, "post", params),
+  // 获取系统售价
+  goodupprice: (data, params) => http(api + "goodupprice", data, "post", params),
+
+  // 复制
+  copy: (data, params) => http(api + "goodcopy", data, "post", params),
+  // 获取全部分类
+  catAll: (data, params) => http(api + "catAll", data, "post", params),
+  // 获取全部品牌
+  brandAll: (data, params) => http(api + "brandall", data, "post", params),
+  // 获取全部供应商账号
+  supplierAll: (data, params) => http(api + "supplierall", data, "post", params),
+  // 商品种类ID换取规格值
+  specByCat: (data, params) => http(api + "SpecByCat", data, "post", params),
+  // 规格属性值新建
+  specinfoadd: (data, params) => http(api + "specinfoadd", data, "post", params),
+
+  //导出线上商品
+  exportgood: (data, params) => http(api + "exportgood", data, "post", params),
+
+
+  //商品上线审核时、驳回重新审核
+
+  goodupreject: (data, params) => http(api + "goodupreject", data, "post", params),
+  // 异常原因列表
+  resultlist: (data, params) => http(api + "resultlist", data, "post", params),
+
+ 
+
+
+};

+ 0 - 1
src/views/goodStore/goodsOnline/components/handle-online-form.vue

@@ -205,7 +205,6 @@ export default {
       this.ruleForm.numStatus = numStatus;
       await this.$refs.ruleForm.validate(async (valid) => {
         if (valid) {
-          return;
           let model = JSON.parse(JSON.stringify(this.ruleForm));
           // 刷新
           this.$emit("resSuccess", model);

+ 347 - 0
src/views/youzan/othOrder/columns.js

@@ -0,0 +1,347 @@
+const columns= [
+  { type: "selection", fixed: "left", _noset_: true },
+  {
+    prop: "orderCode",
+    label: "订单编号",
+    width: "155px",
+  },
+
+
+  // {
+  //   prop: "good_code",
+  //   label: "商品编码",
+  //   width:"128"
+  // },
+  {
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+    width: "150"
+  },
+  {
+    prop: "good_class",
+    label: "商品分类",
+    width: "120"
+
+  },
+
+  {
+    prop: "good_num",
+    label: "商品数量",
+  },
+  {
+    prop: "sale_price",
+    label: "销售单价",
+  },
+  {
+    prop: "total_price",
+    label: "总价",
+  },
+
+
+
+
+  {
+    prop: "status",
+    label: "订单状态",
+    _slot_: "status",
+    width: "120px",
+  },
+  
+  {
+    prop: "order_source",
+    label: "订单来源",
+    _slot_: "order_source",
+    width: "90px",
+  },
+  {
+    prop: "order_type",
+    label: "商品来源",
+    _slot_: "order_type",
+    width: "90px",
+  },
+  {
+    prop: "useage",
+    label: "订单用途",
+    width: "100px",
+  },
+
+  {
+    prop: "customer_code",
+    label: "客户公司编码",
+    width: "155px",
+  },
+  {
+    prop: "customerName",
+    label: "企业客户名称",
+    width: "125px",
+  },
+  {
+    prop: "supplierName",
+    label: "销售方公司",
+    width: "125px",
+  },
+  {
+    prop: "company_name",
+    label: "创建人部门",
+    minWidth: "100px",
+  },
+
+  {
+    prop: "apply_name",
+    label: "创建人",
+    width: "60px",
+  },
+
+  {
+    prop: "addtime",
+    label: "创建时间",
+    width: "145px",
+  },
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    width: "50px",
+    _slot_: "operation",
+  },
+]
+
+
+const addColumns = [
+  {
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+    span: 24,
+  },
+  // {
+  //   prop: "good_info_img",
+  //   _slot_: "good_info_img",
+  //   label: "详情图",
+  //   span: 24,
+  // },
+  {
+    prop: "cat",
+    label: "分类",
+    _slot_: "cat",
+    span: 24,
+  },
+
+  {
+    prop: "is_stock",
+    label: "是否库存品",
+    _slot_: "is_stock",
+    span: 8,
+  },
+
+  {
+    prop: "unit",
+    label: "单位",
+    span: 8,
+  },
+  {
+    prop: "tax",
+    label: "税点",
+    append: '%',
+    span: 8,
+  },
+
+  {
+    prop: "exclusive",
+    label: "专属类型",
+    _slot_: "exclusive",
+    span: 12,
+  },
+  {
+    prop: "brand_name",
+    label: "品牌",
+    span: 12,
+  },
+  {
+    prop: "weight",
+    label: "商品总克重",
+    _slot_: "weight",
+    span: 24,
+  },
+  {
+    prop: "lead_time",
+    label: "工期",
+    span: 8,
+  },
+  {
+    prop: "delivery_day",
+    label: "物流",
+    span: 8,
+  },
+  {
+    prop: "purchase",
+    label: "采购人员",
+    span: 8,
+  },
+  {
+    prop: "delivery_place_cn",
+    label: "发货地",
+    span: 24,
+  },
+  {
+    prop: "after_sales",
+    label: "售后说明",
+    span: 24,
+  },
+]
+const showColumns = [
+  {
+    prop: "orderCode",
+    label: "订单编号",
+    span: 6,
+  },
+  {
+    prop: "status",
+    label: "订单状态",
+    _slot_: "status",
+    span: 6,
+  },
+  {
+    prop: "order_source",
+    label: "订单来源",
+    _slot_: "order_source",
+    span: 4,
+  },
+  {
+    prop: "order_type",
+    label: "商品来源",
+    _slot_: "order_type",
+    span: 4,
+  }, {
+    prop: "apply_name",
+    label: "创建人",
+    span: 4,
+  },
+
+  {
+    prop: "supplierName",
+    label: "销售方公司",
+    _slot_: "supplierName",
+    span: 12,
+  },
+  {
+    prop: "companyName",
+    label: "购买方公司",
+    _slot_: "companyName",
+    span: 12,
+  },
+
+
+  {
+    prop: "platform_name",
+    label: "所属平台",
+    span: 6,
+  },
+
+  {
+    prop: "arrive_time",
+    label: "要求到货时间",
+    span: 6,
+  },
+  {
+    prop: "paytime",
+    label: "承诺付款时间",
+    span: 6,
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+    span: 6,
+  },
+  {
+    prop: "good_num",
+    label: "购买数量",
+    span: 4,
+  },
+  {
+    prop: "send_num",
+    label: "已发数量",
+    span: 4,
+  },
+  {
+    prop: "wsend_num",
+    label: "未发数量",
+    span: 4,
+  },
+  {
+    prop: "th_num",
+    label: "退货数量",
+    span: 4,
+  },
+
+  {
+    prop: "proof_id",
+    label: "凭证文件",
+    _slot_: "proof_id",
+    span: 8,
+  },
+
+
+  {
+    prop: "sale_price",
+    label: "售价",
+    append: '元',
+    span: 6,
+  },
+  {
+    prop: "total_price",
+    label: "总金额",
+    append: '元',
+    span: 6,
+  },
+
+
+  {
+    prop: "post_fee",
+    label: "物流费用",
+    append: '元',
+    span: 6,
+  },
+  {
+    prop: "send_type",
+    label: "发货类型",
+    _slot_: "send_type",
+    span: 6,
+  },
+
+  {
+    prop: "is_active",
+    label: "活动类型",
+    _slot_: "is_active",
+    span: 12,
+  },
+  {
+    prop: "useage",
+    label: "订单用途",
+    span: 12,
+  },
+
+  {
+    prop: "remark",
+    label: "备注",
+    span: 24,
+  },
+
+  {
+    prop: "platform_order",
+    label: "平台订单号",
+    span: 24,
+  },
+  {
+    prop: "workNo",
+    label: "其他单号",
+    span: 24,
+  },
+]
+
+export{
+  columns,
+  addColumns,showColumns
+}

+ 374 - 0
src/views/youzan/othOrder/detail.vue

@@ -0,0 +1,374 @@
+<template>
+  <div class="othOrderDetail pagePadding">
+    <div
+      style="width: 100%"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+    >
+      <div style="height: 30px" v-if="queryType !== 'add'">
+        <span>订单编号:</span><span v-if="sitem">{{ sitem.orderCode }}</span>
+        <el-button
+          style="margin: 0 0 0 10px"
+          class="fr"
+          type="primary"
+          :size="'mini'"
+          @click="setShowModel = true"
+          >设置部分字段
+        </el-button>
+      </div>
+      <el-tabs v-model="activeTabs">
+        <el-tab-pane label="业务详情" name="1" v-if="queryType !== 'add'">
+          <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
+            <el-collapse-item title="销售订单信息" name="-1">
+              <show-data-table
+                style="margin: 0; padding: 0"
+                :sitem="sitem"
+                v-if="status"
+                :columns="showColumns"
+              >
+                <template slot="status">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (
+                        statusOptions.find(
+                          (item) => item.value == sitem.status
+                        ) || {}
+                      ).label || '--'
+                    "
+                  ></el-tag>
+                </template>
+                <template slot="order_type">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (
+                        xs_order_type_options.find(
+                          (item) => item.id == sitem.order_type
+                        ) || {}
+                      ).label || '--'
+                    "
+                  ></el-tag>
+                </template>
+                <template slot="order_source">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (
+                        xs_order_source_options.find(
+                          (item) => item.id == sitem.order_source
+                        ) || {}
+                      ).label || '--'
+                    "
+                  ></el-tag>
+                </template>
+
+                
+
+                <template slot="supplierName">
+                  <span>{{ sitem.supplierName }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>销售方公司编号:</span
+                        ><span>{{ sitem.supplierNo }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="companyName">
+                  <span>{{ sitem.companyName }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>购买方公司编号:</span
+                        ><span>{{ sitem.companyNo }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="is_active">
+                  <span
+                    v-if="sitem.order_type === '1' || sitem.order_type === '2'"
+                    ><span
+                      >{{
+                        sitem.is_activity === "1" ? "参与活动" : "不参与活动"
+                      }}/{{
+                        (
+                          goodtype_options.find(
+                            (item) => item.value == sitem.good_type
+                          ) || {}
+                        ).label || "--"
+                      }}</span
+                    ></span
+                  >
+                  <span v-else>--</span>
+                </template>
+                <template slot="proof_id">
+                  <el-popover
+                    placement="top"
+                    width="300"
+                    trigger="hover"
+                    v-if="sitem.proof_type === '1'"
+                  >
+                    <video width="275" controls class="fl">
+                      <source :src="sitem.proof_url" type="video/mp4" />
+                      <source :src="sitem.proof_url" type="video/avi" />
+                      您的浏览器不支持Video标签。
+                    </video>
+                    <i
+                      class="el-icon-video-camera-solid hover"
+                      style="font-size: 18px"
+                      slot="reference"
+                    ></i>
+                  </el-popover>
+
+                  <img
+                    v-else-if="sitem.proof_type === '2'"
+                    style="width: 28px; height: 28px"
+                    :src="sitem.proof_url"
+                    class="avatar fl hover"
+                    v-viewer
+                  />
+
+                  <a
+                    v-else-if="sitem.proof_type === '3'"
+                    :href="sitem.proof_url"
+                    download="凭证文件"
+                    >点击下载</a
+                  >
+                  <span v-else>暂无凭证</span>
+                </template>
+                <template slot="send_type">
+                  <el-tag :size="'mini'">{{
+                    sitem.send_type === "1"
+                      ? "直接发货"
+                      : sitem.send_type === "2"
+                      ? "延迟发货"
+                      : "--"
+                  }}</el-tag>
+                </template>
+              </show-data-table>
+            </el-collapse-item>
+            <!-- <el-collapse-item title="商品信息" name="2">
+              <show-goods-data-table
+                :newTime="newTime"
+                v-if="newTime !== ''"
+                :type="sitem.order_type"
+                :skucode="sitem.skuCode"
+                :spucode="sitem.good_code"
+              />
+            </el-collapse-item>
+            <el-collapse-item title="发货申请" name="3">
+              <order-out-table
+                :newTime="newTime"
+                v-if="newTime !== ''"
+                :sitem="sitem"
+                :id="queryId"
+                @refresh="initData()"
+              />
+            </el-collapse-item> -->
+          </el-collapse>
+        </el-tab-pane>
+        <el-tab-pane label="审批记录" name="2" v-if="queryType !== 'add'">
+          <process-time-line
+            v-if="newTime !== ''"
+            :newTime="newTime"
+            :type="'XSQRD'"
+            :orderCode="queryId"
+          />
+        </el-tab-pane>
+      </el-tabs>
+
+      <!-- <edit-add
+        :id="modelId"
+        :sitem="sitem"
+        :show-model="showModell"
+        :is-detail="isDetail"
+        @refresh="searchList"
+        @cancel="showModel = false"
+      /> -->
+      <set-partial
+        :sitem="sitem"
+        :show-model="setShowModel"
+        @refresh="initData"
+        @cancel="setShowModel = false"
+      />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+   <script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/youzan/othOrder/detail";
+// import orderOutTable from "./components/order-out-table";
+
+import { showColumns } from "./columns";
+// import setPartial from "./setPartial";
+import {  xs_order_source_options,xs_order_type_options } from "@/assets/js/statusList";
+export default {
+  name: "othOrderDetail",
+  mixins: [mixinPage, resToken],
+  components: {
+    // orderOutTable,
+    // setPartial,
+  },
+  computed: {
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "othOrderDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      finishStatus: "finish",
+      activeTabs: "1",
+      activeNames: ["-1", "0", "1", "2", "3", "4", "5", "6"],
+      showColumns: showColumns,
+      setShowModel: false,
+      goodtype_options: [
+        {
+          value: "1",
+          label: "常规商品",
+        },
+        {
+          value: "2",
+          label: "赠品",
+        },
+        {
+          value: "3",
+          label: "样品",
+        },
+      ],
+      xs_order_type_options,
+       xs_order_source_options,
+      statusOptions: [
+        { value: "0", label: "待发货" },
+        { value: "1", label: "待发货完成" },
+        { value: "2", label: "发货已完成" },
+        { value: "3", label: "订单已取消" },
+      ],
+      sitem: null,
+
+      orderCode: "",
+      status: "",
+      newTime: "",
+      loading: false,
+      queryId: "",
+      queryType: "",
+    };
+  },
+  mounted() {
+    this.status = "";
+    const { id, type } = this.$route.query;
+    this.queryId = id;
+    this.queryType = type;
+    this.activeTabs = type === "add" ? "0" : "1";
+    this.loading = true;
+    if (this.queryType === "add") {
+      this.sitem = {};
+      this.getNewTime();
+    } else {
+      this.initData();
+    }
+    this.loading = false;
+  },
+  methods: {
+    async statusConfirm(status, message) {
+      await this.$confirm(`确定要${message}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          if (status === "-1") {
+            await this.deleteById(message);
+          } else {
+            await this.setStatus(status, message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    getNewTime() {
+      this.newTime = new Date().valueOf() + "";
+    },
+
+    async deleteById(message) {
+      const res = await asyncRequest.delete({ id: this.queryId });
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+
+        this.routeGoto("check", {});
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+
+    async setStatus(status, message, remark) {
+      let model = {
+        id: this.queryId,
+        remark: remark || "",
+        status: status,
+      };
+      const res = await asyncRequest.status(model);
+      this.loading = false;
+      if (res && res.code === 0) {
+        this.$notify.success({
+          title: message + "成功!",
+          message: "",
+        });
+        this.initData();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+    async examForm(e) {
+      if (!this.loading) {
+        let type = e.state === "1" ? "2" : "0";
+        await this.setStatus(type, "提交入库方审核", e.remark);
+      }
+    },
+    async initData() {
+      this.loading = true;
+      const res = await asyncRequest.detail({ id: this.queryId });
+      if (res && res.code === 0 && res.data) {
+        this.sitem = res.data;
+        this.status = this.sitem.status;
+        this.orderCode = this.sitem.orderCode;
+        this.getNewTime();
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+      this.loading = false;
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.othOrderDetail {
+}
+</style>
+   
+   

+ 519 - 0
src/views/youzan/othOrder/index.vue

@@ -0,0 +1,519 @@
+<template>
+  <div class="othOrder pagePadding">
+    <div v-if="powers && powers.length > 0 && powers.some((item) => item == '001')">
+      <ex-table
+        v-loading="loading"
+        :table="table"
+        :data="tableData"
+        :columns="columns"
+        :page="pageInfo"
+        :size="size"
+        @page-curr-change="handlePageChange"
+        @page-size-change="handleSizeChange"
+        @screen-reset="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+        @screen-submit="
+          pageInfo.curr = 1;
+          parmValue.page = 1;
+          searchList();
+        "
+      >
+        <template #table-header="{ selection }">
+          <div style="width: 100%">
+            <el-row style="padding: 0 0 0 80px">
+              <el-col :span="6" style="width: 293px; padding: 0 0 0 0px">
+                <period-date-picker
+                  :type="1"
+                  :width="'135px'"
+                  :size="searchSize"
+                  :start="parmValue.start"
+                  :end="parmValue.end"
+                  @timeReturned="handleTime"
+                />
+              </el-col>
+              <el-col :span="4" style="width: 148px; padding: 0 0 0 8px">
+                <el-select
+                  :size="searchSize"
+                  v-model="parmValue.status"
+                  filterable
+                  clearable
+                  placeholder="订单状态"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in statusOptions"
+                    :key="'status' + item.id"
+                    :label="item.label"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-col>
+              <!-- 客户公司 -->
+              <el-col :span="4" style="width: 240px; padding: 0 0 0 10px">
+                <search-work-company
+                  :type="'1'"
+                  :value="parmValue.supplierNo"
+                  :size="'mini'"
+                  :placeholder="'销售方公司'"
+                  :disabled="false"
+                  :isDetail="false"
+                  @searchChange="supplierChange"
+                />
+              </el-col>
+
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  style="float: right; margin-left: 5px"
+                  @click="searchList"
+                >
+                  刷新
+                </el-button>
+              </el-col>
+              <el-col :span="3" style="width: 66px; float: right">
+                <el-button
+                  :size="searchSize"
+                  type="primary"
+                  style="float: right; margin-left: 5px"
+                  @click="set_user(selection)"
+                >
+                  设置订单用途
+                </el-button>
+              </el-col>
+            </el-row>
+            <el-row style="padding: 10px 0 0 0">
+              <el-col :span="6" style="width: 371px">
+                <search-customer
+                  :value="customerCode"
+                  :size="searchSize"
+                  :names="parmValue.supplierName"
+                  :is-detail="true"
+                  :placeholder="'客户公司名称'"
+                  @searchChange="customerChange"
+                />
+              </el-col>
+
+              <el-col :span="4" style="width: 150px; padding: 0 0 0 9px">
+                <el-select
+                  :size="searchSize"
+                  v-model="parmValue.order_type"
+                  filterable
+                  clearable
+                  placeholder="商品来源"
+                  style="width: 100%"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                >
+                  <el-option
+                    v-for="item in xs_order_type_options"
+                    :key="'orderstatus' + item.id"
+                    :label="item.label"
+                    :value="item.id"
+                  />
+                </el-select>
+              </el-col>
+              <el-col :span="6" style="width: 325px; padding: 0 0 0 10px">
+                <el-input
+                  clearable
+                  placeholder="关键字"
+                  v-model="input"
+                  maxlength="40"
+                  :size="searchSize"
+                  @blur="searchList"
+                  class="input-with-select"
+                >
+                  <el-select
+                    v-model="select"
+                    style="width: 100px"
+                    slot="prepend"
+                    placeholder="关键字类型"
+                    @change="searchList"
+                  >
+                    <el-option label="订单编号" value="orderCode"></el-option>
+                    <!-- <el-option
+                      label="商品属性编号"
+                      value="good_code"
+                    ></el-option> -->
+                    <!-- <el-option
+                      label="供应商编号"
+                      value="supplierNo"
+                    ></el-option> -->
+                    <!-- <el-option
+                      label="客户编号"
+                      value="customer_code"
+                    ></el-option> -->
+                    <el-option label="商品名称" value="good_name"></el-option>
+                    <el-option label="创建人" value="apply_name"></el-option>
+                    <el-option label="创建人部门" value="company_name"></el-option>
+                  </el-select>
+                </el-input>
+              </el-col>
+
+              <el-col :span="4" style="width: 66px; float: right">
+                <el-button
+                  type="warning"
+                  class="fr"
+                  :size="searchSize"
+                  @click="restSearch"
+                >
+                  重置
+                </el-button>
+              </el-col>
+
+            </el-row>
+          </div>
+        </template>
+        <template #good_name="{ scope }">
+          <span>{{ scope.row.good_name }}</span>
+          <span v-for="(si, i) in scope.row.speclist" :key="si.spec_id + i">
+            <span v-if="i !== 0">-</span>
+            <span v-else>_</span>
+            <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
+          </span>
+        </template>
+
+        <template #status="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            :type="scope.row.status == '0' ? 'warning' : ''"
+            v-text="
+              (statusOptions.find((item) => item.id == scope.row.status) || {}).label ||
+              '--'
+            "
+          ></el-tag>
+        </template>
+        <template #order_type="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            v-text="
+              (
+                xs_order_type_options.find((item) => item.id == scope.row.order_type) ||
+                {}
+              ).label || '--'
+            "
+          ></el-tag>
+        </template>
+        <template #order_source="{ scope }">
+          <el-tag
+            :size="tablebtnSize"
+            v-text="
+              (
+                xs_order_source_options.find(
+                  (item) => item.id == scope.row.order_source
+                ) || {}
+              ).label || '--'
+            "
+          ></el-tag>
+        </template>
+
+        <template #operation="{ scope }">
+          <el-tooltip effect="dark" content="详情" placement="top">
+            <i
+              class="el-icon-view tb-icon"
+              @click="getRouter('othOrderDetail', scope.row.id)"
+            ></i>
+          </el-tooltip>
+        </template>
+      </ex-table>
+
+  
+      <!--订单用途设置-->
+      <user-add-edit
+        :code="orderCodeList"
+        :show-model="userShowModel"
+        @refresh="searchList"
+        @cancel="userShowModel = false"
+      />
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+<script>
+import mixinPage from "@/mixins/elPaginationHandle";
+import resToken from "@/mixins/resToken";
+import asyncRequest from "@/apis/service/youzan/othOrder";
+import { columns } from "./columns"; //表格列参数
+import userAddEdit from "./userAddEdit";
+import { mapGetters } from "vuex";
+import { xs_order_type_options, xs_order_source_options } from "@/assets/js/statusList";
+export default {
+  name: "othOrder",
+  mixins: [mixinPage, resToken],
+  components: {
+    userAddEdit,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find((item) => item.menu_route == "othOrder") || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    return {
+      sitem: null,
+      select: "orderCode",
+
+      input: "",
+      customerCode: [],
+      // 状态
+      statusOptions: [
+        { id: "0", label: "待发货" },
+        { id: "1", label: "待发货完成" },
+        { id: "2", label: "发货已完成" },
+        { id: "3", label: "订单已取消" },
+      ],
+      xs_order_type_options,
+      xs_order_source_options,
+      loading: false,
+      showModel: false,
+      isDetail: false,
+      modelId: 0,
+      parmValue: {
+        order_type: "", //订单类型
+        orderCode: "", //销售订单code
+        apply_name: "", // 申请人
+        good_name: "", // 产品名称
+        good_code: "", // 产品属性编号
+        status: "", //状态
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        supplierNo: "", //供应商编号
+        customer_code: "", //客户编号
+        start: "", //新建起始时间
+        end: "", // 新建结束时间
+        company_name: "", //创建人部门
+      },
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: columns,
+      orderCodeList: [],
+      userShowModel: false,
+    };
+  },
+  mounted() {
+    const { back } = this.$route.query;
+    if (back) {
+      this.parmValue = JSON.parse(back);
+      console.log(this.parmValue);
+      const { page, size } = this.parmValue;
+      // this.parmValue.start = start || last_start;
+      // this.parmValue.end = end || last_end;
+      if (this.parmValue.customer_code.length > 0) {
+        this.customerCode = [this.parmValue.customer_code];
+      }
+
+      this.pageInfo = {
+        size: size,
+        curr: page,
+        total: 0,
+      };
+      //多选条件
+      this.select = this.parmValue.select;
+      // this.sselect = this.parmValue.sselect;
+      this.input = this.parmValue.input;
+    } else {
+      this.select = "orderCode";
+      //  this.sselect = "创建时间"
+    }
+    this.searchList();
+  },
+
+  methods: {
+    getRouter(toRouter, queryId) {
+      if (toRouter && queryId) {
+        let model = {
+          id: queryId,
+          type: "view",
+        };
+
+        //有多选框的条件
+        this.parmValue.select = this.select;
+        // this.parmValue.sselect = this.sselect ;
+        this.parmValue.input = this.input;
+        //
+        let routerModel = {
+          options: JSON.parse(JSON.stringify(this.parmValue)),
+          router: this.$route.path,
+        };
+        model.preModel = JSON.stringify(routerModel);
+
+        this.routeGoto(toRouter, model);
+      } else {
+        this.$message.warning("暂未找到相关流程!");
+      }
+    },
+    restSearch() {
+      this.select = "orderCode";
+      this.input = "";
+      this.customerCode = [];
+      this.parmValue = {
+        order_type: "",
+        orderCode: "", //销售订单code
+        apply_name: "", // 申请人
+        good_name: "", // 产品名称
+        good_code: "", // 产品属性编号
+        status: "", //状态
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        supplierNo: "", //供应商编号
+        customer_code: "", //客户编号
+        start: "", //新建起始时间
+        end: "", // 新建结束时间
+        company_name: "", //部门
+      };
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.searchList();
+    },
+    openModal(id, isDetail, sitem) {
+      this.modelId = id;
+      this.isDetail = isDetail;
+      this.sitem = sitem;
+      this.showModel = true;
+    },
+    async supplierChange(e) {
+      const { id, code, label } = e;
+      this.parmValue.supplierNo = code || "";
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    set_user(selection) {
+      if (selection.length === 0) {
+        this.$message.warning("至少选择一个订单!");
+        return;
+      }
+      this.orderCodeList = [];
+      let isok = true;
+      selection.forEach((e) => {
+        this.orderCodeList.push(e.orderCode);
+        if (e.use_order) {
+          isok = false;
+        }
+      });
+
+      if (!isok) {
+        this.$message.warning("只能选择未绑定的订单!");
+        return;
+      }
+      this.userShowModel = true;
+    },
+    // 客户选择
+    async customerChange(e) {
+      if (e && e.id) {
+        this.customerCode = [e.code];
+        this.parmValue.supplierName = e.label;
+        this.parmValue.customer_code = e.code;
+      } else {
+        this.customerCode = [];
+        this.parmValue.supplierName = "";
+        this.parmValue.customer_code = "";
+      }
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    async stockChange(e) {
+      if (e && e.id) {
+        this.parmValue.stockNo = [e.code];
+      } else {
+        this.parmValue.stockNo = [];
+      }
+
+      this.parmValue.page = 1;
+      this.pageInfo.curr = 1;
+      await this.searchList();
+    },
+    async searchList() {
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end === "") ||
+        (this.parmValue.start === "" && this.parmValue.end !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      this.loading = true;
+      this.parmValue.orderCode = this.select === "orderCode" ? this.input : "";
+      this.parmValue.good_name = this.select === "good_name" ? this.input : "";
+      this.parmValue.apply_name = this.select === "apply_name" ? this.input : "";
+
+      this.parmValue.company_name = this.select === "company_name" ? this.input : "";
+
+      const res = await asyncRequest.list(this.parmValue);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.tableData.forEach((v) => {
+          v.good_class = "";
+          if (v.can && v.can.length > 0) {
+            v.can.forEach((x, i) => {
+              v.good_class += i === 0 ? x.name : "_" + x.name;
+            });
+          }
+        });
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.loading = false;
+    },
+    // 时间
+    async handleTime(e) {
+      if (e.startTime !== "") {
+        this.parmValue.start = e.startTime;
+      } else {
+        this.parmValue.start = "";
+      }
+      if (e.endTime !== "") {
+        this.parmValue.end = e.endTime;
+      } else {
+        this.parmValue.end = "";
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.othOrder {
+  // text-align: right;
+}
+</style>

+ 169 - 0
src/views/youzan/othOrder/userAddEdit.vue

@@ -0,0 +1,169 @@
+<template>
+  <el-dialog
+    v-loading="loading"
+    :title="'设置订单用途'"
+    :center="true"
+    align="left"
+    top="18vh"
+    width="500px"
+    :close-on-click-modal="false"
+    :visible.sync="showModelThis"
+    element-loading-text="拼命加载中"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0.8)"
+    @close="showModelThis = false"
+  >
+    <el-card style="margin: -20px 0 0 0">
+      <el-row :gutter="10">
+        <el-col :span="24">
+          <el-form
+            ref="ruleForm"
+            :model="ruleForm"
+            status-icon
+            :rules="rulesThis"
+            label-width="80px"
+            class="demo-ruleForm"
+          >
+            <el-form-item label="订单用途" prop="useid">
+              <el-select
+                v-model="ruleForm.useid"
+                filterable
+                style="width: 100%"
+                clearable
+                placeholder="订单用途"
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.id"
+                  :label="item.order_use"
+                  :value="item.id"
+                  :disabled="item.status !== '1'"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-form>
+        </el-col>
+        <el-col :span="24" style="text-align: right">
+          <span class="fl" v-if="code">已选{{ code.length }}个订单</span>
+          <el-button type="primary" @click="submitForm">保 存 </el-button>
+          <el-button @click="showModelThis = false">取 消</el-button>
+        </el-col>
+      </el-row>
+    </el-card>
+  </el-dialog>
+</template>
+<script>
+import asyncRequest from "@/apis/service/youzan/othOrder";
+import resToken from "@/mixins/resToken";
+export default {
+  name: "brand",
+  props: ["showModel", "code"],
+  mixins: [resToken],
+  data() {
+    return {
+      loading: false,
+      title: "添加单位",
+      showModelThis: this.showModel,
+      options: [],
+      ruleForm: {
+        orderCode: [],
+        useid: "",
+      },
+      rulesThis: this.rules,
+      rules: {
+        useid: [
+          { required: true, message: "请选择订单用途", trigger: "change" },
+        ],
+      },
+    };
+  },
+  watch: {
+    showModel: function (val) {
+      this.showModelThis = val;
+      if (val) {
+        this.initForm();
+      }
+    },
+    showModelThis(val) {
+      if (!val) {
+        this.$emit("cancel");
+      }
+    },
+  },
+  methods: {
+    async initForm() {
+      this.loading = true;
+      this.rulesThis = this.rules;
+      this.options = [];
+      await this.resetForm();
+      await this.get_options();
+      this.loading = false;
+    },
+    async resetForm() {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+
+          this.ruleForm = {
+            orderCode: this.code || [],
+            useid: "",
+          };
+        }
+      });
+    },
+    async submitForm() {
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          if (this.loading) {
+            return;
+          }
+          this.loading = true;
+          let model = JSON.parse(JSON.stringify(this.ruleForm));
+          let res = (res = await asyncRequest.saleuse(model));
+
+          this.loading = false;
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "设置成功!",
+              message: "",
+            });
+            this.showModelThis = false;
+            // 刷新
+            this.$emit("refresh");
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    async get_options() {
+      const { code, data, message } = await asyncRequest.uselist({
+        page: 1,
+        size: 10000,
+      });
+      if (code === 0) {
+        const { list } = data;
+        this.options = list;
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.options = [];
+        this.$message.warning(message);
+      }
+    },
+  },
+};
+</script>
+
+   <style lang="scss" scoped>
+.brand {
+}
+</style>

+ 0 - 0
src/views/youzan/othOrder/销售订单管理


+ 300 - 0
src/views/youzan/othgoodsOnline/ShowDataTableColumns.js

@@ -0,0 +1,300 @@
+
+const public_listCol = [
+  {
+    prop: "good_name",
+    label: "商品名称",
+    _slot_: "good_name",
+    span: 24,
+  },
+
+  // {
+  //   prop: "speclist",
+  //   label: "规格",
+  //   _slot_: "speclist",
+  // },
+  // {
+  //   prop: "skuCode",
+  //   label: "上线商品编号",
+  //   span: 7,
+  // },
+  // {
+  //   prop: "companyNo",
+  //   label: "业务企业编号",
+  //   span: 7,
+  // },
+  {
+    prop: "company",
+    label: "业务企业名称",
+    _slot_: "company",
+  },
+  {
+    prop: "good_info_img",
+    _slot_: "good_info_img",
+    label: "详情图",
+  },
+  {
+    prop: "cat",
+    label: "分类",
+    span: 8,
+  },
+
+
+
+  {
+    prop: "creater",
+    label: "申请人",
+    span: 4,
+  },
+  {
+    prop: "platform_name",
+    label: "上线平台",
+    span: 6,
+  },
+  {
+    prop: "online_time",
+    label: "上线时间",
+    span: 6,
+  },
+  {
+    prop: "online_reason",
+    label: "上线原因",
+  },
+
+  {
+    prop: "online_remark",
+    label: "上线备注",
+    span: 12,
+  },
+  {
+    prop: "brand_name",
+    label: "品牌",
+    span: 6,
+  },
+
+
+
+  {
+    prop: "exclusive",
+    label: "专属类型",
+    _slot_: "exclusive",
+    span: 6,
+  },
+  {
+    prop: "weight",
+    label: "商品总克重",
+    append: 'g',
+    span: 6,
+  },
+
+
+  {
+    prop: "packing_list",
+    label: "包装清单",
+    span: 6,
+  },
+  {
+    prop: "packing_way",
+    label: "包装方式",
+    span: 6,
+  },
+  {
+    prop: "packing_spec",
+    label: "装箱规格",
+    span: 6,
+  },
+  {
+    prop: "packing_weight",
+    label: "装箱重量",
+    append: 'g',
+    span: 6,
+  },
+  {
+    prop: "packing_size",
+    label: "装箱尺寸",
+    span: 6,
+  },
+  {
+    prop: "origin_place_cn",
+    label: "产地",
+    span: 8,
+  },
+  {
+    prop: "unit",
+    label: "单位",
+    span: 4,
+  },
+  {
+    prop: "good_bar",
+    label: "商品条形码",
+    span: 6,
+  },
+  {
+    prop: "supply_area",
+    label: "供货区域",
+    _slot_: "supply_area",
+    span: 6,
+  },
+  {
+    prop: "delivery_place_cn",
+    label: "发货地",
+    span: 8,
+  },
+  {
+    prop: "is_stock",
+    label: "是否库存品",
+    _slot_: "is_stock",
+    span: 4,
+  },
+  {
+    prop: "exam_status",
+    label: "状态",
+    _slot_: "exam_status",
+    span: 6,
+  },
+  {
+    prop: "good_type",
+    label: "是否定制",
+    _slot_: "good_type",
+    span: 6
+  },
+
+  {
+    prop: "addtime",
+    label: "创建时间",
+    span: 8,
+  },
+  {
+    prop: "tax",
+    label: "税点",
+    append: '%',
+    span: 4,
+  },
+
+  {
+    prop: "delivery_day",
+    label: "物流时间",
+    append: '天',
+    span: 4,
+  },
+  {
+    prop: "lead_time",
+    label: "供货周期",
+    append: '天',
+    span: 4
+  },
+  {
+    prop: "sample_day",
+    label: "调样周期",
+    append: '天',
+    span: 4,
+  },
+
+  {
+    prop: "noble",
+    label: "贵金属信息",
+    _slot_: "noble",
+    span: 24,
+  },
+  {
+    prop: "good_remark",
+    label: "商品备注",
+    span: 24,
+  },
+
+
+  {
+    prop: "after_sales",
+    label: "售后说明",
+    span: 24,
+  },
+
+
+
+  {
+    prop: "craft_desc",
+    label: "工艺说明",
+    span: 24,
+  },
+
+
+
+
+]
+const purchase_listCol = [
+  // {
+  //   prop: "spuCode",
+  //   label: "商品成本编号",
+  //   span: 7,
+  // },
+  // {
+  //   prop: "supplierNo",
+  //   label: "供应商编号",
+  //   span: 7,
+  // },
+  {
+    prop: "supplierName",
+    label: "供应商名称",
+    _slot_: "supplierName",
+    span: 12,
+  },
+  {
+    prop: "cgd_gold_price",
+    label: "供应商采购金价",
+    append: '元/g',
+    span: 6,
+  },
+
+  {
+    prop: "is_auth",
+    label: "供应商权限",
+    _slot_: "is_auth",
+    span: 6,
+  },
+  {
+    prop: "is_step",
+    label: "启用成本阶梯",
+    _slot_: "is_step",
+    span: 4,
+  },
+  {
+    prop: "demo_fee",
+    label: "打样费(元)",
+    span: 5,
+  },
+  {
+    prop: "open_fee",
+    label: "开模费(元/件)",
+    span: 5,
+  },
+
+  {
+    prop: "sample_fee",
+    label: "调样费(元)",
+    span: 5,
+  },
+  {
+    prop: "market_price",
+    label: "市场价(元)",
+    span: 5,
+  },
+ 
+  
+  {
+    prop: "nakelist",
+    label: "采购起订量",
+    _slot_: "nakelist",
+    span: 24,
+  },
+
+
+]
+const sale_listCol = [
+  {
+    prop: "ladderlist",
+    label: "销售起订量",
+    _slot_: "ladderlist",
+    span: 24,
+  },
+]
+
+export { public_listCol, purchase_listCol, sale_listCol }

+ 173 - 0
src/views/youzan/othgoodsOnline/columns.js

@@ -0,0 +1,173 @@
+
+//是否定制
+const options1 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+//专属类型
+const options2 = [
+  { id: "0", name: "非泰康" },
+  { id: "1", name: "泰康" },
+]
+//销售权限
+const options3 = [
+  { id: "0", name: "无销售权限" },
+  { id: "1", name: "有销售权限" },
+]
+
+//是否库存品
+const options4 = [
+  { id: "0", name: "非库存品" },
+  { id: "1", name: "库存品" },
+]
+//是否启用实时金价
+const options5 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+//供货区域
+const options6 = [
+  { id: "1", name: "全国" },
+  { id: "2", name: "全国除偏远" },
+]
+//是否启用阶梯
+const options7 = [
+  { id: "0", name: "否" },
+  { id: "1", name: "是" },
+]
+const options8 = [
+  // { id: "0", name: "待提交" },
+  { id: "1", name: "待完善成本" },
+  { id: "2", name: "待产品审核" },
+  { id: "3", name: "待财务定价" },
+  { id: "4", name: "待财务审核定价" },
+  { id: "5", name: "待上线" },
+  { id: "6", name: "上线成功" },
+  { id: "7", name: "审核失败" },
+  { id: "8", name: "已下线" },
+]
+const listCol = [
+  {
+    prop: "skuCode",
+    label: "上线商品编号",
+    fixed: "left",
+    width: "160px",
+  },
+  {
+    prop: "spuCode",
+    label: "成本商品编号",
+    width: "160px",
+  },
+  {
+    prop: "good_thumb_img",
+    label: "图片",
+    _slot_: "good_thumb_img",
+    width: "45px",
+  },
+  {
+    prop: "good_name",
+    label: "名称",
+    "min-width": "160px",
+  },
+  // {
+  //   prop: "platform_code_en",
+  //   label: "平台编号",
+  //   width: "170px",
+  // },
+  {
+    prop: "platform_name",
+    label: "平台名称",
+    width: "100px",
+  },
+
+  {
+    prop: "status",
+    label: "状态",
+    _slot_: "status",
+    width: "118px",
+  },
+  {
+    prop: "cat_name",
+    label: "分类",
+    width: "118px",
+  },
+  {
+    prop: "good_type",
+    label: "是否定制",
+    _slot_: "good_type",
+    width: "70px",
+  },
+  {
+    prop: "brand_name",
+    label: "品牌",
+  },
+  {
+    prop: "companyNo",
+    label: "业务公司编号",
+    width: "160px",
+  },
+  {
+    prop: "company",
+    label: "业务公司名称",
+    width: "150px",
+  },
+  {
+    prop: "plat_code",
+    label: "平台商品编号",
+    width: "150px",
+  },
+  {
+    prop: "purchase",
+    label: "采购员",
+    width: "70px",
+  },
+  {
+    prop: "company_name",
+    label: "创建人部门",
+    minWidth: "150px",
+  },
+  {
+    prop: "creater",
+    label: "创建人",
+    width: "70px",
+  },
+  {
+    prop: "addtime",
+    label: "创建时间",
+    width: "140px",
+  },
+  {
+    prop: "",
+    label: "操作",
+    fixed: "right",
+    _noset_: true,
+    width: "110px",
+    _slot_: "operation",
+  },
+]
+const rules = {
+  platform: [
+    {
+      required: true,
+      message: "请选择所属平台",
+      trigger: "change",
+    },
+  ],
+  online_reason: [
+    {
+      required: true,
+      message: "上线原因不能为空",
+      trigger: "blur",
+    },
+  ],
+  online_remark: [
+    {
+      required: true,
+      message: "上线备注不能为空",
+      trigger: "blur",
+    },
+  ],
+
+}
+
+export { options1, options2, options3, options4, options5, options6, options7, options8, listCol, rules }

+ 274 - 0
src/views/youzan/othgoodsOnline/components/online-exam-form.vue

@@ -0,0 +1,274 @@
+<template>
+  <el-form
+    v-loading="loading"
+    ref="ruleForm"
+    :model="ruleForm"
+    status-icon
+    :rules="rulesThis"
+    :label-width="labelWidth || '100px'"
+    class="demo-ruleForm"
+    :size="size || 'medium'"
+  >
+    <el-row>
+      <el-col :span="6"
+        ><el-form-item label="审核状态" prop="state">
+          <el-radio-group
+            v-model="ruleForm.state"
+            placeholder="请选择审核状态"
+            style="width: 100%"
+            :size="size || 'medium'"
+            @change="stateChange"
+          >
+            <el-radio v-for="item in stateList" :key="item.value" :label="item.value">{{
+              item.label
+            }}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+      </el-col>
+      <el-col :span="18" v-if="ruleForm.state === '1'">
+        <el-row>
+          <el-col :span="14">
+            <el-form-item label="有赞公用分类" prop="cat" label-width="120px">
+              <el-input
+                v-model="ruleForm.cat"
+                placeholder="有赞公用分类"
+                :size="'mini'"
+                maxlength="20"
+              />
+            </el-form-item>
+            <el-form-item label="是否可退货" prop="is_return" label-width="120px">
+              <el-radio-group
+                v-model="ruleForm.is_return"
+                placeholder="请选择是否可退货"
+                style="width: 100%"
+                :size="'mini'"
+              >
+                <el-radio
+                  v-for="item in is_return_list"
+                  :key="item.value"
+                  :label="item.value"
+                  >{{ item.label }}</el-radio
+                >
+              </el-radio-group>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="10">
+            <el-form-item label="系统售价" prop="new_sale_price" required>
+              <el-input
+                v-model="ruleForm.new_sale_price"
+                placeholder="系统售价"
+                :disabled="true"
+                :size="'mini'"
+                maxlength="20"
+              >
+                <template slot="append">元</template>
+              </el-input>
+            </el-form-item>
+            <el-form-item label="最终售价" prop="sale_price">
+              <digital-input
+                :values="ruleForm.sale_price"
+                :placeholder="'售价'"
+                :min="0"
+                :max="100000000000"
+                :position="'right'"
+                :precision="2"
+                :controls="false"
+                :append="'元'"
+                :newTime="ruleForm.newTime"
+                :size="'mini'"
+                :disabled="!ruleForm.edit"
+                @reschange="num_change($event, 'sale_price', scope.$index)"
+              /> </el-form-item
+          ></el-col>
+        </el-row>
+      </el-col>
+      <el-col :span="18" v-else>
+        <el-form-item label="审核备注" prop="remark">
+          <el-input
+            type="textarea"
+            placeholder="审核备注"
+            v-model="ruleForm.remark"
+            :disabled="disabled"
+            maxlength="250"
+            show-word-limit
+            :autosize="{ minRows: 3, maxRows: 3 }"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col :span="24">
+        <el-form-item class="fr">
+          <el-button
+            v-if="!isDetail"
+            :size="'mini'"
+            type="primary"
+            @click="submitForm(ruleForm.state === '1' ? '3' : '')"
+            >保 存
+          </el-button>
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+export default {
+  name: "exam-form",
+  props: ["size", "statusList", "disabled", "isMust", "labelWidth", "time"],
+  /**
+   * 属性集合
+   * @param {String}        size             : 组件大小             非必填
+   * @param {Array}         statusList       : 驳回至备选项          必填
+   * @param {Boolean}       disabled         : 是否禁用              必填
+   * @param {Boolean}       isMust           : 是否需要展示驳回节点   必填
+   *
+   *
+   */
+  /**
+   * 事件集合
+   * @searchChange             : 选中值变化调用   抛出选中数据
+   */
+  data() {
+    return {
+      loading: false,
+      stateList: [
+        {
+          value: "1",
+          label: "通过",
+        },
+        {
+          value: "0",
+          label: "驳回",
+        },
+      ],
+      is_return_list: [
+        {
+          value: "1",
+          label: "支持退货",
+        },
+        {
+          value: "0",
+          label: "不支持退货",
+        },
+      ],
+      showModelThis: this.showModel,
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() < Date.now() - 60 * 60 * 24 * 1000;
+        },
+      },
+      ruleForm: {
+        numStatus: "", //点击的按钮状态
+        state: "1", // 通过or驳回
+        rebut: "", //驳回至
+        remark: "",
+      },
+      rulesThis: this.rules,
+      rules: {
+        state: [
+          {
+            required: true,
+            message: "请选择审核状态",
+            trigger: "change",
+          },
+        ],
+
+        is_return: [
+          {
+            required: true,
+            message: "请选择是否可退",
+            trigger: "change",
+          },
+        ],
+        cat: [
+          {
+            required: true,
+            message: "请选择有赞公用分类",
+            trigger: "change",
+          },
+        ],
+        sale_price: [
+          {
+            required: true,
+            message: "请选择有赞公用分类",
+            trigger: "blur",
+          },
+        ],
+        remark: [
+          { required: true, message: "请输入审核备注", trigger: "blur" },
+          {
+            min: 1,
+            max: 250,
+            message: "长度在 1 到 250 个字符",
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  watch: {
+    isDetail: function (val, old) {
+      if (this.isDetail !== val) {
+        this.options = [];
+        this.selectLoading = false;
+      }
+    },
+    newTime: function (val) {
+      if (val) {
+        this.initForm();
+      }
+    },
+  },
+  mounted() {
+    this.initForm();
+  },
+  methods: {
+    async initForm() {
+      // this.loading = true;
+      this.rulesThis = this.rules;
+      await this.resetForm();
+      this.stateChange();
+      this.loading = false;
+    },
+    stateChange() {
+      if (this.ruleForm.state === "1") {
+        this.rulesThis.rebut[0].required = false;
+        this.rulesThis.remark[0].required = false;
+      } else {
+        this.rulesThis.rebut[0].required = true;
+        this.rulesThis.remark[0].required = true;
+      }
+    },
+
+    async resetForm() {
+      // 重置
+      await this.$nextTick(() => {
+        if (this.$refs.ruleForm) {
+          this.$refs.ruleForm.resetFields();
+          this.$refs.ruleForm.clearValidate();
+          this.ruleForm = {
+            state: "1", // 通过or驳回
+            rebut: "", //驳回至
+            remark: "",
+          };
+        }
+      });
+    },
+    async submitForm(numStatus) {
+      this.ruleForm.numStatus = numStatus;
+      //点击驳回重新审核时,调用其他接口
+
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          this.$emit("searchChange", this.ruleForm);
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+  },
+};
+</script>
+
+<style></style>

+ 579 - 0
src/views/youzan/othgoodsOnline/detail.vue

@@ -0,0 +1,579 @@
+<template>
+  <div class="othgoodsOnlineDetail">
+    <div
+      class="othgoodsOnlineDetail-main"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '007')"
+    >
+      <el-tabs v-model="activeTabs">
+        <el-tab-pane label="商品上线详情" name="1" v-if="queryType !== 'add'">
+          <el-collapse v-model="activeNames" style="margin: -18px 0 0 0">
+            <el-collapse-item title="商品上线详情" name="0">
+              <show-data-table
+                :newTime="newTime"
+                v-if="newTime !== ''"
+                :sitem="sitem"
+                :columns="public_listCol"
+              >
+                <template slot="good_name">
+                  <img
+                    v-viewer
+                    style="width: 23px; height: 23px; margin: 0 5px 0 0"
+                    class="fl"
+                    v-if="sitem.good_thumb_img"
+                    :src="sitem.good_thumb_img"
+                    alt=""
+                  />
+                  <span>{{ sitem.good_name }}</span>
+                  <span v-for="(si, i) in sitem.speclist" :key="si.spec_id + i">
+                    <span v-if="i !== 0">-</span>
+                    <span v-else>_</span>
+                    <span>{{ si.spec_name }}[{{ si.spec_value }}]</span>
+                  </span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>上线商品编号:</span
+                        ><span>{{ sitem.skuCode }}</span>
+                      </li>
+                      <li
+                        v-if="
+                          newTime !== '' &&
+                          private_field &&
+                          private_field.length > 0 &&
+                          private_field.some((item) => item == '1')
+                        "
+                      >
+                        <span>成本商品编号:</span
+                        ><span>{{ sitem.spuCode }}</span>
+                      </li>
+                      <li>
+                        <span>平台商品编码:</span
+                        ><span>{{ sitem.plat_code }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="company">
+                  <span>{{ sitem.company }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>业务企业编号:</span
+                        ><span>{{ sitem.companyNo }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="good_info_img">
+                  <img
+                    class="fl"
+                    style="width: 23px; height: 23px; margin: 0 5px 0 0"
+                    v-viewer
+                    v-for="(si, i) in sitem.good_info_img"
+                    :src="si"
+                    :key="si + i"
+                  />
+                </template>
+                <template slot="exclusive">
+                  <span v-for="(si, sii) in sitem.exclusive" :key="si.id">
+                    <span v-if="sii !== 0">/</span> <span>{{ si.name }}</span>
+                  </span>
+                </template>
+                <template slot="supply_area">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (
+                        options6.find((item) => item.id == sitem.supply_area) ||
+                        {}
+                      ).name || '--'
+                    "
+                  />
+                </template>
+                <template slot="is_stock">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (options4.find((item) => item.id == sitem.is_stock) || {})
+                        .name || '--'
+                    "
+                  />
+                </template>
+                <template slot="exam_status">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (
+                        options8.find((item) => item.id == sitem.exam_status) ||
+                        {}
+                      ).name || '--'
+                    "
+                  />
+                </template>
+                <template slot="good_type">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (
+                        options1.find((item) => item.id == sitem.good_type) ||
+                        {}
+                      ).name || '--'
+                    "
+                  />
+                  <span
+                    v-if="sitem.good_type === '1'"
+                    style="padding: 0 0 0 5px"
+                    >{{ sitem.moq }}起订/工期{{ sitem.customized }}天</span
+                  >
+                </template>
+                <template slot="noble">
+                  <span v-if="sitem.noble_metal"
+                    >{{ sitem.noble_weight ? sitem.noble_weight : "0" }}g-{{
+                      sitem.noble_name
+                    }}-{{ sitem.gold_price ? sitem.gold_price : "0" }}元/g-{{
+                      sitem.is_gold_price === "0" ? "不" : ""
+                    }}启用实时金价-{{
+                      sitem.is_diff === "1" ? "有" : "无"
+                    }}工差-{{ sitem.config }}-{{ sitem.other_config }}</span
+                  >
+                </template>
+              </show-data-table>
+              <show-data-table
+                :newTime="newTime"
+                v-if="
+                  newTime !== '' &&
+                  private_field &&
+                  private_field.length > 0 &&
+                  private_field.some((item) => item == '1')
+                "
+                :sitem="sitem"
+                :columns="purchase_listCol"
+              >
+                <template slot="supplierName">
+                  <span>{{ sitem.supplierName }}</span>
+                  <el-popover placement="top" width="300" trigger="hover">
+                    <ul>
+                      <li>
+                        <span>供应商编号:</span
+                        ><span>{{ sitem.supplierNo }}</span>
+                      </li>
+                    </ul>
+                    <i class="el-icon-warning-outline fr" slot="reference"></i>
+                  </el-popover>
+                </template>
+                <template slot="is_auth">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (options3.find((item) => item.id == sitem.is_auth) || {})
+                        .name || '--'
+                    "
+                  />
+                </template>
+
+                <template slot="is_step">
+                  <el-tag
+                    :size="'mini'"
+                    v-text="
+                      (options7.find((item) => item.id == sitem.is_step) || {})
+                        .name || '--'
+                    "
+                  />
+                </template>
+
+                <template slot="nakelist">
+                  <div v-if="nakelist">
+                    <el-table
+                      :data="nakelist"
+                      :size="'mini'"
+                      border
+                      stripe
+                      style="width: 99%; margin: 10px 10px 10px 0"
+                    >
+                      <el-table-column prop="min_num" label="起订量(>=)" />
+                      <el-table-column prop="nake_fee" label="成本单价" />
+                      <el-table-column prop="cost_fee" label="工艺费" />
+                      <el-table-column prop="delivery_fee" label="物流费" />
+                      <el-table-column prop="cert_fee" label="证书费" />
+                      <el-table-column prop="mark_fee" label="加标费" />
+                      <el-table-column prop="package_fee" label="包装费" />
+                      <el-table-column prop="other_fee" label="其他费用" />
+                      <el-table-column prop="nake_total" label="成本合计" />
+                    </el-table>
+                  </div>
+                  <div v-else>--</div>
+                </template>
+              </show-data-table>
+              <show-data-table
+                :newTime="newTime"
+                v-if="
+                  newTime !== '' &&
+                  private_field &&
+                  private_field.length > 0 &&
+                  private_field.some((item) => item == '2') &&
+                  ladderlist &&
+                  ladderlist.length > 0
+                "
+                :sitem="sitem"
+                :columns="sale_listCol"
+              >
+                <template slot="ladderlist">
+                  <el-table
+                    :data="ladderlist"
+                    :size="'mini'"
+                    border
+                    stripe
+                    style="width: 99%; margin: 10px 10px 10px 0"
+                  >
+                    <el-table-column prop="min_num" label="起订量(>=)" />
+                    <el-table-column prop="sale_price" label="售价" />
+                    <el-table-column prop="cost_fee" label="工艺费" />
+                    <el-table-column prop="market_price" label="市场价" />
+                    <el-table-column prop="market_platform" label="对比平台" />
+                    <el-table-column prop="status" label="状态">
+                      <template slot-scope="scope">{{
+                        scope.row.status === "1" ? "启用" : "禁用"
+                      }}</template>
+                    </el-table-column>
+                  </el-table>
+                </template>
+              </show-data-table>
+            </el-collapse-item>
+            <el-collapse-item
+              title="上线审批"
+              name="1"
+            >
+              <online-exam-form
+                :newTime="newTime"
+                v-if="newTime !== ''"
+                :time="sitem.online_time"
+                :disabled="false"
+                :isMust="false"
+                :statusList="[]"
+                @searchChange="examForm"
+              />
+            </el-collapse-item>
+          </el-collapse>
+        </el-tab-pane>
+        <el-tab-pane label="审批记录" name="2">
+          <process-time-line
+            v-if="newTime !== ''"
+            :newTime="newTime"
+            :type="'SPSX'"
+            :orderCode="queryId"
+        /></el-tab-pane>
+      </el-tabs>
+    </div>
+    <div v-else>
+      <no-auth></no-auth>
+    </div>
+  </div>
+</template>
+   <script>
+import asyncRequest from "@/apis/service/youzan/othgoodsOnline";
+import resToken from "@/mixins/resToken";
+import { mapGetters } from "vuex";
+import {
+  public_listCol,
+  purchase_listCol,
+  sale_listCol,
+} from "./ShowDataTableColumns";
+import onlineExamForm from "./components/online-exam-form";
+import {
+  options1,
+  options2,
+  options3,
+  options4,
+  options5,
+  options6,
+  options7,
+  options8,
+} from "./columns";
+import { isArray } from "@/utils/validate";
+export default {
+  name: "othgoodsOnlineDetail",
+  mixins: [resToken],
+  components: {
+    onlineExamForm,
+  },
+  computed: {
+    ...mapGetters(["tablebtnSize", "searchSize", "size", "private_field"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "othgoodsOnlineDetail"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+
+  data() {
+    return {
+      public_listCol: public_listCol,
+      purchase_listCol: purchase_listCol,
+      sale_listCol: sale_listCol,
+      options1: options1,
+      options2: options2,
+      options3: options3,
+      options4: options4,
+      options5: options5,
+      options6: options6,
+      options7: options7,
+      options8: options8,
+      ladderlist: [],
+      nakelist: [],
+      spuCode: "",
+      size: "small",
+      activeTabs: "1",
+      activeNames: ["0", "1", "2", "3", "4", "5", "6", "7"],
+      newTime: "",
+      loading: false,
+      queryType: "",
+      queryId: "",
+      status: "",
+      sitem: null,
+    };
+  },
+  mounted() {
+    this.initForm();
+  },
+  methods: {
+    async initForm() {
+      const { id, type } = this.$route.query;
+      this.queryId = id;
+      this.queryType = type;
+      this.activeTabs = type === "add" ? "0" : "1";
+      this.loading = true;
+      if (this.queryType === "add") {
+        this.sitem = {};
+        this.getNewTime();
+      } else {
+        await this.initData();
+      }
+
+      this.loading = false;
+    },
+    // 点击业务审核的按钮
+    async examForm(e) {
+      console.log(e);
+      if (!this.loading) {
+        let model = {
+          skuCode: this.queryId,
+          exam_status: e.numStatus,
+          online_time: e.online_time,
+          remark: e.remark,
+        };
+
+        if ((e.numStatus ?? "") == "") {
+          //驳回重新审核
+          await this.setstatus("提交产品部门审核结果", model);
+          
+        } else if (e.numStatus == "3") {
+          //点击保存
+          // return;
+          await this.setstatus("提交产品部门审核结果", model);
+        } else {
+          //驳回下线
+          await this.setstatus("驳回下线吗", model);
+        }
+      }
+    },
+    // 点击财务定价的驳回按钮
+    async examForm1(e) {
+      if ((e.numStatus ?? "") == "") {
+        if (!this.loading) {
+          let model = {
+            skuCode: this.queryId,
+            exam_status: e.numStatus,
+            remark: e.remark,
+          };
+          await this.setstatus("驳回重新审核吗", model);
+        }
+      } else {
+        // return;
+        if (!this.loading) {
+          let model = {
+            skuCode: this.queryId,
+            exam_status: e.numStatus,
+            remark: e.remark,
+          };
+          await this.setstatus("驳回下线吗", model);
+        }
+      }
+    },
+    // 财务审核的保存按钮
+    async examForm2(e) {
+      console.log(e);
+      if (!this.loading) {
+        let model = {
+          skuCode: this.queryId,
+          exam_status: e.numStatus,
+          remark: e.remark,
+        };
+
+        if ((e.numStatus ?? "") == "") {
+          //驳回重新审核
+          await this.setstatus("驳回重新审核吗", model);
+        } else if (e.numStatus == "5") {
+          //点击保存
+          // return;
+          await this.setstatus("提交财务审核结果", model);
+        } else {
+          //驳回下线
+          await this.setstatus("驳回下线吗", model);
+        }
+      }
+    },
+    // 操作上线的保存按钮
+    async examForm3(e) {
+      console.log(e);
+      if (!this.loading) {
+        let model = {
+          skuCode: this.queryId,
+          exam_status:e.numStatus,
+          plat_code: e.plat_code,
+          remark: e.remark || "",
+        };
+
+        if ((e.numStatus ?? "") == "") {
+          //驳回重新审核
+          await this.setstatus("驳回重新审核吗", model);
+
+        } else if (e.numStatus == "6") {
+          //点击保存
+          // return;
+          await this.setstatus("提交商品上线结果", model);
+        } else {
+          //驳回下线
+          await this.setstatus("驳回下线吗", model);
+        }
+      }
+    },
+
+    async setstatus(detail, model) {
+      
+
+      await this.$confirm(`确定要${detail}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          let res = null;
+          if(model.exam_status == ""){
+            res = await asyncRequest.goodupreject(model);
+          }else{
+            res = await asyncRequest.status(model);
+          }
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "提交成功!",
+              message: "",
+            });
+            await this.initForm();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+
+    refresh(e) {
+      const { spuCode } = e;
+
+      let model = {
+        id: this.queryType === "add" ? spuCode : this.queryId,
+        type: "view",
+      };
+      this.routeReGoto("othgoodsOnlineDetail", model);
+    },
+    async initData() {
+      this.loading = true;
+      const { code, message, data } = await asyncRequest.detail({
+        skuCode: this.queryId,
+      });
+      this.loading = false;
+      if (code === 0) {
+        this.sitem = JSON.parse(JSON.stringify(data));
+        const { exam_status, cat_info, ladderlist, nakelist, spuCode } =
+          this.sitem;
+        this.spuCode = spuCode;
+        this.ladderlist = JSON.parse(JSON.stringify(ladderlist));
+        this.nakelist = JSON.parse(JSON.stringify(nakelist));
+        console.log(this.ladderlist);
+        let cat = "";
+        if (cat_info && cat_info.length > 0) {
+          cat_info.forEach((e, i) => {
+            cat += i === 0 ? e.name : "/" + e.name;
+          });
+        }
+        this.sitem.cat = cat;
+
+        if (!isArray(this.sitem.good_info_img)) {
+          this.sitem.good_info_img = this.sitem.good_info_img.split(",");
+        }
+
+        this.status = exam_status;
+        this.getNewTime();
+      } else if (code >= 100 && code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(message);
+      }
+    },
+    getNewTime() {
+      this.newTime = new Date().valueOf();
+    },
+  },
+};
+</script>
+   <style lang="scss" scoped>
+.othgoodsOnlineDetail {
+  width: 100%;
+  box-sizing: border-box;
+  .othgoodsOnlineDetail-main {
+    padding: 10px;
+    width: 100%;
+  }
+  .othgoodsOnlineDetail-title {
+    border-top: 1px solid #ebeef5;
+    span {
+      height: 50px;
+      line-height: 50px;
+      font-family: "微软雅黑", sans-serif;
+      font-weight: 400;
+      font-style: normal;
+      font-size: 16fpx;
+      text-align: left;
+    }
+  }
+  /deep/ .ddiv {
+    border-top: 1px solid #dcdfe6;
+  }
+  /deep/ .dtitle {
+    width: 40px;
+    text-align: center;
+    height: 100%;
+    min-height: 100%;
+    ul {
+      padding: 12px 0 0 0;
+    }
+  }
+  /deep/ .dmain {
+    padding: 20px 0 0 0;
+    width: calc(100% - 40px);
+    border-left: 1px solid #dcdfe6;
+  }
+}
+</style>
+   

+ 939 - 0
src/views/youzan/othgoodsOnline/index.vue

@@ -0,0 +1,939 @@
+<template>
+  <div class="othgoodsOnline pagePadding">
+    <ex-table
+      v-loading="loading"
+      v-if="powers && powers.length > 0 && powers.some((item) => item == '001')"
+      :table="table"
+      :data="tableData"
+      :columns="columns"
+      :page="pageInfo"
+      :size="size"
+      @page-curr-change="handlePageChange"
+      @page-size-change="handleSizeChange"
+      @screen-reset="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+      @screen-submit="
+        pageInfo.curr = 1;
+        parmValue.page = 1;
+        searchList();
+      "
+    >
+      <template #table-header="{}">
+        <div style="width: 100%">
+          <el-row style="padding: 0 0 10px 80px">
+            <el-col :span="4" style="width: 150px">
+              <el-select
+                v-model="parmValue.exam_status"
+                filterable
+                clearable
+                :size="searchSize"
+                placeholder="状态"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in options8"
+                  :key="'status' + item.id"
+                  :label="item.name"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-col>
+            <el-col :span="4" style="width: 130px; padding: 0 0 0 10px">
+              <el-select
+                v-model="parmValue.good_type"
+                filterable
+                clearable
+                :size="searchSize"
+                placeholder="是否定制"
+                style="width: 100%"
+                @change="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+              >
+                <el-option
+                  v-for="item in options1"
+                  :key="'good_type' + item.id"
+                  :label="item.name"
+                  :value="item.id"
+                />
+              </el-select>
+            </el-col>
+            <el-col :span="6" style="width: 303px; padding: 0 0 0 10px">
+              <period-date-picker
+                :type="1"
+                :width="'135px'"
+                :size="searchSize"
+                :start="parmValue.start"
+                :end="parmValue.end"
+                @timeReturned="handleTime"
+              />
+            </el-col>
+
+            <el-col
+              :span="3"
+              class="fr"
+              style="width: 66px; padding: 0 0 0 10px"
+            >
+              <el-button type="warning" :size="searchSize" @click="restSearch">
+                重置
+              </el-button>
+            </el-col>
+          </el-row>
+
+          <el-row>
+            <el-col :span="6" style="width: 310px">
+              <good-class
+                :value="parmValue.cat_id"
+                @handleChange="goods_class_change"
+                :disabled="false"
+                :size="searchSize"
+                :isDetail="false"
+                :placeholder="'分类'"
+              />
+            </el-col>
+
+            <el-col :span="6" style="width: 240px; padding: 0 0 0 10px">
+              <search-terrace
+                :value="parmValue.platform_code"
+                :disabled="false"
+                :size="'mini'"
+                :isDetail="false"
+                :is_show="'0'"
+                :placeholder="'所属平台'"
+                @searchChange="platform_codeChange"
+            /></el-col>
+            <el-col :span="4" style="width: 210px; padding: 0 0 0 10px">
+              <search-brand
+                :value="brandid"
+                :disabled="false"
+                :size="'mini'"
+                :isDetail="true"
+                :names="parmValue.supplierName"
+                :placeholder="'商品品牌'"
+                @searchChange="brandidsearchChange"
+              />
+            </el-col>
+            <el-col
+              :span="3"
+              class="fr"
+              style="width: 66px; padding: 0 0 0 10px"
+            >
+              <el-button type="primary" :size="searchSize" @click="searchList">
+                刷新
+              </el-button>
+            </el-col>
+          </el-row>
+          <el-row style="padding: 10px 0 0 0">
+            <el-col :span="4" style="width: 450px">
+              <el-input
+                :size="searchSize"
+                v-model="sinput"
+                :maxlength="40"
+                @blur="
+                  pageInfo.curr = 1;
+                  parmValue.page = 1;
+                  searchList();
+                "
+                placeholder="关键字"
+                ><el-select
+                  v-model="select"
+                  slot="prepend"
+                  :size="searchSize"
+                  style="width: 140px"
+                  @change="
+                    pageInfo.curr = 1;
+                    parmValue.page = 1;
+                    searchList();
+                  "
+                  placeholder="关键字类型"
+                >
+                  <el-option label="商品名称" value="1" />
+                  <el-option label="成本商品编号" value="2" />
+                  <el-option label="上线商品编号" value="8" />
+                  <!-- <el-option label="平台编号" value="3" /> -->
+                  <!-- <el-option label="供应商编号" value="4" /> -->
+                  <el-option label="业务企业编号" value="5" />
+                  <el-option label="平台商品编号" value="6" />
+                  <el-option label="创建人" value="7" />
+                  <el-option label="创建人部门" value="9" /> </el-select
+              ></el-input>
+            </el-col>
+            <el-col
+              :span="3"
+              class="fr"
+              style="width: 66px; padding: 0 0 0 10px"
+              v-if="powers.some((item) => item == '087')"
+            >
+              <el-button
+                :size="searchSize"
+                type="primary"
+                style="float: right"
+                @click="centerDialogVisible = true"
+              >
+                导出上线商品
+              </el-button>
+            </el-col>
+          </el-row>
+        </div></template
+      >
+      <template #good_thumb_img="{ scope }">
+        <div
+          v-if="scope.row.good_thumb_img"
+          style="width: 20px; height: 20px"
+          class="hover"
+          v-viewer
+        >
+          <img
+            :src="scope.row.good_thumb_img"
+            style="display: inline-block; width: 100%; height: 100%"
+            alt=""
+          />
+        </div>
+      </template>
+      <template #status="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="
+            scope.row.status == '6'
+              ? ''
+              : scope.row.status == '7'
+              ? 'danger'
+              : 'warning'
+          "
+          v-text="
+            (options8.find((item) => item.id == scope.row.status) || {}).name ||
+            '--'
+          "
+        ></el-tag>
+      </template>
+      <template #good_type="{ scope }">
+        <el-tag
+          :size="tablebtnSize"
+          :type="scope.row.good_type == '0' ? 'warning' : ''"
+          v-text="
+            (options1.find((item) => item.id == scope.row.good_type) || {})
+              .name || '--'
+          "
+        ></el-tag>
+      </template>
+
+      <template #operation="{ scope }">
+        <el-tooltip
+          v-if="powers.some((item) => item == '007')"
+          effect="dark"
+          content="详情"
+          placement="top"
+        >
+          <i
+            class="el-icon-view tb-icon"
+            @click="getRouter('othgoodsOnlineDetail', scope.row.skuCode)"
+          ></i>
+        </el-tooltip>
+        <el-tooltip
+          v-if="
+            powers.some((item) => item == '078') &&
+            (scope.row.status === '7' || scope.row.status === '8')
+          "
+          effect="dark"
+          content="重新发起上线流程"
+          placement="top"
+        >
+          <i
+            class="el-icon-upload tb-icon"
+            @click="get_againonline(scope.row.skuCode)"
+          ></i>
+        </el-tooltip>
+        <el-tooltip
+          v-if="
+            powers.some((item) => item == '079') && scope.row.status !== '8'
+          "
+          effect="dark"
+          content="下线商品"
+          placement="top"
+        >
+          <i
+            class="el-icon-download tb-icon"
+            @click="showDonlineDlg(scope.row.skuCode)"
+          ></i>
+        </el-tooltip>
+      </template>
+    </ex-table>
+    <no-auth v-else></no-auth>
+    <el-dialog title="下线原因" :visible.sync="dialogFormVisible" width="500px">
+      <el-form
+        :model="donline_form"
+        :rules="donline_rules"
+        ref="donline_Form"
+        class="demo-ruleForm"
+        label-width="80px"
+      >
+        <el-form-item label="下线原因" prop="offline_reason" >
+          <el-select
+          style="width:100%"
+            v-model="donline_form.offline_reason"
+            placeholder="请选择下线原因"
+          >
+            <el-option
+              :label="item.result"
+              :value="item.result_code"
+              v-for="item in donline_formStOps"
+              :key="item.result_code"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="下线备注" prop="offline_remark">
+          <el-input
+            v-model="donline_form.offline_remark"
+            type="textarea"
+            placeholder="请输入下线备注"
+            autocomplete="off"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="donlineDlg">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog
+      title="上线商品导出"
+      :visible.sync="centerDialogVisible"
+      width="500px"
+      center
+    >
+      <el-form
+        :model="ruleForm"
+        :rules="rules"
+        ref="ruleForm"
+        class="demo-ruleForm"
+        label-width="80px"
+      >
+        <el-form-item prop="start_date" label="日期: ">
+          <!-- <el-date-picker
+            value-format="yyyy-MM-dd"
+            v-model="ruleForm.date"
+            type="date"
+            placeholder="请选择"
+          >
+          </el-date-picker> -->
+
+          <periodDatePicker
+            :start="ruleForm.start_date"
+            :end="ruleForm.end_date"
+            :width="'165px'"
+            @timeReturned="time"
+          />
+        </el-form-item>
+        <el-form-item label="状态: " prop="status">
+          <el-select v-model="ruleForm.status" placeholder="请选择">
+            <el-option label="待上线" value="5"></el-option>
+            <el-option label="上线成功" value="6"></el-option>
+            <el-option label="已下线" value="8"></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item label="平台id: " prop="platform_id">
+          <!-- <el-input
+            v-model="ruleForm.platform_id"
+            style="width: 300px"
+            placeholder="请输入"
+          ></el-input> -->
+          <search-terrace
+            :value="ruleForm.platform_id"
+            :disabled="false"
+            :isDetail="false"
+            :is_show="'0'"
+            :placeholder="'所属平台'"
+            @searchChange="platform_codesearchChange"
+          />
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="centerDialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="goodsExport">导 出</el-button>
+      </span>
+    </el-dialog>
+    <!-- 弹窗 新增/修改 -->
+    <add-edit
+      :id="modelId"
+      :show-model="showModel"
+      :sitem="sitem"
+      @refresh="searchList"
+      @cancel="showModel = false"
+    />
+  </div>
+</template>
+<script>
+import asyncRequest from "@/apis/service/youzan/othgoodsOnline";
+import mixinPage from "@/mixins/elPaginationHandle";
+import { mapGetters } from "vuex";
+import urlConfig from "@/apis/url-config";
+import resToken from "@/mixins/resToken";
+import { listCol, options1, options8 } from "./columns";
+export default {
+  name: "othgoodsOnline",
+  mixins: [mixinPage, resToken],
+  computed: {
+    //组件SIZE设置
+    ...mapGetters(["tablebtnSize", "searchSize", "size"]),
+    powers() {
+      let tran =
+        this.$store.getters.btnList.find(
+          (item) => item.menu_route == "othgoodsOnline"
+        ) || {};
+      if (tran && tran.action && tran.action.length > 0) {
+        return tran.action;
+      } else {
+        return [];
+      }
+    },
+  },
+  data() {
+    var validate = (rule, value, callback) => {
+      if (value == "") {
+        return callback(new Error("必填项不能为空"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      dialogFormVisible: false,
+      donline_formStOps: [],
+      donline_form: {
+        offline_reason: "",
+        offline_remark: "",
+        skuCode: "",
+      },
+      donline_rules: {
+        offline_reason: [
+          { validator: validate, required: true, trigger: "blur" },
+        ],
+        offline_remark: [
+          { validator: validate, required: true, trigger: "blur" },
+        ],
+      },
+      fileUrl: urlConfig.baseURL,
+      ruleForm: {
+        // date: "",
+        platform_id: "",
+        status: "",
+        start_date: "",
+        end_date: "",
+      },
+      rules: {
+        start_date: [
+          {
+            validator: validate,
+            type: "date",
+            required: true,
+            trigger: "change",
+          },
+        ],
+        status: [{ validator: validate, required: true, trigger: "change" }],
+        platform_id: [
+          { validator: validate, required: true, trigger: "change" },
+        ],
+      },
+      centerDialogVisible: false,
+      options1: options1,
+      options8: options8,
+      loading: false,
+      parmValue: {
+        good_name: "", //商品名称
+        spucode: "", //商品编号
+        skucode: "", //商品编号
+        cat_id: "", //商品分类
+        start: "", //开始日期
+        end: "", //结束日期
+        platform_code: "", //平台编码
+        is_stock: "", //是否库存品
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        supplierNo: "", //供应商编号
+        good_type: "", //是否定制
+        brand_id: "", //品牌
+        companyNo: "", //业务企业编号
+        exam_status: "", //审核状态
+        plat_code: "", //平台商品编号
+        creater: "", //
+        company_name: "", //创建人部门
+      },
+
+      // 表格 - 数据
+      tableData: [],
+      // 表格 - 参数
+      table: {
+        stripe: true,
+        border: true,
+        _defaultHeader_: ["setcol"],
+      },
+      // 表格 - 分页
+      pageInfo: {
+        size: 15,
+        curr: 1,
+        total: 0,
+      },
+      // 表格 - 列参数
+      columns: listCol,
+      cat_id: [],
+      brandid: [],
+      select: "1",
+      sinput: "",
+    };
+  },
+  mounted() {
+    const { back } = this.$route.query;
+    if (back) {
+      this.parmValue = JSON.parse(back);
+      console.log(this.parmValue);
+      const { page, size } = this.parmValue;
+      // this.parmValue.start = start || last_start;
+      // this.parmValue.end = end || last_end;
+      if (this.parmValue.brand_id.length > 0) {
+        this.brandid = [this.parmValue.brand_id];
+      }
+
+      this.pageInfo = {
+        size: size,
+        curr: page,
+        total: 0,
+      };
+      //多选条件
+      this.select = this.parmValue.select;
+      // this.sselect = this.parmValue.sselect;
+      this.sinput = this.parmValue.sinput;
+    } else {
+      this.select = "1";
+      //  this.sselect = "创建时间"
+    }
+    this.cat_id = [];
+    // this.brandid = [];
+    this.searchList();
+  },
+  methods: {
+    // 获取异常原因下拉列表
+    async getresultlist() {
+      const res = await asyncRequest.resultlist({
+        page: 1,
+        size: 100,
+        type: "8",
+        status: "3",
+      });
+      if (res && res.code === 0 && res.data) {
+        const { list } = res.data;
+        this.donline_formStOps = list;
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.$message.warning(res.message);
+      }
+    },
+    // 时间函数
+    async time(e) {
+      this.ruleForm.start_date = e.startTime || "";
+      this.ruleForm.end_date = e.endTime || "";
+    },
+    platform_codesearchChange(e) {
+      const { id } = e;
+      this.ruleForm.platform_id = id || "";
+      this.$refs.ruleForm.validateField("platform_id");
+    },
+    async platform_codeChange(e) {
+      const { id } = e;
+      this.parmValue.platform_code = id || "";
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+    //导出
+    async goodsExport() {
+      if (
+        (this.ruleForm.start_date !== "" && this.ruleForm.end_date === "") ||
+        (this.ruleForm.start_date === "" && this.ruleForm.end_date !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      // console.log(this.$refs.ruleForm)
+      // return;
+      await this.$refs.ruleForm.validate(async (valid) => {
+        if (valid) {
+          if (!this.loading) {
+            this.loading = true;
+            let httpType = `aplication/zip`;
+            axios({
+              method: "post",
+              url: this.fileUrl + "admin/exportgood",
+              responseType: "blob",
+              data: this.ruleForm,
+              headers: {
+                Accept: httpType,
+              },
+            })
+              .then((res) => {
+                if (res && res.status == 200 && res.data) {
+                  let url = window.URL.createObjectURL(
+                    new Blob([res.data], {
+                      type: httpType,
+                    })
+                  );
+                  let link = document.createElement("a");
+                  link.style.display = "none";
+                  link.href = url;
+                  let excelName = "商品.zip";
+                  link.setAttribute("download", excelName);
+                  document.body.appendChild(link);
+                  link.click();
+                  link.remove();
+                  window.URL.revokeObjectURL(url); //释放掉blob对象
+                  this.$message.success(`导出成功!`);
+                  setTimeout(() => {
+                    this.loading = false;
+                  }, 500);
+                } else {
+                  this.$message.error(res.data.message);
+                  setTimeout(() => {
+                    this.loading = false;
+                  }, 500);
+                }
+              })
+              .catch((error) => {
+                console.log(error);
+                this.loading = false;
+              });
+          }
+          // this.loading = true;
+
+          // const res = await asyncRequest.exportgood(this.ruleForm);
+          // if (res && res.code === 0) {
+          //   this.$message.warning(res.message);
+          //   console.log(res);
+          //   this.loading = false;
+          // } else if (res && res.code >= 100 && res.code <= 104) {
+          //   await this.logout();
+          // } else {
+          //   this.loading = false;
+          //   this.$message.warning(res.message);
+          // }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    //点击详情
+    getRouter(toRouter, queryId) {
+      if (toRouter && queryId) {
+        let model = {
+          id: queryId,
+          type: "view",
+        };
+
+        //有多选框的条件
+        this.parmValue.select = this.select;
+        // this.parmValue.sselect = this.sselect ;
+        this.parmValue.sinput = this.sinput;
+        //
+        console.log(this.parmValue);
+        let routerModel = {
+          options: JSON.parse(JSON.stringify(this.parmValue)),
+          router: this.$route.path,
+        };
+        model.preModel = JSON.stringify(routerModel);
+
+        this.routeGoto(toRouter, model);
+      } else {
+        this.$message.warning("暂未找到相关流程!");
+      }
+    },
+    restSearch() {
+      this.select = "1";
+      this.sinput = "";
+      this.cat_id = [];
+      this.brandid = [];
+      // 表格 - 分页
+      this.pageInfo = {
+        size: 15,
+        curr: 1,
+        total: 0,
+      };
+      this.parmValue = {
+        good_name: "", //商品名称
+        spucode: "", //商品编号
+        skucode: "", //商品编号
+        cat_id: "", //商品分类
+        start: "", //开始日期
+        end: "", //结束日期
+        platform_code: "", //平台编码
+        is_stock: "", //是否库存品
+        page: 1, // 页码
+        size: 15, // 每页显示条数
+        supplierNo: "", //供应商编号
+        good_type: "", //是否定制
+        brand_id: "", //品牌
+        companyNo: "", //业务企业编号
+        exam_status: "", //审核状态
+        plat_code: "", //平台商品编号
+        creater: "", //
+        company_name: "", //创建人部门
+      };
+      this.searchList();
+    },
+    //商品品牌选择
+    async brandidsearchChange(e) {
+      const { id, code, label } = e;
+      if (id) {
+        this.brandid = [id];
+        this.parmValue.brand_id = id;
+        this.parmValue.supplierName = label;
+      } else {
+        this.brandid = [];
+        this.parmValue.brand_id = "";
+        this.parmValue.supplierName = "";
+      }
+      this.parmValue.brand_id = this.brandid.toString();
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+    // 时间
+    async handleTime(e) {
+      this.parmValue.start = e.startTime || "";
+      this.parmValue.end = e.endTime || "";
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end !== "") ||
+        (this.parmValue.start === "" && this.parmValue.end === "")
+      ) {
+        this.pageInfo.curr = 1;
+        this.parmValue.page = 1;
+        await this.searchList();
+      }
+    },
+    /**
+     * 商品重新上线
+     * @param {String} id id
+     * @param {String} status 0-禁用 1-启用
+     */
+    async get_againonline(skuCode) {
+      await this.$confirm(`确定要重新发起上线流程?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          const model = {
+            skuCode: skuCode,
+          };
+          const res = await asyncRequest.againonline(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: "重新发起上线流程成功!",
+              message: "",
+            });
+            await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+            
+          } else {
+            this.loading = false;
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    //点击下线
+    async showDonlineDlg(skuCode) {
+      this.dialogFormVisible = true;
+      this.donline_form = {
+        offline_reason: "",
+        offline_remark: "",
+        skuCode: "",
+      };
+      this.donline_form.skuCode = skuCode;
+      // this.donlineDlg(skuCode)
+    },
+    //商品下线原因 确定
+    async donlineDlg() {
+      await this.$refs.donline_Form.validate(async (valid) => {
+        if (valid) {
+          this.dialogFormVisible = false;
+          this.get_donline(this.donline_form.skuCode);
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    /**
+     * 商品下线
+     * @param {String} id id
+     * @param {String} status 0-禁用 1-启用
+     */
+    async get_donline(skuCode) {
+      await this.$confirm(`确定要下线商品?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          let obj = {
+            skuCode: skuCode,
+            exam_status: "8",
+          };
+          let model = { ...this.donline_form, ...obj };
+          console.log("aaaaa", model);
+
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: res.message,
+              message: "",
+            });
+            await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.loading = false;
+            this.$message.warning(res.message);
+          }
+
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    /**
+     * 启用/禁用
+     * @param {String} id id
+     * @param {String} status 0-禁用 1-启用
+     */
+    async changeStatus(id, status) {
+      await this.$confirm(`确定要改为${status === "1" ? "禁用" : "启用"}?`, {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          this.loading = true;
+          const model = {
+            id: id,
+            status: status === "1" ? "0" : "1",
+          };
+          const res = await asyncRequest.status(model);
+          if (res && res.code === 0) {
+            this.loading = false;
+            this.$notify.success({
+              title: "状态修改成功!",
+              message: "",
+            });
+            await this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.loading = false;
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    async deleteItem(code) {
+      await this.$confirm("确定要删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(async () => {
+          const model = {
+            codes: [code],
+          };
+          const res = await asyncRequest.delete(model);
+          if (res && res.code === 0) {
+            this.$notify.success({
+              title: "删除成功",
+              message: "",
+            });
+            this.searchList();
+          } else if (res && res.code >= 100 && res.code <= 104) {
+            await this.logout();
+          } else {
+            this.$message.warning(res.message);
+          }
+        })
+        .catch(() => {
+          console.log("取消");
+        });
+    },
+    // 刷新表格
+    async searchList() {
+      if (
+        (this.parmValue.start !== "" && this.parmValue.end === "") ||
+        (this.parmValue.start === "" && this.parmValue.end !== "")
+      ) {
+        this.$message.warning("时间区间不完整!");
+        return;
+      }
+      this.loading = true;
+      let model = JSON.parse(JSON.stringify(this.parmValue));
+      model.good_name = this.select === "1" ? this.sinput : ""; //商品名称
+      model.spucode = this.select === "2" ? this.sinput : ""; //商品编号
+      model.skucode = this.select === "8" ? this.sinput : ""; //商品编号
+      // model.platform_code = this.select === "1" ? this.sinput : ""; //平台编码
+      // model.supplierNo = this.select === "1" ? this.sinput : ""; //供应商编号
+      model.companyNo = this.select === "5" ? this.sinput : ""; //业务企业编号
+      // model.exam_status = this.select === "1" ? this.sinput : ""; //审核状态
+      model.plat_code = this.select === "6" ? this.sinput : ""; //平台商品编号
+      model.creater = this.select === "7" ? this.sinput : ""; //
+      model.company_name = this.select === "9" ? this.sinput : ""; // 部门
+      const res = await asyncRequest.list(model);
+      if (res && res.code === 0 && res.data) {
+        this.tableData = res.data.list;
+        this.tableData.forEach((a) => {
+          a.cat_name = "";
+          let list = a.cat_info || [];
+          list.forEach((b, i) => {
+            a.cat_name += i == 0 ? b.name : "/" + b.name;
+          });
+        });
+        this.pageInfo.total = Number(res.data.count);
+      } else if (res && res.code >= 100 && res.code <= 104) {
+        await this.logout();
+      } else {
+        this.tableData = [];
+        this.pageInfo.total = 0;
+      }
+      this.getresultlist();
+      this.loading = false;
+    },
+    //商品分类选择
+    async goods_class_change(e) {
+      this.cat_id = e;
+      this.parmValue.cat_id =
+        this.cat_id.length === 0 ? "" : this.cat_id[this.cat_id.length - 1];
+      this.pageInfo.curr = 1;
+      this.parmValue.page = 1;
+      await this.searchList();
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 0 - 0
src/views/youzan/othgoodsOnline/商品上线管理


この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません