Merge remote-tracking branch 'origin/build' into build
This commit is contained in:
		| @@ -41,13 +41,13 @@ | ||||
|         </template> | ||||
|         <template slot="right"> | ||||
|           <el-input | ||||
|             v-model="search.title" | ||||
|             v-model="search.goodsTitle" | ||||
|             class="search-input" | ||||
|             size="small" | ||||
|             v-throttle="() => {search.current = 1, getList()}" | ||||
|             placeholder="请输入商品名称" | ||||
|             placeholder="请输入商品名称、兑换人" | ||||
|             clearable | ||||
|             @clear="search.current = 1, search.title = '', getList()" | ||||
|             @clear="search.current = 1, search.goodsTitle = '', getList()" | ||||
|             suffix-icon="iconfont iconSearch"> | ||||
|           </el-input> | ||||
|         </template> | ||||
| @@ -118,7 +118,7 @@ | ||||
|       return { | ||||
|         search: { | ||||
|           goodsType: '', | ||||
|           title: '', | ||||
|           goodsTitle: '', | ||||
|           current: 1, | ||||
|           status: '', | ||||
|           size: 10, | ||||
|   | ||||
| @@ -358,6 +358,18 @@ | ||||
|               return this.$message.error('请选择商品') | ||||
|             } | ||||
|  | ||||
|             for (let i = 0; i < this.form.goodsList.length; i++) { | ||||
|               if (!this.form.goodsList[i].integralPrice) { | ||||
|                 return this.$message.error('请输入兑换所需积分') | ||||
|               } | ||||
|               if (!this.form.goodsList[i].payMoney && this.form.goodsList[i].goods.type === '1') { | ||||
|                 return this.$message.error('请输入兑换后补差价金额') | ||||
|               } | ||||
|               if (!this.form.goodsList[i].stock) { | ||||
|                 return this.$message.error('请输入库存') | ||||
|               } | ||||
|             } | ||||
|  | ||||
|             this.instance.post(`/app/appintegralsupermarketshop/addOrUpdate`, { | ||||
|               ...this.form, | ||||
|               id: this.params.id || '', | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
|             v-model="search.status" | ||||
|             @change="(search.current = 1), getList()" | ||||
|             placeholder="请选择状态" | ||||
|             :selectList="dict.getDict('integralSGStatus')"> | ||||
|             :selectList="dict.getDict('integralSSStatus')"> | ||||
|           </ai-select> | ||||
|         </template> | ||||
|         <template slot="right"> | ||||
| @@ -40,19 +40,19 @@ | ||||
|         @getList="getList"> | ||||
|         <el-table-column label="网格店铺服务网格" slot="grid" align="center"> | ||||
|           <template v-slot="{ row }"> | ||||
|             <span>{{ row.type === '0' ? row.visibleNames || '-' : '-'  }}</span> | ||||
|             <span>{{ row.type === '0' ? (row.visibleNames ? row.visibleNames : row.serviceType === '0' ? '不限' : '-') : '-'  }}</span> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|         <el-table-column label="居民店铺服务地区" slot="area" align="center"> | ||||
|           <template v-slot="{ row }"> | ||||
|             <span>{{ row.type === '1' ? row.visibleNames || '-' : '-'  }}</span> | ||||
|             <span>{{ row.type === '1' ? (row.visibleNames ? row.visibleNames : row.serviceType === '0' ? '不限' : '-') : '-'  }}</span> | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|         <el-table-column label="操作" slot="options" align="center" width="160" fixed="right"> | ||||
|           <template v-slot="{ row }"> | ||||
|             <div class="table-options"> | ||||
|               <el-button type="text" title="编辑" @click="toAdd(row.id)">编辑</el-button> | ||||
|               <el-button type="text" :title="row.status === '0' ? '上架' : '下架'" @click="changeStatus(row)">{{ row.status === '0' ? '上架' : '下架' }}</el-button> | ||||
|               <el-button type="text" :title="row.status === '0' ? '启用' : '停用'" @click="changeStatus(row)">{{ row.status === '0' ? '启用' : '停用' }}</el-button> | ||||
|               <el-button type="text" title="删除" @click="remove(row.id)">删除</el-button> | ||||
|             </div> | ||||
|           </template> | ||||
| @@ -130,7 +130,7 @@ | ||||
|  | ||||
|       remove (id) { | ||||
|         this.$confirm('确定删除该商品吗?').then(() => { | ||||
|           this.instance.post(`/app/appintegralsupermarketgoods/delete?id=${id}`).then(res => { | ||||
|           this.instance.post(`/app/appintegralsupermarketshop/delete?id=${id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success('删除成功!') | ||||
|               this.getList() | ||||
| @@ -140,10 +140,10 @@ | ||||
|       }, | ||||
|  | ||||
|       changeStatus (row) { | ||||
|         this.$confirm(`确定${row.status === '0' ? '上架' : '下架'}该商品?`).then(() => { | ||||
|           this.instance.post(`/app/appintegralsupermarketgoods/online?id=${id}`).then(res => { | ||||
|         this.$confirm(`确定${row.status === '0' ? '启用' : '停用'}该商铺?`).then(() => { | ||||
|           this.instance.post(`/app/appintegralsupermarketshop/enable?id=${row.id}`).then(res => { | ||||
|             if (res.code == 0) { | ||||
|               this.$message.success(`${row.status === '0' ? '上架' : '下架'}成功`) | ||||
|               this.$message.success(`${row.status === '0' ? '启用' : '停用'}成功`) | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user