Преглед изворни кода

1. 修改除去伟大转折

MONSTER-ygh пре 9 месеци
родитељ
комит
0e85db81be

+ 1 - 1
.env.staging

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE =伟大转折点后台管理系统(测试)
+VUE_APP_TITLE =剧场票务管理系统
 
 NODE_ENV = staging
 

+ 9 - 0
src/api/order/groupBuyingMr.js

@@ -35,4 +35,13 @@ export function downOrderListXls(params) {
     responseType: 'blob',
     params
   });
+}
+
+// 对公支付
+export const teamOrderReSubmitApi = (data) => {
+  return request({
+    url: '/member/marketTeamApply/teamOrderReSubmit',
+    method: 'post',
+    data: data
+  })
 }

+ 36 - 0
src/api/otaMr/meituan.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+// 分页查询
+export const pageList = (query) => {
+  return request({
+    url: '/thirdapi/meituan/product/list',
+    method: 'post',
+    data: query
+  })
+}
+
+/** 系统-美团-ota-(商品推送)  */
+export const pushById = (data) => {
+    return request({
+        url: '/thirdapi/meituan/product/push',
+        method: 'post',
+        data: data
+    })
+}
+
+/** 系统-美团(商品上下架)  */
+export const updateById = (data) => {
+  return request({
+      url: '/thirdapi/meituan/product/update',
+      method: 'post',
+      data: data
+  })
+}
+
+/** 系统-美团(商品批量更新库存)  */
+export const stockUpdateById = (data) => {
+  return request({
+      url: '/thirdapi/meituan/product/update',
+      method: 'post',
+      data: data
+  })
+}

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

