合并并提交修改
						commit
						5960df31bd
					
				|  | @ -157,6 +157,6 @@ export default { | |||
|   position: relative; | ||||
|   height: 0px; | ||||
|   top: -38px; | ||||
|   left: 339px; | ||||
|   left: 352px; | ||||
| } | ||||
| </style> | ||||
|  |  | |||
|  | @ -51,6 +51,7 @@ export default { | |||
|       list: [], // 优惠券列表 | ||||
|       total: 0, // 优惠券总数 | ||||
|       params: { // 请求参数 | ||||
|         getType: 'FREE', | ||||
|         pageNumber: 1, | ||||
|         pageSize: 20 | ||||
|       } | ||||
|  | @ -95,6 +96,7 @@ export default { | |||
|             content: '<p>优惠券领取成功,可到我的优惠券页面查看</p>', | ||||
|             okText: '我的优惠券', | ||||
|             cancelText: '立即使用', | ||||
|             closable: true, | ||||
|             onOk: () => { | ||||
|               this.$router.push('/home/Coupons') | ||||
|             }, | ||||
|  |  | |||
|  | @ -313,8 +313,12 @@ export default { | |||
|             let notSupArea = res.result.notSupportFreight; | ||||
|             this.selectedCoupon = {}; | ||||
|             if (res.result.platformCoupon) | ||||
|               this.selectedCoupon.platformCoupon = res.result.platformCoupon; | ||||
|             Object.assign(this.selectedCoupon, res.result.storeCoupons); | ||||
|               this.selectedCoupon[res.result.platformCoupon.memberCoupon.id] = res.result.platformCoupon; | ||||
|             if (res.result.storeCoupons && Object.keys(res.result.storeCoupons)[0]) { | ||||
|               let storeMemberCouponsId = Object.keys(res.result.storeCoupons)[0]; | ||||
|               let storeCouponId = res.result.storeCoupons[storeMemberCouponsId].memberCoupon.id; | ||||
|               this.selectedCoupon[storeCouponId] = res.result.storeCoupons[storeMemberCouponsId]; | ||||
|             } | ||||
|             if (notSupArea) { | ||||
|               let content = []; | ||||
|               let title = ""; | ||||
|  | @ -340,7 +344,7 @@ export default { | |||
|             const couponKeys = Object.keys(this.selectedCoupon); | ||||
|             if (couponKeys.length) { | ||||
|               this.couponList.forEach((e) => { | ||||
|                 if (e.id === this.selectedCoupon[couponKeys].memberCoupon.id) { | ||||
|                 if (this.selectedCoupon[e.id] && e.id === this.selectedCoupon[e.id].memberCoupon.id) { | ||||
|                   this.usedCouponId.push(e.id); | ||||
|                 } | ||||
|               }); | ||||
|  |  | |||
|  | @ -4,8 +4,14 @@ | |||
|       <div class="mb_10"> | ||||
|         <Button @click="addParent" icon="md-add">添加一级分类</Button> | ||||
|       </div> | ||||
|       <Table class="table" :load-data="handleLoadData" row-key="id" :loading="loading" :data="tableData" | ||||
|         :columns="columns"> | ||||
|       <Table | ||||
|         class="table" | ||||
|         :load-data="handleLoadData" | ||||
|         row-key="id" | ||||
|         :loading="loading" | ||||
|         :data="tableData" | ||||
|         :columns="columns" | ||||
|       > | ||||
|         <template slot="action" slot-scope="scope"> | ||||
|           <Dropdown v-show="scope.row.level == 2" trigger="click"> | ||||
|             <Button size="small"> | ||||
|  | @ -13,9 +19,15 @@ | |||
|               <Icon type="ios-arrow-down"></Icon> | ||||
|             </Button> | ||||
|             <DropdownMenu slot="list"> | ||||
|               <DropdownItem @click.native="brandOperation(scope.row)">编辑绑定品牌</DropdownItem> | ||||
|               <DropdownItem @click.native="specOperation(scope.row)">编辑绑定规格</DropdownItem> | ||||
|               <DropdownItem @click.native="parameterOperation(scope.row)">编辑绑定参数</DropdownItem> | ||||
|               <DropdownItem @click.native="brandOperation(scope.row)" | ||||
|                 >编辑绑定品牌</DropdownItem | ||||
|               > | ||||
|               <DropdownItem @click.native="specOperation(scope.row)" | ||||
|                 >编辑绑定规格</DropdownItem | ||||
|               > | ||||
|               <DropdownItem @click.native="parameterOperation(scope.row)" | ||||
|                 >编辑绑定参数</DropdownItem | ||||
|               > | ||||
|             </DropdownMenu> | ||||
|           </Dropdown> | ||||
| 
 | ||||
|  | @ -27,14 +39,28 @@ | |||
|             </Button> | ||||
|             <DropdownMenu slot="list"> | ||||
|               <DropdownItem @click.native="edit(scope.row)">编辑</DropdownItem> | ||||
|               <DropdownItem v-if="scope.row.deleteFlag == 1" @click.native="enable(scope.row)">启用</DropdownItem> | ||||
|               <DropdownItem v-if="scope.row.deleteFlag == 0" @click.native="disable(scope.row)">禁用</DropdownItem> | ||||
|               <DropdownItem | ||||
|                 v-if="scope.row.deleteFlag == 1" | ||||
|                 @click.native="enable(scope.row)" | ||||
|                 >启用</DropdownItem | ||||
|               > | ||||
|               <DropdownItem | ||||
|                 v-if="scope.row.deleteFlag == 0" | ||||
|                 @click.native="disable(scope.row)" | ||||
|                 >禁用</DropdownItem | ||||
|               > | ||||
|               <DropdownItem @click.native="remove(scope.row)">删除</DropdownItem> | ||||
|             </DropdownMenu> | ||||
|           </Dropdown> | ||||
|             | ||||
|           <Button v-show="scope.row.level != 2" type="primary" @click="addChildren(scope.row)" size="small" | ||||
|             icon="md-add" style="margin-right: 5px">添加子分类 | ||||
|           <Button | ||||
|             v-show="scope.row.level != 2" | ||||
|             type="primary" | ||||
|             @click="addChildren(scope.row)" | ||||
|             size="small" | ||||
|             icon="md-add" | ||||
|             style="margin-right: 5px" | ||||
|             >添加子分类 | ||||
|           </Button> | ||||
|         </template> | ||||
| 
 | ||||
|  | @ -43,17 +69,30 @@ | |||
|         </template> | ||||
| 
 | ||||
|         <template slot="deleteFlag" slot-scope="{ row }"> | ||||
|           <Tag :class="{'ml_10': row.deleteFlag}" :color="row.deleteFlag == false ? 'success' : 'error'"> | ||||
|             {{row.deleteFlag == false ? '正常启用' : '禁用'}}</Tag> | ||||
|           <Tag | ||||
|             :class="{ ml_10: row.deleteFlag }" | ||||
|             :color="row.deleteFlag == false ? 'success' : 'error'" | ||||
|           > | ||||
|             {{ row.deleteFlag == false ? "正常启用" : "禁用" }}</Tag | ||||
|           > | ||||
|         </template> | ||||
|       </Table> | ||||
| 
 | ||||
|       <Modal :title="modalTitle" v-model="modalVisible" :mask-closable="false" :width="500"> | ||||
|       <Modal | ||||
|         :title="modalTitle" | ||||
|         v-model="modalVisible" | ||||
|         :mask-closable="false" | ||||
|         :width="500" | ||||
|       > | ||||
|         <Form ref="form" :model="formAdd" :label-width="100" :rules="formValidate"> | ||||
|           <div v-if="showParent"> | ||||
|             <FormItem label="上级分类" prop="parentId"> | ||||
|               {{ parentTitle }} | ||||
|               <Input v-model="formAdd.parentId" clearable style="width: 100%; display: none" /> | ||||
|               <Input | ||||
|                 v-model="formAdd.parentId" | ||||
|                 clearable | ||||
|                 style="width: 100%; display: none" | ||||
|               /> | ||||
|             </FormItem> | ||||
|           </div> | ||||
|           <FormItem label="层级" prop="level" style="display: none"> | ||||
|  | @ -63,7 +102,10 @@ | |||
|             <Input v-model="formAdd.name" clearable style="width: 100%" /> | ||||
|           </FormItem> | ||||
|           <FormItem label="分类图标" prop="image" v-if="formAdd.level !== 1"> | ||||
|             <upload-pic-input v-model="formAdd.image" style="width: 100%"></upload-pic-input> | ||||
|             <upload-pic-input | ||||
|               v-model="formAdd.image" | ||||
|               style="width: 100%" | ||||
|             ></upload-pic-input> | ||||
|           </FormItem> | ||||
|           <FormItem label="排序值" prop="sortOrder" style="width: 345px"> | ||||
|             <InputNumber v-model="formAdd.sortOrder"></InputNumber> | ||||
|  | @ -72,7 +114,12 @@ | |||
|             <InputNumber v-model="formAdd.commissionRate"></InputNumber> | ||||
|           </FormItem> | ||||
|           <FormItem label="是否启用" prop="deleteFlag"> | ||||
|             <i-switch size="large" v-model="formAdd.deleteFlag" :true-value="0" :false-value="1"> | ||||
|             <i-switch | ||||
|               size="large" | ||||
|               v-model="formAdd.deleteFlag" | ||||
|               :true-value="0" | ||||
|               :false-value="1" | ||||
|             > | ||||
|               <span slot="open">启用</span> | ||||
|               <span slot="close">禁用</span> | ||||
|             </i-switch> | ||||
|  | @ -84,33 +131,52 @@ | |||
|         </div> | ||||
|       </Modal> | ||||
| 
 | ||||
|       <Modal :title="modalBrandTitle" v-model="modalBrandVisible" :mask-closable="false" :width="500"> | ||||
|       <Modal | ||||
|         :title="modalBrandTitle" | ||||
|         v-model="modalBrandVisible" | ||||
|         :mask-closable="false" | ||||
|         :width="500" | ||||
|       > | ||||
|         <Form ref="brandForm" :model="brandForm" :label-width="100"> | ||||
|           <Select v-model="brandForm.categoryBrands" filterable multiple> | ||||
|             <Option v-for="item in brandWay" :value="item.id" :key="item.id">{{ item.name }}</Option> | ||||
| 
 | ||||
|             <Option v-for="item in brandWay" :value="item.id" :key="item.id">{{ | ||||
|               item.name | ||||
|             }}</Option> | ||||
|           </Select> | ||||
|         </Form> | ||||
|         <div slot="footer"> | ||||
|           <Button type="text" @click="modalBrandVisible = false">取消</Button> | ||||
|           <Button type="primary" :loading="submitLoading" @click="saveCategoryBrand">提交</Button> | ||||
|           <Button type="primary" :loading="submitLoading" @click="saveCategoryBrand" | ||||
|             >提交</Button | ||||
|           > | ||||
|         </div> | ||||
|       </Modal> | ||||
| 
 | ||||
|       <Modal :title="modalSpecTitle" v-model="modalSpecVisible" :mask-closable="false" :width="500"> | ||||
|       <Modal | ||||
|         :title="modalSpecTitle" | ||||
|         v-model="modalSpecVisible" | ||||
|         :mask-closable="false" | ||||
|         :width="500" | ||||
|       > | ||||
|         <Form ref="specForm" :model="specForm" :label-width="100"> | ||||
|           <Select v-model="specForm.categorySpecs" multiple> | ||||
|             <Option v-for="item in specifications" :value="item.id" :key="item.id" :label="item.specName"> | ||||
|             <Option | ||||
|               v-for="item in specifications" | ||||
|               :value="item.id" | ||||
|               :key="item.id" | ||||
|               :label="item.specName" | ||||
|             > | ||||
|             </Option> | ||||
|           </Select> | ||||
|         </Form> | ||||
|         <div slot="footer"> | ||||
|           <Button type="text" @click="modalSpecVisible = false">取消</Button> | ||||
|           <Button type="primary" :loading="submitLoading" @click="saveCategorySpec">提交</Button> | ||||
|           <Button type="primary" :loading="submitLoading" @click="saveCategorySpec" | ||||
|             >提交</Button | ||||
|           > | ||||
|         </div> | ||||
|       </Modal> | ||||
|     </Card> | ||||
| 
 | ||||
|   </div> | ||||
| </template> | ||||
| <script> | ||||
|  | @ -170,18 +236,9 @@ export default { | |||
|       specForm: {}, // 规格数据 | ||||
|       // 表单验证规则 | ||||
|       formValidate: { | ||||
|         commissionRate: [ | ||||
|           regular.REQUIRED, | ||||
|           regular.INTEGER | ||||
|         ], | ||||
|         name:[ | ||||
|           regular.REQUIRED, | ||||
|           regular.VARCHAR20, | ||||
|         ], | ||||
|         sortOrder:[ | ||||
|           regular.REQUIRED, | ||||
|           regular.INTEGER | ||||
|         ] | ||||
|         commissionRate: [regular.REQUIRED, regular.INTEGER], | ||||
|         name: [regular.REQUIRED, regular.VARCHAR20], | ||||
|         sortOrder: [regular.REQUIRED, regular.INTEGER], | ||||
|       }, | ||||
|       columns: [ | ||||
|         { | ||||
|  | @ -235,7 +292,6 @@ export default { | |||
|     //弹出品牌关联框 | ||||
|     brandOperation(v) { | ||||
|       getCategoryBrandListData(v.id).then((res) => { | ||||
|         console.warn(res); | ||||
|         this.categoryId = v.id; | ||||
|         this.modalBrandTitle = "品牌关联"; | ||||
|         this.brandForm.categoryBrands = res.result.map((item) => item.id); | ||||
|  | @ -277,7 +333,6 @@ export default { | |||
|     }, | ||||
|     // 添加子分类 | ||||
|     addChildren(v) { | ||||
|       console.log(v); | ||||
|       this.modalType = 0; | ||||
|       this.modalTitle = "添加子分类"; | ||||
|       this.parentTitle = v.name; | ||||
|  | @ -367,7 +422,6 @@ export default { | |||
| 
 | ||||
|     // 异步手动加载分类名称 | ||||
|     handleLoadData(item, callback) { | ||||
|       console.warn(item); | ||||
|       if (item.level == 0) { | ||||
|         let categoryList = JSON.parse(JSON.stringify(this.categoryList)); | ||||
|         categoryList.forEach((val) => { | ||||
|  | @ -384,7 +438,6 @@ export default { | |||
|         }); | ||||
|       } else { | ||||
|         this.deepCategoryChildren(item.id, this.categoryList); | ||||
|         console.log(this.checkedCategoryChildren); | ||||
|         setTimeout(() => { | ||||
|           callback(this.checkedCategoryChildren); | ||||
|         }, 1000); | ||||
|  | @ -420,8 +473,6 @@ export default { | |||
|             } | ||||
|             return item; | ||||
|           }); | ||||
| 
 | ||||
|           console.log(this.tableData); | ||||
|         } | ||||
|       }); | ||||
|     }, | ||||
|  |  | |||
|  | @ -42,12 +42,7 @@ | |||
|           /> | ||||
|         </template> | ||||
|         <template slot-scope="{ row, index }" slot="action"> | ||||
|           <Button | ||||
|             type="error" | ||||
|             size="small" | ||||
|             @click="delGoods(index,row)" | ||||
|           >删除 | ||||
|           </Button> | ||||
|           <Button type="error" size="small" @click="delGoods(index, row)">删除 </Button> | ||||
|         </template> | ||||
|       </Table> | ||||
|       <Row type="flex" justify="end" class="mt_10"> | ||||
|  | @ -72,7 +67,7 @@ | |||
|   seckillGoodsList, | ||||
|   seckillDetail, | ||||
|   auditApplySeckill, | ||||
|     delSeckillGoods | ||||
|   delSeckillGoods, | ||||
| } from "@/api/promotion.js"; | ||||
| 
 | ||||
| export default { | ||||
|  | @ -86,13 +81,14 @@ | |||
|       searchForm: { | ||||
|         // 搜索框初始化对象 | ||||
|         pageNumber: 0, // 当前页数 | ||||
|           pageSize: 100, // 页面大小 | ||||
|         pageSize: 10, // 页面大小 | ||||
|       }, | ||||
|       total: 0, // 总数 | ||||
|       selectList: [], // 多选数据 | ||||
|       selectCount: 0, // 多选计数 | ||||
|       data: [], // 表单数据 | ||||
|         columns: [ // 表头 | ||||
|       columns: [ | ||||
|         // 表头 | ||||
|         { | ||||
|           title: "活动名称", | ||||
|           key: "promotionName", | ||||
|  | @ -156,12 +152,13 @@ | |||
|           }, | ||||
|         }, | ||||
|       ], | ||||
|         goodsColumns: [ // 商品表单 | ||||
|       goodsColumns: [ | ||||
|         // 商品表单 | ||||
|         { | ||||
|           title: "商品名称", | ||||
|           key: "goodsName", | ||||
|           minWidth: 120, | ||||
|             tooltip: true | ||||
|           tooltip: true, | ||||
|         }, | ||||
|         { | ||||
|           title: "商品价格", | ||||
|  | @ -172,7 +169,7 @@ | |||
|           title: "库存", | ||||
|           slot: "quantity", | ||||
|           minWidth: 30, | ||||
|             width: 90 | ||||
|           width: 90, | ||||
|         }, | ||||
|         { | ||||
|           title: "活动价格", | ||||
|  | @ -183,8 +180,7 @@ | |||
|           title: "商家名称", | ||||
|           key: "storeName", | ||||
|           minWidth: 100, | ||||
|             tooltip: true | ||||
| 
 | ||||
|           tooltip: true, | ||||
|         }, | ||||
|         { | ||||
|           title: "活动场次", | ||||
|  | @ -204,13 +200,15 @@ | |||
|         }, | ||||
|       ], | ||||
|       goodsList: [], // 商品列表 | ||||
|         params: { // 请求参数 | ||||
|       params: { | ||||
|         // 请求参数 | ||||
|         seckillId: this.$route.query.id, | ||||
|         applyStatus: "PASS", | ||||
|         failReason: "", | ||||
|         ids: "", | ||||
|       }, | ||||
|         rules: { // 验证规则 | ||||
|       rules: { | ||||
|         // 验证规则 | ||||
|         failReason: [{ required: true, message: "请输入拒绝原因" }], | ||||
|       }, | ||||
|     }; | ||||
|  | @ -269,14 +267,14 @@ | |||
|         onOk: () => { | ||||
|           const params = { | ||||
|             seckillId: row.seckillId, | ||||
|               id: row.id | ||||
|             } | ||||
|             delSeckillGoods(params).then(res => { | ||||
|             id: row.id, | ||||
|           }; | ||||
|           delSeckillGoods(params).then((res) => { | ||||
|             if (res.success) { | ||||
|               this.goodsList.splice(index, 1); | ||||
|               this.$Message.success("删除成功!"); | ||||
|             } | ||||
|             }) | ||||
|           }); | ||||
|         }, | ||||
|       }); | ||||
|     }, | ||||
|  | @ -291,7 +289,7 @@ | |||
|         hourArr[i] += ":00"; | ||||
|       } | ||||
|       return hourArr; | ||||
|       } | ||||
|     }, | ||||
|   }, | ||||
|   mounted() { | ||||
|     this.init(); | ||||
|  |  | |||
|  | @ -1,6 +1,12 @@ | |||
| <template> | ||||
|   <div class="layout"> | ||||
|     <Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate"> | ||||
|     <Form | ||||
|       ref="formValidate" | ||||
|       :label-width="150" | ||||
|       label-position="right" | ||||
|       :model="formValidate" | ||||
|       :rules="ruleValidate" | ||||
|     > | ||||
|       <FormItem label="appId" prop="appId"> | ||||
|         <Input class="w200" v-model="formValidate.appId" /> | ||||
|         <p style="color: red">*APP应用 AppID 非必填</p> | ||||
|  | @ -34,7 +40,6 @@ | |||
|       </FormItem> | ||||
|       <div class="label-btns"> | ||||
|         <Button type="primary" @click="submit('formValidate')">保存</Button> | ||||
| 
 | ||||
|       </div> | ||||
|     </Form> | ||||
|   </div> | ||||
|  | @ -48,7 +53,6 @@ export default { | |||
|     return { | ||||
|       ruleValidate: {}, // 验证规则 | ||||
|       formValidate: {}, // 表单数据 | ||||
| 
 | ||||
|     }; | ||||
|   }, | ||||
|   props: ["res", "type"], | ||||
|  | @ -79,7 +83,6 @@ export default { | |||
|       this.$set(this, "formValidate", { ...this.res }); | ||||
|       Object.keys(this.formValidate).forEach((item) => { | ||||
|         if (item.indexOf("pId") < 0) { | ||||
| 
 | ||||
|           this.ruleValidate[item] = [ | ||||
|             { | ||||
|               required: true, | ||||
|  | @ -87,7 +90,6 @@ export default { | |||
|               trigger: "blur", | ||||
|             }, | ||||
|           ]; | ||||
| 
 | ||||
|         } | ||||
|       }); | ||||
|     }, | ||||
|  |  | |||
|  | @ -1,10 +1,17 @@ | |||
| <template> | ||||
|   <div class="layout"> | ||||
|     <Form ref="formValidate" :label-width="150" label-position="right" :model="formValidate" :rules="ruleValidate"> | ||||
|       <FormItem label="积分比率" prop="money"> | ||||
|       <FormItem label="消费1元赠送积分" prop="money"> | ||||
|         <Input type="number" v-model="formValidate.money"> | ||||
|           <span slot="prepend">1积分=</span> | ||||
|           <span slot="append">人民币</span> | ||||
|           <span slot="append">积分</span> | ||||
|           <!--          <span slot="append">人民币</span>--> | ||||
|         </Input> | ||||
| 
 | ||||
|       </FormItem> | ||||
|       <FormItem label="积分抵扣付款" prop="money"> | ||||
|         <Input type="number" v-model="formValidate.money"> | ||||
|           <span slot="prepend">积分</span> | ||||
|           <span slot="append"> = 1 人民币</span> | ||||
|         </Input> | ||||
| 
 | ||||
|       </FormItem> | ||||
|  | @ -35,7 +42,8 @@ | |||
| 
 | ||||
|       </FormItem> | ||||
| 
 | ||||
|       <FormItem class="label-item" v-for="(point,index) in  formValidate.pointSettingItems" :key="index" :label="'签到设置'+(index+1)"> | ||||
|       <FormItem class="label-item" v-for="(point,index) in  formValidate.pointSettingItems" :key="index" | ||||
|                 :label="'签到设置'+(index+1)"> | ||||
|         <div class="label-item"> | ||||
| 
 | ||||
|           <InputNumber :min="1" v-model="point.day"></InputNumber> | ||||
|  | @ -43,7 +51,8 @@ | |||
|           <InputNumber :min="0" v-model="point.point"></InputNumber> | ||||
| 
 | ||||
|           <Button ghost type="error" @click="delSign(point,index)">删除</Button> | ||||
|           <span class="ml_10">签到<span class="theme_color">{{point.day}}</span>天,赠送<span class="theme_color">{{point.point}}</span>积分</span> | ||||
|           <span class="ml_10">签到<span class="theme_color">{{ point.day }}</span>天,赠送<span | ||||
|             class="theme_color">{{ point.point }}</span>积分</span> | ||||
|         </div> | ||||
| 
 | ||||
|       </FormItem> | ||||
|  | @ -60,6 +69,7 @@ | |||
| <script> | ||||
| import {setSetting} from "@/api/index"; | ||||
| import {handleSubmit} from "./validate"; | ||||
| 
 | ||||
| export default { | ||||
|   data() { | ||||
|     return { | ||||
|  | @ -150,22 +160,27 @@ export default { | |||
|     width: 100px; | ||||
|     margin-right: 5px; | ||||
|   } | ||||
| 
 | ||||
|   > .ivu-input-number:nth-last-of-type(1) { | ||||
|     width: 150px; | ||||
|     margin-right: 5px; | ||||
|   } | ||||
| 
 | ||||
|   > .ivu-input { | ||||
|     width: 100px; | ||||
|     margin: 0 10px; | ||||
|   } | ||||
| } | ||||
| 
 | ||||
| /deep/ .ivu-input { | ||||
|   width: 70px !important; | ||||
| } | ||||
| 
 | ||||
| .ivu-input-wrapper { | ||||
|   width: 70px; | ||||
|   margin-right: 10px; | ||||
| } | ||||
| 
 | ||||
| .label-btns { | ||||
|   /deep/ .ivu-btn { | ||||
|     margin-right: 10px; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue