| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375 |
- define({
- template:`
- <div>
- <el-form ref="auction" label-width="15%" :rules="rules">
- <div id="vue_head">
- <div class="base_set">
- <div class="vue-main-title">
- <div class="vue-main-title-left"></div>
- <div class="vue-main-title-content">拍卖</div>
- </div>
- <div class="vue-main-form auction" style="margin:0 auto;width:80%;">
- <el-form-item label="商品所属拍卖员">
- <div class="upload-box" >
- <div class="upload-box-member" @click="btnNotificationData">
- <i class="el-icon-plus notcie_icon" style="font-size:32px"></i><br>
- <span>选择商品所属拍卖员</span>
- </div>
- </div>
- <div class="img_box" v-if="auctioneer.avatar_image">
- <img :src="auctioneer.avatar_image"/>
- <span class="introduce_name">{{auctioneer.nickname}}</span>
- </div>
- </el-form-item>
- <el-form-item label="拍卖商品审核状态">
- <el-radio v-model="auction.type" :label="0">审核中</el-radio>
- <el-radio v-model="auction.type" :label="1">审核通过</el-radio>
- <el-radio v-model="auction.type" :label="2">审核失败</el-radio>
- <div class="tip">审核通过允许上架,审核失败不允许上架</div>
- </el-form-item>
- <el-form-item label="起拍价" prop="start_price">
- <el-input v-model.trim="auction.start_price" maxlength="300">
- <template slot="append">元</template>
- </el-input>
- <div class="form-item_tips">商品最低拍卖价</div>
- </el-form-item>
- <el-form-item label="加一口" prop="mini_markup">
- <el-input v-model.trim="auction.mini_markup" maxlength="300">
- <template slot="append">元</template>
- </el-input>
- <div class="form-item_tips">商品每次加价金额</div>
- </el-form-item>
- <el-form-item label="一口价" prop="fixed_price">
- <el-input v-model.trim="auction.fixed_price" maxlength="300">
- <template slot="append">元</template>
- </el-input>
- <!-- <div class="form-item_tips">出价达到或者超过此价格时立即成交</div>-->
- </el-form-item>
- <el-form-item label="封顶金额" prop="capped_amount">
- <el-input v-model.trim="auction.capped_amount" maxlength="300">
- <template slot="append">元</template>
- </el-input>
- <div class="form-item_tips">出价达到或者超过此价格时立即成交</div>
- </el-form-item>
- <!-- <el-form-item label="最低成交价(保留价)" prop="mini_deal" label-width="155px">-->
- <!-- <el-input v-model.trim="auction.mini_deal" maxlength="300">-->
- <!-- <template slot="append">元</template>-->
- <!-- </el-input>-->
- <!-- <div class="form-item_tips">拍卖品的最低成交金额</div>-->
- <!-- </el-form-item>-->
-
- <el-form-item :label="endorsement_name" >
- <div style="display: flex;">
- <el-form-item prop="em_proportion">
- <el-input v-model.trim="auction.em_proportion" maxlength="300">
- <template slot="prepend">比例或固定金额</template>
- <template slot="append">%</template>
- </el-input>
- </el-form-item>
- <el-form-item prop="endorsement">
- <el-input v-model.trim="auction.endorsement" maxlength="300">
- <template slot="append">元</template>
- </el-input>
- </el-form-item>
- </div>
- <div class="form-item_tips">拍卖完成后会员上级获得{{endorsement_name}}</div>
- </el-form-item>
-
- <el-form-item label="成交奖励积分" prop="reward_points">
- <el-input v-model.trim="auction.reward_points" maxlength="300">
- <!--<template slot="append">元</template>-->
- </el-input>
- </el-form-item>
-
- <el-form-item label="拍卖开始和结束时间" label-width="155px">
- <el-date-picker
- value-format="timestamp"
- type="datetimerange"
- v-model="timeLimit"
- range-separator="至"
- start-placeholder="开始日期"
- end-placeholder="结束日期">
- </el-date-picker>
- </el-form-item>
-
- <el-form-item label="保证金金额" >
- <div style="display: flex;">
- <el-form-item prop="advance_proportion">
- <el-input v-model.trim="auction.advance_proportion" maxlength="300">
- <template slot="prepend">比例或固定金额</template>
- <template slot="append">%</template>
- </el-input>
- </el-form-item>
- <el-form-item prop="advance_money">
- <el-input v-model.trim="auction.advance_money" maxlength="300">
- <template slot="append">元</template>
- </el-input>
- </el-form-item>
- </div>
- </el-form-item>
-
- <el-form-item label="出价奖励金额" >
- <div style="display: flex;">
- <el-form-item prop="balance_proportion">
- <el-input v-model.trim="auction.balance_proportion" maxlength="300">
- <template slot="prepend">比例或固定金额</template>
- <template slot="append">%</template>
- </el-input>
- </el-form-item>
- <el-form-item prop="balance_money">
- <el-input v-model.trim="auction.balance_money" maxlength="300">
- <template slot="append">元</template>
- </el-input>
- </el-form-item>
- </div>
- </el-form-item>
- <el-form-item label="拍卖结束触发延时时间" prop="delay_before_minute" label-width="155px">
- <el-input v-model.trim="auction.delay_before_minute" maxlength="300">
- <template slot="append">分</template>
- </el-input>
- </el-form-item>
- <el-form-item label="延时周期时间" prop="delay_cycle_minute">
- <el-input v-model.trim="auction.delay_cycle_minute" maxlength="300">
- <template slot="append">分</template>
- </el-input>
- </el-form-item>
-
- </div>
- </div>
- </div>
- </el-form>
- <!-- 选择图片弹窗 -->
- <el-dialog :visible.sync="choose_goods_show" width="60%" left title="选择通知人">
- <div>
- <div class="search_line">
- <el-input style="width:90%" placeholder="" v-model="keyword"></el-input>
- <el-button @click="btnSearch">搜索</el-button>
- </div>
- <el-table :data="memberData" style="width: 100%;height:500px;overflow:auto" v-loading="loading">
- <el-table-column label="昵称" align="" >
- <template slot-scope="scope">
- <div style="display:flex;">
- <img style="width: 50px;height:50px" :src="scope.row.avatar_image" alt="">
- <span class="nickname_card">{{scope.row.nickname}}</span>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="会员ID" align="center" prop="uid"></el-table-column>
- <el-table-column label="姓名" align="center" prop="username"></el-table-column>
- <el-table-column label="手机号码" align="center" prop="mobile"></el-table-column>
- <el-table-column label="" align="center">
- <template slot-scope="scope">
- <span style="color:#399fbd" @click="btnSelect(scope.row)">
- 选择
- </span>
- </template>
- </el-table-column>
- </el-table>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="choose_goods_show = false">取 消</el-button>
- </span>
- </el-dialog>
- </div>
- `,
- style:`
- .auction .el-input-group {
- width:300px;
- }
- .img_box{
- margin:20px 0;
- display: flex;
- flex-direction: column;
- }
- .img_box img{
- width:150px;
- height:150px;
- }
- .introduce_name{
- width: 150px;
- line-height: 20px;
- }
- .notcie_icon{
- font-size: 32px;
- width: 100%;
- text-align: center;
- }
- .el-checkbox-group{
- display: contents;
- }
- .nickname_card{
- align-items: center;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 1;
- height: fit-content;
- line-height: 50px;
- margin-left:10px;
- }
- `,
- props: {
- form: {
- default() {
- return {}
- }
- },
- http_url:{
- type:String,
- default() {
- return "";
- }
- },
- },
- data() {
- let intReg = /^[0-9]*$/;
- let floatReg = /^\d+(\.\d+)?$/;
- // 整数校验
- let intNum = (rule,value,callback)=>{
- let regular = intReg.test(value);
- if(!value){
- callback();
- }else{
- if (regular) {
- callback();
- }else{
- callback(new Error("请输入正整数"));
- }
- }
- };
- // 浮点数校验
- let floatNum = (rule,value,callback)=>{
- let regular = floatReg.test(value);
- if(!value){
- callback();
- }else{
- if (regular) {
- callback();
- }else{
- callback(new Error("请输入大于零或等于零的数字"));
- }
- }
- };
- return {
- rules: {
- start_price: { validator: floatNum },
- mini_markup: { validator: floatNum },
- fixed_price: { validator: floatNum },
- // mini_deal: { validator: floatNum },
- delay_before_minute: { validator: intNum },
- delay_cycle_minute: { validator: intNum },
- reward_points:{validator: intNum},
- },
- choose_goods_show:false,
- choose_goods_loading:false,
- keyword:"",
- loading:false,
- timeLimit:'',
- memberData:[],
- endorsement_name:'',
- auctioneer:{
- nickname:"",
- avatar_image:"",
- uid:"",
- },
- auction: {
- type: 0,
- start_price:0,
- mini_markup:0,
- fixed_price:0,
- capped_amount:0,
- // mini_deal:0,
- reward_points:0,
- delay_before_minute:0,
- delay_cycle_minute:0,
- },
- }
- },
- mounted() {
- this.endorsement_name = this.form.endorsement_name;
- this.auctioneer.avatar_image = this.form.auctioneer ? this.form.auctioneer.avatar_image : "";
- this.auctioneer.uid = this.form.auctioneer ? this.form.auctioneer.uid : "";
- this.auctioneer.nickname = this.form.auctioneer ? this.form.auctioneer.nickname : "";
- this.timeLimit = [this.form.start_time * 1000,this.form.end_time * 1000];
- if (!Array.isArray(this.form.auction)) {
- this.auction = this.form.auction;
- }
- },
- methods:{
- btnNotificationData(){
- this.choose_goods_show = true;
- this.choose_goods_loading = true
- },
- btnSelect(data){
- this.auctioneer.nickname = data.nickname;
- this.auctioneer.avatar_image = data.avatar_image;
- this.auctioneer.uid = data.uid;
- this.choose_goods_show = false
- },
- btnSearch(){
- this.loading = true
- this.$http.post(this.http_url +'plugin.auction.admin.auctioneer.get-search-auctioneer-json',{
- keyword:this.keyword
- }).then(response => {
- if(response.data.result==1){
- this.$message({
- message: '成功',
- type: 'success'
- });
- this.loading = false;
- this.memberData = response.data.data.members
- }
- else{
- this.$message.error(response.data);
- }
- }),function(res){
- console.log(res);
- };
- },
- extraDate(){
- },
- validate(){
- // if(!this.auctioneer.uid){
- // this.$message({
- // message: '请选择商品所属拍卖员', type: 'warning'
- // });
- // return false;
- // }
- let json = {
- auctioneer_id:this.auctioneer.uid?this.auctioneer.uid: 0,
- type:this.auction.type,
- start_price:this.auction.start_price,
- mini_markup:this.auction.mini_markup,
- fixed_price:this.auction.fixed_price,
- capped_amount:this.auction.capped_amount,
- // mini_deal:this.auction.mini_deal,
- reward_points:this.auction.reward_points,
- delay_before_minute:this.auction.delay_before_minute,
- delay_cycle_minute:this.auction.delay_cycle_minute,
- advance_proportion:this.auction.advance_proportion?this.auction.advance_proportion: 0,
- advance_money:this.auction.advance_money?this.auction.advance_money: 0,
- em_proportion:this.auction.em_proportion?this.auction.em_proportion: 0,
- endorsement:this.auction.endorsement?this.auction.endorsement: 0,
- balance_proportion:this.auction.balance_proportion?this.auction.balance_proportion: 0,
- balance_money:this.auction.balance_money?this.auction.balance_money: 0,
- };
- if (this.timeLimit) {
- json.start_shooting = this.timeLimit[0] / 1000;
- json.end_shooting = this.timeLimit[1] / 1000;
- }
- return json;
- }
- }
- });
|