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

Merge branch 'test' into 'master'

Test

See merge request quanshu/mp-ui-pc!284
zhong chunping пре 3 година
родитељ
комит
dcf4df0ed7

+ 20 - 1
src/api/business/marketing.js

@@ -71,8 +71,16 @@ export function setMarketingStatusOff(data) {
     },
   })
 }
-
 //查询活动数据列表
+export function getMarketingDataCodeList(id) {
+  return request({
+    url: `/api/v1/mp/admin/marketing/data/codeList/${id}`,
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    },
+  })
+}
 export function getMarketingData(id) {
   return request({
     url: `/api/v1/mp/admin/marketing/data/${id}`,
@@ -82,3 +90,14 @@ export function getMarketingData(id) {
     },
   })
 }
+
+//复制活动
+export function getMarketingCopy(id) {
+  return request({
+    url: `/api/v1/mp/admin/marketing/copy/${id}`,
+    method: 'post',
+    headers: {
+      'Content-Type': 'application/x-www-form-urlencoded'
+    },
+  })
+}

+ 4 - 4
src/views/business/goods/add.vue

@@ -109,7 +109,7 @@
           </el-form-item>
         </el-col>
         <el-col :span="23">
-          <el-form-item label="兑换盲豆数量:" prop="exchangePrice">
+          <el-form-item label="盲豆兑换数量:" prop="exchangePrice">
             <el-input v-model="addData.exchangePrice" type="number" placeholder="请输入盲豆数量">
               <template slot="append">盲豆</template>
             </el-input>
@@ -130,8 +130,8 @@
           </el-form-item>
         </el-col>
         <el-col :span="23">
-          <el-form-item label="采购价格:" prop="cost">
-            <el-input v-model="addData.cost" type="number" placeholder="请输入商品采购价格">
+          <el-form-item label="商品成本:" prop="cost">
+            <el-input v-model="addData.cost" type="number" placeholder="请输入商品成本">
               <template slot="append">元</template>
             </el-input>
           </el-form-item>