@@ -8,50 +8,6 @@ export const pageList = (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) => {

BIN
src/assets/index_bgm.jpg


+ 2 - 1
src/views/device/gateMr/index.vue

@@ -93,7 +93,8 @@ export default {
       // 查询参数
       queryParams: {
         pageNum: 1,
-        pageSize: 9999,
+        pageSize: 10,
+        deviceType: 1
       },
       visibleStatus: false,
       newObj: {},

+ 22 - 2
src/views/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="app-container home">
+  <div :class="['app-container', 'home',processClass]">
 
   </div>
 </template>
@@ -10,9 +10,20 @@ export default {
   data() {
     return {
       // 版本号
-      version: "3.8.6"
+      version: "3.8.6",
+      processClass: '',
     };
   },
+  created(){
+    // 根据环境切换名称和背景图
+    if(process.env.NODE_ENV == 'development') { // 开发环境
+      this.processClass = 'login-dev';
+    } else if (process.env.NODE_ENV == 'staging') { // 测试环境
+      this.processClass = 'login-stage';
+    } else if (process.env.NODE_ENV == 'production') { // 生产环境
+      this.processClass = 'login-prod';
+    }
+  },
   methods: {
     goTarget(href) {
       window.open(href, "_blank");
@@ -28,8 +39,17 @@ export default {
   align-items: center;
   min-height: calc(100vh - 84px);
   background-size: 100% 100%;
+  
+}
+.login-prod {
   background-image: url("../assets/images/login-prod.jpg") !important;
 }
+.login-stage {
+  background-image: url("../assets/index_bgm.jpg") !important;
+}
+.login-dev {
+  background-image: url("../assets/index_bgm.jpg") !important;
+}
 .home {
   blockquote {
     padding: 10px 20px;

+ 1 - 1
src/views/order/groupBuyingMr/dialog/details.vue

@@ -206,7 +206,7 @@ import { querySeatList } from '@/api/team/applicationMr'
 import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
 export default {
   name: "detailsDia",
-  dicts: ['order_form_type', 'order_status_type', 'pay_way_type', 'personnel_type'],
+  dicts: ['order_form_type', 'order_status_type', 'pay_way_type', 'personnel_type','team_type'],
   data() {
     return {
       title: "编辑",

+ 20 - 18
src/views/order/groupBuyingMr/dialog/resetOrder.vue

@@ -221,13 +221,13 @@
 
 <script>
 import { saveAndEdit, uploadExcel, downloadModel, } from "@/api/team/applicationMr";
-import { getSelectById } from '@/api/order/groupBuyingMr'
+import { getSelectById, teamOrderReSubmitApi } from '@/api/order/groupBuyingMr'
 import { querySeatList } from '@/api/team/applicationMr'
 import { pageList as getSeatType } from '@/api/seatTypeMr/seatTypeMr'
 import { getToken } from "@/utils/auth";
 export default {
   name: "detailsDia",
-  dicts: ['order_form_type', 'order_status_type', 'pay_way_type', 'personnel_type'],
+  dicts: ['order_form_type', 'order_status_type', 'pay_way_type', 'personnel_type','team_type'],
   data() {
     return {
       title: "编辑",
@@ -329,22 +329,24 @@ export default {
         this.seatSelectList = res.data.viewersOrderList
         this.form = res.data;
         this.formCopy = {
-          "theatreId": res.data.theatreId,
-          "theatreName": res.data.theatreName,
-          "auditoriumId": res.data.auditoriumId,
-          "auditoriumName": res.data.auditoriumName,
-          "performId": res.data.performId,
-          "performName": res.data.performName,
-          "seatTypeId": res.data.seatTypeId,
-          "seatTypeName": res.data.seatTypeName,
-          "goodsId": res.data.goodsId,
-          "goodsName": res.data.goodsName,
-          "performTimeId": res.data.performTimeId,
-          "price": res.data.price,
-          "priceTotal": res.data.priceTotal,
+          "orderId": row.id,
           "viewerList": [],
-          "linkName": res.data.linkName,
-          "linkPhone": res.data.linkPhone
+          // "theatreId": res.data.theatreId,
+          // "theatreName": res.data.theatreName,
+          // "auditoriumId": res.data.auditoriumId,
+          // "auditoriumName": res.data.auditoriumName,
+          // "performId": res.data.performId,
+          // "performName": res.data.performName,
+          // "seatTypeId": res.data.seatTypeId,
+          // "seatTypeName": res.data.seatTypeName,
+          // "goodsId": res.data.goodsId,
+          // "goodsName": res.data.goodsName,
+          // "performTimeId": res.data.performTimeId,
+          // "price": res.data.price,
+          // "priceTotal": res.data.priceTotal,
+          // "viewerList": [],
+          // "linkName": res.data.linkName,
+          // "linkPhone": res.data.linkPhone
         }
         if(res.data.corporate){
           this.voucherUrl = res.data.corporate.voucherUrl.split(',')||[];
@@ -533,7 +535,7 @@ export default {
           this.$message.error("请导入观影人信息!");
           return
         }
-        const { code } = await saveAndEdit({ ...params });
+        const { code } = await teamOrderReSubmitApi({ ...params });
         if (code === 200) {
           this.$message.success("操作成功!");
           this.$emit("getList");

+ 139 - 143
src/views/otaMr/meituan/dialog/dataEdit.vue

@@ -11,136 +11,107 @@
   <el-dialog
     :title="title"
     :visible.sync="open"
-    width="600px"
+    width="70vw"
     append-to-body
     :close-on-click-modal="false"
     @close="cancel"
   >
     <div class="dialog">
-      <el-form :model="form" ref="form" :rules="rules" label-width="80px">
-        <el-form-item label="票务名称:">
-          <el-input
-            disabled
-            type="number"
-            v-model="form.priceAmount"
-            placeholder="票务名称"
-            clearable
-            style="width: 260px;"
-          />
-        </el-form-item>
-        <el-form-item label="座位类型:">
-          <el-input
-            disabled
-            type="number"
-            v-model="form.priceAmount"
-            placeholder="座位类型"
-            clearable
-            style="width: 260px;"
-          />
-        </el-form-item>
-        <el-form-item label="市场价:">
-          <el-input
-            disabled
-            type="number"
-            v-model="form.priceAmount"
-            placeholder=""
-            clearable
-            style="width: 260px;"
-          >
-            <template slot="append">元</template>
-          </el-input>
-        </el-form-item>
-        <el-form-item label="销售价:">
-          <el-input
-            disabled
-            type="number"
-            v-model="form.priceAmount"
-            placeholder=""
-            clearable
-            style="width: 260px;"
-          >
-            <template slot="append">元</template>
-          </el-input>
-        </el-form-item>
-        <el-form-item label="结算价:" prop="priceAmount">
-          <el-input
-            :disabled="isDisabled"
-            type="number"
-            v-model="form.priceAmount"
-            placeholder=""
-            clearable
-            @change="changePriceAmount"
-            style="width: 260px;"
-          >
-            <template slot="append">元</template>
-          </el-input>
-        </el-form-item>
-
-      </el-form>
+      <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"
+        :disabled="!multipleSelection || multipleSelection.length == 0"
         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>
+        <span v-else>推送已选</span>
       </el-button>
     </span>
   </el-dialog>
 </template>
 
 <script>
-import { saveAndEdit } from "@/api/ticketMr/priceMr";
-import Editor from "@/components/Editor";
-import { getToken } from "@/utils/auth";
+import { pushById } from "@/api/otaMr/meituan";
 export default {
   name: "dataEdit",
-  props: {
-    dict: {
-      type: Object,
-      default: () => [],
-    },
-  },
-  components: {
-    Editor,
-  },
+  dicts: ['tiktok_category','tiktok_scheduling_status'],
   data() {
     return {
       title: "编辑",
       model: "EDIT",
       open: false,
       loading: false,
-      tableType: false,
-      isDisabled: false,
-      form: {
-        id: undefined,
-        priceType: '2'
-      },
+      goodsList: [],
+      form: {},
       rules: {
-        venueId: [{ required: true, message: "请选择场馆", trigger: ["change","blur"] }],
-        auditoriumId: [{ required: true, message: "请选择演出厅", trigger: ["change","blur"] }],
-        performId: [{ required: true, message: "请选择剧目", trigger: ["change","blur"] }],
-        goodsId: [{ required: true, message: "请选择票务", trigger: ["change","blur"] }],
-        seatTypeId: [{ required: true, message: "请选择座位类型", trigger: ["change","blur"] }],
-        priceType: [{ required: true, message: "请选择结算方式", trigger: ["change","blur"] }],
-        priceAmount: [{ required: true, message: "请输入价格", trigger: ["change","blur"] }],
-      },
-      uploadObj: {
-        url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
-        Headers: { Authorization: "Bearer " + getToken() },
+        poiId: [{ required: true, message: "请输入门店POIID", trigger: ["change","blur"] }],
+        categoryId: [{ required: true, message: "请选择商品类目ID", trigger: ["change","blur"] }],
       },
-      theatreList: [],
-      goodsList: [],
-      merchantList: [],
-      editType: false,
-      ticketList: [],
-      seatList: []
+      multipleSelection: []
     };
   },
   methods: {
@@ -152,31 +123,25 @@ export default {
      */
     openDialog(title, obj, type) {
       this.open = true;
-      if (obj){
-        this.title = "编辑商品信息";
-        this.$nextTick(() => {
-          this.$set(this.form, 'id', obj.id);
-          this.$set(this.form, 'goodsId', obj.goodsId);
-          this.$set(this.form, 'seatTypeId', obj.seatTypeId);
-          this.$set(this.form, 'performId', obj.performId);
-          this.$set(this.form, 'auditoriumId', obj.auditoriumId);
-          this.$set(this.form, 'priceType', obj.priceType ? obj.priceType.toString():obj.priceType);
-          this.$set(this.form, 'priceAmount', obj.priceAmount);
-        });
-      }else{
-        this.title = "新增商品信息";
-        this.$nextTick(() => {
-          this.$refs["form"].clearValidate();
-        });
-      }
-    },
-    /** 价格输入事件 */
-    changePriceAmount(val) {
-      if(val * 1 < 0){
-        this.$message.error("输入需大于或等于0!");
-        this.$set(this.form, 'priceAmount', '');
-        return false
-      }
+      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()
+      })
     },
     /**
      * 保存
@@ -186,20 +151,45 @@ export default {
     submitForm() {
       this.$refs["form"].validate(async (valid) => {
         if (valid) {
-          // try {
-          //   this.loading = true;
-          //   const { code } = await saveAndEdit({ ...this.form });
-          //   if (code === 200) {
-          //     this.$message.success("操作成功!");
-          //     this.$emit("getList");
-          //     this.cancel();
-          //   }
-          // } catch (error) {
-          // } finally {
-          //   this.loading = false;
-          // }
+          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 {
+
         }
-      });
+      })
     },
     /**
      * 重置
@@ -207,14 +197,7 @@ export default {
      * @returns {any}
      */
     reset() {
-      this.$set(this.form, 'id', '');
-      this.$set(this.form, 'goodsId', '');
-      this.$set(this.form, 'venueId', '');
-      this.$set(this.form, 'seatTypeId', '');
-      this.$set(this.form, 'performId', '');
-      this.$set(this.form, 'auditoriumId', '');
-      this.$set(this.form, 'priceType', '2');
-      this.$set(this.form, 'priceAmount', '');
+      this.$refs["form"].clearValidate()
     },
     /**
      * 关闭弹框
@@ -225,6 +208,19 @@ export default {
       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>

+ 52 - 167
src/views/otaMr/meituan/index.vue

@@ -1,76 +1,46 @@
 <template>
   <div class="app-container">
-
-    <div class="top-taber" style="margin-top: 10px">
-      <el-radio-group v-model="otaType" size="small" @change="handleQuery">
-        <el-radio-button label="1">美团</el-radio-button>
-        <el-radio-button label="2">携程</el-radio-button>
-      </el-radio-group>
-    </div>
-
-    <el-row :gutter="10" class="mb8" style="margin-top: 30px">
-      <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>
+    <el-row :gutter="10" class="mb8">
       <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="美团ID" align="center" prop="id" />
+      <el-table-column label="演出厅" align="center" prop="performHallName" />
+      <el-table-column label="剧目名称" align="center" prop="performName" />
       <el-table-column label="商品名称" align="center" prop="goodsName" />
-      <el-table-column label="类型" align="center" prop="goodsName" />
-      <el-table-column label="市场价" align="center" prop="otaPrice">
-        <template slot-scope="scope">
-          <span>¥{{ scope.row.otaPrice }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="销售价格" align="center" prop="otaPrice">
-        <template slot-scope="scope">
-          <span>¥{{ scope.row.otaPrice }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="结算价" align="center" prop="otaPrice">
+      <el-table-column label="时刻信息" align="center" prop="goodsName1">
         <template slot-scope="scope">
-          <span>¥{{ scope.row.otaPrice }}</span>
+          <span>{{ scope.row.times }}</span>
         </template>
       </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <span v-hasPermi="['otaMr:otaMr:edit']" style="display: inline-block;">
+          <span v-hasPermi="['otaMr:tiktok:push']" style="display: inline-block;">
             <el-button
               size="mini"
               type="text"
               style="margin-left: 10px;"
-              v-if="scope.row.status != '1'"
-              @click="handleUpdate(scope.row,scope.index)"
-            >修改</el-button>
+              @click="handlePush(scope.row,scope.index)"
+              v-if="(scope.row.status == 0 || scope.row.status == 1) && scope.row.process == 4"
+            >{{ scope.row.status == 0 ? '上线' : '下线' }}</el-button>
           </span>
-          <span v-hasPermi="['otaMr:otaMr:delete']" style="display: inline-block;">
+          <!-- <span v-hasPermi="['otaMr:tiktok:push']" style="display: inline-block;">
             <el-button
               size="mini"
               type="text"
               style="margin-left: 10px;"
-              v-if="scope.row.status != '1'"
-              @click="handleDelete(scope.row,scope.index)"
-            >删除</el-button>
-          </span>
+              @click="handleInventory(scope.row,scope.index)"
+              v-if="scope.row.status == 1"
+            >日历库存推送</el-button>
+          </span> -->
+          <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>
@@ -82,84 +52,24 @@
       :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>
 
-
-    <el-dialog
-      title="填写密钥"
-      :visible.sync="visibleStatus"
-      width="600px"
-      :destroy-on-close="true"
-      :close-on-click-modal="false"
-    >
-      <div class="dialog">
-        <el-form :model="otaForm" ref="otaForm" :rules="otaRules" label-width="120px">
-          <el-form-item label="供应商id" prop="name">
-            <el-input
-              v-model="otaForm.name"
-              placeholder=""
-              clearable
-              style="width: 100%;"
-            />
-          </el-form-item>
-          <el-form-item label="client id" prop="otaKey">
-            <el-input
-              v-model="otaForm.otaKey"
-              placeholder=""
-              clearable
-              style="width: 100%;"
-            />
-          </el-form-item>
-          <el-form-item label="client secret" prop="otaValue">
-            <el-input
-              v-model="otaForm.otaValue"
-              placeholder=""
-              clearable
-              style="width: 100%;"
-            />
-          </el-form-item>
-        </el-form>
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click="visibleStatus = false">取消</el-button>
-        <el-button
-          type="primary"
-          @click="submitForm"
-          v-loading.fullscreen.lock="otaLoading"
-          element-loading-text="提交中..."
-          element-loading-spinner="el-icon-loading"
-          element-loading-background="rgba(0, 0, 0, 0.8)"
-        >
-          <span v-if="otaLoading">提交中...</span>
-          <span v-else>保存</span>
-        </el-button>
-      </div>
-    </el-dialog>
   </div>
 </template>
 
 <script>
 
-import { pageList, deleteById, getOtaConfig, otaSave } from '@/api/otaMr/otaMr'
-import addAndEdit from "./dialog/addAndEdit.vue";
+import { pageList, updateById,stockUpdateById } from '@/api/otaMr/meituan'
 import dataEdit from "./dialog/dataEdit.vue";
 
 export default {
   name: "agreement",
-  dicts: ['agreement_type'],
-  components: { addAndEdit, dataEdit },
+  dicts: ['tiktok_process','tiktok_online','tiktok_category'],
+  components: { dataEdit },
   data() {
     return {
       // 遮罩层
@@ -190,7 +100,6 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        ota: '1'
       },
       visibleStatus: false,
       newObj: {},
@@ -210,14 +119,17 @@ export default {
     /** 查询列表 */
     getList() {
       this.loading = true;
-      this.queryParams.ota = this.otaType
       pageList(this.addDateRange(this.queryParams, this.dateRange))
       .then(response => {
           this.dataList = response.data.rows;
-          this.total = response.data.total;
+          this.total = response.data.total?Number(response.data.total):0;
           this.loading = false;
         }
-      );
+      ).catch(()=>{
+        this.dataList = []
+        this.total = 0;
+        this.loading = false;
+      })
     },
     // 取消按钮
     cancel() {
@@ -235,11 +147,6 @@ export default {
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.$refs["addAndEdit"].openDialog("新增数据", this.queryParams);
-    },
-
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.$refs["dataEdit"].openDialog("修改数据", row);
@@ -254,52 +161,30 @@ export default {
         this.$modal.msgSuccess("删除成功");
       }).catch(() => {});
     },
-    /** 查看按钮操作 */
-    handleKey(obj, type) {
-      this.visibleStatus = true
-      this.visibleType = type;
-      this.otaForm = {};
-      this.getOtaConfigApi();
-    },
-    /** 查询列表 */
-    getOtaConfigApi() {
-      getOtaConfig({ota: this.otaType})
-        .then(response => {
-          let dataList = response.data;
-          dataList.forEach(item => {
-            this.$set(this.otaForm, item.otaKey, item.otaValue);
-          })
+    /** 推送 */
+    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(() => {
+
+      });
     },
-    /**
-     * 保存
-     * @date 2023-11-22
-     * @returns {any}
-     */
-    submitForm() {
-      this.$refs["otaForm"].validate(async (valid) => {
-        if (valid) {
-          try {
-            let postList = [];
-            for (const key in this.otaForm) {
-              postList.push({
-                ota: this.otaType,
-                otaKey: key,
-                otaValue: this.otaForm[key]
-              })
-            }
-            this.otaLoading = true;
-            const { code } = await otaSave(postList);
-            if (code === 200) {
-              this.$message.success("操作成功!");
-              this.getList();
-              this.visibleStatus = false;
-            }
-          } catch (error) {
-          } finally {
-            this.otaLoading = false;
-          }
-        }
+    handleInventory(row) {
+      this.$modal.confirm(`是否确认推送此商品的日历库存?`).then(function() {
+        return stockUpdateById({
+          id: row.id,
+        });
+      }).then(() => {
+        this.$modal.msgSuccess(`推送成功`);
+        this.getList();
+      }).catch(() => {
+
       });
     },
   }

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


+ 258 - 0
src/views/otaMr/thirdParty/dialog/dataEdit.vue

@@ -0,0 +1,258 @@
+<!--
+ * @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="600px"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="dialog">
+      <el-form :model="form" ref="form" :rules="rules" label-width="80px">
+        <el-form-item label="票务名称:">
+          <el-input
+            disabled
+            type="number"
+            v-model="form.priceAmount"
+            placeholder="票务名称"
+            clearable
+            style="width: 260px;"
+          />
+        </el-form-item>
+        <el-form-item label="座位类型:">
+          <el-input
+            disabled
+            type="number"
+            v-model="form.priceAmount"
+            placeholder="座位类型"
+            clearable
+            style="width: 260px;"
+          />
+        </el-form-item>
+        <el-form-item label="市场价:">
+          <el-input
+            disabled
+            type="number"
+            v-model="form.priceAmount"
+            placeholder=""
+            clearable
+            style="width: 260px;"
+          >
+            <template slot="append">元</template>
+          </el-input>
+        </el-form-item>
+        <el-form-item label="销售价:">
+          <el-input
+            disabled
+            type="number"
+            v-model="form.priceAmount"
+            placeholder=""
+            clearable
+            style="width: 260px;"
+          >
+            <template slot="append">元</template>
+          </el-input>
+        </el-form-item>
+        <el-form-item label="结算价:" prop="priceAmount">
+          <el-input
+            :disabled="isDisabled"
+            type="number"
+            v-model="form.priceAmount"
+            placeholder=""
+            clearable
+            @change="changePriceAmount"
+            style="width: 260px;"
+          >
+            <template slot="append">元</template>
+          </el-input>
+        </el-form-item>
+
+      </el-form>
+    </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 { saveAndEdit } from "@/api/ticketMr/priceMr";
+import Editor from "@/components/Editor";
+import { getToken } from "@/utils/auth";
+export default {
+  name: "dataEdit",
+  props: {
+    dict: {
+      type: Object,
+      default: () => [],
+    },
+  },
+  components: {
+    Editor,
+  },
+  data() {
+    return {
+      title: "编辑",
+      model: "EDIT",
+      open: false,
+      loading: false,
+      tableType: false,
+      isDisabled: false,
+      form: {
+        id: undefined,
+        priceType: '2'
+      },
+      rules: {
+        venueId: [{ required: true, message: "请选择场馆", trigger: ["change","blur"] }],
+        auditoriumId: [{ required: true, message: "请选择演出厅", trigger: ["change","blur"] }],
+        performId: [{ required: true, message: "请选择剧目", trigger: ["change","blur"] }],
+        goodsId: [{ required: true, message: "请选择票务", trigger: ["change","blur"] }],
+        seatTypeId: [{ required: true, message: "请选择座位类型", trigger: ["change","blur"] }],
+        priceType: [{ required: true, message: "请选择结算方式", trigger: ["change","blur"] }],
+        priceAmount: [{ required: true, message: "请输入价格", trigger: ["change","blur"] }],
+      },
+      uploadObj: {
+        url: process.env.VUE_APP_UPLOAD_FILE_API + "/upload/single/minio",
+        Headers: { Authorization: "Bearer " + getToken() },
+      },
+      theatreList: [],
+      goodsList: [],
+      merchantList: [],
+      editType: false,
+      ticketList: [],
+      seatList: []
+    };
+  },
+  methods: {
+    /**
+     * 打开弹框
+     * @date 2023-11-22
+     * @param {any} obj
+     * @returns {any}
+     */
+    openDialog(title, obj, type) {
+      this.open = true;
+      if (obj){
+        this.title = "编辑商品信息";
+        this.$nextTick(() => {
+          this.$set(this.form, 'id', obj.id);
+          this.$set(this.form, 'goodsId', obj.goodsId);
+          this.$set(this.form, 'seatTypeId', obj.seatTypeId);
+          this.$set(this.form, 'performId', obj.performId);
+          this.$set(this.form, 'auditoriumId', obj.auditoriumId);
+          this.$set(this.form, 'priceType', obj.priceType ? obj.priceType.toString():obj.priceType);
+          this.$set(this.form, 'priceAmount', obj.priceAmount);
+        });
+      }else{
+        this.title = "新增商品信息";
+        this.$nextTick(() => {
+          this.$refs["form"].clearValidate();
+        });
+      }
+    },
+    /** 价格输入事件 */
+    changePriceAmount(val) {
+      if(val * 1 < 0){
+        this.$message.error("输入需大于或等于0!");
+        this.$set(this.form, 'priceAmount', '');
+        return false
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(async (valid) => {
+        if (valid) {
+          // try {
+          //   this.loading = true;
+          //   const { code } = await saveAndEdit({ ...this.form });
+          //   if (code === 200) {
+          //     this.$message.success("操作成功!");
+          //     this.$emit("getList");
+          //     this.cancel();
+          //   }
+          // } catch (error) {
+          // } finally {
+          //   this.loading = false;
+          // }
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      this.$set(this.form, 'id', '');
+      this.$set(this.form, 'goodsId', '');
+      this.$set(this.form, 'venueId', '');
+      this.$set(this.form, 'seatTypeId', '');
+      this.$set(this.form, 'performId', '');
+      this.$set(this.form, 'auditoriumId', '');
+      this.$set(this.form, 'priceType', '2');
+      this.$set(this.form, 'priceAmount', '');
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      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>

+ 307 - 0
src/views/otaMr/thirdParty/index.vue

@@ -0,0 +1,307 @@
+<template>
+  <div class="app-container">
+
+    <div class="top-taber" style="margin-top: 10px">
+      <el-radio-group v-model="otaType" size="small" @change="handleQuery">
+        <el-radio-button label="1">美团</el-radio-button>
+        <el-radio-button label="2">携程</el-radio-button>
+      </el-radio-group>
+    </div>
+
+    <el-row :gutter="10" class="mb8" style="margin-top: 30px">
+      <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="商品名称" align="center" prop="goodsName" />
+      <el-table-column label="类型" align="center" prop="goodsName" />
+      <el-table-column label="市场价" align="center" prop="otaPrice">
+        <template slot-scope="scope">
+          <span>¥{{ scope.row.otaPrice }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="销售价格" align="center" prop="otaPrice">
+        <template slot-scope="scope">
+          <span>¥{{ scope.row.otaPrice }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="结算价" align="center" prop="otaPrice">
+        <template slot-scope="scope">
+          <span>¥{{ scope.row.otaPrice }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <span v-hasPermi="['otaMr:otaMr:edit']" style="display: inline-block;">
+            <el-button
+              size="mini"
+              type="text"
+              style="margin-left: 10px;"
+              v-if="scope.row.status != '1'"
+              @click="handleUpdate(scope.row,scope.index)"
+            >修改</el-button>
+          </span>
+          <span v-hasPermi="['otaMr:otaMr:delete']" style="display: inline-block;">
+            <el-button
+              size="mini"
+              type="text"
+              style="margin-left: 10px;"
+              v-if="scope.row.status != '1'"
+              @click="handleDelete(scope.row,scope.index)"
+            >删除</el-button>
+          </span>
+        </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>
+
+
+    <el-dialog
+      title="填写密钥"
+      :visible.sync="visibleStatus"
+      width="600px"
+      :destroy-on-close="true"
+      :close-on-click-modal="false"
+    >
+      <div class="dialog">
+        <el-form :model="otaForm" ref="otaForm" :rules="otaRules" label-width="120px">
+          <el-form-item label="供应商id" prop="name">
+            <el-input
+              v-model="otaForm.name"
+              placeholder=""
+              clearable
+              style="width: 100%;"
+            />
+          </el-form-item>
+          <el-form-item label="client id" prop="otaKey">
+            <el-input
+              v-model="otaForm.otaKey"
+              placeholder=""
+              clearable
+              style="width: 100%;"
+            />
+          </el-form-item>
+          <el-form-item label="client secret" prop="otaValue">
+            <el-input
+              v-model="otaForm.otaValue"
+              placeholder=""
+              clearable
+              style="width: 100%;"
+            />
+          </el-form-item>
+        </el-form>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="visibleStatus = false">取消</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm"
+          v-loading.fullscreen.lock="otaLoading"
+          element-loading-text="提交中..."
+          element-loading-spinner="el-icon-loading"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+          <span v-if="otaLoading">提交中...</span>
+          <span v-else>保存</span>
+        </el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+
+import { pageList, deleteById, getOtaConfig, otaSave } from '@/api/otaMr/otaMr'
+import addAndEdit from "./dialog/addAndEdit.vue";
+import dataEdit from "./dialog/dataEdit.vue";
+
+export default {
+  name: "agreement",
+  dicts: ['agreement_type'],
+  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,
+        ota: '1'
+      },
+      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;
+      this.queryParams.ota = this.otaType
+      pageList(this.addDateRange(this.queryParams, this.dateRange))
+      .then(response => {
+          this.dataList = response.data.rows;
+          this.total = response.data.total;
+          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(() => {});
+    },
+    /** 查看按钮操作 */
+    handleKey(obj, type) {
+      this.visibleStatus = true
+      this.visibleType = type;
+      this.otaForm = {};
+      this.getOtaConfigApi();
+    },
+    /** 查询列表 */
+    getOtaConfigApi() {
+      getOtaConfig({ota: this.otaType})
+        .then(response => {
+          let dataList = response.data;
+          dataList.forEach(item => {
+            this.$set(this.otaForm, item.otaKey, item.otaValue);
+          })
+        });
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["otaForm"].validate(async (valid) => {
+        if (valid) {
+          try {
+            let postList = [];
+            for (const key in this.otaForm) {
+              postList.push({
+                ota: this.otaType,
+                otaKey: key,
+                otaValue: this.otaForm[key]
+              })
+            }
+            this.otaLoading = true;
+            const { code } = await otaSave(postList);
+            if (code === 200) {
+              this.$message.success("操作成功!");
+              this.getList();
+              this.visibleStatus = false;
+            }
+          } catch (error) {
+          } finally {
+            this.otaLoading = false;
+          }
+        }
+      });
+    },
+  }
+};
+</script>

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

@@ -1,224 +0,0 @@
-<!--
- * @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>

+ 4 - 17
src/views/otaMr/tiktok/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
               type="primary"
               plain
@@ -20,7 +20,7 @@
           @click="handleAdd"
           v-hasPermi="['otaMr:otaMr:add']"
         >添加商品</el-button>
-      </el-col>
+      </el-col> -->
       <right-toolbar :showSearch.sync="showSearch" :search="false" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -51,7 +51,7 @@
           <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" prop="statusTime" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <span v-hasPermi="['otaMr:tiktok:push']" style="display: inline-block;">
@@ -90,13 +90,6 @@
       @pagination="getList"
     />
 
-    <!-- 新增/编辑弹框 -->
-    <add-and-edit
-      ref="addAndEdit"
-      :dict="dict"
-      @getList="getList"
-    />
-
     <!-- 编辑商品弹框 -->
     <data-edit
       ref="dataEdit"
@@ -109,13 +102,12 @@
 <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','tiktok_category'],
-  components: { addAndEdit, dataEdit },
+  components: { dataEdit },
   data() {
     return {
       // 遮罩层
@@ -193,11 +185,6 @@ export default {
       this.queryParams.pageNum = 1;
       this.handleQuery();
     },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.$refs["addAndEdit"].openDialog("新增数据", this.queryParams);
-    },
-
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.$refs["dataEdit"].openDialog("修改数据", row);