MONSTER-ygh 10 months ago
parent
commit
6f09dd7e52

+ 11 - 30
src/views/tourism/commodityManagement/commodityList.vue

@@ -13,23 +13,6 @@
                         @keyup.enter.native="handleQuery"
                     />
                 </el-form-item>
-                <el-form-item label="归属店铺:" prop="shopId">
-                  <el-select
-                    v-model="queryParams.shopId"
-                    filterable
-                    remote
-                    reserve-keyword
-                    placeholder="请选择归属店铺"
-                    :remote-method="remoteShop"
-                    :loading="shopListLoading">
-                    <el-option
-                      v-for="item in shopList"
-                      :key="item.id"
-                      :label="item.name"
-                      :value="item.id">
-                    </el-option>
-                  </el-select>
-                </el-form-item>
                 <el-form-item label="商品分类:" prop="classifyId">
                   <div style="width: 200px;">
                     <treeselect
@@ -41,7 +24,7 @@
                   </div>
                 </el-form-item>
                 <el-form-item label="上架状态:" prop="status">
-                  <el-select v-model="queryParams.status" placeholder="请选择上架状态">
+                  <el-select v-model="queryParams.status" clearable placeholder="请选择上架状态">
                     <el-option :key="1" label="下架" :value="1"></el-option>
                     <el-option :key="0" label="上架" :value="0"></el-option>
                   </el-select>
@@ -78,22 +61,21 @@
                 </template>
             </el-table-column>
             <el-table-column label="商品名称" align="center" key="goodsName" prop="goodsName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="归属店铺" align="center" key="shopName" prop="shopName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="分类" align="center" key="classifyName" prop="classifyName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="销售价格(元)" align="center" key="salePrice" prop="salePrice" v-if="columns[4].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="规格" align="center" key="specName" prop="specName" v-if="columns[5].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="库存" align="center" key="quantity" prop="quantity" v-if="columns[6].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="总销量" align="center" key="saleNum" prop="saleNum" v-if="columns[7].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="单位" align="center" key="unitName" prop="unitName" v-if="columns[8].visible" :show-overflow-tooltip="true" />
-            <el-table-column label="限购" align="center" width="190px" key="name8" prop="name8" v-if="columns[9].visible" :show-overflow-tooltip="true">
+            <el-table-column label="分类" align="center" key="classifyName" prop="classifyName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="销售价格(元)" align="center" key="salePrice" prop="salePrice" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="规格" align="center" key="specName" prop="specName" v-if="columns[4].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="库存" align="center" key="quantity" prop="quantity" v-if="columns[5].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="总销量" align="center" key="saleNum" prop="saleNum" v-if="columns[6].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="单位" align="center" key="unitName" prop="unitName" v-if="columns[7].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="限购" align="center" width="190px" key="name8" prop="name8" v-if="columns[8].visible" :show-overflow-tooltip="true">
               <template slot-scope="scope">
                 <span>{{ 
                   scope.row.daySale <=0 && scope.row.buyAstrict <=0? '不限' : 
-                  scope.row.daySale <=0 && scope.row.buyAstrict > 0? ('每人每日限购数量'+scope.row.buyAstrict): ('每人限购数量'+scope.row.daySale)
+                  scope.row.daySale <=0 && scope.row.buyAstrict > 0? ('每人限购数量'+scope.row.buyAstrict): ('每人每日限购数量'+scope.row.daySale)
                 }}</span>  
               </template>
             </el-table-column>
-            <el-table-column label="上架/下架" align="center" key="status" v-if="columns[10].visible">
+            <el-table-column label="上架/下架" align="center" key="status" v-if="columns[9].visible">
               <template slot-scope="scope">
                 <switchBox 
                 :defaultChecked="true" 
@@ -105,7 +87,7 @@
                  />
               </template>
             </el-table-column>
-            <el-table-column label="创建时间" align="center" key="createTime" prop="createTime" v-if="columns[11].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="创建时间" align="center" key="createTime" prop="createTime" v-if="columns[10].visible" :show-overflow-tooltip="true" />
             <el-table-column
               label="操作"
               align="center"
@@ -216,7 +198,6 @@
         columns: [
           { key: 0, label: `商品图片`, visible: true },
           { key: 2, label: `商品名称`, visible: true },
-          { key: 3.5, label: `归属店铺`, visible: true },
           { key: 3, label: `分类`, visible: true },
           { key: 4, label: `销售价格`, visible: true },
           { key: 5, label: `规格`, visible: true },

+ 2 - 2
src/views/tourism/commodityManagement/detailsBox/commodityListDetails.vue

@@ -69,8 +69,8 @@
           <div class="form-title"><span>购买规则</span></div>
           <el-form-item label="商品限购:">
             <span v-if="form.daySaleRadio == -1">不限</span>
-            <span v-if="form.daySaleRadio == -2">每人限购数量{{ form.daySale }}</span>
-            <span v-if="form.daySaleRadio == -2">每人每日限购数量{{ form.buyAstrict }}</span>
+            <span v-if="form.daySaleRadio == -3">每人限购数量{{ form.buyAstrict }}</span>
+            <span v-if="form.daySaleRadio == -2">每人每日限购数量{{ form.daySale }}</span>
           </el-form-item>
           <el-form-item label="允许退款:">
             <span v-if="form.backStatus == 0">允许退款</span>

+ 27 - 24
src/views/tourism/commodityManagement/formBox/commodityListForm.vue

@@ -53,16 +53,19 @@
               <el-input style="width: 250px;" v-model="form.labelName" placeholder="请输入商品标签" maxlength="10" show-word-limit />
             </el-form-item>
             <el-form-item label="商品上架:" prop="status">
-                 <el-switch
-                v-model="form.status"
-                active-color="#13ce66"
-                inactive-color="#cccccc"
-                :active-value="0"
-                :inactive-value="1">
-              </el-switch>
+              <div style="width: 350px;">
+                <el-switch
+                  v-model="form.status"
+                  active-color="#13ce66"
+                  inactive-color="#cccccc"
+                  :active-value="0"
+                  :inactive-value="1">
+                </el-switch>
+              </div>
+                 
             </el-form-item>
           </div>
-          <el-form-item label="景点图片" prop="goodsImage">
+          <el-form-item label="商品图片" prop="goodsImage">
             <div style="display: flex;">
               <div 
               v-for="(item,index) in form.goodsImage" 
@@ -105,7 +108,7 @@
             </div>
             <span>建议上传图片尺寸200px X 144px,支持jpg、png,支持5MB大小以内的图片上传</span>
           </el-form-item>
-          <el-form-item label-width="80px" label="商介绍" prop="goodsSnapshot">
+          <el-form-item label-width="80px" label="商介绍" prop="goodsSnapshot">
             <editor ref="editor" v-model="form.goodsSnapshot" :fileSize="20" :min-height="100" />
           </el-form-item>
           <div class="form-title"><span>库存信息</span></div>
@@ -124,11 +127,11 @@
                     <div style="display: flex;align-items: center;">
                       <el-radio label="-1">不限</el-radio>
                       <el-radio style="display: flex;align-items: center;" label="-2">
-                        <el-form-item label="" label-width="0" :prop="'daySale'">
+                        <el-form-item label="" label-width="0" :prop="'buyAstrict'">
                           <span>每人限购数量</span>
                           <el-input-number 
                             :disabled="form.daySaleRadio!=-2"
-                            v-model="form.daySale" 
+                            v-model="form.buyAstrict" 
                             placeholder="请输入限购数量"
                             controls-position="right">
                           </el-input-number>
@@ -136,11 +139,11 @@
                         </el-form-item>
                       </el-radio>
                       <el-radio style="display: flex;align-items: center;" label="-3">
-                        <el-form-item label="" label-width="0" :prop="'buyAstrict'">
+                        <el-form-item label="" label-width="0" :prop="'daySale'">
                           <span>每人每日限购数量</span>
                           <el-input-number 
                             :disabled="form.daySaleRadio!=-3"
-                            v-model="form.buyAstrict" 
+                            v-model="form.daySale" 
                             placeholder="请输入限购数量"
                             controls-position="right">
                           </el-input-number>
@@ -217,8 +220,8 @@ export default {
         unitName: [{ required: true, message: "请输入单位", trigger: ["change","blur"] }],
         labelName: [{ required: true, message: "请输入商品标签", trigger: ["change","blur"] }],
         status: [{ required: true, message: "请选择商品上架", trigger: ["change","blur"] }],
-        goodsSnapshot: [{ required: true, message: "请上传景点图片", trigger: ["change","blur"] }],
-        goodsImage: [{ required: true, message: "请输入商介绍", trigger: ["change","blur"] }],
+        goodsSnapshot: [{ required: true, message: "请上传商品图片", trigger: ["change","blur"] }],
+        goodsImage: [{ required: true, message: "请输入商介绍", trigger: ["change","blur"] }],
         quantity: [{ required: true, message: "请输入库存数量", trigger: ["change","blur"] }],
 
 
@@ -248,20 +251,21 @@ export default {
         this.$set(this,'form',{
           ...row,
           goodsImage: [],
-          status: 1,
+          daySaleRadio: '-1',
+          backStatus: 0
         })
         this.formStatus = 1
       }else if(model=='EDIT') { // 新增
         let obj = {
           ...row,
           goodsImage: [],
-          status: 1,
         }
         this.$set(this,'form',obj)
         this.formStatus = 1
       }else if(model=='EDITInit') { // 新增
         await this.getTableDeatilsFun(row)
       }
+      this.radioInputs(this.form.daySaleRadio)
       this.loading = false
       this.$nextTick(()=>{
         if(this.$refs["form"]) {
@@ -289,16 +293,15 @@ export default {
             obj.daySale = undefined
             obj.buyAstrict = undefined
           }else if(obj.daySale > 0){
-            obj.daySaleRadio = '-2'
+            obj.daySaleRadio = '-3'
             obj.daySale = obj.daySale
             obj.buyAstrict = undefined
           }else if(obj.buyAstrict > 0) {
-            obj.daySaleRadio = '-3'
+            obj.daySaleRadio = '-2'
             obj.daySale = undefined
             obj.buyAstrict = obj.buyAstrict
           }
           this.$set(this,'form',JSON.parse(JSON.stringify(obj)))
-          this.radioInputs(this.form.daySaleRadio)
           this.formStatus = 1
         }else {
           this.$message.error('获取详情失败!!!');
@@ -328,10 +331,10 @@ export default {
           if(params.daySaleRadio == -1){
             params['daySale'] = -1
             params['buyAstrict'] = -1
-          }else if(params.daySaleRadio == -2) {
+          }else if(params.daySaleRadio == -3) {
             params['daySale'] =  params.daySale
             params['buyAstrict'] = -1
-          }else if(params.daySaleRadio == -3) {
+          }else if(params.daySaleRadio == -2) {
             params['daySale'] =  -1
             params['buyAstrict'] = params.buyAstrict
           }
@@ -427,11 +430,11 @@ export default {
         this.rules.buyAstrict[0].required = false
         this.$refs.form.clearValidate('daySale');
         this.$refs.form.clearValidate('buyAstrict');
-      }else if( value == -2 ) {
+      }else if( value == -3 ) {
         this.rules.daySale[0].required = true
         this.rules.buyAstrict[0].required = false
         this.$refs.form.clearValidate('buyAstrict');
-      }else if( value == -3 ) {
+      }else if( value == -2 ) {
         this.rules.daySale[0].required = false
         this.rules.buyAstrict[0].required = true
         this.$refs.form.clearValidate('daySale');

+ 446 - 0
src/views/tourism/orderManagement/productOrders/detailsBox/productOrdersDetails.vue

@@ -0,0 +1,446 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="70%"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="form-dialog-box"
+    v-loading="loading"
+    :element-loading-text="loadingText"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0)">
+      <div
+        v-loading="loading"
+        :element-loading-text="''"
+        element-loading-spinner="''"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+        <el-form :model="form" ref="form" :rules="rules" label-width="130px">
+          <div class="form-title"><span>订单信息</span></div>
+          <div style="display: flex;">
+            <el-form-item label="订单号:">
+              <span style="display: inline-block;display: inline-block;width: 250px;">{{ form.id }}</span>
+            </el-form-item>
+            <el-form-item label="实付金额:">
+              <span style="display: inline-block;width: 250px;">{{ form.realPrice }}</span>
+            </el-form-item>
+            <el-form-item label="下单人手机号:">
+              <span style="display: inline-block;width: 250px;">{{ form.memberMobile }}</span>
+            </el-form-item>
+          </div>
+          <div style="display: flex;">
+            <el-form-item label="下单时间:">
+              <span style="display: inline-block;width: 250px;">{{ form.createTime }}</span>
+            </el-form-item>
+            <el-form-item label="支付状态:">
+              <span style="display: inline-block;width: 250px;">
+                <dict-tag :options="dict.type.tourism_ticketOrders_payStatus" :value="form.payStatus"/>
+              </span>
+            </el-form-item>
+            <el-form-item label="支付方式:">
+              <span style="display: inline-block;width: 250px;">
+                <dict-tag :options="dict.type.tourism_ticketOrders_payWay" :value="form.payWay"/>
+              </span>
+            </el-form-item>
+          </div>
+          <div style="display: flex;">
+            <el-form-item label="订单备注:">
+              <span style="display: inline-block;width: 250px;">{{ form.remark }}</span>
+            </el-form-item>
+            <el-form-item label="订单状态:">
+              <span style="display: inline-block;width: 250px;">
+                <dict-tag :options="dict.type.tourism_ticketOrders_status" :value="form.status"/>
+              </span>
+            </el-form-item>
+            <el-form-item label="支付时间:">
+              <span style="display: inline-block;width: 250px;">{{ form.payTime }}</span>
+            </el-form-item>
+          </div>
+
+          <div class="form-title"><span>商品信息</span></div>
+          <div style="display: flex;padding: 10px 0 15px;">
+            <el-table :data="tableList">
+              <el-table-column type="index" label="编号" align="center"  />
+              <el-table-column label="商品名称" align="center" key="goodsName" prop="goodsName" :show-overflow-tooltip="true" />
+              <el-table-column label="分类" align="center" key="classifyName" prop="classifyName" :show-overflow-tooltip="true" />
+              <el-table-column label="单价(元)" align="center" key="salePrice" prop="salePrice" :show-overflow-tooltip="true" />
+              <el-table-column label="数量" align="center" key="saleNum" prop="saleNum" :show-overflow-tooltip="true" />
+              <el-table-column label="实付金额(元)" align="center" key="realPrice" prop="realPrice" :show-overflow-tooltip="true" />
+            </el-table>
+          </div>
+          <div class="form-title"><span>收货信息</span></div>
+          <div style="display: flex;">
+            <el-form-item label="快递名称:">
+              <span style="display: inline-block;width: 250px;">{{ form.logisticsCompanyName }}</span>
+            </el-form-item>
+            <el-form-item label="快递单号:">
+              <span style="display: inline-block;width: 250px;">{{ form.logisticsNum }}</span>
+            </el-form-item>
+          </div>
+          <div style="display: flex;">
+            <el-form-item label="收货人姓名:">
+              <span style="display: inline-block;width: 250px;">{{ form.receiveName }}</span>
+            </el-form-item>
+            <el-form-item label="收货人电话:">
+              <span style="display: inline-block;width: 250px;">{{ form.receivePhone }}</span>
+            </el-form-item>
+          </div>
+          <div style="display: flex;">
+            <el-form-item label="收货地址:">
+              <span style="display: inline-block;width: 250px;">{{ form.receiveAdress }}</span>
+            </el-form-item>
+          </div>
+        </el-form>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer" v-if="formStatus==1">
+      <el-button @click="cancel">关闭</el-button>
+    </span>
+    <!-- 添加或修改对话框 End -->
+  </el-dialog>
+</template>
+
+<script>
+import { 
+  getTableDeatilsByIdApi,
+  updateTableApi,
+  addTableApi
+ } from '@/api/CURD'
+export default {
+  name: "addAndEdit",
+  dicts: ['tourism_ticketOrders_source','tourism_ticketOrders_status','tourism_ticketOrders_payStatus','tourism_ticketOrders_payWay'],
+  data() {
+    return {
+      title: "",
+      activeName: 'first',
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '', // 新增地址
+        details: '/order/orderInfo/selectById', // 详情地址
+        edit: '', // 编辑地址
+      },
+      form: {
+        id: undefined,
+        goodsImage: []
+      },
+      rules: {},
+
+      tableList: []
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.actionUrlLoading = false
+      this.model = model
+      this.formStatus = 0
+      this.tableList = []
+      if(model=='ADD') { // 新增
+        this.$set(this,'form',{
+          ...row,
+          goodsImage: [],
+          status: 1,
+        })
+        this.formStatus = 1
+      }else if(model=='EDIT') { // 新增
+        let obj = {
+          ...row,
+          goodsImage: [],
+          status: 1,
+        }
+        this.$set(this,'form',obj)
+        this.formStatus = 1
+      }else if(model=='EDITInit' || model=='DEATILSInit') { // 新增
+        await this.getTableDeatilsFun(row)
+      }
+      this.loading = false
+      this.$nextTick(()=>{
+        if(this.$refs["form"]) {
+          this.$refs["form"].clearValidate();
+        }
+      })
+    },
+    /** 获取详情 */
+    async getTableDeatilsFun(row) {
+      const id = row.id
+      this.loading = true
+      try {
+        let res = await getTableDeatilsByIdApi(this.configUrl.details,{id})
+        if(res.code == 200) {
+          let obj = {
+            ...res.data,
+          }
+          if(obj.goodsList) {
+            this.tableList = obj.goodsList
+          }
+          if(obj.orderReceive) {
+            obj = {
+              ...obj,
+              ...res.data.orderReceive,
+              ...res.data.orderDelivery
+            }
+          }
+          this.$set(this,'form',JSON.parse(JSON.stringify(obj)))
+          this.radioInputs(this.form.daySaleRadio)
+          this.formStatus = 1
+        }else {
+          this.$message.error('获取详情失败!!!');
+          this.formStatus = 2
+          this.loading = false
+          this.open = false;
+        }
+        this.loading = false
+      } catch (error) {
+        console.error('获取详情失败!!!!',error)
+        this.formStatus = 2
+        this.loading = false
+        this.open = false;
+      }
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+
+    /**  上传图片 单张  */
+    handleAvatarSuccess(response, file, fileList) {
+      console.log("res, file",response, file, fileList)
+      this.actionUrlLoading = false
+      if(response.code == 200) {
+        this.form.goodsImage.push(response.data.url)
+      }
+    },
+    beforeAvatarUpload(file) {
+      const isLt2M = file.size / 1024 / 1024 <= 5;
+      let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
+      let typeList = ['png','jepg','jpg']
+      const isJPG = typeList.includes(testmsg);
+      if (!isJPG) {
+        this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片图片大小不能超过 5MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    handleAvatarProgress(){
+      this.actionUrlLoading = true
+    },
+    handleAvatarError() {
+      this.actionUrlLoading = false
+    },
+    handleRemove(index) {
+      this.form.goodsImage.splice(index,1)
+    },
+
+    /** */
+    radioInputs(value) {
+      if( value == -1 ){
+        this.rules.daySale[0].required = false
+        this.rules.buyAstrict[0].required = false
+        this.$refs.form.clearValidate('daySale');
+        this.$refs.form.clearValidate('buyAstrict');
+      }else if( value == -2 ) {
+        this.rules.daySale[0].required = true
+        this.rules.buyAstrict[0].required = false
+        this.$refs.form.clearValidate('buyAstrict');
+      }else if( value == -3 ) {
+        this.rules.daySale[0].required = false
+        this.rules.buyAstrict[0].required = true
+        this.$refs.form.clearValidate('daySale');
+      }
+    },
+    /** 选择商品分类 获取分类的名称  */
+    valueChange(list,value) {
+      let str = ''
+      function treeForEach(list) {
+        list.forEach((item,index)=>{
+          if(item.children && item.children.length>0) {
+            treeForEach(item.children,value)
+          }
+          if(item.id == value) {
+            str = item.label
+          }
+        })
+      }
+      treeForEach(list,value)
+      return str
+    }
+  },
+  watch: {
+    'form.goodsSnapshot'() {
+      if(this.form.goodsSnapshot == '<p><br></p>') {
+        this.form.goodsSnapshot = null
+      }
+      if(this.$refs["form"]) {
+        this.$refs["form"].validateField('goodsSnapshot');
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  padding: 0 30px;
+  padding: 0 30px;
+  min-height: 50vh;
+  max-height: 65vh;
+  overflow-y: auto;
+  >div {
+    width: 100%;
+    min-height: 50vh;
+  }
+  .form-title {
+    padding: 0 0 10px 0;
+    span {
+      display: flex;
+      color: rgba(65,80,88,1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+    
+  }
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+  .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;
+  }
+}
+.el-table{
+  .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;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+    .el-input__inner {
+      display: none !important;
+    }
+    span.el-input__suffix {
+      position: inherit !important;
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 608 - 0
src/views/tourism/orderManagement/productOrders/formBox/productOrdersForm.vue

@@ -0,0 +1,608 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="70%"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="form-dialog-box"
+    v-loading="loading"
+    :element-loading-text="loadingText"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0)">
+      <div
+        v-loading="loading"
+        :element-loading-text="''"
+        element-loading-spinner="''"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+        <el-form :model="form" ref="form" :rules="rules" label-width="130px">
+          <div class="form-title"><span>订单信息</span></div>
+          <el-form-item label="商品名称:" prop="goodsName">
+            <el-input style="width: 350px;" v-model="form.goodsName" placeholder="请输入商品名称" maxlength="10" show-word-limit />
+          </el-form-item>
+          <el-form-item label="商品分类:" prop="classifyId">
+            <div style="width: 350px;">
+              <treeselect
+                v-model="form.classifyId"
+                :options="listTreeCopy"
+                :show-count="true"
+                placeholder="请选择商品分类"
+              />
+            </div>
+          </el-form-item>
+          <div style="display: flex;">
+            <el-form-item label="销售价格(元):" prop="salePrice">
+              <el-input-number 
+                v-model="form.salePrice" 
+                placeholder="请输入销售价格"
+                controls-position="right">
+              </el-input-number>
+            </el-form-item>
+            <el-form-item label="规格:" prop="specName">
+              <el-input style="width: 250px;" v-model="form.specName" placeholder="请输入规格" maxlength="10" show-word-limit />
+            </el-form-item>
+            <el-form-item label="单位:" prop="unitName">
+              <el-input style="width: 250px;" v-model="form.unitName" placeholder="请输入单位" maxlength="10" show-word-limit />
+            </el-form-item>
+          </div>
+          <div style="display: flex;">
+            <el-form-item label="商品标签:" prop="labelName">
+              <el-input style="width: 250px;" v-model="form.labelName" placeholder="请输入商品标签" maxlength="10" show-word-limit />
+            </el-form-item>
+            <el-form-item label="商品上架:" prop="status">
+                 <el-switch
+                v-model="form.status"
+                active-color="#13ce66"
+                inactive-color="#cccccc"
+                :active-value="0"
+                :inactive-value="1">
+              </el-switch>
+            </el-form-item>
+          </div>
+          <el-form-item label="景点图片" prop="goodsImage">
+            <div style="display: flex;">
+              <div 
+              v-for="(item,index) in form.goodsImage" 
+              :key="index"
+              style="width: 100px; height: 100px;position: relative;border: 1px solid #999;border-radius: 5px;margin-right: 20px;">
+                <el-image 
+                  style="width: 100%; height: 100%"
+                  :src="item" 
+                  :preview-src-list="form.goodsImage">
+                </el-image>
+                <span @click="handleRemove(index)" style="position: absolute;top: -15px;right: -15px;color: red;font-size: 24px;z-index: 999;cursor: pointer;">
+                  <i class="el-icon-error"></i>
+                </span>
+              </div>
+              <div 
+              style="width: 100px; height: 100px;" 
+              v-if="!form.goodsImage||form.goodsImage.length<1"
+              v-loading="actionUrlLoading"
+              element-loading-text="上传中..."
+              element-loading-spinner="el-icon-loading"
+              element-loading-background="rgba(0, 0, 0, 0.8)"
+              >
+                <el-upload
+                  class="avatar-uploader"
+                  :action="actionUrl"
+                  :data="{
+                    bucket: 'tourism'
+                  }"
+                  :show-file-list="false"
+                  :before-upload="beforeAvatarUpload"
+                  :on-success="handleAvatarSuccess"
+                  :on-progress="handleAvatarProgress"
+                  :disabled="actionUrlLoading"
+                  :on-error="handleAvatarError"
+                  >
+                  <i class="el-icon-plus avatar-uploader-icon"></i>
+                </el-upload>
+              </div>
+              
+            </div>
+            <span>建议上传图片尺寸200px X 144px,支持jpg、png,支持5MB大小以内的图片上传</span>
+          </el-form-item>
+          <el-form-item label-width="80px" label="商家介绍" prop="goodsSnapshot">
+            <editor ref="editor" v-model="form.goodsSnapshot" :fileSize="20" :min-height="100" />
+          </el-form-item>
+          <div class="form-title"><span>库存信息</span></div>
+          <el-form-item label="库存数量:" prop="quantity">
+            <el-input-number 
+              v-model="form.quantity" 
+              placeholder="请输入库存数量"
+              :step="1"
+              controls-position="right">
+            </el-input-number>
+          </el-form-item>
+          <div class="form-title"><span>购买规则</span></div>
+          <el-form-item label="商品限购:" :prop="'daySaleRadio'">
+                <div style="display: flex;align-items: center;">
+                  <el-radio-group v-model="form.daySaleRadio" @input="radioInputs">
+                    <div style="display: flex;align-items: center;">
+                      <el-radio label="-1">不限</el-radio>
+                      <el-radio style="display: flex;align-items: center;" label="-2">
+                        <el-form-item label="" label-width="0" :prop="'daySale'">
+                          <span>每人限购数量</span>
+                          <el-input-number 
+                            :disabled="form.daySaleRadio!=-2"
+                            v-model="form.daySale" 
+                            placeholder="请输入限购数量"
+                            controls-position="right">
+                          </el-input-number>
+                          <span></span>
+                        </el-form-item>
+                      </el-radio>
+                      <el-radio style="display: flex;align-items: center;" label="-3">
+                        <el-form-item label="" label-width="0" :prop="'buyAstrict'">
+                          <span>每人每日限购数量</span>
+                          <el-input-number 
+                            :disabled="form.daySaleRadio!=-3"
+                            v-model="form.buyAstrict" 
+                            placeholder="请输入限购数量"
+                            controls-position="right">
+                          </el-input-number>
+                          <span></span>
+                        </el-form-item>
+                      </el-radio>
+                    </div>
+                  </el-radio-group>
+                </div>
+          </el-form-item>
+          <el-form-item label="允许退款:" prop="backStatus">
+            <el-radio-group v-model="form.backStatus" placeholder="请选择允许退款">
+              <el-radio :label="0">允许退款</el-radio>
+              <el-radio :label="1">不允许退款</el-radio>
+            </el-radio-group>
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer" v-if="formStatus==1">
+      <el-button @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        :loading="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      > 
+        {{ loading ? '提交中...' : '保存' }}
+      </el-button>
+    </span>
+    <!-- 添加或修改对话框 End -->
+  </el-dialog>
+</template>
+
+<script>
+import { 
+  getTableDeatilsByIdApi,
+  updateTableApi,
+  addTableApi
+ } from '@/api/CURD'
+import Editor from "@/components/Editor";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+export default {
+  name: "addAndEdit",
+  dicts: ['tourism_online_status','tourism_online_type'],
+  components: {Editor,Treeselect},
+  props: ['listTreeCopy'],
+  data() {
+    return {
+      title: "",
+      activeName: 'first',
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '/merchant/merchantPerformAuditorium/saveMerchantGoods', // 新增地址
+        details: '/merchant/merchantPerformAuditorium/merchantGoodsDetail', // 详情地址
+        edit: '/merchant/merchantPerformAuditorium/saveMerchantGoods', // 编辑地址
+      },
+      form: {
+        id: undefined,
+        goodsImage: []
+      },
+      rules: {
+        goodsName: [{ required: true, message: "请输入商品名称", trigger: ["change","blur"] }],
+        classifyId: [{ required: true, message: "请选择商品分类", trigger: ["change","blur"] }],
+        salePrice: [{ required: true, message: "请输入销售价格", trigger: ["change","blur"] }],
+        specName: [{ required: true, message: "请输入规格", trigger: ["change","blur"] }],
+        unitName: [{ required: true, message: "请输入单位", trigger: ["change","blur"] }],
+        labelName: [{ required: true, message: "请输入商品标签", trigger: ["change","blur"] }],
+        status: [{ required: true, message: "请选择商品上架", trigger: ["change","blur"] }],
+        goodsSnapshot: [{ required: true, message: "请上传景点图片", trigger: ["change","blur"] }],
+        goodsImage: [{ required: true, message: "请输入商家介绍", trigger: ["change","blur"] }],
+        quantity: [{ required: true, message: "请输入库存数量", trigger: ["change","blur"] }],
+
+
+        daySaleRadio: [{ required: true, message: "请选择商品限购", trigger: ["change","blur"] }],
+        daySale: [{ required: false, message: "请输入每日限售数量", trigger: ["change","blur"] }],
+        buyAstrict: [{ required: false, message: "请输入下单限购数量", trigger: ["change","blur"] }],
+
+        backStatus: [{ required: true, message: "请选择允许退款", trigger: ["change","blur"] }],
+      },
+      scenicAreaProducts: [],// 景点产品关联
+
+      //  上传文件
+      actionUrl: process.env.VUE_APP_BASE_API + process.env.VUE_APP_UPLOAD_IMAGE,
+      actionUrlLoading: false,
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.actionUrlLoading = false
+      this.model = model
+      this.formStatus = 0
+      if(model=='ADD') { // 新增
+        this.$set(this,'form',{
+          ...row,
+          goodsImage: [],
+          status: 1,
+        })
+        this.formStatus = 1
+      }else if(model=='EDIT') { // 新增
+        let obj = {
+          ...row,
+          goodsImage: [],
+          status: 1,
+        }
+        this.$set(this,'form',obj)
+        this.formStatus = 1
+      }else if(model=='EDITInit') { // 新增
+        await this.getTableDeatilsFun(row)
+      }
+      this.loading = false
+      this.$nextTick(()=>{
+        if(this.$refs["form"]) {
+          this.$refs["form"].clearValidate();
+        }
+      })
+    },
+    /** 获取详情 */
+    async getTableDeatilsFun(row) {
+      const id = row.id
+      this.loading = true
+      try {
+        let res = await getTableDeatilsByIdApi(this.configUrl.details,{id})
+        if(res.code == 200) {
+          let obj = {
+            ...res.data
+          }
+          if(obj.goodsImage) {
+            obj.goodsImage = obj.goodsImage.split(',')
+          }else {
+            obj.goodsImage = []
+          }
+          if(obj.daySale<=0 && obj.buyAstrict<=0) {
+            obj.daySaleRadio = '-1'
+            obj.daySale = undefined
+            obj.buyAstrict = undefined
+          }else if(obj.daySale > 0){
+            obj.daySaleRadio = '-2'
+            obj.daySale = obj.daySale
+            obj.buyAstrict = undefined
+          }else if(obj.buyAstrict > 0) {
+            obj.daySaleRadio = '-3'
+            obj.daySale = undefined
+            obj.buyAstrict = obj.buyAstrict
+          }
+          this.$set(this,'form',JSON.parse(JSON.stringify(obj)))
+          this.radioInputs(this.form.daySaleRadio)
+          this.formStatus = 1
+        }else {
+          this.$message.error('获取详情失败!!!');
+          this.formStatus = 2
+          this.loading = false
+          this.open = false;
+        }
+        this.loading = false
+      } catch (error) {
+        console.error('获取详情失败!!!!',error)
+        this.formStatus = 2
+        this.loading = false
+        this.open = false;
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.loadingText = "提交数据中..."
+          this.loading = true
+          let params = JSON.parse(JSON.stringify(this.form))
+          if(params.daySaleRadio == -1){
+            params['daySale'] = -1
+            params['buyAstrict'] = -1
+          }else if(params.daySaleRadio == -2) {
+            params['daySale'] =  params.daySale
+            params['buyAstrict'] = -1
+          }else if(params.daySaleRadio == -3) {
+            params['daySale'] =  -1
+            params['buyAstrict'] = params.buyAstrict
+          }
+          params.goodsImage = params.goodsImage.join(',')
+          params.classifyName = this.valueChange(this.listTreeCopy,this.form.classifyId)
+          delete params.daySaleRadio
+          if (this.model != 'ADD') {
+            addTableApi(
+              this.configUrl.edit,{
+                ...params,
+                goodsType: 3,
+              }).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(()=>{
+              this.$message.error("修改失败!!!");
+              this.loading = false
+            })
+          } else {
+            addTableApi(this.configUrl.edit,{
+              ...params,
+              goodsType: 3,
+              }).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+            }).catch(()=>{
+              this.$message.error("新增失败!!!");
+              this.loading = false
+            })
+          }
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+
+    /**  上传图片 单张  */
+    handleAvatarSuccess(response, file, fileList) {
+      console.log("res, file",response, file, fileList)
+      this.actionUrlLoading = false
+      if(response.code == 200) {
+        this.form.goodsImage.push(response.data.url)
+      }
+    },
+    beforeAvatarUpload(file) {
+      const isLt2M = file.size / 1024 / 1024 <= 5;
+      let testmsg = file.name.substring(file.name.lastIndexOf('.')+1)
+      let typeList = ['png','jepg','jpg']
+      const isJPG = typeList.includes(testmsg);
+      if (!isJPG) {
+        this.$message.error(`上传图片图片只能是 ${typeList} 格式!`);
+      }
+      if (!isLt2M) {
+        this.$message.error('上传图片图片大小不能超过 5MB!');
+      }
+      return isJPG && isLt2M;
+    },
+    handleAvatarProgress(){
+      this.actionUrlLoading = true
+    },
+    handleAvatarError() {
+      this.actionUrlLoading = false
+    },
+    handleRemove(index) {
+      this.form.goodsImage.splice(index,1)
+    },
+
+    /** */
+    radioInputs(value) {
+      if( value == -1 ){
+        this.rules.daySale[0].required = false
+        this.rules.buyAstrict[0].required = false
+        this.$refs.form.clearValidate('daySale');
+        this.$refs.form.clearValidate('buyAstrict');
+      }else if( value == -2 ) {
+        this.rules.daySale[0].required = true
+        this.rules.buyAstrict[0].required = false
+        this.$refs.form.clearValidate('buyAstrict');
+      }else if( value == -3 ) {
+        this.rules.daySale[0].required = false
+        this.rules.buyAstrict[0].required = true
+        this.$refs.form.clearValidate('daySale');
+      }
+    },
+    /** 选择商品分类 获取分类的名称  */
+    valueChange(list,value) {
+      let str = ''
+      function treeForEach(list) {
+        list.forEach((item,index)=>{
+          if(item.children && item.children.length>0) {
+            treeForEach(item.children,value)
+          }
+          if(item.id == value) {
+            str = item.label
+          }
+        })
+      }
+      treeForEach(list,value)
+      return str
+    }
+  },
+  watch: {
+    'form.goodsSnapshot'() {
+      if(this.form.goodsSnapshot == '<p><br></p>') {
+        this.form.goodsSnapshot = null
+      }
+      if(this.$refs["form"]) {
+        this.$refs["form"].validateField('goodsSnapshot');
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  padding: 0 30px;
+  padding: 0 30px;
+  min-height: 50vh;
+  max-height: 65vh;
+  overflow-y: auto;
+  >div {
+    width: 100%;
+    min-height: 50vh;
+  }
+  .form-title {
+    padding: 0 0 10px 0;
+    span {
+      display: flex;
+      color: rgba(65,80,88,1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+    
+  }
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+  .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;
+  }
+}
+.el-table{
+  .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;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+    .el-input__inner {
+      display: none !important;
+    }
+    span.el-input__suffix {
+      position: inherit !important;
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 330 - 0
src/views/tourism/orderManagement/productOrders/formBox/releaseForm.vue

@@ -0,0 +1,330 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="open"
+    width="40%"
+    append-to-body
+    :close-on-click-modal="false"
+    @close="cancel"
+  >
+    <div class="form-dialog-box"
+    v-loading="loading"
+    :element-loading-text="loadingText"
+    element-loading-spinner="el-icon-loading"
+    element-loading-background="rgba(0, 0, 0, 0)">
+      <div
+        v-loading="loading"
+        :element-loading-text="''"
+        element-loading-spinner="''"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+        >
+        <el-form :model="form" ref="form" :rules="rules" label-width="130px">
+          <el-form-item label="快递名称:" prop="logisticsNum">
+            <el-input style="width: 350px;" v-model="form.logisticsNum" placeholder="请输入快递名称" maxlength="50" show-word-limit />
+          </el-form-item>
+          <el-form-item label="快递单号:" prop="logisticsCompanyName">
+            <el-input style="width: 350px;" v-model="form.logisticsCompanyName" placeholder="请输入快递单号" maxlength="100" show-word-limit />
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+    <span slot="footer" class="dialog-footer" v-if="formStatus==1">
+      <el-button @click="cancel">取消</el-button>
+      <el-button
+        type="primary"
+        @click="submitForm"
+        :loading="loading"
+        element-loading-text="提交中..."
+        element-loading-spinner="el-icon-loading"
+        element-loading-background="rgba(0, 0, 0, 0.8)"
+      > 
+        {{ loading ? '提交中...' : '保存' }}
+      </el-button>
+    </span>
+    <!-- 添加或修改对话框 End -->
+  </el-dialog>
+</template>
+
+<script>
+import { 
+  getTableDeatilsByIdApi,
+  updateTableApi,
+  addTableApi
+ } from '@/api/CURD'
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+export default {
+  name: "addAndEdit",
+  dicts: ['tourism_online_status','tourism_online_type'],
+  components: {Treeselect},
+  data() {
+    return {
+      title: "",
+      activeName: 'first',
+      model: "", // EDIT: 编辑模式 ADD : 新增模式  EDITInit : 编辑模式(需要请求详情)
+      open: false,
+      loading: false,
+      loadingText: "拼命加载数据中...",
+      formStatus: null, // 0/null : 加载中 1 : 获取详情成功 2  : 获取详情失败 
+      configUrl: {
+        add: '/order/orderInfo/addOrderDelivery', // 新增地址
+        details: '', // 详情地址
+        edit: '/order/orderInfo/addOrderDelivery', // 编辑地址
+      },
+      form: {
+        id: undefined,
+      },
+      rules: {
+        logisticsNum: [{ required: true, message: "请输入物流单号", trigger: ["change","blur"] }],
+        logisticsCompanyName: [{ required: true, message: "请输入物流公司名称", trigger: ["change","blur"] }],
+      },
+      scenicAreaProducts: [],// 景点产品关联
+
+      //  上传文件
+      actionUrl: process.env.VUE_APP_BASE_API + process.env.VUE_APP_UPLOAD_IMAGE,
+      actionUrlLoading: false,
+    };
+  },
+  methods: {
+    async initData(title , model,row){
+      this.title = title
+      this.open = true
+      this.loadingText = "拼命加载数据中..."
+      this.loading = true
+      this.actionUrlLoading = false
+      this.model = model
+      this.formStatus = 0
+      if(model=='ADD') { // 新增
+        this.$set(this,'form',{
+          ...row,
+        })
+        this.formStatus = 1
+      }else if(model=='EDIT') { // 新增
+        let obj = {
+          orderId: row.id,
+        }
+        this.$set(this,'form',obj)
+        this.formStatus = 1
+      }else if(model=='EDITInit') { // 新增
+        await this.getTableDeatilsFun(row)
+      }
+      this.loading = false
+      this.$nextTick(()=>{
+        if(this.$refs["form"]) {
+          this.$refs["form"].clearValidate();
+        }
+      })
+    },
+    /** 获取详情 */
+    async getTableDeatilsFun(row) {
+      const id = row.id
+      this.loading = true
+      try {
+        let res = await getTableDeatilsByIdApi(this.configUrl.details,{id})
+        if(res.code == 200) {
+          let obj = {
+            ...res.data
+          }
+          this.$set(this,'form',JSON.parse(JSON.stringify(obj)))
+          this.formStatus = 1
+        }else {
+          this.$message.error('获取详情失败!!!');
+          this.formStatus = 2
+          this.loading = false
+          this.open = false;
+        }
+        this.loading = false
+      } catch (error) {
+        console.error('获取详情失败!!!!',error)
+        this.formStatus = 2
+        this.loading = false
+        this.open = false;
+      }
+    },
+    /**
+     * 保存
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.loadingText = "提交数据中..."
+          this.loading = true
+          let params = JSON.parse(JSON.stringify(this.form))
+          addTableApi(this.configUrl.edit,{
+            ...params,
+          }).then(response => {
+              this.$modal.msgSuccess("发货成功");
+              this.loading = false
+              this.open = false;
+              this.$emit('refresh')
+          }).catch(()=>{
+              this.$message.error("发货失败!!!");
+              this.loading = false
+          })
+        }
+      });
+    },
+    /**
+     * 重置
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    reset() {
+      if(this.$refs["form"]) {
+        this.$refs["form"].clearValidate();
+      }
+    },
+    /**
+     * 关闭弹框
+     * @date 2023-11-22
+     * @returns {any}
+     */
+    cancel() {
+      this.reset();
+      this.open = false;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.form-dialog-box {
+  padding: 0 30px;
+  padding: 0 30px;
+  min-height: 30vh;
+  max-height: 65vh;
+  overflow-y: auto;
+  >div {
+    width: 100%;
+    min-height: 30vh;
+  }
+  .form-title {
+    padding: 0 0 10px 0;
+    span {
+      display: flex;
+      color: rgba(65,80,88,1);
+      font-size: 16px;
+      font-family: SourceHanSansSC;
+      font-weight: 700;
+      line-height: 23px;
+      border-left: 4px solid rgb(22, 132, 252);
+      padding-left: 10px;
+    }
+    
+  }
+  ::v-deep .ql-editor {
+    height: 400px;
+  }
+  .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;
+  }
+}
+.el-table{
+  .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;
+  }
+}
+
+.area-container {
+  min-height: 400px;
+}
+
+::v-deep .area-wrap-city.el-cascader {
+  line-height: normal;
+  .el-input {
+    cursor: pointer;
+    width: 100% !important;
+    height: 28px !important;
+    .el-input__inner {
+      display: none !important;
+    }
+    span.el-input__suffix {
+      position: inherit !important;
+      i.el-input__icon {
+        line-height: inherit;
+        margin-left: 5px;
+      }
+    }
+
+    .el-input__wrapper {
+      box-shadow: none;
+      input {
+        display: none;
+      }
+    }
+  }
+
+  .el-cascader__tags {
+    display: none;
+  }
+}
+
+.area-city-popper {
+  .el-cascader-panel {
+    .el-scrollbar.el-cascader-menu {
+      .el-cascader-menu__wrap.el-scrollbar__wrap {
+        height: 315px;
+      }
+    }
+  }
+}
+
+::v-deep .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  ::v-deep .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  ::v-deep .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 100px;
+    height: 100px;
+    line-height: 100px;
+    text-align: center;
+  }
+  ::v-deep .avatar {
+    width: 100px;
+    height: 100px;
+    display: block;
+  }
+</style>
+<style>
+.custom-class-box {
+  z-index: 999999 !important;
+}
+</style>

+ 354 - 0
src/views/tourism/orderManagement/productOrders/productOrders.vue

@@ -0,0 +1,354 @@
+<template>
+    <div class="app-container">
+      <el-row :gutter="20">
+        <!--用户数据-->
+        <el-col :span="24" :xs="24">
+            <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
+                <el-form-item label="订单号:" prop="orderId">
+                    <el-input
+                        v-model="queryParams.orderId"
+                        placeholder="请输入订单号"
+                        clearable
+                        style="width: 240px"
+                        @keyup.enter.native="handleQuery"
+                    />
+                </el-form-item>
+                <el-form-item label="商品名称:" prop="goodsName">
+                    <el-input
+                        v-model="queryParams.goodsName"
+                        placeholder="请输入商品名称"
+                        clearable
+                        style="width: 240px"
+                        @keyup.enter.native="handleQuery"
+                    />
+                </el-form-item>
+                <el-form-item label="下单人手机号:" prop="memberMobile" label-width="110px">
+                    <el-input
+                        v-model="queryParams.memberMobile"
+                        placeholder="请输入下单人手机号"
+                        clearable
+                        style="width: 240px"
+                        @keyup.enter.native="handleQuery"
+                    />
+                </el-form-item>
+                <el-form-item label="订单状态" prop="status">
+                  <el-select v-model="queryParams.status" clearable placeholder="请选择订单状态">
+                      <el-option
+                          v-for="dict in dict.type.tourism_ticketOrders_status"
+                          :key="dict.value"
+                          :label="dict.label"
+                          :value="dict.value">
+                      </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="支付方式" prop="payWay">
+                  <el-select v-model="queryParams.payWay" clearable placeholder="请选择支付方式">
+                      <el-option
+                          v-for="dict in dict.type.tourism_ticketOrders_payWay"
+                          :key="dict.value"
+                          :label="dict.label"
+                          :value="dict.value">
+                      </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="支付状态" prop="payStatus">
+                  <el-select v-model="queryParams.payStatus" clearable placeholder="请选择支付状态">
+                      <el-option
+                          v-for="dict in dict.type.tourism_ticketOrders_payStatus"
+                          :key="dict.value"
+                          :label="dict.label"
+                          :value="dict.value">
+                      </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="支付时间" prop="payTime">
+                  <el-date-picker
+                    v-model="queryParams.payTime"
+                    type="datetimerange"
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    end-placeholder="结束日期">
+                  </el-date-picker>
+                </el-form-item>
+                <el-form-item label="下单时间" prop="createTime">
+                  <el-date-picker
+                    v-model="queryParams.createTime"
+                    type="datetimerange"
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    value-format="yyyy-MM-dd HH:mm:ss"
+                    end-placeholder="结束日期">
+                  </el-date-picker>
+                </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>
+                </el-form-item>
+            </el-form>
+  
+          <el-row :gutter="10" class="mb8">
+            <!-- <el-col :span="1.5">
+                <el-button
+                  type="warning"
+                  plain
+                  icon="el-icon-download"
+                  size="mini"
+                  @click="releaseFormFun"
+                  v-hasPermi="configPermi.export"
+                >导出</el-button>
+            </el-col> -->
+            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
+          </el-row>
+
+          <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
+            <el-table-column type="index" label="序号" align="center"  />
+            <el-table-column label="订单号" align="center" key="orderNum" prop="orderNum" v-if="columns[0].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="商品名称" align="center" key="goodsName" prop="goodsName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="下单人手机号" align="center" key="memberMobile" prop="memberMobile" v-if="columns[2].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="下单时间" align="center" key="createTime" prop="createTime" v-if="columns[3].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="实付金额(元)" align="center" key="realPrice" prop="realPrice" v-if="columns[4].visible" :show-overflow-tooltip="true" />
+            <el-table-column label="支付状态" align="center" key="payStatus" prop="payStatus" v-if="columns[5].visible">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.tourism_ticketOrders_payStatus" :value="scope.row.payStatus"/>
+              </template>
+            </el-table-column>
+            <el-table-column label="支付方式" align="center" key="payWay" prop="payWay" v-if="columns[6].visible">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.tourism_ticketOrders_payWay" :value="scope.row.payWay"/>
+              </template>
+            </el-table-column>
+            <el-table-column label="支付时间" align="center" key="payTime" prop="payTime" v-if="columns[7].visible" />
+            <el-table-column label="订单状态" align="center" key="status" prop="status" v-if="columns[8].visible">
+              <template slot-scope="scope">
+                <dict-tag :options="dict.type.tourism_ticketOrders_status" :value="scope.row.status"/>
+              </template>
+            </el-table-column>
+            <el-table-column
+              label="操作"
+              align="center"
+              class-name="small-padding fixed-width"
+              width="180px"
+            >
+              <template slot-scope="scope" >
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-edit"
+                  @click="handleDetails(scope.row)"
+                  v-hasPermi="configPermi.editBase"
+                >详情</el-button>
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-position"
+                  @click="releaseFormFun(scope.row)"
+                  v-hasPermi="configPermi.editBase"
+                >发布</el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+
+          <pagination
+            v-show="total>0"
+            :total="total"
+            :page.sync="queryParams.pageNum"
+            :limit.sync="queryParams.pageSize"
+            @pagination="getList"
+          />
+        </el-col>
+      </el-row>
+      <!--  详情   -->
+      <detailsBox ref="detailsBox" @refresh="getList"></detailsBox>
+      <!-- 发货  -->
+      <releaseForm ref="releaseForm" @refresh="getList"></releaseForm>
+    </div>
+  </template>
+
+  <script>
+  import {
+    listTableApi,
+    delTableParamsApi,
+    } from "@/api/CURD";
+  import detailsBox from "./detailsBox/productOrdersDetails.vue"
+  import releaseForm from "./formBox/releaseForm.vue";
+  export default {
+    name: "User",
+    dicts: ['tourism_ticketOrders_source','tourism_ticketOrders_status','tourism_ticketOrders_payStatus','tourism_ticketOrders_payWay'],
+    components: {detailsBox,releaseForm},
+    data() {
+      return {
+        title: "商品订单",// 通用标题
+        configPermi: {
+          add: ['productManagement:scenicAreaTickets:add'], // 新增权限
+          details: [''], // 详情权限
+          delect: ['productManagement:scenicAreaTickets:delect'], // 删除权限
+          editBase: ['productManagement:scenicAreaTickets:editBase'], // 编辑基本信息权限
+          editGuige: ['productManagement:scenicAreaTickets:editGuige'], // 编辑规格信息权限
+          upload: [''],// 导入权限
+          export: [''],// 导出权限
+          release: ['']
+        },
+        configUrl: {
+          list: '/order/orderInfo/orderList', // 列表地址
+          delect: '', // 删除地址
+          upload: '',// 导入地址
+          download:'', // 下载模板地址
+          export: '',// 导出地址
+          updateStatusById: '',
+        },
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 用户表格数据
+        tableList: null,
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+        },
+        dateRange: [],
+        // 控制列表是否显示
+        columns: [
+          { key: 0, label: `订单号`, visible: true },
+          { key: 2, label: `商品名称`, visible: true },
+          { key: 3.5, label: `下单人手机号`, visible: true },
+          { key: 3, label: `下单时间`, visible: true },
+          { key: 4, label: `实付金额`, visible: true },
+          { key: 5, label: `支付状态`, visible: true },
+          { key: 6, label: `支付方式`, visible: true },
+          { key: 7, label: `支付时间`, visible: true },
+          { key: 8, label: `订单状态`, visible: true },
+        ],
+      };
+    },
+    created() {
+      this.getList();
+    },
+    methods: {
+      /** 查询用户列表 */
+      getList() {
+        this.loading = true;
+        let params = this.paramsFormat({...this.queryParams})
+        listTableApi(
+          this.configUrl.list,{...params}).then(response => {
+              this.tableList = response.data.rows;
+              this.total = response.data.total;
+              this.loading = false;
+          }
+        ).catch (error=>{
+          console.error('获取列表失败!!!!',error)
+          this.tableList = [];
+          this.total = 0;
+          this.loading = false
+        })
+      },
+      /**  请求参数格式化  */
+      paramsFormat(data,isPage) {
+        let params = JSON.parse(JSON.stringify({
+          ...data,
+          createBeginTime: data.createTime&&data.createTime[0]?data.createTime[0]:null,
+          createEndTime: data.createTime&&data.createTime[1]?data.createTime[1]:null,
+
+          payBeginTime: data.payTime&&data.payTime[0]?data.payTime[0]:null,
+          payEndTime: data.payTime&&data.payTime[1]?data.payTime[1]:null,
+          
+        }))
+        delete params.createTime;
+        delete params.payTime;
+        if(isPage) {
+          delete params.pageSize;
+          delete params.pageNum;
+        }
+        return params
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.dateRange = [];
+        this.queryParams = {
+          pageNum: 1,
+          pageSize: 10,
+        }
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.id);
+        this.single = selection.length != 1;
+        this.multiple = !selection.length;
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        if(this.$refs.addAndEdit) {
+          this.$refs.addAndEdit.initData(this.title + '新增', "ADD",{})
+        }
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        if(this.$refs.addAndEdit) {
+          this.$refs.addAndEdit.initData(this.title + '编辑', "EDITInit",{...row})
+        }
+      },
+      /**  发货   */
+      releaseFormFun(row) {
+        if(this.$refs.releaseForm) {
+          this.$refs.releaseForm.initData('快递信息', "EDIT",{...row})
+        }
+      },
+      handleDetails(row){
+        if(this.$refs.detailsBox) {
+          this.$refs.detailsBox.initData(this.title + '详情',"DEATILSInit", {...row})
+        }
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const goodsId = row.goodsId || this.ids;
+        this.$modal.confirm('是否确认删除数据项?').then( () => {
+          return delTableParamsApi(this.configUrl.delect,{
+            goodsId: goodsId
+          });
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        }).catch((e) => {
+          console.error("删除失败====",e)
+        });
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        let params = this.paramsFormat({...this.queryParams},true)
+        this.download(this.configUrl.export, {
+          ...params
+        }, `${this.title }_${new Date().getTime()}.xlsx`)
+      },
+      /** 导入按钮操作 */
+      handleImport() {
+        if(this.$refs.upload) {
+          this.$refs.upload.initData({
+            width: '400px',
+            // 弹出层标题(用户导入)
+            title: this.title + "导入",
+            // 下载模板地址
+            importTemplate: this.configUrl.download,
+            // 上传的地址
+            url: this.configUrl.upload
+          })
+        }
+      },
+    }
+  };
+  </script>

+ 25 - 32
src/views/tourism/orderManagement/ticketOrdersAll/ticketOrders.vue

@@ -271,21 +271,7 @@
       /** 查询用户列表 */
       getList() {
         this.loading = true;
-        let params = JSON.parse(JSON.stringify({
-          ...this.queryParams,
-          createBeginTime: this.queryParams.createTime&&this.queryParams.createTime[0]?this.queryParams.createTime[0]:null,
-          createEndTime: this.queryParams.createTime&&this.queryParams.createTime[1]?this.queryParams.createTime[1]:null,
-          
-          performDateStart: this.queryParams.performTime&&this.queryParams.performTime[0]?this.queryParams.performTime[0]:null,
-          performDateEnd: this.queryParams.performTime&&this.queryParams.performTime[1]?this.queryParams.performTime[1]:null,
-
-          payBeginTime: this.queryParams.payTime&&this.queryParams.payTime[0]?this.queryParams.payTime[0]:null,
-          payEndTime: this.queryParams.payTime&&this.queryParams.payTime[1]?this.queryParams.payTime[1]:null,
-          
-        }))
-        delete params.createTime;
-        delete params.performTime;
-        delete params.payTime;
+        let params = this.paramsFormat({...this.queryParams})
         listTableApi(
           this.configUrl.list,
           this.addDateRange(
@@ -302,6 +288,29 @@
           this.loading = false
         }) 
       },
+      /**  请求参数格式化  */
+      paramsFormat(data,isPage) {
+        let params = JSON.parse(JSON.stringify({
+          ...data,
+          createBeginTime: data.createTime&&data.createTime[0]?data.createTime[0]:null,
+          createEndTime: data.createTime&&data.createTime[1]?data.createTime[1]:null,
+          
+          performDateStart: data.performTime&&data.performTime[0]?data.performTime[0]:null,
+          performDateEnd: data.performTime&&data.performTime[1]?data.performTime[1]:null,
+
+          payBeginTime: data.payTime&&data.payTime[0]?data.payTime[0]:null,
+          payEndTime: data.payTime&&data.payTime[1]?data.payTime[1]:null,
+          
+        }))
+        delete params.createTime;
+        delete params.performTime;
+        delete params.payTime;
+        if(isPage) {
+          delete params.pageSize;
+          delete params.pageNum;
+        }
+        return params
+      },
       /** 搜索按钮操作 */
       handleQuery() {
         this.queryParams.pageNum = 1;
@@ -355,23 +364,7 @@
       },
       /** 导出按钮操作 */
       handleExport() {
-        let params = JSON.parse(JSON.stringify({
-          ...this.queryParams,
-          createBeginTime: this.queryParams.createTime&&this.queryParams.createTime[0]?this.queryParams.createTime[0]:null,
-          createEndTime: this.queryParams.createTime&&this.queryParams.createTime[1]?this.queryParams.createTime[1]:null,
-          
-          performDateStart: this.queryParams.performTime&&this.queryParams.performTime[0]?this.queryParams.performTime[0]:null,
-          performDateEnd: this.queryParams.performTime&&this.queryParams.performTime[1]?this.queryParams.performTime[1]:null,
-
-          payBeginTime: this.queryParams.payTime&&this.queryParams.payTime[0]?this.queryParams.payTime[0]:null,
-          payEndTime: this.queryParams.payTime&&this.queryParams.payTime[1]?this.queryParams.payTime[1]:null,
-          
-        }))
-        delete params.createTime;
-        delete params.performTime;
-        delete params.payTime;
-        delete params.pageSize;
-        delete params.pageNum;
+        let params = this.paramsFormat({...this.queryParams},true)
         this.downloadGet(this.configUrl.export, {
           ...params
         }, `${this.title }_${new Date().getTime()}.xlsx`)