@@ -231,7 +231,7 @@ export default {
           },
         ],
         cost: [
-          { required: false, message: '请输入采购价格', trigger: 'blur' },
+          { required: false, message: '请输入商品成本', trigger: 'blur' },
           { pattern: /^([1-9]\d*(\.\d{1,2})?|([0](\.([0][1-9]|[1-9]\d{0,1}))))$/, message: "请输入正确的金额,最多两位小数", trigger: ["blur", "change"] }
         ],
         quantity: [

+ 2 - 2
src/views/business/goods/components/spec.vue

@@ -42,7 +42,7 @@
           <th rowspan="2" class="required"><span>*</span>兑换盲豆数量</th>
           <th rowspan="2" class="required"><span>*</span>回收折扣(%)</th>
           <th rowspan="2">盲豆划线价</th>
-          <th rowspan="2">采购价格(元)</th>
+          <th rowspan="2">商品成本(元)</th>
           <th rowspan="2">SKU编码</th>
           <th rowspan="2" class="required"><span>*</span>库存</th>
           <th rowspan="2">启用</th>
@@ -142,7 +142,7 @@ export default {
         { required: true, message: '请输入价格', trigger: 'blur' },
         { pattern: /^([1-9]\d*(\.\d{1,2})?|([0](\.([0][1-9]|[1-9]\d{0,1}))))$/, message: "请输入正确的金额,最多两位小数", trigger: ["blur", "change"]}],
       costYRules: [
-        { required: false, message: '请输入采购价格', trigger: 'blur' },
+        { required: false, message: '请输入商品成本', trigger: 'blur' },
         { pattern: /^([1-9]\d*(\.\d{1,2})?|([0](\.([0][1-9]|[1-9]\d{0,1}))))$/, message: "请输入正确的金额,最多两位小数", trigger: ["blur", "change"] }],
       exchangeRules: [
         { required: true,message:'请输入盲豆数量', trigger: 'blur' },

+ 9 - 7
src/views/business/goods/index.vue

@@ -57,11 +57,11 @@
         </el-select>
       </el-form-item>
       <br>
-      <el-form-item label="采购价格" prop="minCost">
-        <el-input v-model="queryParams.minCost" placeholder="最低采购价格" clearable @keyup.enter.native="queryParams.pageNum = 1;getList()" />
+      <el-form-item label="商品成本" prop="minCost">
+        <el-input v-model="queryParams.minCost" placeholder="最低成本" clearable @keyup.enter.native="queryParams.pageNum = 1;getList()" />
       </el-form-item>
       <el-form-item label="-" prop="maxCost">
-        <el-input v-model="queryParams.maxCost" placeholder="最高采购价格" clearable @keyup.enter.native="queryParams.pageNum = 1;getList()" />
+        <el-input v-model="queryParams.maxCost" placeholder="最高成本" clearable @keyup.enter.native="queryParams.pageNum = 1;getList()" />
       </el-form-item>
       <el-form-item label="价格" prop="minValue">
         <el-input v-model="queryParams.minValue" placeholder="最低价格" clearable @keyup.enter.native="queryParams.pageNum = 1;getList()" />
@@ -103,7 +103,7 @@
           ¥{{$numberFormat(row.value)}}
         </template>
       </el-table-column>
-      <el-table-column label="采购价格" prop="cost" sortable="custom" min-width="100px">
+      <el-table-column label="商品成本" prop="cost" sortable="custom" min-width="100px">
         <template slot-scope="{row}">
           ¥{{$numberFormat(row.cost)}}
         </template>
@@ -114,7 +114,7 @@
           <span v-if="row.exchangeShow == '0'">不支持</span>
         </template>
       </el-table-column>
-      <el-table-column label="兑换盲豆数量" prop="exchangePrice" sortable="custom" min-width="125" />
+      <el-table-column label="盲豆兑换数量" prop="exchangePrice" sortable="custom" min-width="125" />
       <el-table-column label="销量" prop="exchangedQty" sortable="custom" />
       <el-table-column label="库存" prop="quantity" sortable="custom" />
       <el-table-column label="状态" prop="status">
@@ -218,7 +218,9 @@ export default {
       // }
       if(this.queryParams.categoryIdList){
         for (let i = 0; i < this.queryParams.categoryIdList.length; i++) {
-          this.queryParams.categoryIdList[i] = this.queryParams.categoryIdList[i][1]
+          if(this.queryParams.categoryIdList[i][1]){
+            this.queryParams.categoryIdList[i] = this.queryParams.categoryIdList[i][1]
+          }
         }
       }
       getGoodsList('pageNum='+this.queryParams.pageNum + '&pageSize='+this.queryParams.pageSize+'&orderByColumn='+ this.queryParams.orderByColumn +'&isAsc='+ this.queryParams.isAsc +'&', {
@@ -246,7 +248,7 @@ export default {
 
     // 重置
     resetQuery() {
-      this.resetForm("queryForm");
+      this.queryParams = { pageNum: 1, pageSize: 20, orderByColumn: '', isAsc: '',}
       this.getList();
     },
 

+ 11 - 13
src/views/business/marketing/add.vue

@@ -21,7 +21,7 @@
         <el-col>
           <el-form-item label="活动日期:" prop="dateValue">
             <el-date-picker value-format="timestamp" v-model="addData.dateValue" :picker-options="setYearDisabled" type="datetimerange"
-                            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"/>
+                            range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期"  :default-time="['20:00:00', '20:00:00']"/>
           </el-form-item>
         </el-col>
         <el-col :span="16">
@@ -29,15 +29,12 @@
             <el-input v-model="addData.fakeNum"/>
           </el-form-item>
         </el-col>
-        <el-col :span="23">
-          <el-form-item label="抽奖码获取方式:" prop="type">
-            <el-col>邀请用户助力</el-col>
-            <el-col>用户助力条件:
-              <el-radio-group v-model="labelRadio" >
-                <el-radio :label="1">每个账号终身仅助力一次</el-radio>
-                <el-radio :label="2" disabled>无</el-radio>
+        <el-col :span="24">
+          <el-form-item label="是否可无条件参与:" prop="type" label-width="140px">
+              <el-radio-group v-model="addData.codeType" >
+                <el-radio :label="1">是</el-radio>
+                <el-radio :label="2">否</el-radio>
               </el-radio-group>
-            </el-col>
           </el-form-item>
         </el-col>
       </el-row>
@@ -119,8 +116,8 @@ export default {
         fakeNum: 0,//初始用户数
         description: '',//活动详情
         awardsList: [],//奖级列表
+        codeType: 1,//获取类型
       },
-      labelRadio: 1,//单选框
       rules: {
         title: [{required: true, message: '请输入活动名称', trigger: 'blur'}],
         picUrl: [{required: true, message: '请上传活动封面', trigger: 'change'}],
@@ -196,8 +193,8 @@ export default {
   created() {
     if (this.id) {
       getMarketingDetail(this.id).then(res => {
-        const { startTime, endTime, description, fakeNum,picUrl, realNum, title, awardsList, id } = res.data
-        this.addData = { title, dateValue:[startTime,endTime], picUrl, fakeNum, realNum, description, awardsList, id }
+        const { startTime, endTime, description, fakeNum, codeType, picUrl, realNum, title, awardsList, id } = res.data
+        this.addData = { title, dateValue:[startTime,endTime], picUrl, fakeNum, codeType, realNum, description, awardsList, id }
         if(description) {
           this.$refs.editor.setContent(description)
         }
@@ -272,7 +269,7 @@ export default {
             });
           });
 
-          const { fakeNum, description, title, picUrl } = this.addData
+          const { fakeNum, description, title, picUrl, codeType } = this.addData
           addMarketing({
             title,
             description: encodeURI(description),
@@ -280,6 +277,7 @@ export default {
             startTime: this.addData.dateValue[0],
             endTime: this.addData.dateValue[1],
             awardsList: this.awardsList,
+            codeType:Number(codeType),
             picUrl, id:this.addData.id?this.addData.id:"",
           }).then(res => {
             if (res.code === 0) {

+ 15 - 32
src/views/business/marketing/components/ActivityTable.vue

@@ -1,20 +1,21 @@
 <template>
   <div>
     <el-dialog
-      :title="this.ids.title"
+      :title="marketingData.title"
       width="1000px"
       :visible.sync="dialogVisible"
       :before-close="close"
     >
       <div class="dialog-search">
-        <div>参与用户数量:{{this.ids.realNum}}</div>
+        <div>参与用户数量:{{marketingData.realNum}}</div>
         <div class="ge"></div>
-        <div>抽奖码数量:{{marketingTotal}}</div>
+        <div>新用户数(助力用户数):{{marketingData.newUserCount}}</div>
+        <div class="ge"></div>
+        <div>抽奖码数量:{{marketingData.codeCount}}</div>
       </div>
       <el-table
         v-loading="loading"
         :data="marketingList"
-        @selection-change="handleSelectionCoupon"
         class="el-table"
       >
         <el-table-column label="用户编号" prop="userId" min-width="80" />
@@ -53,8 +54,7 @@
   </div>
 </template>
 <script>
-import { publicFileGetUrl } from "@/api/common";
-import { getMarketingData } from '@/api/business/marketing'
+import { getMarketingData, getMarketingDataCodeList } from '@/api/business/marketing'
 export default {
   name: "CouponAdd",
   props: {
@@ -70,50 +70,33 @@ export default {
   data() {
     return {
       loading: false,
-      marketingTitle: "", // 券名称
-      marketingList: [], // 卡券列表
-      marketingTotal: 0, // 卡券总数
-      selectCouponList: [], // 选中卡券
+      marketingList: [], // 列表
+      marketingTotal: 0, // 总数
       pageParams: {
         pageNum: 1,
         pageSize: 10,
       },
+      marketingData: {},//
     };
   },
   created() {
     this.getMarketingData();
   },
   methods: {
-    // 卡券列表
+    // 列表
     getMarketingData() {
       this.loading = true;
-      getMarketingData(this.ids.id ).then((res) => {
+      getMarketingDataCodeList(this.ids.id ).then((res) => {
         this.marketingList = res.rows
         this.marketingTotal = res.total;
         this.loading = false;
       });
-    },
-
-    // 选中卡券
-    handleSelectionCoupon(e) {
-      this.selectCouponList = e.map((item) => {
-        return {
-          couponNum: 1,
-          couponId: item.couponId,
-          title: item.title,
-          createdTime: item.createdTime,
-          updatedTime: item.updatedTime,
-          type: item.type,
-          discount: item.discount,
-          dueDays: item.dueDays
-        };
+      getMarketingData(this.ids.id ).then((res) => {
+        if(res.code == 0){
+          this.marketingData = res.data
+        }
       });
-    },
 
-    // 确认选中卡券
-    confirmCoupon() {
-      this.$emit("confirmCoupon", this.selectCouponList);
-      this.close()
     },
 
     close() {

+ 4 - 0
src/views/business/marketing/components/CouponAdd.vue

@@ -153,6 +153,10 @@ export default {
 
     // 确认选中卡券
     confirmCoupon() {
+      if(!this.selectCouponList.length) {
+        this.msgInfo('请选择券')
+        return
+      }
       this.$emit("confirmCoupon", this.selectCouponList);
     },
 

+ 4 - 0
src/views/business/marketing/components/CouponPkgAdd.vue

@@ -124,6 +124,10 @@ export default {
 
     // 确认选中券包
     confirmCouponPkg() {
+      if(!this.selectCouponPkgList.length) {
+        this.msgInfo('请选择券包')
+        return
+      }
       this.$emit("confirmCouponPkg", this.selectCouponPkgList);
     },
 

+ 4 - 0
src/views/business/marketing/components/GoodsAdd.vue

@@ -153,6 +153,10 @@ export default {
 
     // 确认选中商品
     confirmGoods() {
+      if(!this.selectGoodsList.length) {
+        this.msgInfo('请选择商品')
+        return
+      }
       this.$emit("confirmGoods", this.selectGoodsList);
     },
 

+ 7 - 11
src/views/business/marketing/detail.vue

@@ -28,15 +28,10 @@
             <el-input v-model="addData.fakeNum" readonly />
           </el-form-item>
         </el-col>
-        <el-col :span="23">
-          <el-form-item label="抽奖码获取方式:" prop="type">
-            <el-col>邀请用户助力</el-col>
-            <el-col>用户助力条件:
-              <el-radio-group v-model="labelRadio" >
-                <el-radio :label="1">每个账号终身仅助力一次</el-radio>
-                <el-radio :label="2" disabled>无</el-radio>
-              </el-radio-group>
-            </el-col>
+        <el-col :span="16">
+          <el-form-item label="是否可无条件参与:" label-width="140px">
+            <div v-if="addData.codeType == 1">是</div>
+            <div v-else>否</div>
           </el-form-item>
         </el-col>
       </el-row>
@@ -123,6 +118,7 @@ export default {
         fakeNum: 0,//初始用户数
         description: '',//活动详情
         awardsList: [],//奖级列表
+        codeType: '',
       },
       labelRadio: 1,//单选框
 
@@ -136,8 +132,8 @@ export default {
   created() {
     if (this.id) {
       getMarketingDetail(this.id).then(res => {
-        const { startTime, endTime, description, fakeNum,picUrl, realNum, title, awardsList, id } = res.data
-        this.addData = { title, dateValue:[startTime,endTime], picUrl: publicFileGetUrl + picUrl, fakeNum, realNum, description, awardsList, id }
+        const { startTime, endTime, description, fakeNum,picUrl, codeType, realNum, title, awardsList, id } = res.data
+        this.addData = { title, dateValue:[startTime,endTime], picUrl: publicFileGetUrl + picUrl, fakeNum, codeType, realNum, description, awardsList, id }
         if(awardsList){
           awardsList.forEach((item) => {
             item.prizeList.forEach((ele) => {

+ 16 - 1
src/views/business/marketing/index.vue

@@ -67,6 +67,7 @@
           <el-button v-if=" JSON.parse(row.status).value === 0 " v-hasPermi="['business:marketing:on']" type="text" @click="setStatus(row, 'on')">开启</el-button>
           <el-button v-if=" JSON.parse(row.status).value === 3 || JSON.parse(row.status).value === 2 " v-hasPermi="['business:marketing:off']" type="text" @click="setStatus(row, 'off')">关闭</el-button>
           <el-button v-if=" JSON.parse(row.status).value === 0 " v-hasPermi="['business:marketing:remove']" class="del" type="text" @click="del(row)">删除</el-button>
+          <el-button v-hasPermi="['business:marketing:copy']" type="text" @click="MarketingCopy(row.id,row.title)">复制</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -75,7 +76,7 @@
   </div>
 </template>
 <script>
-import { getMarketingList, delMarketing, setMarketingStatus, setMarketingStatusOff, ticketMarketingExport } from '@/api/business/marketing'
+import { getMarketingList, delMarketing, setMarketingStatus, setMarketingStatusOff, ticketMarketingExport, getMarketingCopy } from '@/api/business/marketing'
 import ActivityTable from "./components/ActivityTable";
 export default {
   name: 'CouponList',
@@ -159,6 +160,20 @@ export default {
         })
       })
     },
+    MarketingCopy(id,title) {
+      this.$confirm(`确认复制活动 “${title}” 吗?`, '复制活动', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        getMarketingCopy(id).then(res => {
+          if (res.code === 0) {
+            this.$message.success('操作已完成!')
+            this.getList()
+          }
+        })
+      })
+    },
 
     // 导出订单
     handleExportDraw() {

+ 4 - 0
src/views/business/ticket/components/CouponAdd.vue

@@ -153,6 +153,10 @@ export default {
 
     // 确认选中卡券
     confirmCoupon() {
+      if(!this.selectCouponList.length) {
+        this.msgInfo('请选择券')
+        return
+      }
       this.$emit("confirmCoupon", this.selectCouponList);
     },
 

+ 4 - 0
src/views/business/ticket/components/CouponPkgAdd.vue

@@ -124,6 +124,10 @@ export default {
 
     // 确认选中券包
     confirmCouponPkg() {
+      if(!this.selectCouponPkgList.length) {
+        this.msgInfo('请选择券包')
+        return
+      }
       this.$emit("confirmCouponPkg", this.selectCouponPkgList);
     },
 

+ 84 - 33
src/views/business/ticket/components/GoodsAdd.vue

@@ -7,30 +7,46 @@
       :before-close="close"
     >
       <div class="dialog-search">
-        <div>商品名称:</div>
+        <div style="margin:0 0 10px 20px">商品名称:</div>
         <el-input
           v-model="goodsTitle"
           placeholder="请输入商品名称"
           clearable
           size="small"
-          style="width: 220px" @clear="queryParams.pageNum = 1;getGoodsList()"
-          @keyup.enter.native="queryParams.pageNum = 1;getGoodsList()"
+          style="width: 220px" @clear="pageParams.pageNum = 1;getGoodsList()"
+          @keyup.enter.native="pageParams.pageNum = 1;getGoodsList()"
         />
         <div style="margin-left: 20px">商品价格:</div>
-<!--        <el-input v-model="minValue" placeholder="最低价格" clearable @keyup.enter.native="pageParams.pageNum = 1;getList()" />-->
-        <el-input style="width: 220px" v-model="queryParams.minValue"  @clear="queryParams.pageNum = 1;getGoodsList()" placeholder="最低价格" clearable @keyup.enter.native="queryParams.pageNum = 1;getGoodsList()"/>
+        <el-input type="number" style="width: 220px" v-model="queryParams.minValue" @clear="pageParams.pageNum = 1;getGoodsList()"
+                  placeholder="最低价格" clearable @keyup.enter.native="pageParams.pageNum = 1;getGoodsList()"/>
         <div style="width: 20px;text-align: center">-</div>
-<!--        <el-input v-model="maxValue" placeholder="最高价格" clearable @keyup.enter.native="pageParams.pageNum = 1;getList()" />-->
-        <el-input style="width: 220px" v-model="queryParams.maxValue"  @clear="queryParams.pageNum = 1;getGoodsList()" placeholder="最高价格" clearable @keyup.enter.native="queryParams.pageNum = 1;getGoodsList()"/>
+        <el-input type="number" style="width: 220px" v-model="queryParams.maxValue" @clear="pageParams.pageNum = 1;getGoodsList()"
+                  placeholder="最高价格" clearable @keyup.enter.native="pageParams.pageNum = 1;getGoodsList()"/>
+        <br>
+        <div style="margin:0 0 10px 20px">盲豆兑换数量:</div>
+        <el-input type="number" style="width: 220px" v-model="queryParams.minExchange" @clear="pageParams.pageNum = 1;getGoodsList()"
+                  placeholder="最低盲豆数量" clearable @keyup.enter.native="pageParams.pageNum = 1;getGoodsList()"/>
+        <div style="width: 20px;text-align: center">-</div>
+        <el-input type="number" style="width: 220px" v-model="queryParams.maxExchange" @clear="pageParams.pageNum = 1;getGoodsList()"
+                  placeholder="最高盲豆数量" clearable @keyup.enter.native="pageParams.pageNum = 1;getGoodsList()"/>
+        <br>
+        <div style="margin:0 0 10px 20px">商品成本:</div>
+        <el-input type="number" style="width: 220px" v-model="queryParams.minCost" @clear="pageParams.pageNum = 1;getGoodsList()"
+                  placeholder="最低成本" clearable @keyup.enter.native="pageParams.pageNum = 1;getGoodsList()"/>
+        <div style="width: 20px;text-align: center">-</div>
+        <el-input type="number" style="width: 220px" v-model="queryParams.maxCost" @clear="pageParams.pageNum = 1;getGoodsList()"
+                  placeholder="最高成本" clearable @keyup.enter.native="pageParams.pageNum = 1;getGoodsList()"/>
 
         <div class="ge"></div>
         <el-button
           type="primary"
           icon="el-icon-search"
           size="mini"
-          @click="getGoodsList()"
-          >查询</el-button
+          @click="pageParams.pageNum = 1;getGoodsList()"
+        >查询
+        </el-button
         >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery()">重置</el-button>
       </div>
       <el-table
         v-loading="loading"
@@ -44,7 +60,7 @@
           align="center"
           fixed="left"
         />
-        <el-table-column label="商品ID" prop="goodsId" />
+        <el-table-column label="商品ID" prop="goodsId"/>
         <el-table-column label="商品图片">
           <template slot-scope="{ row }">
             <div v-if="row.picUrl">
@@ -58,15 +74,31 @@
             <p v-else>-</p>
           </template>
         </el-table-column>
-        <el-table-column label="商品名称" prop="title" min-width="85" />
+        <el-table-column label="商品名称" prop="title" min-width="85"/>
 
         <el-table-column label="商品价格" min-width="85">
           <template slot-scope="scope">
             <div>¥{{ $numberFormat(scope.row.value) }}</div>
           </template>
         </el-table-column>
-        <el-table-column label="商品库存" prop="quantity" width="80" />
+
+        <el-table-column label="盲豆兑换数量" prop="exchangePrice" min-width="85"/>
+
+        <el-table-column label="商品成本" min-width="85">
+          <template slot-scope="scope">
+            <div>¥{{ $numberFormat(scope.row.cost) }}</div>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="是否支持兑换" prop="exchangeShow" min-width="85">
+          <template slot-scope="scope">
+            <div>{{scope.row.exchangeShow == 1 ? '支持兑换':'不支持兑换' }}</div>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="商品库存" prop="quantity" width="80"/>
       </el-table>
+      <div style="width: 700px;"></div>
       <pagination
         v-show="goodsTotal > 0"
         :total="goodsTotal"
@@ -75,8 +107,9 @@
         @pagination="getGoodsList"
       />
       <div class="dialog-btn">
-        <el-button size="small" @click="close"> 取 消 </el-button>
-        <div class="ge"></div>
+        <div style="width: 20px;"></div>
+        <el-button size="small" @click="close"> 取 消</el-button>
+        <div style="width: 20px;"></div>
         <el-button type="primary" size="small" @click="confirmGoods">
           确 认
         </el-button>
@@ -85,9 +118,10 @@
   </div>
 </template>
 <script>
-import { publicFileGetUrl } from "@/api/common";
-import { getGoodsList } from "@/api/business/goods";
-import { accMul } from '@/utils/util'
+import {publicFileGetUrl} from "@/api/common";
+import {getGoodsList} from "@/api/business/goods";
+import {accMul} from '@/utils/util'
+
 export default {
   name: "GoodsAdd",
   props: {
@@ -100,7 +134,7 @@ export default {
     return {
       loading: false,
       goodsTitle: "", // 商品名称
-      queryParams:{},
+      queryParams: {},
 
       goodsList: [], // 商品列表
       goodsTotal: 0, // 商品总数
@@ -118,13 +152,23 @@ export default {
     // 商品列表
     getGoodsList() {
       this.loading = true;
+
       getGoodsList(
         "pageNum=" +
-          this.pageParams.pageNum +
-          "&pageSize=" +
-          this.pageParams.pageSize +
-          "&",
-        { title: this.goodsTitle,  status: "on", minValue: this.queryParams.minValue?accMul(this.queryParams.minValue, 100):this.queryParams.minValue, maxValue: this.queryParams.maxValue?accMul(this.queryParams.maxValue, 100):this.queryParams.maxValue,}
+        this.pageParams.pageNum +
+        "&pageSize=" +
+        this.pageParams.pageSize +
+        "&",
+        {
+          title: this.goodsTitle,
+          status: "on",
+          minValue: this.queryParams.minValue ? accMul(this.queryParams.minValue, 100) : this.queryParams.minValue,
+          maxValue: this.queryParams.maxValue ? accMul(this.queryParams.maxValue, 100) : this.queryParams.maxValue,
+          minExchange:this.queryParams.minExchange,
+          maxExchange:this.queryParams.maxExchange,
+          minCost: this.queryParams.minCost ? accMul(this.queryParams.minCost, 100) : this.queryParams.minCost,
+          maxCost: this.queryParams.maxCost ? accMul(this.queryParams.maxCost, 100) : this.queryParams.maxCost,
+        }
       ).then((res) => {
         this.goodsList = res.rows.map((item) => {
           return {
@@ -136,6 +180,13 @@ export default {
         this.loading = false;
       });
     },
+    //重置
+    resetQuery(){
+      this.goodsTitle = ''
+      this.queryParams = {}
+      this.pageParams.pageNum = 1
+      this.getGoodsList();
+    },
 
     // 选中商品
     handleSelectionGoods(e) {
@@ -153,6 +204,10 @@ export default {
 
     // 确认选中商品
     confirmGoods() {
+      if(!this.selectGoodsList.length) {
+        this.msgInfo('请选择商品')
+        return
+      }
       this.$emit("confirmGoods", this.selectGoodsList);
     },
 
@@ -163,21 +218,17 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
+div {
+  display: inline-block;
+}
 .dialog-search {
-  display: flex;
+  //display: flex;
   line-height: 32px;
   margin-bottom: 20px;
+
   .ge {
     width: 20px;
   }
 }
-.dialog-btn {
-  display: flex;
-  align-content: center;
-  justify-content: flex-end;
-  padding: 40px 0 0;
-  .ge {
-    width: 20px;
-  }
-}
+
 </style>