浏览代码

1. 新增

MONSTER-ygh 10 月之前
父节点
当前提交
8c47ad5c3a

+ 81 - 0
src/api/otaMr/tiktok.js

@@ -0,0 +1,81 @@
+import request from '@/utils/request'
+// 分页查询
+export const pageList = (query) => {
+  return request({
+    url: '/thirdapi/douyin/product/list',
+    method: 'post',
+    data: query
+  })
+}
+
+// 分页查询
+export const goodsList = (query) => {
+  return request({
+    url: '/thirdapi/otaGoods/goodsList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 获取OTA配置
+export const getOtaConfig = (query) => {
+  return request({
+    url: '/thirdapi/otaConfig/getInfo',
+    method: 'get',
+    params: query
+  })
+}
+
+// 保存OTA
+export const otaSave = (data) => {
+  return request({
+    url: '/thirdapi/otaConfig/save',
+    method: 'post',
+    data: data
+  })
+}
+
+// 新增/修改
+export const saveAndEdit = (data) => {
+  return request({
+    url: '/thirdapi/otaGoods/save',
+    method: 'post',
+    data: data
+  })
+}
+
+// 删除模板
+export const deleteById = (id) => {
+  return request({
+    url: '/thirdapi/otaGoods/deleteById',
+    method: 'delete',
+    params: {id:id}
+  })
+}
+
+/** 系统-抖音-ota-(商品推送)  */
+export const pushById = (data) => {
+    return request({
+        url: '/thirdapi/douyin/product/push',
+        method: 'post',
+        data: data
+    })
+}
+
+/** 系统-抖音(商品上下架)  */
+export const updateById = (data) => {
+  return request({
+      url: '/thirdapi/douyin/product/update',
+      method: 'post',
+      data: data
+  })
+}
+
+/** 系统-抖音(商品批量更新库存)  */
+export const stockUpdateById = (data) => {
+  return request({
+      url: '/thirdapi/douyin/product/stock/update',
+      method: 'post',
+      data: data
+  })
+}

+ 32 - 8
src/views/marketing/activity/dialog/addAndEdit.vue

@@ -11,7 +11,7 @@
   <el-dialog
     :title="title"
     :visible.sync="open"
-    width="700px"
+    width="1200px"
     append-to-body
     :close-on-click-modal="false"
     @close="cancel"
@@ -37,7 +37,7 @@
             end-placeholder="结束日期">
           </el-date-picker>
         </el-form-item>
-        <el-form-item label="优惠劵总数" prop="couponNum" required>
+        <!-- <el-form-item label="优惠劵总数" prop="couponNum" required>
           <el-input
             v-model="form.couponNum"
             @change="changeNumber('couponNum')"
@@ -45,7 +45,7 @@
             clearable
             style="width: 100%;"
           />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="优惠劵" prop="couponList" required>
           <!-- <el-input
             v-model="form.couponList"
@@ -75,6 +75,11 @@
                 <span>{{ parseTime(scope.row.createTime) }}</span>
               </template>
             </el-table-column>
+            <el-table-column label="数量" align="center" prop="num" width="250">
+                <template slot-scope="scope">
+                  <el-input-number v-model="scope.row.num" controls-position="right"></el-input-number>
+                </template>
+              </el-table-column>
         </el-table>
       </div>
     </div>
@@ -92,7 +97,7 @@
         <span v-else>保存</span>
       </el-button>
     </span>
-    <el-dialog title="选择优惠券" :visible.sync="showSelectTable" width="700px" append-to-body>
+    <el-dialog title="选择优惠券" :visible.sync="showSelectTable" width="1000px" append-to-body>
       <div class="dialog select-table">
           <div class="table-title"></div>
             <el-table
@@ -119,7 +124,7 @@
               <el-button @click="showSelectTable=false">取消</el-button>
               <el-button
                 type="primary"
-                @click="confirmSelection"
+                @click="confirmSelection(true)"
                 element-loading-text="提交中..."
                 element-loading-spinner="el-icon-loading"
                 element-loading-background="rgba(0, 0, 0, 0.8)"
@@ -202,6 +207,7 @@ export default {
         });
       }else{
         this.title = "新增活动";
+        this.reset()
         this.$nextTick(() => {
           this.$refs["form"].clearValidate();
         });
@@ -238,8 +244,23 @@ export default {
       this.$refs["form"].validate(async (valid) => {
         if (valid) {
           try {
+            let params = JSON.parse(JSON.stringify(this.form))
+            let flog = false
+            this.tempCouponList.forEach((item,index)=>{
+              if(!item.num && item.num != 0) {
+                flog = true
+              }
+            })
+            if(flog) {
+              this.$message.error("请输入优惠卷的数量!");
+              return
+            }
+            params.couponList = this.tempCouponList.map(item=>{return {
+              couponId: item.id,
+              num: item.num
+            }});
             this.loading = true;
-            const { code } = await saveAndEdit({ ...this.form });
+            const { code } = await saveAndEdit({ ...params });
             if (code === 200) {
               this.$message.success("操作成功!");
               this.$emit("getList");
@@ -306,10 +327,13 @@ export default {
       // console.log('val', val);
       this.tempCouponList = val;
     },
-    confirmSelection() {
+    confirmSelection(init) {
       this.showSelectTable = false;
       console.log('this.tempCouponList', this.tempCouponList);
-      this.form.couponList = this.tempCouponList.map(item=>{return item.id});
+      this.form.couponList = this.tempCouponList.map(item=>{return {
+        couponId: item.id,
+        num: item.num
+      }});
     }
   },
 };

+ 6 - 1
src/views/marketing/activity/index.vue

@@ -125,7 +125,7 @@
     <el-dialog
       title="查看"
       :visible.sync="visibleStatus"
-      width="600px"
+      width="1000px"
       :destroy-on-close="true"
       :close-on-click-modal="false"
     >
@@ -162,6 +162,11 @@
                     <span>{{ parseTime(scope.row.createTime) }}</span>
                   </template>
                 </el-table-column>
+                <el-table-column label="数量" align="center" prop="num" width="160">
+                  <template slot-scope="scope">
+                    <span>{{ scope.row.num }}</span>
+                  </template>
+                </el-table-column>
             </el-table>
           </div>
         </div>

+ 1 - 1
src/views/officesale/preorder.vue

@@ -52,7 +52,7 @@ import { ticketout } from "@/api/officesale/officesale";
 const https = require('https');
 const axios = require('axios');
     export default {
-        name: "preorder",
+        name: "Preorder1",
         data() {
             return {
                 // 遮罩层

+ 1 - 1
src/views/officesale/ticketingSales.vue

@@ -208,7 +208,7 @@
  import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
  import selectListMixin from "./mixins/selectList"
  export default {
-    name: "TicketingSales1",
+    name: "OfficesaleticketingSales1",
     components: {
         increaseViewers
     },

+ 20 - 2
src/views/order/groupBuyingMr/index.vue

@@ -138,6 +138,15 @@
             end-placeholder="结束日期">
           </el-date-picker>
         </el-form-item>
+        <el-form-item label="商户退款单号" label-width="100px">
+          <el-input
+            v-model="queryParams.refundPaymentId"
+            placeholder="请输入商户退款单号"
+            clearable
+            style="width: 240px;"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
           <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -214,6 +223,7 @@
               <dict-tag :options="dict.type.order_status_type" :value="scope.row.status"/>
             </template>
           </el-table-column>
+          <el-table-column label="商户退款单号" align="center" prop="refundPaymentId" />
           <el-table-column label="已核销票数" align="center" prop="usedTotal">
             <template slot-scope="scope">
               <span>{{ scope.row.usedTotal }}</span>
@@ -402,7 +412,7 @@ import moment from "moment"
 const https = require('https');
 const axios = require('axios');
 export default {
-  name: "agreement",
+  name: "GroupBuyingMr",
   dicts: ['agreement_type', 'team_type','order_status_type','pay_way_type'],
   components: { detailsDia },
   data() {
@@ -531,6 +541,9 @@ export default {
     this.pagePerformTimeListFun(this.queryParams.performDate)
     this.getList();
   },
+  activated(){
+    this.getList();
+  },
   mounted() {
     this.resizeObserver = new ResizeObserver(entries => {
       for (let entry of entries) {
@@ -563,7 +576,11 @@ export default {
           this.dataList = response.data.rows;
           this.total = response.data.total;
           this.loading = false;
-      });
+      }).catch(()=>{
+        this.dataList = [];
+        this.total = 0;
+        this.loading = false;
+      })
     },
     // 取消按钮
     cancel() {
@@ -604,6 +621,7 @@ export default {
       this.$set(this.queryParams, 'performTimeId', '');
       this.$set(this.queryParams, 'invoiceTime', '');
       this.$set(this.queryParams, 'salerPerson', '');
+      this.$set(this.queryParams, 'refundPaymentId', '');
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },

+ 20 - 2
src/views/order/orderMr/index.vue

@@ -179,6 +179,15 @@
             end-placeholder="结束日期">
           </el-date-picker>
         </el-form-item>
+        <el-form-item label="商户退款单号" label-width="100px">
+          <el-input
+            v-model="queryParams.refundPaymentId"
+            placeholder="请输入商户退款单号"
+            clearable
+            style="width: 240px;"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
         <el-form-item>
           <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
           <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -249,6 +258,7 @@
               <dict-tag :options="dict.type.order_status_type" :value="scope.row.status"/>
             </template>
           </el-table-column>
+          <el-table-column label="商户退款单号" align="center" prop="refundPaymentId" />
           <el-table-column label="已核销票数" align="center" prop="usedTotal">
             <template slot-scope="scope">
               <span>{{ scope.row.usedTotal }}</span>
@@ -358,7 +368,7 @@ const https = require('https');
 const axios = require('axios');
 import moment from "moment"
 export default {
-  name: "agreement",
+  name: "OrderMr",
   dicts: ['order_form_type','order_status_type','pay_way_type'],
   components: { detailsDia },
   data() {
@@ -418,6 +428,9 @@ export default {
     this.pagePerformTimeListFun(this.queryParams.performDate)
     this.getList();
   },
+  activated(){
+    this.getList();
+  },
   mounted() {
     this.resizeObserver = new ResizeObserver(entries => {
       for (let entry of entries) {
@@ -472,7 +485,11 @@ export default {
           this.dataList = response.data.rows;
           this.total = response.data.total;
           this.loading = false;
-      });
+      }).catch(()=>{
+        this.dataList = [];
+        this.total = 0;
+        this.loading = false;
+      })
     },
     // 取消按钮
     cancel() {
@@ -504,6 +521,7 @@ export default {
       this.$set(this.queryParams, 'performTimeId', '');
       this.$set(this.queryParams, 'payWay', '');
       this.$set(this.queryParams, 'invoiceTime', '');
+      this.$set(this.queryParams, 'refundPaymentId', '');
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },

+ 4 - 1
src/views/order/viewers/index.vue

@@ -321,7 +321,7 @@ const axios = require('axios');
 const mathM = require('mathjs')
 import moment from "moment"
 export default {
-  name: "agreement",
+  name: "Viewers",
   dicts: ['order_form_type', 'order_status_type', 'pay_way_type', 'personnel_type'],
   components: { detailsDia },
   data() {
@@ -411,6 +411,9 @@ export default {
     this.pagePerformTimeListFun(this.queryParams.performDate)
     this.getList();
   },
+  activated(){
+    this.getList();
+  },
   mounted() {
     this.resizeObserver = new ResizeObserver(entries => {
       for (let entry of entries) {

+ 4 - 1
src/views/order/writeOffMr/index.vue

@@ -105,7 +105,7 @@ import { pageList } from '@/api/order/writeOffMr'
 import detailsDia from "./dialog/details.vue";
 import moment from "moment"
 export default {
-  name: "agreement",
+  name: "WriteOffMr",
   dicts: ['device_sys_type'],
   components: { detailsDia },
   data() {
@@ -142,6 +142,9 @@ export default {
     this.$set(this.queryParams,'writeoffTime',[moment().format("yyyy-MM-DD"),moment().format("yyyy-MM-DD")])
     this.getList();
   },
+  activated(){
+    this.getList();
+  },
   methods: {
     /** 查询列表 */
     getList() {

src/views/otaMr/dialog/addAndEdit.vue → src/views/otaMr/meituan/dialog/addAndEdit.vue


src/views/otaMr/dialog/dataEdit.vue → src/views/otaMr/meituan/dialog/dataEdit.vue


src/views/otaMr/index.vue → src/views/otaMr/meituan/index.vue


+ 224 - 0
src/views/otaMr/tiktok/dialog/addAndEdit.vue

@@ -0,0 +1,224 @@
+<!--
+ * @Description: 新增/编辑弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: Sugar.
+ * @LastEditTime: 2023-11-24 13:55:00
+ * @FilePath: \cattle_webui\src\views\otaMr\dialog\AddOrEditDialog.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="700px"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog" style="padding: 0">
+      <el-table ref="tables" v-loading="tabLoading" :data="dataList" border @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="50" align="center" />
+        <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+        <el-table-column label="票务名称" align="center" prop="goodsName" />
+        <el-table-column label="座位类型" align="center" prop="goodsName" />
+        <el-table-column label="市场价" align="center" prop="salePrice" width="160">
+          <template slot-scope="scope">
+            <span>¥{{ scope.row.salePrice }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="销售价" align="center" prop="salePrice" width="160">
+          <template slot-scope="scope">
+            <span>¥{{ scope.row.salePrice }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="结算价" align="center" prop="salePrice" width="160">
+          <template slot-scope="scope">
+            <el-input
+              type="number"
+              v-model="scope.row.salePrice"
+              placeholder=""
+              clearable
+              @change="changePriceAmount('salePrice')"
+              style="width: 260px;"
+            >
+            </el-input>
+          </template>
+        </el-table-column>
+      </el-table>
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        v-loading.fullscreen.lock="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      >
+        <span v-if="loading">提交中...</span>
+        <span v-else>确认添加</span>
+      </el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { goodsList, saveAndEdit } from '@/api/otaMr/otaMr'
+import Editor from "@/components/Editor";
+import { getToken } from "@/utils/auth";
+export default {
+  name: "addAndEdit",
+  props: {
+    dict: {
+      type: Object,
+      default: () => [],
+    },
+  },
+  components: {
+    Editor,
+  },
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      open: false,
+      loading: false,
+      tabLoading: false,
+      dataList: [],
+      total: 0,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        ota: '1'
+      },
+      selectList: []
+    };
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    openDialog(title, obj) {
+      this.open = true;
+      this.title = "票务信息";
+      this.getList(obj);
+    },
+    /** 价格输入事件 */
+    changePriceAmount(row) {
+      if(row.salePrice * 1 < 0){
+        this.$message.error("输入需大于或等于0!");
+        row.salePrice = '';
+        return false
+      }
+    },
+    /** 查询列表 */
+    getList(obj) {
+      this.tabLoading = true;
+      this.queryParams.ota = obj.ota;
+      goodsList(this.queryParams)
+        .then(response => {
+            // this.dataList = response.data.rows;
+            // this.total = response.data.total;
+            // this.tabLoading = false;
+          this.dataList = response.data;
+          this.tabLoading = false;
+          }
+        ).catch(() => {
+        this.tabLoading = false;
+      });
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.selectList = selection;
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    async submitForm() {
+      try {
+        if(this.selectList.length <= 0) {
+          this.$message.error("请勾选商品!");
+          return false
+        }
+        let postList = [];
+        this.selectList.forEach(item => {
+          postList.push({
+            "ota": this.queryParams.ota,
+            "goodsId": item.id,
+            "otaPrice": item.salePrice
+          })
+        })
+        this.loading = true;
+        const { code } = await saveAndEdit(postList);
+        if (code === 200) {
+          this.$message.success("操作成功!");
+          this.$emit("getList");
+          this.cancel();
+        }
+      } catch (error) {
+      } finally {
+        this.loading = false;
+      }
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.open = false;
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  padding: 0 30px;
+  max-height: 65vh;
+  overflow-y: auto;
+}
+.dialog {
+  padding: 0 30px;
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+</style>

+ 253 - 0
src/views/otaMr/tiktok/dialog/dataEdit.vue

@@ -0,0 +1,253 @@
+<!--
+ * @Description: 新增/编辑弹框
+ * @Author: Sugar.
+ * @Date: 2023-11-24 13:55:00
+ * @LastEditors: Sugar.
+ * @LastEditTime: 2023-11-24 13:55:00
+ * @FilePath: \cattle_webui\src\views\otaMr\dialog\dataEdit.vue
+ * @Copyright: Copyright (c) 2016~2023 by Sugar., All Rights Reserved.
+-->
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="70vw"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog">
+      <div>
+        <el-form :model="form" ref="form" size="small" :rules="rules" :inline="true" label-width="100px">
+          <el-form-item label="门店POIID" prop="poiId">
+            <el-input
+              v-model="form.poiId"
+              placeholder="请输入门店POIID"
+              clearable
+              style="width: 240px"
+              @keyup.enter.native="handleQuery"
+            />
+          </el-form-item>
+          <el-form-item label="商品类目ID" prop="categoryId">
+            <el-select
+              v-model="form.categoryId"
+              placeholder="商品类目ID"
+              clearable
+              style="width: 240px"
+            >
+              <el-option
+                v-for="dict in dict.type.tiktok_category"
+                :key="dict.value"
+                :label="dict.label"
+                :value="dict.value"
+              />
+            </el-select>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table 
+      row-key="tableId"
+      ref="tables" 
+      v-loading="loading" 
+      :data="goodsList" 
+      border 
+      @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+        <el-table-column label="座位类型" align="center" prop="priceName" />
+        <el-table-column label="销售价" align="center" prop="actualAmount" width="250">
+          <template slot-scope="scope">
+            <span v-if="!isCheck(scope.row)">{{ scope.row.actualAmount }}</span>
+            <el-input-number v-else v-model="scope.row.actualAmount" controls-position="right"></el-input-number>
+          </template>
+        </el-table-column>
+        <el-table-column label="结算价" align="center" prop="originAmount" width="250">
+          <template slot-scope="scope">
+            <span v-if="!isCheck(scope.row)">{{ scope.row.originAmount }}</span>
+            <el-input-number v-else v-model="scope.row.originAmount" controls-position="right"></el-input-number>
+          </template>
+        </el-table-column>
+        <el-table-column label="开始时间" align="center" prop="timeStart" />
+        <el-table-column label="结束时间" align="center" prop="timeEnd" />
+        <el-table-column label="抖音排期状态" align="center" prop="status">
+          <template slot-scope="scope">
+            <dict-tag :options="dict.type.tiktok_scheduling_status" :value="scope.row.status"/>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button  @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        v-loading.fullscreen.lock="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      >
+        <span v-if="loading">提交中...</span>
+        <span v-else>推送已选</span>
+      </el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { pushById } from "@/api/otaMr/tiktok";
+export default {
+  name: "dataEdit",
+  dicts: ['tiktok_category','tiktok_scheduling_status'],
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      open: false,
+      loading: false,
+      goodsList: [],
+      form: {},
+      rules: {
+        poiId: [{ required: true, message: "请输入门店POIID", trigger: ["change","blur"] }],
+        categoryId: [{ required: true, message: "请选择商品类目ID", trigger: ["change","blur"] }],
+      },
+      multipleSelection: []
+    };
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    openDialog(title, obj, type) {
+      this.open = true;
+      this.multipleSelection = []
+      this.form = JSON.parse(JSON.stringify(obj))
+      
+      let list = []
+      obj.sku.forEach((item,index)=>{
+        list.push({
+          ...item,
+          tableId: "id_" + index
+        })
+      })
+      this.goodsList = JSON.parse(JSON.stringify(list))
+      this.$nextTick(()=>{
+        this.goodsList.forEach((item)=>{
+          if(item.checkFlag == 1) {
+            this.$refs.tables.toggleRowSelection(item,true)
+          }
+        })
+        this.$refs["form"].clearValidate()
+      })
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(async (valid) => {
+        if (valid) {
+          try {
+            if(!this.multipleSelection && this.multipleSelection.length <= 0) {
+              this.$message.error("请选择上推送的数据!!!");
+              return
+            } 
+            let flog = false
+            let list = []
+            this.multipleSelection.forEach((item)=>{
+              list.push({
+                ...item,
+                checkFlag: 1
+              })
+              if((!item.actualAmount && item.actualAmount !=0) || (!item.originAmount && item.originAmount !=0)) {
+                flog = true
+              } 
+            })
+            if(flog) {
+              this.$message.error("请输入销售价和结算价!!!");
+              return
+            }
+            this.loading = true;
+            const { code } = await pushById({ 
+              ...this.form,
+              sku: list
+            });
+            if (code === 200) {
+              this.$message.success("操作成功!");
+              this.$emit("getList");
+              this.cancel();
+            }
+          } catch (error) {
+            console.error("error====",error)
+          } finally {
+            this.loading = false;
+          }
+        }else {
+
+        }
+      })
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      this.$refs["form"].clearValidate()
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+    isCheck(row){
+      let flog = false
+      this.multipleSelection.forEach((item,index)=>{
+        if(item.tableId == row.tableId) {
+          flog = true
+        }
+      })
+      return flog
+    },
+    handleSelectionChange(val) {
+      console.log("选中了====", val)
+      this.multipleSelection = val;
+    }
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dialog {
+  padding: 0 30px;
+  max-height: 65vh;
+  overflow-y: auto;
+}
+.dialog {
+  padding: 0 30px;
+  .upload-btn {
+    width: 100px;
+    height: 100px;
+    background-color: #fbfdff;
+    border: dashed 1px #c0ccda;
+    border-radius: 5px;
+    i {
+      font-size: 30px;
+      margin-top: 20px;
+    }
+    &-text {
+      margin-top: -10px;
+    }
+  }
+  .avatar {
+    cursor: pointer;
+  }
+}
+</style>

+ 233 - 0
src/views/otaMr/tiktok/index.vue

@@ -0,0 +1,233 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+              type="primary"
+              plain
+              icon="el-icon-key"
+              size="mini"
+              @click="handleKey"
+              v-hasPermi="['otaMr:otaMr:key']"
+            >填写密钥</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['otaMr:otaMr:add']"
+        >添加商品</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" :search="false" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table ref="tables" v-loading="loading" :data="dataList" border>
+      <el-table-column label="序号" align="center" type="index" width="50"></el-table-column>
+      <el-table-column label="门店POIID" align="center" prop="poiId" />
+      <el-table-column label="商品类目ID" align="center" prop="categoryId" />
+      <el-table-column label="剧目名称" align="center" prop="performName" />
+      <el-table-column label="商品名称" align="center" prop="goodsName" />
+      <el-table-column label="时刻信息" align="center" prop="goodsName">
+        <template slot-scope="scope">
+          <span>{{ scope.row.times }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="抖音审核状态" align="center" prop="process">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.tiktok_process" :value="scope.row.process"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="商品上架/下架" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.tiktok_online" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="最新上架时间" align="center" prop="goodsName3" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            @click="handlePush(scope.row,scope.index)"
+            v-if="(scope.row.status == 0 || scope.row.status == 1) && scope.row.process == 4"
+            v-hasPermi="['otaMr:tiktok:push']"
+          >{{ scope.row.status == 0 ? '上线' : '下线' }}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleInventory(scope.row,scope.index)"
+            v-if="scope.row.status == 1"
+            v-hasPermi="['otaMr:tiktok:push']"
+          >日历库存推送</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            @click="handleUpdate(scope.row,scope.index)"
+            v-hasPermi="['otaMr:tiktok:scheduling']"
+          >排期推送</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 新增/编辑弹框 -->
+    <add-and-edit
+      ref="addAndEdit"
+      :dict="dict"
+      @getList="getList"
+    />
+
+    <!-- 编辑商品弹框 -->
+    <data-edit
+      ref="dataEdit"
+      @getList="getList"
+      :dict="dict"></data-edit>
+
+  </div>
+</template>
+
+<script>
+
+import { pageList, updateById,stockUpdateById } from '@/api/otaMr/tiktok'
+import addAndEdit from "./dialog/addAndEdit.vue";
+import dataEdit from "./dialog/dataEdit.vue";
+
+export default {
+  name: "agreement",
+  dicts: ['tiktok_process','tiktok_online'],
+  components: { addAndEdit, dataEdit },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      otaLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 用户表格数据
+      dataList: null,
+      // 弹出层标题
+      title: "",
+
+      otaType: '1',
+
+      // 是否显示弹出层
+      open: false,
+      // 日期范围
+      dateRange: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      visibleStatus: false,
+      newObj: {},
+      visibleType: '',
+      otaForm: {},
+      otaRules: {
+        name: [{ required: true, message: "请输入供应商id", trigger: ["change","blur"] }],
+        otaKey: [{ required: true, message: "请输入client id", trigger: ["change","blur"] }],
+        otaValue: [{ required: true, message: "请输入client secret", trigger: ["change","blur"] }]
+      },
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询列表 */
+    getList() {
+      this.loading = true;
+      pageList(this.addDateRange(this.queryParams, this.dateRange))
+      .then(response => {
+          this.dataList = response.data.rows;
+          this.total = response.data.total?Number(response.data.total):0;
+          this.loading = false;
+        }
+      ).catch(()=>{
+        this.dataList = []
+        this.total = 0;
+        this.loading = false;
+      })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.dateRange = [];
+      this.dataList = [];
+      this.queryParams.pageNum = 1;
+      this.handleQuery();
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.$refs["addAndEdit"].openDialog("新增数据", this.queryParams);
+    },
+
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.$refs["dataEdit"].openDialog("修改数据", row);
+    },
+
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      this.$modal.confirm('是否确认删除商品名称为"' + row.goodsName + '"的数据项?').then(function() {
+        return deleteById(row.id);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 推送 */
+    handlePush(row) {
+      this.$modal.confirm(`是否确认${ row.status == 0 ? '上线': row.status == 1 ?'下线':''}此商品吗?`).then(function() {
+        return updateById({
+          id: row.id,
+          status: row.status == 0 ? 1 : 0
+        });
+      }).then(() => {
+        this.$modal.msgSuccess(`${ row.status == 0 ? '上线': row.status == 1 ?'下线':''}成功`);
+        this.getList();
+      }).catch(() => {
+
+      });
+    },
+    handleInventory(row) {
+      this.$modal.confirm(`是否确认推送此商品的日历库存?`).then(function() {
+        return stockUpdateById({
+          id: row.id,
+        });
+      }).then(() => {
+        this.$modal.msgSuccess(`推送成功`);
+        this.getList();
+      }).catch(() => {
+
+      });
+    },
+  }
+};
+</script>

+ 7 - 1
src/views/windowTicketSales/ticketingCollection.vue

@@ -205,7 +205,7 @@
   const https = require('https');
   const axios = require('axios');
   export default {
-    name: "TicketingCollectionfsd",
+    name: "TicketingCollections1",
     dicts: ['order_form_type','order_status_type'],
     data() {
       return {
@@ -261,6 +261,12 @@
       //this.getList();
       //this.getPrintListApi()
     },
+    activated() {
+      if(this.$route.query&&this.$route.query.orderId) {
+        this.$set(this.queryParams,'orderId',this.$route.query.orderId)
+        this.getList()
+      }
+    },
     methods: {
       /** 查询列表 */
       getList() {