Browse Source

Merge branch 'linwenxin_dev' into pengyouhao_dev

pengyh 1 year ago
parent
commit
536d433291

+ 73 - 0
src/api/commodityManagement.js

@@ -0,0 +1,73 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function esGoodsList(data) {
+  return request({
+    url: `/es/goods/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function esGoodsListExport(data, name) {
+  return postBlob({
+    url: '/es/goods/list/export',
+    data,
+    name
+  })
+}
+
+export function esGoodsUpdate(data) {
+  return request({
+    url: '/es/goods/update',
+    method: 'post',
+    data: data
+  })
+}
+
+export function esGoodsDetail(params) {
+  return request({
+    url: '/es/goods/detail',
+    method: 'post',
+    params
+  })
+}
+
+export function esGoodsDel(params) {
+  return request({
+    url: '/es/goods/del',
+    method: 'post',
+    params
+  })
+}
+
+export function esGoodsCopy(params) {
+  return request({
+    url: '/es/goods/copy',
+    method: 'post',
+    params
+  })
+}
+
+export function esGoodsBatchUpdateStatus(params) {
+  return request({
+    url: '/es/goods/batch/update/status',
+    method: 'post',
+    params
+  })
+}
+
+export function esGoodsTop(params) {
+  return request({
+    url: '/es/goods/top',
+    method: 'post',
+    params
+  })
+}
+
+export function esGoodsReply(params) {
+  return request({
+    url: '/es/goods/reply',
+    method: 'post',
+    params
+  })
+}

+ 17 - 0
src/api/orderManagement.js

@@ -0,0 +1,17 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function esOrderList(params) {
+  return request({
+    url: '/esOrder/list',
+    method: 'post',
+    params
+  })
+}
+
+export function esOrderAdd(data) {
+  return request({
+    url: '/esOrder/add',
+    method: 'post',
+    data
+  })
+}

+ 382 - 0
src/views/secondHandMall/activistOrder/index.vue

@@ -0,0 +1,382 @@
+<template>
+  <zj-page-container>
+    <zj-page-fill>
+      <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
+        <template slot-scope="{activeKey, data}">
+          <div :style="{height:activeKey == 'list'?'100%':'0px'}" style="width:100%; height:100%; overflow: hidden;">
+            <div style="width:100%; height:100%;box-sizing: border-box; padding:10px;">
+              <zj-page-container>
+                <div class="screen-container">
+                  <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+                    <el-row :gutter="20">
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="订单号" prop="orderId">
+                          <el-input v-model="screenForm.orderId" placeholder="请输入订单号"></el-input>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="商品名称" prop="goodsName">
+                          <el-input v-model="screenForm.goodsName" placeholder="请输入商品名称"></el-input>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="会员昵称" prop="memberName">
+                          <el-input v-model="screenForm.memberName" placeholder="请输入会员昵称"></el-input>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="手机号" prop="phone">
+                          <el-input v-model="screenForm.phone" placeholder="请输入手机号"></el-input>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="状态" prop="evaluateStatus">
+                          <el-select v-model="screenForm.evaluateStatus" placeholder="全部">
+                            <el-option label="全部" value=""></el-option>
+                            <el-option label="未评价订单" :value="0"></el-option>
+                            <el-option label="已评价订单" :value="3"></el-option>
+                            <el-option label="差评订单" :value="1"></el-option>
+                            <el-option label="好评订单" :value="2"></el-option>
+                          </el-select>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="创建时间" prop="createDate" style="height: 33px;">
+                          <el-date-picker v-model="screenForm.createDate" type="datetimerange"
+                            value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
+                            end-placeholder="结束日期">
+                          </el-date-picker>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="支付时间" prop="payDate" style="height: 33px;">
+                          <el-date-picker v-model="screenForm.payDate" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
+                            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
+                          </el-date-picker>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6" class="tr">
+                        <el-form-item label="">
+                          <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+                          <el-button size="small" @click="resetScreenForm">清空</el-button>
+                        </el-form-item>
+                      </el-col>
+                    </el-row>
+                  </el-form>
+                </div>
+                <div class="tabs-container order-tabs-container clearfix" style="margin: 10px 0!important;">
+                  <div class="fl">
+                    <el-tabs v-model="tabCurrent" type="card" @tab-click="changeTabs" class="fl" size="small" style="margin-right: 10px">
+                      <el-tab-pane label="全部" name="ALL"></el-tab-pane>
+                      <el-tab-pane label="待付款" name="NOPAY"></el-tab-pane>
+                      <el-tab-pane label="待确认" name="DQR"></el-tab-pane>
+                      <el-tab-pane label="待发货" name="DFH"></el-tab-pane>
+                      <el-tab-pane label="已发货" name="YFH"></el-tab-pane>
+                      <el-tab-pane label="已完成" name="OVER"></el-tab-pane>
+                      <el-tab-pane label="退款/取消" name="CLOSE"></el-tab-pane>
+                      <el-tab-pane label="已超时" name="TIMEOUT"></el-tab-pane>
+                    </el-tabs>
+                    <el-button class="fl" type="primary" size="small">新增</el-button>
+                  </div>
+                  <div class="fr">
+                    <el-button size="small" type="primary">导出</el-button>
+                  </div>
+                </div>
+                <zj-page-fill>
+                  <div class="order-main-container">
+                    <!--  -->
+                    <div class="table-top">
+                      <el-row style="width:100%">
+                        <el-col :span="3">
+                          <span class="item product">商品信息</span>
+                        </el-col>
+                        <el-col :span="3" style="text-align: right"><span class="item">单价(元)/数量</span></el-col>
+                        <el-col :span="4" style="text-align: center"><span class="item">买家信息</span></el-col>
+                        <el-col :span="4" style="text-align: center"><span class="item">收货信息</span></el-col>
+                        <el-col :span="4" style="text-align: center"><span class="item">实付金额</span></el-col>
+                        <el-col :span="3" style="text-align: center"><span class="item">订单状态</span></el-col>
+                        <el-col :span="3" style="text-align: center"><span class="item">操作</span></el-col>
+                      </el-row>
+                    </div>
+                    <!--  -->
+                    <div class="order-item" v-for="order in dataList" :key="order.orderId">
+                      <div class="order-top">
+                        <span><b>订单号</b>:{{ order.orderId }}</span>
+                        <span><b>下单时间</b>:{{ order.createTime }}</span>
+                        <el-tag>商城销售</el-tag>
+                        <div class="fr"></div>
+                      </div>
+                      <div class="order-content">
+                        <el-row style="width:100%;">
+                          <el-col :span="6" style="height: 100%;">
+                            <div class="col-item-pro">
+                              <div class="pro-item" v-for="orderItem in order.orderDetails" :key="orderItem.orderDetailId">
+                                <div class="left">
+                                  <div class="image">
+                                    <img :src="orderItem.imgUrl" style="height:80px;width: 80px;">
+                                  </div>
+                                  <div class="main">
+                                    <span><el-tag type="danger" effect="plain" size="mini" style="margin-right: 4px"
+                                        v-if="orderItem.promotionFullPieceId">满件打折</el-tag>{{ orderItem.goodsName }}</span>
+                                    <span class="spec"
+                                      v-if="orderItem.goodsSpecName === '默认' && orderItem.goodsSpecValue === '默认'">默认</span>
+                                    <span class="spec" v-else>{{ orderItem.goodsSpecName }}-{{ orderItem.goodsSpecValue
+                                      }}</span>
+                                  </div>
+                                </div>
+                                <div class="right">
+                                  <span>¥{{ orderItem.price }}</span>
+                                  <span>x{{ orderItem.num }}</span>
+                                </div>
+                              </div>
+                            </div>
+                          </el-col>
+                          <el-col :span="4" style="height: 100%;">
+                            <div class="col-item">
+                              <div>{{ order.userName }}</div>
+                              <div>{{ order.phone }}</div>
+                            </div>
+                          </el-col>
+                          <el-col :span="4" style="height: 100%;">
+                            <div class="col-item">
+                              <div>{{ order.receUserName }}/{{ order.recePhone }}</div>
+                              <div class="ellipsis-2">{{ order.province + order.city + order.area + order.street + order.receAddress + order.houseNo }}</div>
+                            </div>
+                          </el-col>
+                          <el-col :span="4" style="height: 100%;">
+                            <div class="col-item">
+                              <div class="totalprice">¥{{ order.payAmount }}</div>
+                              <div style="font-size: 12px" v-if="order.discountAmount">(<span>-{{ order.discountAmount
+                                  }}</span><span v-if="order.promotionDiscountRate">/{{ order.promotionDiscountRate * 10
+                                  }}折</span>)</div>
+                            </div>
+                          </el-col>
+                          <el-col :span="3" style="height: 100%;">
+                            <div class="col-item">
+                              <div style="display: flex; align-items: center;">
+                                <img src="@/assets/order/CLOSE.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.orderStatus == 'CLOSE'">
+                                <img src="@/assets/order/DFH.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.orderStatus == 'DFH'">
+                                <img src="@/assets/order/NOPAY.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.orderStatus == 'NOPAY'">
+                                <img src="@/assets/order/OVER.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.orderStatus == 'OVER'">
+                                <img src="@/assets/order/TIMEOUT.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.orderStatus == 'TIMEOUT'">
+                                <img src="@/assets/order/YFH.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.orderStatus == 'YFH'">
+                                <span style="margin-left: 4px">{{ order.orderStatus | ORDER_CURRENT_STATUS_FILTER }}</span>
+                              </div>
+                              <div>({{ order.toWorkOrder ? '已派单' : '未派单' }})</div>
+                            </div>
+                          </el-col>
+                          <el-col :span="3" style="height: 100%;">
+                            <div class="col-item">
+                              <div class="operate">
+                                <el-popconfirm title="确定确认订单吗?" @confirm="">
+                                  <el-button slot="reference" type="text" size="small">确认订单</el-button>
+                                </el-popconfirm>
+                              </div>
+                            </div>
+                          </el-col>
+                        </el-row>
+                      </div>
+                    </div>
+                    <div class="no-data" v-if="dataList.length <= 0">暂无订单</div>
+                  </div>
+                </zj-page-fill>
+                <div class="pagination clearfix" style="margin-top:10px;">
+                  <div class="fr">
+                    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                      :current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="10"
+                      layout="total, sizes, prev, pager, next, jumper" :total="listTotal">
+                    </el-pagination>
+                  </div>
+                </div>
+              </zj-page-container>
+            </div>
+          </div>
+          <!-- 新增 -->
+          <div v-if="activeKey == 'remark'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 确认订单 -->
+          <div v-if="activeKey == 'remark'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 确认收款 -->
+          <div v-if="activeKey == 'materialDetail'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 取消订单 -->
+          <div v-if="activeKey == 'deliverGoods'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 查看物流 -->
+          <div v-if="activeKey == 'editAddress1'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 查看详情 -->
+          <div v-if="activeKey == 'editAddress2'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 退货 -->
+          <div v-if="activeKey == 'editAddress3'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+        </template>
+      </zj-tab-page>
+    </zj-page-fill>
+  </zj-page-container>
+
+</template>
+
+<script>
+import { getList } from "@/api/order";
+import '@/styles/order-list.scss'
+export default {
+  components: {},
+
+  data() {
+    return {
+      screenForm: { // 筛选表单数据
+        orderId: '', // 订单号
+        goodsName: '', // 商品名称
+        memberName: '', // 会员昵称
+        phone: '', // 手机号
+        websitId: '', // 网点名称
+        orderStatus: '', // 状态
+        createDate: '', // 创建时间
+        payDate: '', // 支付时间
+        exchangeCode: '', // 兑换码
+        evaluateStatus: '', // 评价状态
+        sendStatus: '', // 派单异常
+        workerOrderNo: '', // 信息编号
+      },
+      screen_status: [ // 筛选字段 - 状态
+        { label: '待付款', value: 'NOPAY' },
+        { label: '待发货', value: 'DFH' },
+        { label: '已发货', value: 'YFH' },
+        { label: '已完成', value: 'OVER' },
+        { label: '已退款', value: 'CLOSE' }
+      ],
+      tabCurrent: 'ALL',
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [],
+    }
+  },
+  computed: {
+
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    changeTabs(tab, event) {
+      this.screenForm.orderStatus = this.tabCurrent === 'ALL' ? '' : tab.$options.propsData.name
+      this.currentPage = 1;
+      this.getList();
+    },
+    // 获取数据列表
+    getList() {
+      let params = {
+        orderId: this.screenForm.orderId, // 订单号
+        productName: this.screenForm.goodsName, // 商品名称
+        userName: this.screenForm.memberName, // 会员昵称
+        phone: this.screenForm.phone, // 手机号
+        websitId: this.screenForm.websitId,
+        exchangeCode: this.screenForm.exchangeCode,
+        orderStatus: this.screenForm.orderStatus, // 状态
+        startCreateTime: this.screenForm.createDate[0] ? this.screenForm.createDate[0] : null, // 创建时间
+        endCreateTime: this.screenForm.createDate[1] ? this.screenForm.createDate[1] : null, // 创建时间
+        startPayTime: this.screenForm.payDate[0] ? this.screenForm.payDate[0] : null, // 支付时间
+        endPayTime: this.screenForm.payDate[1] ? this.screenForm.payDate[1] : null, // 支付时间
+        isNegative: this.screenForm.evaluateStatus, // 评价状态
+        abnormalDispatch: this.screenForm.sendStatus, // 派单异常
+        workerOrderNo: this.screenForm.workerOrderNo, // 信息编号
+        pageNum: this.currentPage,
+        pageSize: this.pageSize
+      };
+      getList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.selected = false;
+        });
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+      })
+    },
+    openForm(type, order) {
+
+    },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+  }
+}
+
+</script>

+ 464 - 0
src/views/secondHandMall/commodityManagement/form.vue

@@ -0,0 +1,464 @@
+<template>
+  <zj-page-container>
+    <zj-page-fill class="neibuview">
+      <zj-form-container ref="formRef" :form-data="formData" :form-rules="formRules">
+        <zj-form-module title="商品详情" :form-data="formData" :form-items="formItems" label-width="80px">
+        </zj-form-module>
+        <zj-form-module title="出售信息" class="my-module" :form-data="formData.order" :form-items="formItems2"
+          label-width="0px"/>
+          <zj-form-module title="查看留言" class="my-module" :form-data="formData.order" :form-items="formItems3"
+          label-width="0px"/>
+      </zj-form-container>
+    </zj-page-fill>
+    <div style="box-sizing: border-box; padding: 10px; text-align: right;">
+      <el-button type="primary" size="small" @click="handleSubmit">保存</el-button>
+      <el-button v-if="formData.id && ~['SALE'].indexOf(formData.status)" type="primary" size="small"
+        @click="copyGoods">克隆商品</el-button>
+      <el-button v-if="formData.id && ~['ON'].indexOf(formData.status)" type="primary" size="small"
+        @click="setStatus('OFF')">下架</el-button>
+      <el-button v-if="formData.id && ~['ON', 'OFF'].indexOf(formData.status)" type="primary" size="small"
+        @click="zhuanxiaoshou">转销售</el-button>
+      <el-button v-if="formData.id && ~['OFF'].indexOf(formData.status)" type="primary" size="small"
+        @click="setStatus('ON')">重新上架</el-button>
+      <el-button size="small" @click="handleClose">取消</el-button>
+    </div>
+  </zj-page-container>
+</template>
+
+<script>
+import ImageUpload from '@/components/Common/image-upload.vue'
+import { esGoodsDetail, esGoodsCopy, esGoodsBatchUpdateStatus, esGoodsReply } from '@/api/commodityManagement'
+export default {
+  components: { ImageUpload },
+  props: {
+    detailId: {
+      type: String,
+      default: ''
+    }
+  },
+  data() {
+    return {
+      formData: {
+        "brand": "",
+        "categoryId": "",
+        "categoryName": "",
+        "companyWechatId": "",
+        "companyWechatName": "",
+        "del": true,
+        "goodsName": "",
+        "goodsNote": "",
+        "imgList": [],
+        "isTop": true,
+        "likeCount": 0,
+        "makeDate": "",
+        "mark": "",
+        "markId": "",
+        "messageList": [],
+        "operateRecordList": [],
+        "power": "",
+        "price": 0,
+        "qty": 0,
+        "queryCount": 0,
+        "remark": "",
+        "sort": 0,
+        "status": "",
+        "topTime": "",
+        "userId": ""
+      },
+      formRules: {},
+      publishStatus: [
+        { label: '下架', value: "OFF" },
+        { label: '上架', value: "ON" },
+        { label: '已卖出', value: "SALE" },
+      ],
+    }
+  },
+  computed: {
+    disabled(){
+      return this.detailId? !~['ON', 'OFF'].indexOf(this.formData?.status) : false
+    },
+    formItems() {
+      return [
+        {
+          name: 'el-input',
+          md: 12,
+          attributes: { disabled: this.disabled },
+          formItemAttributes: { label: '商品分类', prop: 'categoryName' }
+        },
+        {
+          name: 'el-radio',
+          options: this.publishStatus,
+          attributes: { disabled: this.disabled },
+          md: 12,
+          formItemAttributes: { label: '发布状态', prop: 'status' }
+        },
+        {
+          name: 'el-input',
+          md: 12,
+          attributes: { disabled: this.disabled },
+          formItemAttributes: { label: '商品名称', prop: 'goodsName' }
+        },
+        {
+          name: 'el-input',
+          md: 12,
+          attributes: { disabled: this.disabled, type: 'textarea' },
+          formItemAttributes: { label: '商品描述', prop: 'goodsNote' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: this.disabled },
+          formItemAttributes: { label: '商品价格', prop: 'price' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: this.disabled },
+          formItemAttributes: { label: '上架数量', prop: 'qty' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: this.disabled },
+          formItemAttributes: { label: '商品品牌', prop: 'brand' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: this.disabled },
+          formItemAttributes: { label: '功率(W)', prop: 'power' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: this.disabled },
+          formItemAttributes: { label: '制造日期', prop: 'makeDate' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: this.disabled },
+          formItemAttributes: { label: '联系电话', prop: 'linkPhone' }
+        },
+        {
+          name: 'el-input',
+          md: 6,
+          attributes: { disabled: true },
+          formItemAttributes: { label: '点赞量', prop: 'likeCount' }
+        },
+        {
+          name: 'slot-component',
+          md: 6,
+          attributes: { disabled: true, placeholder: '' },
+          formItemAttributes: { label: '留言量', prop: '' },
+          render: (h, { props }) => {
+            return (
+              <el-input
+                value={Number(this.formData?.messageList?.length)}
+                disabled={true}
+                size="mini"
+                placeholder=""
+              ></el-input>
+            )
+          },
+        },
+        {
+          name: 'el-radio',
+          options: [
+            { label: '一级能效', value: "一级能效" },
+            { label: '二级能效', value: "二级能效" },
+            { label: '三级能效', value: "三级能效" },
+            { label: '四级能效', value: "四级能效" },
+            { label: '五级能效', value: "五级能效" },
+          ],
+          md: 24,
+          attributes: { disabled: this.disabled },
+          formItemAttributes: { label: '能效标识', prop: 'mark' }
+        },
+        {
+          name: 'slot-component',
+          md: 24,
+          attributes: { disabled: this.disabled },
+          formItemAttributes: { label: '商品图片', prop: 'imgList' },
+          render: (h, { props }) => {
+            return (<div>
+              <ImageUpload file-list={this.formData.imgList} limit={this.formData?.imgList?.length + 1} isEdit={false} />
+            </div>)
+          }
+        },
+      ]
+    },
+    formItems2() {
+      return [{
+        name: 'slot-component',
+        md: 24,
+        attributes: { disabled: this.disabled },
+        formItemAttributes: { label: '', prop: '', 'label-width': '0px' },
+        render: (h, { props }) => {
+          var { formData } = props
+          console.log(formData, 999)
+          return (<div>
+            <el-row gutter={10}>
+              <el-col xs={24} sm={24} md={8} lg={8} xl={8}>
+                <div class='info'>
+                  <div class='info_title'>上架人信息</div>
+                  <div class='info_bottom'>
+                    <div class='info_bottom_lt'>
+                      <el-image
+                        style='width: 40px; height: 40px'
+                        src={this.$imageUrl + this.formData?.order?.buyerUserPic}
+                      >
+                      </el-image>
+                    </div>
+                    <div class='info_bottom_rt'>
+                      <div>微信昵称:{formData.userName}</div>
+                      <div>微信手机号:{formData.phone}</div>
+                      <div>发布时间:{formData.goodsCreateTime}</div>
+                    </div>
+                  </div>
+                </div>
+              </el-col>
+              <el-col xs={24} sm={24} md={8} lg={8} xl={8}>
+                <div class='info'>
+                  <div class='info_title'>买家信息</div>
+                    <div class='info_bottom'>
+                      <div class='info_bottom_lt'>
+                        <el-image
+                          style='width: 40px; height: 40px'
+                          src={this.$imageUrl + this?.formData?.userPic}
+                        >
+                        </el-image>
+                      </div>
+                      <div class='info_bottom_rt'>
+                        <div>微信昵称:{formData.buyerUserName}</div>
+                        <div>微信手机号:{formData.buyerUserPhone}</div>
+                        <div>收货人信息:{formData.consigneeName}</div>
+                        <div>收货人地址:{formData.address}</div>
+                        <div>支付方式:{formData.payType === 'WECHAT' ? '微信支付' : ''}</div>
+                      </div>
+                    </div>
+                </div>
+              </el-col>
+              <el-col xs={24} sm={24} md={8} lg={8} xl={8}>
+                <div class='info'>
+                  <div class='info_title'>物流信息</div>
+                  <div class='info_bottom'>
+                    <div class='info_bottom_rt'>
+                      <div>
+                        <el-radio-group value={formData.logisticsType}>
+                          <el-radio label='SELF'>自提</el-radio>
+                          <el-radio label='DELIVERY'>物流</el-radio>
+                        </el-radio-group>
+                      </div>
+                      <div>快递单号:{formData.logisticsNum}</div>
+                      <div>快递公司:{formData.logisticsName}</div>
+                      <el-button type='primary' size='small' onClick={() => { }}
+                      >查看物流
+                      </el-button>
+                    </div>
+                  </div>
+                </div>
+              </el-col>
+            </el-row>
+          </div>)
+        }
+      }]
+    },
+    formItems3() {
+      return [{
+        name: 'slot-component',
+        md: 24,
+        attributes: { disabled: this.disabled },
+        formItemAttributes: { label: '', prop: 'messageList', 'label-width': '0px' },
+        render: (h, { props }) => {
+          var { formData } = props
+          return <div>
+            <zj-table
+              columns={[
+                {
+                  columnAttributes: {
+                    label: '留言人名称',
+                    prop: 'createBy'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '留言内容',
+                    prop: 'content'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '留言时间',
+                    prop: 'createTime'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '回复人名称',
+                    prop: 'replyBy'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '回复内容',
+                    prop: 'replyContent'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '回复时间',
+                    prop: 'replyTime'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '操作',
+                  },
+                  render: (h, { row, column, index }) => {
+                    return <div style="padding-left:10px">
+                      <el-button type="text" onClick={() => {this.msgSend(row)}}>回复</el-button>
+                    </div>
+                  }
+                }
+              ]}
+              tableData={this.formData.messageList}>
+            </zj-table>
+          </div>
+        }
+      }]
+    },
+  },
+  watch: {
+    detailId: {
+      handler(newVal, oldVal) {
+        if (!newVal) {
+          return
+        }
+        esGoodsDetail({ id: newVal }).then(res => {
+          console.log(res.data)
+          this.formData = {
+            ...res.data,
+            imgList: res.data.imgList.map(item => {
+              return {
+                ...item,
+                imgUrl: item.imgUrl
+              }
+            })
+          }
+        })
+      },
+      deep: true,
+      immediate: true,
+    }
+  },
+  methods: {
+    msgSend(row){
+      this.$prompt('留言回复', '回复', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        inputType: "textarea"
+      }).then(({ value }) => {
+        if(value){
+          esGoodsReply({
+            id:this.detailId,
+            messageId:row.id,
+            content:value
+          }).then(res => {
+            this.$message({ type: 'success', message: `设置成功!` })
+            esGoodsDetail({ id: this.detailId }).then(res2 => {
+              this.formData = {
+                ...res2.data,
+                imgList: res2.data.imgList.map(item => {
+                  return {
+                    ...item,
+                    imgUrl: item.imgUrl
+                  }
+                })
+              }
+            })
+          })
+        }
+      })
+    },
+    copyGoods() {
+      esGoodsCopy({ id: this.detailId.id }).then(res => {
+        this.$message({ type: 'success', message: `克隆成功!` })
+        this.handleClose()
+      })
+    },
+    setStatus(status){
+      esGoodsBatchUpdateStatus({ ids: this.detailId.id,status:status }).then(res => {
+        this.$message({ type: 'success', message: `设置成功!` })
+        this.handleClose()
+      })
+    },
+    zhuanxiaoshou(){
+      
+    },
+    handleSubmit() {
+
+    },
+    handleClose() {
+      this.$emit('back')
+    }
+  }
+}
+</script>
+
+<style lang="scss">
+.info {
+  .info_title {
+    font-size: 16px;
+    font-weight: 700;
+  }
+
+  .info_bottom {
+    display: flex;
+    margin: 10px 0;
+
+    .info_bottom_lt {
+      width: 40px;
+      height: 40px;
+    }
+
+    .info_bottom_rt {
+      padding: 0 0 0 10px;
+      line-height: 30px;
+
+      .photoPZ {
+        display: inline-block;
+        vertical-align: text-top;
+      }
+    }
+  }
+}
+</style>
+<style lang="scss" scoped>
+.neibuview {
+  box-sizing: border-box;
+  padding-left: 16px;
+
+  ::v-deep &>.zj-page-fill-scroll {
+    box-sizing: border-box;
+    padding-right: 16px;
+
+    &>div:nth-child(1) {
+      margin-top: 20px;
+    }
+  }
+}
+
+.header1style {
+  text-align: right;
+  font-size: 12px;
+  color: red;
+  line-height: 18px;
+}
+
+.my-module {
+  ::v-deep .el-form-item__content {
+    margin-left: 12px !important;
+  }
+}
+</style>

+ 185 - 0
src/views/secondHandMall/commodityManagement/index.vue

@@ -0,0 +1,185 @@
+<template>
+  <template-page ref="pageRef" :get-list="getList" :export-list="exportList" :column-parsing="columnParsing"
+    :more-parameters="moreParameters" :operation="operation()" :operation-column-width="240" :replace-or-not-map="false"
+    :optionsEvensGroup="optionsEvensGroup" :tableAttributes="tableAttributes" :tableEvents="tableEvents">
+    <div class="cartographer_big">
+      <el-dialog title="编辑" width="100%" :modal="false" :visible.sync="visible" :before-close="handleClose">
+        <Form v-if="visible" :detail-id="detailId" @back="handleClose" />
+      </el-dialog>
+    </div>
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
+import Form from './form.vue'
+import { esGoodsList, esGoodsListExport, esGoodsDel, esGoodsTop, esGoodsBatchUpdateStatus } from '@/api/commodityManagement'
+export default {
+  components: { TemplatePage, Form },
+  mixins: [import_mixin, operation_mixin],
+  props: {},
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            this.optionsEvensAuth('batchListing', {
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.warning('请勾选')
+                  return
+                }
+                esGoodsBatchUpdateStatus({
+                  ids:this.recordSelected.map(item=>item.id).join(","),
+                  status:"ON"
+                }).then(res => {
+                  this.$message({ type: 'success', message: `设置成功!` })
+                  this.$refs.pageRef.refreshList()
+                })
+              }
+            })
+          ],
+          [
+            this.optionsEvensAuth('batchDelist', {
+              click: () => {
+                if (this.recordSelected.length === 0) {
+                  this.$message.warning('请勾选')
+                  return
+                }
+                esGoodsBatchUpdateStatus({
+                  ids:this.recordSelected.map(item=>item.id).join(","),
+                  status:"OFF"
+                }).then(res => {
+                  this.$message({ type: 'success', message: `设置成功!` })
+                  this.$refs.pageRef.refreshList()
+                })
+              }
+            })
+          ]
+        ]
+      ],
+      visible: false,
+      detailId: '',
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true,
+        selectable: this.selectable
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: []
+    }
+  },
+  computed: {
+    moreParameters() {
+      return [
+        {
+          name: '状态',
+          key: 'orderType',
+          value: '',
+          conditions: [
+            {
+              label: `全部`,
+              value: ''
+            },
+            {
+              label: `上架`,
+              value: 'ON'
+            },
+            {
+              label: `下架`,
+              value: 'OFF'
+            },
+            {
+              label: `已卖出`,
+              value: 'SALE'
+            }
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    selectable(row, index) {
+      return ["ON", "OFF"].includes(Object.entries(row.selectMapData.status).find(([key, val]) => val == row.status)?.[0])
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 列表请求函数
+    getList(p, cb) {
+      if (p.orderType) {
+        p.params.push({ param: 'a.status', compare: '=', value: p.orderType })
+      }
+      cb && cb(p)
+      return esGoodsList(p)
+    },
+    // 列表导出函数
+    exportList: esGoodsListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    operation() {
+      return this.operationBtn({
+        edit: {
+          click: ({ row, index, column }) => {
+            this.detailId = row.id
+            this.visible = true
+          }
+        },
+        del: {
+          prompt: "是否确定删除?",
+          conditions: ({ row, index, column }) => {
+            return row.status == "SALE"
+          },
+          click: ({ row, index, column }) => {
+            esGoodsDel({ id: row.id }).then(res => {
+              this.$message({ type: 'success', message: `删除成功!` })
+              this.$refs.pageRef.refreshList()
+            })
+          }
+        },
+        topFix: {
+          prompt: "是否确定置顶?",
+          conditions: ({ row, index, column }) => {
+            return !row.isTop
+          },
+          click: ({ row, index, column }) => {
+            esGoodsTop({ id: row.id, isTop: true }).then(res => {
+              this.$message({ type: 'success', message: `设置成功!` })
+              this.$refs.pageRef.refreshList()
+            })
+          }
+        },
+        unTopFix: {
+          prompt: "是否确定取消置顶?",
+          conditions: ({ row, index, column }) => {
+            return row.isTop
+          },
+          click: ({ row, index, column }) => {
+            esGoodsTop({ id: row.id, isTop: false }).then(res => {
+              this.$message({ type: 'success', message: `设置成功!` })
+              this.$refs.pageRef.refreshList()
+            })
+          }
+        }
+      })
+    },
+    handleClose() {
+      this.detailId = ''
+      this.visible = false
+      this.$refs.pageRef.refreshList()
+    }
+  }
+}
+</script>
+
+<style scoped></style>

+ 282 - 0
src/views/secondHandMall/orderManagement/add.vue

@@ -0,0 +1,282 @@
+<template>
+  <zj-form-container ref="formRef" :form-data="formData" :form-attributes="{ size: 'mini' }">
+    <zj-form-module title="客户信息" label-width="100px" :form-data="formData" :form-items="formItems" />
+    <zj-form-module title="商品信息" label-width="100px" :form-data="formData" :form-items="formItems2" />
+  </zj-form-container>
+</template>
+
+<script>
+import getLbsAmapRegion from "./getLbsAmapRegion.js"
+import ImageUpload from '@/components/file-upload'
+import editTable from '@/components/template/editTable.js'
+export default {
+  components: {ImageUpload},
+  mixins: [getLbsAmapRegion, editTable],
+  data(){
+    return {
+      formData: {
+        imgSrc: [],
+        promotionQuestionnaireQrcodes: []
+      }
+    }
+  },
+  computed: {
+    formItems(){
+      return [{
+        name: 'el-input',
+        md: 6,
+        attributes: { disabled: false },
+        formItemAttributes: { label: '商品分类', prop: 'categoryName' }
+      },{
+        name: 'el-input',
+        md: 6,
+        attributes: { disabled: false },
+        formItemAttributes: { label: '商品分类', prop: 'categoryName' }
+      },{
+        name: 'el-radio',
+        options: [
+          { label: '一级能效', value: "一级能效" },
+          { label: '二级能效', value: "二级能效" },
+        ],
+        md: 6,
+        attributes: { disabled: this.disabled },
+        formItemAttributes: { label: '能效标识', prop: 'mark' }
+      },{
+        name: 'el-radio',
+        options: [
+          { label: '一级能效', value: "一级能效" },
+          { label: '五级能效', value: "五级能效" },
+        ],
+        md: 6,
+        attributes: { disabled: this.disabled },
+        formItemAttributes: { label: '能效标识', prop: 'mark' }
+      },...this.amapRegion,{
+        name: 'el-input',
+        md: 24,
+        attributes: { disabled: false, type:"textarea" },
+        formItemAttributes: { label: '备注', prop: 'categoryName' }
+      },{
+        md: 24,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '附件',
+          prop: 'imgSrc',
+          rules: []
+        },
+        render: (h, { props, onInput }) => {
+          return (
+            <ImageUpload fileList={this.formData.imgSrc} limit={100}/>
+          )
+        }
+      }]
+    },
+    formItems2(){
+      return [{
+          name: 'slot-component',
+          md: 24,
+          formItemAttributes: {
+            label: '',
+            'label-width': '0px',
+            prop: 'promotionQuestionnaireQrcodes',
+            rules: []
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return this.convertTableJson(
+              value,
+              [
+                {
+                  columnAttributes: {
+                    label: '商品分类',
+                    prop: 'websitName'
+                  },
+                  editRender: (h, { row, column, index }) => {
+                    return (
+                      <div class="redbordererr">
+                        <el-form-item
+                          label=""
+                          label-width="0px"
+                          prop={`promotionQuestionnaireQrcodes.${index}.${column.columnAttributes.prop}`}
+                          rules={[{ required: true, message: '请填写', trigger: 'blur' }]}
+                        >
+                          <el-input
+                            value={row[column.columnAttributes.prop]}
+                            onInput={val => {
+                              row[column.columnAttributes.prop] = val
+                            }}
+                            placeholder="请输入内容"
+                          ></el-input>
+                        </el-form-item>
+                      </div>
+                    )
+                  },
+                  viewRender: (h, { row, column, index }) => {
+                    return <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '商品名称',
+                    prop: 'websitName'
+                  },
+                  editRender: (h, { row, column, index }) => {
+                    return (
+                      <div class="redbordererr">
+                        <el-form-item
+                          label=""
+                          label-width="0px"
+                          prop={`promotionQuestionnaireQrcodes.${index}.${column.columnAttributes.prop}`}
+                          rules={[{ required: true, message: '请填写', trigger: 'blur' }]}
+                        >
+                          <el-input
+                            value={row[column.columnAttributes.prop]}
+                            onInput={val => {
+                              row[column.columnAttributes.prop] = val
+                            }}
+                            placeholder="请输入内容"
+                          ></el-input>
+                        </el-form-item>
+                      </div>
+                    )
+                  },
+                  viewRender: (h, { row, column, index }) => {
+                    return <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '单位',
+                    prop: 'websitName'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '上架数量',
+                    prop: 'websitName'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '订单数量',
+                    prop: 'websitName'
+                  },
+                  editRender: (h, { row, column, index }) => {
+                    return (
+                      <div class="redbordererr">
+                        <el-form-item
+                          label=""
+                          label-width="0px"
+                          prop={`promotionQuestionnaireQrcodes.${index}.${column.columnAttributes.prop}`}
+                          rules={[{ required: true, message: '请填写', trigger: 'blur' }]}
+                        >
+                          <el-input
+                            value={row[column.columnAttributes.prop]}
+                            onInput={val => {
+                              row[column.columnAttributes.prop] = val
+                            }}
+                            placeholder="请输入内容"
+                          ></el-input>
+                        </el-form-item>
+                      </div>
+                    )
+                  },
+                  viewRender: (h, { row, column, index }) => {
+                    return <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '商品价格',
+                    prop: 'websitName'
+                  },
+                  editRender: (h, { row, column, index }) => {
+                    return (
+                      <div class="redbordererr">
+                        <el-form-item
+                          label=""
+                          label-width="0px"
+                          prop={`promotionQuestionnaireQrcodes.${index}.${column.columnAttributes.prop}`}
+                          rules={[{ required: true, message: '请填写', trigger: 'blur' }]}
+                        >
+                          <el-input
+                            value={row[column.columnAttributes.prop]}
+                            onInput={val => {
+                              row[column.columnAttributes.prop] = val
+                            }}
+                            placeholder="请输入内容"
+                          ></el-input>
+                        </el-form-item>
+                      </div>
+                    )
+                  },
+                  viewRender: (h, { row, column, index }) => {
+                    return <div style="padding-left:10px">{row[column.columnAttributes.prop]}</div>
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '金额',
+                    prop: 'websitName'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '商品品牌',
+                    prop: 'websitName'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '功率(W)',
+                    prop: 'websitName'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '制造日期',
+                    prop: 'websitName'
+                  }
+                },
+                {
+                  columnAttributes: {
+                    label: '能效标识',
+                    prop: 'websitName'
+                  }
+                },
+              ],
+              {
+                isEdit: true,
+                isAdd: true,
+                isDel: true
+              },
+              {
+                add: () => {
+                  this.formData.promotionQuestionnaireQrcodes.push({
+                    websitName: '',
+                    qrcode: ''
+                  })
+                  this.isEditTableIndex = this.formData.promotionQuestionnaireQrcodes.length - 1
+                },
+                // verify: ({ row, column, index }, isEditTableIndex) => {
+                //   return new Promise(r => {
+                //     if (isEditTableIndex > -1) {
+                //       r(true)
+                //     } else {
+                //       r(true)
+                //     }
+                //   })
+                // },
+              }
+            )
+          }
+        }]
+    }
+  },
+  methods: {
+    
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 242 - 0
src/views/secondHandMall/orderManagement/getLbsAmapRegion.js

@@ -0,0 +1,242 @@
+import { lbsAmapRegion } from '@/api/common.js'
+import geographicalPosi from '@/components/geographicalPosi/index.vue'
+export default {
+  data() {
+    return {
+      provinceList: [],
+      cityList: [],
+      areaList: [],
+      streetList: [],
+    }
+  },
+  computed: {
+    amapRegion() {
+      return [
+        {
+          name: 'el-select',
+          md: 6,
+          formItemAttributes: {
+            label: '客户地址', //省
+            prop: 'provinceId',
+            rules: [],
+            errLabel: '省'
+          },
+          options: this.provinceList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
+          events: {
+            change: (val) => {
+              // 获取省名称
+              this.formData.province = this.provinceList.find(item => item.id === val)?.name || ''
+              // 清除市区街道以及详细地址数据
+              this.delDataK(1)
+              lbsAmapRegion({ pid: val }).then(res => {
+                this.cityList = res.data
+              })
+            }
+          }
+        },
+        {
+          name: 'el-select',
+          md: 5,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '', //市
+            prop: 'cityId',
+            rules: [],
+            errLabel: '市'
+          },
+          options: this.cityList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
+          events: {
+            change: (val) => {
+              // 获取市名称
+              this.formData.city = this.cityList.find(item => item.id === val).name
+              // 清除区街道以及详细地址数据
+              this.delDataK(2)
+              lbsAmapRegion({ pid: val }).then(res => {
+                this.areaList = res.data
+              })
+            }
+          }
+        },
+        {
+          name: 'el-select',
+          md: 5,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '', //区
+            prop: 'areaId',
+            rules: [],
+            errLabel: '区'
+          },
+          options: this.areaList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
+          events: {
+            change: (val) => {
+              // 获取区名称
+              this.formData.area = this.areaList.find(item => item.id === val).name
+              // 清除街道以及详细地址数据
+              this.delDataK(3)
+              lbsAmapRegion({ pid: val }).then(res => {
+                this.streetList = res.data
+              })
+            }
+          }
+        },
+        {
+          name: 'el-select',
+          md: 6,
+          formItemAttributes: {
+            'label-width': '0px',
+            label: '', //街道
+            prop: 'streetId',
+            rules: [],
+            errLabel: '街道'
+          },
+          options: this.streetList.map((v, i) => ({ value: v.id, label: v.name })),
+          attributes: { disabled: true, clearable: true, filterable: true, placeholder: '请选择' },
+          events: {
+            change: (val) => {
+              // 获取街道名称
+              this.formData.street = this.streetList.find(item => item.id === val).name
+              // 清除详细地址数据
+              this.delDataK(4)
+            }
+          }
+        },
+        {
+          name: 'slot-component',
+          md: 2,
+          formItemAttributes: {
+            'label-width': '0px',
+            prop: '',
+          },
+          render: (h, { props }) => {
+            return (
+              <geographicalPosi
+                disabled={false}
+                formData={this.formData}
+                onSelectPosi={data => {
+                  // 获取经纬度
+                  this.formData.lng = data.center[0]
+                  this.formData.lat = data.center[1]
+                  // 获取定位的省市区街道
+                  var { province, city, district, township } = data.data.addressComponent
+                  // 获取选中省名称id
+                  var { id, name } = this.provinceList.find(item => item.name === province)
+                  this.formData.provinceId = id
+                  this.formData.province = name
+                  // 请求市选项
+                  lbsAmapRegion({ pid: this.formData.provinceId }).then(res => {
+                    // 赋值市选项
+                    this.cityList = res.data
+                    // 获取选中市名称id
+                    var { id, name } = res.data.find(item => item.name === city)
+                    this.formData.cityId = id
+                    this.formData.city = name
+                    // 请求区选项
+                    lbsAmapRegion({ pid: this.formData.cityId }).then(res => {
+                      // 赋值区选项
+                      this.areaList = res.data
+                      // 获取选中区名称id
+                      var { id, name } = res.data.find(item => item.name === district)
+                      this.formData.areaId = id
+                      this.formData.area = name
+                      // 请求街道选项
+                      lbsAmapRegion({ pid: this.formData.areaId }).then(res => {
+                        // 赋值街道选项
+                        this.streetList = res.data
+                        // 获取选中街道名称id
+                        var { id, name } = res.data.find(item => item.name === township)
+                        this.formData.streetId = id
+                        this.formData.street = name
+                        // 赋值GPS详细地址
+                        this.formData.gpsAddress = data.name
+                        if (!this.formData.address) {
+                          this.formData.address = data.name
+                        }
+                      })
+                    })
+                  })
+                }}
+              />
+            )
+          }
+        },
+        {
+          name: 'el-input',
+          md: 24,
+          formItemAttributes: { label: '', prop: 'address', rules: [] },
+          attributes: { disabled: false, placeholder: '详细地址' }
+        },
+      ]
+    }
+  },
+  created(){
+    this.getinitlbslist()
+  },
+  methods: {
+    getinitlbslist() {
+      // 初始化请求省市区街道下拉选项数据
+      lbsAmapRegion({ pid: 0 }).then(res => {
+        this.provinceList = res.data
+        // 创建工单时获取ip地址定位赋值
+        if (!this.id && !!~[1, 2, 3].indexOf(this?.workOrderType) && this.$IpAdd.province) {
+          var item = this.provinceList.find(item => item.name === this.$IpAdd.province)
+          if (item) {
+            this.formData.provinceId = item.id
+            this.formData.province = item.name
+          }
+        }
+        if (this.formData.provinceId) {
+          lbsAmapRegion({ pid: this.formData.provinceId }).then(res => {
+            this.cityList = res.data
+            // 创建工单时获取ip地址定位赋值
+            if (!this.id && this.$IpAdd.city) {
+              var item2 = this.cityList.find(item => item.name === this.$IpAdd.city)
+              if (item2) {
+                this.formData.cityId = item2.id
+                this.formData.city = item2.name
+              }
+            }
+            if (this.formData.cityId) {
+              lbsAmapRegion({ pid: this.formData.cityId }).then(res => {
+                this.areaList = res.data
+              })
+            }
+            if (this.formData.areaId) {
+              lbsAmapRegion({ pid: this.formData.areaId }).then(res => {
+                this.streetList = res.data
+              })
+            }
+          })
+        }
+      })
+    },
+    delDataK(num) {
+      if (num <= 1) {
+        // 删除市
+        this.formData.cityId = ''
+        this.formData.city = ''
+        // 删除市选项
+        this.cityList = []
+      }
+      if (num <= 2) {
+        // 删除区
+        this.formData.areaId = ''
+        this.formData.area = ''
+        // 删除区选项
+        this.areaList = []
+      }
+      if (num <= 3) {
+        // 删除街道
+        this.formData.streetId = ''
+        this.formData.street = ''
+        // 删除街道选项
+        this.streetList = []
+      }
+      // 删除gps地址
+      this.formData.gpsAddress = ''
+    }
+  }
+}

+ 396 - 0
src/views/secondHandMall/orderManagement/index.vue

@@ -0,0 +1,396 @@
+<template>
+  <zj-page-container>
+    <zj-page-fill>
+      <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
+        <template slot-scope="{activeKey, data}">
+          <div :style="{height:activeKey == 'list'?'100%':'0px'}" style="width:100%; height:100%; overflow: hidden;">
+            <div style="width:100%; height:100%;box-sizing: border-box; padding:10px;">
+              <zj-page-container>
+                <div class="screen-container">
+                  <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+                    <el-row :gutter="20">
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="订单号" prop="orderId">
+                          <el-input v-model="screenForm.orderId" placeholder="请输入订单号"></el-input>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="商品名称" prop="esGoodsName">
+                          <el-input v-model="screenForm.esGoodsName" placeholder="请输入商品名称"></el-input>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="会员昵称" prop="userName">
+                          <el-input v-model="screenForm.userName" placeholder="请输入会员昵称"></el-input>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="手机号" prop="userMobile">
+                          <el-input v-model="screenForm.userMobile" placeholder="请输入手机号"></el-input>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="状态" prop="evaluateStatus">
+                          <el-select v-model="screenForm.evaluateStatus" placeholder="全部">
+                            <el-option label="全部" value=""></el-option>
+                            <el-option label="未评价订单" :value="0"></el-option>
+                            <el-option label="已评价订单" :value="3"></el-option>
+                            <el-option label="差评订单" :value="1"></el-option>
+                            <el-option label="好评订单" :value="2"></el-option>
+                          </el-select>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="创建时间" prop="createDate" style="height: 33px;">
+                          <el-date-picker v-model="screenForm.createDate" type="datetimerange"
+                            value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期"
+                            end-placeholder="结束日期">
+                          </el-date-picker>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6">
+                        <el-form-item label="支付时间" prop="payDate" style="height: 33px;">
+                          <el-date-picker v-model="screenForm.payDate" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss"
+                            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
+                          </el-date-picker>
+                        </el-form-item>
+                      </el-col>
+                      <el-col :xs="24" :sm="12" :lg="6" class="tr">
+                        <el-form-item label="">
+                          <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+                          <el-button size="small" @click="resetScreenForm">清空</el-button>
+                        </el-form-item>
+                      </el-col>
+                    </el-row>
+                  </el-form>
+                </div>
+                <div class="tabs-container order-tabs-container clearfix" style="margin: 10px 0!important;">
+                  <div class="fl">
+                    <el-tabs v-model="tabCurrent" type="card" @tab-click="changeTabs" class="fl" size="small" style="margin-right: 10px">
+                      <el-tab-pane label="全部" name="ALL"></el-tab-pane>
+                      <el-tab-pane label="待付款" name="NOPAY"></el-tab-pane>
+                      <el-tab-pane label="待确认" name="DQR"></el-tab-pane>
+                      <el-tab-pane label="待发货" name="DFH"></el-tab-pane>
+                      <el-tab-pane label="已发货" name="YFH"></el-tab-pane>
+                      <el-tab-pane label="已完成" name="OVER"></el-tab-pane>
+                      <el-tab-pane label="退款/取消" name="CLOSE"></el-tab-pane>
+                      <el-tab-pane label="已超时" name="TIMEOUT"></el-tab-pane>
+                    </el-tabs>
+                    <el-button class="fl" type="primary" size="small" @click="add">新增</el-button>
+                  </div>
+                  <div class="fr">
+                    <el-button size="small" type="primary">导出</el-button>
+                  </div>
+                </div>
+                <zj-page-fill>
+                  <div class="order-main-container">
+                    <!--  -->
+                    <div class="table-top">
+                      <el-row style="width:100%">
+                        <el-col :span="3">
+                          <span class="item product">商品信息</span>
+                        </el-col>
+                        <el-col :span="3" style="text-align: right"><span class="item">单价(元)/数量</span></el-col>
+                        <el-col :span="4" style="text-align: center"><span class="item">买家信息</span></el-col>
+                        <el-col :span="4" style="text-align: center"><span class="item">收货信息</span></el-col>
+                        <el-col :span="4" style="text-align: center"><span class="item">实付金额</span></el-col>
+                        <el-col :span="3" style="text-align: center"><span class="item">订单状态</span></el-col>
+                        <el-col :span="3" style="text-align: center"><span class="item">操作</span></el-col>
+                      </el-row>
+                    </div>
+                    <!--  -->
+                    <div class="order-item" v-for="order in dataList" :key="order.orderId">
+                      <div class="order-top">
+                        <span><b>订单号</b>:{{ order.orderId }}</span>
+                        <span><b>下单时间</b>:{{ order.createTime }}</span>
+                        <el-tag>商城销售</el-tag>
+                        <div class="fr"></div>
+                      </div>
+                      <div class="order-content">
+                        <el-row style="width:100%;">
+                          <el-col :span="6" style="height: 100%;">
+                            <div class="col-item-pro">
+                              <div class="pro-item" v-for="orderItem in order.orderDetails" :key="orderItem.orderDetailId">
+                                <div class="left">
+                                  <div class="image">
+                                    <img :src="orderItem.imgUrl" style="height:80px;width: 80px;">
+                                  </div>
+                                  <div class="main">
+                                    <span><el-tag type="danger" effect="plain" size="mini" style="margin-right: 4px"
+                                        v-if="orderItem.promotionFullPieceId">满件打折</el-tag>{{ orderItem.esGoodsName }}</span>
+                                    <span class="spec"
+                                      v-if="orderItem.goodsSpecName === '默认' && orderItem.goodsSpecValue === '默认'">默认</span>
+                                    <span class="spec" v-else>{{ orderItem.goodsSpecName }}-{{ orderItem.goodsSpecValue
+                                      }}</span>
+                                  </div>
+                                </div>
+                                <div class="right">
+                                  <span>¥{{ orderItem.price }}</span>
+                                  <span>x{{ orderItem.num }}</span>
+                                </div>
+                              </div>
+                            </div>
+                          </el-col>
+                          <el-col :span="4" style="height: 100%;">
+                            <div class="col-item">
+                              <div>{{ order.userName }}</div>
+                              <div>{{ order.userMobile }}</div>
+                            </div>
+                          </el-col>
+                          <el-col :span="4" style="height: 100%;">
+                            <div class="col-item">
+                              <div>{{ order.receUserName }}/{{ order.recePhone }}</div>
+                              <div class="ellipsis-2">{{ order.province + order.city + order.area + order.street + order.receAddress + order.houseNo }}</div>
+                            </div>
+                          </el-col>
+                          <el-col :span="4" style="height: 100%;">
+                            <div class="col-item">
+                              <div class="totalprice">¥{{ order.payAmount }}</div>
+                              <div style="font-size: 12px" v-if="order.discountAmount">(<span>-{{ order.discountAmount
+                                  }}</span><span v-if="order.promotionDiscountRate">/{{ order.promotionDiscountRate * 10
+                                  }}折</span>)</div>
+                            </div>
+                          </el-col>
+                          <el-col :span="3" style="height: 100%;">
+                            <div class="col-item">
+                              <div style="display: flex; align-items: center;">
+                                <img src="@/assets/order/CLOSE.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.status == 'CLOSE'">
+                                <img src="@/assets/order/DFH.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.status == 'DFH'">
+                                <img src="@/assets/order/NOPAY.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.status == 'NOPAY'">
+                                <img src="@/assets/order/OVER.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.status == 'OVER'">
+                                <img src="@/assets/order/TIMEOUT.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.status == 'TIMEOUT'">
+                                <img src="@/assets/order/YFH.png" style="width: 16px; flex-shrink: 0;"
+                                  v-if="order.status == 'YFH'">
+                                <span style="margin-left: 4px">{{ order.status | ORDER_CURRENT_STATUS_FILTER }}</span>
+                              </div>
+                              <div>({{ order.toWorkOrder ? '已派单' : '未派单' }})</div>
+                            </div>
+                          </el-col>
+                          <el-col :span="3" style="height: 100%;">
+                            <div class="col-item">
+                              <div class="operate">
+                                <el-popconfirm title="确定确认订单吗?" @confirm="">
+                                  <el-button slot="reference" type="text" size="small">确认订单</el-button>
+                                </el-popconfirm>
+                              </div>
+                            </div>
+                          </el-col>
+                        </el-row>
+                      </div>
+                    </div>
+                    <div class="no-data" v-if="dataList.length <= 0">暂无订单</div>
+                  </div>
+                </zj-page-fill>
+                <div class="pagination clearfix" style="margin-top:10px;">
+                  <div class="fr">
+                    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+                      :current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="10"
+                      layout="total, sizes, prev, pager, next, jumper" :total="listTotal">
+                    </el-pagination>
+                  </div>
+                </div>
+              </zj-page-container>
+            </div>
+          </div>
+          <!-- 新增 -->
+          <div v-if="activeKey == 'add'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                  <add/>
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 确认订单 -->
+          <div v-if="activeKey == 'remark'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 确认收款 -->
+          <div v-if="activeKey == 'materialDetail'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 取消订单 -->
+          <div v-if="activeKey == 'deliverGoods'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 查看物流 -->
+          <div v-if="activeKey == 'editAddress1'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 查看详情 -->
+          <div v-if="activeKey == 'editAddress2'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+          <!-- 退货 -->
+          <div v-if="activeKey == 'editAddress3'" style="width:100%;height:100%;">
+            <zj-page-container>
+              <zj-page-fill>
+                <div style="box-sizing: border-box; padding:10px;">
+                
+                </div>
+              </zj-page-fill>
+            </zj-page-container>
+          </div>
+        </template>
+      </zj-tab-page>
+    </zj-page-fill>
+  </zj-page-container>
+
+</template>
+
+<script>
+import { esOrderList } from "@/api/orderManagement";
+import add from "./add.vue"
+import '@/styles/order-list.scss'
+export default {
+  components: {add},
+
+  data() {
+    return {
+      screenForm: { // 筛选表单数据
+        orderId: '', // 订单号
+        esGoodsName: '', // 商品名称
+        userName: '', // 会员昵称
+        userMobile: '', // 手机号
+        websitId: '', // 网点名称
+        status: '', // 状态
+        createDate: '', // 创建时间
+        payDate: '', // 支付时间
+        exchangeCode: '', // 兑换码
+        evaluateStatus: '', // 评价状态
+        sendStatus: '', // 派单异常
+        workerOrderNo: '', // 信息编号
+      },
+      screen_status: [ // 筛选字段 - 状态
+        { label: '待付款', value: 'NOPAY' },
+        { label: '待发货', value: 'DFH' },
+        { label: '已发货', value: 'YFH' },
+        { label: '已完成', value: 'OVER' },
+        { label: '已退款', value: 'CLOSE' }
+      ],
+      tabCurrent: 'ALL',
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [],
+    }
+  },
+  computed: {
+
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    add(){
+      this.$refs.tabPage.addTab({
+        // 对应显示的模块
+        activeKey: "add",
+        // 唯一标识
+        key: "add",
+        // 页签名称
+        label: "新增订单",
+        // 打开时事件
+        triggerEvent: () => {
+        
+        },
+        // 关闭时事件
+        closeEvent: () => {
+          
+        }
+      })
+    },
+    changeTabs(tab, event) {
+      this.screenForm.status = this.tabCurrent === 'ALL' ? '' : tab.$options.propsData.name
+      this.currentPage = 1;
+      this.getList();
+    },
+    // 获取数据列表
+    getList() {
+      let params = {
+        orderId: this.screenForm.orderId, // 订单号
+        esGoodsName: this.screenForm.esGoodsName, // 商品名称
+        userName: this.screenForm.userName, // 会员昵称
+        userMobile: this.screenForm.userMobile, // 手机号
+        status: this.screenForm.status, // 状态
+        startCreateTime: this.screenForm.createDate[0] ? this.screenForm.createDate[0] : null, // 创建时间
+        endCreateTime: this.screenForm.createDate[1] ? this.screenForm.createDate[1] : null, // 创建时间
+        startPayTime: this.screenForm.payDate[0] ? this.screenForm.payDate[0] : null, // 支付时间
+        endPayTime: this.screenForm.payDate[1] ? this.screenForm.payDate[1] : null, // 支付时间
+        pageNum: this.currentPage,
+        pageSize: this.pageSize
+      };
+      esOrderList(params).then(res => {
+        res.data.records.forEach(item => {
+          item.selected = false;
+        });
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+      })
+    },
+    openForm(type, order) {
+
+    },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+  }
+}
+
+</script>