|
@@ -29,6 +29,7 @@
|
|
|
</el-dropdown-item>
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item command="goods-edit" @click.native="handleGoodUp(scope.row.ID)">商品上架 </el-dropdown-item>
|
|
<el-dropdown-item command="goods-edit" @click.native="handleGoodUp(scope.row.ID)">商品上架 </el-dropdown-item>
|
|
|
<el-dropdown-item command="goods-edit" @click.native="handleGoodDown(scope.row.ID)">商品下架 </el-dropdown-item>
|
|
<el-dropdown-item command="goods-edit" @click.native="handleGoodDown(scope.row.ID)">商品下架 </el-dropdown-item>
|
|
|
|
|
+ <el-dropdown-item command="goods-edit" @click.native="handleEditShowGoodsTimes(scope.row)">商品限时 </el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
|
</template>
|
|
</template>
|
|
@@ -95,7 +96,7 @@
|
|
|
<el-form-item label="市场价格">
|
|
<el-form-item label="市场价格">
|
|
|
<el-input v-model="form.marketPrice"></el-input>
|
|
<el-input v-model="form.marketPrice"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="销售价格" p>
|
|
|
|
|
|
|
+ <el-form-item label="销售价格" >
|
|
|
<el-input v-model="form.sellPrice"></el-input>
|
|
<el-input v-model="form.sellPrice"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="价格PV ">
|
|
<el-form-item label="价格PV ">
|
|
@@ -139,6 +140,44 @@
|
|
|
<el-button type="primary" @click.native="handleEdit">修 改</el-button>
|
|
<el-button type="primary" @click.native="handleEdit">修 改</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
+
|
|
|
|
|
+ <el-dialog title="商品限时" :visible.sync="dialogEditFormVisibleGoodsTimes">
|
|
|
|
|
+ <el-form :model="form" label-width="250px" class="form-dialog" v-loading="dialogEditLoadingGoodsTimes">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <el-form-item label="是否限时">
|
|
|
|
|
+ <el-switch
|
|
|
|
|
+ v-model="form.statusdate"
|
|
|
|
|
+ active-value="1"
|
|
|
|
|
+ inactive-value="0">
|
|
|
|
|
+ </el-switch>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <transition name="el-zoom-in-top">
|
|
|
|
|
+ <el-form-item label="限时时间" v-show='form.statusdate==1?true:false'>
|
|
|
|
|
+ <el-date-picker
|
|
|
|
|
+ v-model="form.goodsdate"
|
|
|
|
|
+ type="datetime"
|
|
|
|
|
+ placeholder="选择日期时间"
|
|
|
|
|
+ value-format="timestamp"
|
|
|
|
|
+ popper-class='goodsdate'>
|
|
|
|
|
+ </el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </transition>
|
|
|
|
|
+ <transition name="el-zoom-in-top">
|
|
|
|
|
+ <el-form-item label="限时类型" v-show='form.statusdate==1?true:false'>
|
|
|
|
|
+
|
|
|
|
|
+ <el-radio v-model="form.goodsstatusdate" label="0" border>下架</el-radio>
|
|
|
|
|
+ <el-radio v-model="form.goodsstatusdate" label="1" border>上架</el-radio>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ </transition>
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ </el-form>
|
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
|
+ <el-button @click="dialogEditFormVisibleGoodsTimes = false">取 消</el-button>
|
|
|
|
|
+ <el-button type="primary" @click.native="handleEdit">修 改</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -183,6 +222,8 @@
|
|
|
selectedIds:'',
|
|
selectedIds:'',
|
|
|
dialogEditFormVisible: false,
|
|
dialogEditFormVisible: false,
|
|
|
dialogEditLoading: false,
|
|
dialogEditLoading: false,
|
|
|
|
|
+ dialogEditFormVisibleGoodsTimes: false,
|
|
|
|
|
+ dialogEditLoadingGoodsTimes: false,
|
|
|
form:{
|
|
form:{
|
|
|
sellType:[],
|
|
sellType:[],
|
|
|
goodsName:'',
|
|
goodsName:'',
|
|
@@ -201,6 +242,9 @@
|
|
|
cover:'',
|
|
cover:'',
|
|
|
textarea:'',
|
|
textarea:'',
|
|
|
sellDiscount:'',
|
|
sellDiscount:'',
|
|
|
|
|
+ statusdate:'',
|
|
|
|
|
+ goodsstatusdate:'',
|
|
|
|
|
+ goodsdate:'',
|
|
|
},
|
|
},
|
|
|
submitButtonStat: false,
|
|
submitButtonStat: false,
|
|
|
goodsType:[],
|
|
goodsType:[],
|
|
@@ -289,6 +333,9 @@
|
|
|
vueObj.form.sort=response.goodsInfo.SORT
|
|
vueObj.form.sort=response.goodsInfo.SORT
|
|
|
vueObj.form.id=response.goodsInfo.ID
|
|
vueObj.form.id=response.goodsInfo.ID
|
|
|
vueObj.form.cover=response.goodsInfo.COVER
|
|
vueObj.form.cover=response.goodsInfo.COVER
|
|
|
|
|
+ vueObj.form.statusdate=response.goodsInfo.STATUS_DATE
|
|
|
|
|
+ vueObj.form.goodsstatusdate=response.goodsInfo.GOODS_STATUS_DATE
|
|
|
|
|
+ vueObj.form.goodsdate=response.goodsInfo.GOODS_DATE
|
|
|
// vueObj.form.sellType=vueObj.form.sellType.map((item,index)=>{
|
|
// vueObj.form.sellType=vueObj.form.sellType.map((item,index)=>{
|
|
|
// return response.goodsInfo.SELL_TYPE.some(val=>(index+1).toString()==val)
|
|
// return response.goodsInfo.SELL_TYPE.some(val=>(index+1).toString()==val)
|
|
|
// })
|
|
// })
|
|
@@ -297,8 +344,78 @@
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 2022-05-09
|
|
|
|
|
+ * York
|
|
|
|
|
+ * 限时商品
|
|
|
|
|
+ */
|
|
|
|
|
+ handleEditShowGoodsTimes(row) {
|
|
|
|
|
+ this.dialogEditLoadingGoodsTimes = true
|
|
|
|
|
+ this.auditId = row.ID
|
|
|
|
|
+ this.dialogEditFormVisibleGoodsTimes = true
|
|
|
|
|
+ let vueObj = this
|
|
|
|
|
+ network.getData('shop/goods-edit', {id: this.auditId}).then(response => {
|
|
|
|
|
+ vueObj.dialogEditLoadingGoodsTimes = false
|
|
|
|
|
+ vueObj.goodsType=response.goodsType
|
|
|
|
|
+
|
|
|
|
|
+ let gift=response.goodsInfo.GIFT_TYPE;
|
|
|
|
|
+ let gift_type=response.giftType;
|
|
|
|
|
+
|
|
|
|
|
+ let giftType=[];
|
|
|
|
|
+ if(gift.length>0){
|
|
|
|
|
+ for(let i in gift_type){
|
|
|
|
|
+ giftType.push({key:i,name:gift_type[i].name,checked:false})
|
|
|
|
|
+ gift.map((v,k)=>{
|
|
|
|
|
+ if(v==i){
|
|
|
|
|
+ giftType[i-1].checked=true;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ vueObj.GiftTypeArr=giftType
|
|
|
|
|
+
|
|
|
|
|
+ let sell=response.goodsInfo.SELL_TYPE;
|
|
|
|
|
+ let sell_type=response.sellType;
|
|
|
|
|
+ let sellType=[];
|
|
|
|
|
+ if(sell.length>0){
|
|
|
|
|
+ for(let i in sell_type){
|
|
|
|
|
+ sellType.push({key:i,name:sell_type[i].name,checked:false})
|
|
|
|
|
+ sell.map((item,index)=>{
|
|
|
|
|
+ if(item==i){
|
|
|
|
|
+ sellType[i-1].checked=true;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ vueObj.sell_type=sellType;
|
|
|
|
|
+
|
|
|
|
|
+ vueObj.form.goodsName=response.goodsInfo.GOODS_NAME
|
|
|
|
|
+ vueObj.form.sellDiscount=response.goodsInfo.SELL_DISCOUNT
|
|
|
|
|
+ vueObj.form.goodsNo=response.goodsInfo.GOODS_NO
|
|
|
|
|
+ vueObj.form.type=response.goodsInfo.TYPE
|
|
|
|
|
+ vueObj.form.unit=response.goodsInfo.UNIT
|
|
|
|
|
+ vueObj.form.marketPrice=response.goodsInfo.MARKET_PRICE
|
|
|
|
|
+ vueObj.form.sellPrice=response.goodsInfo.SELL_PRICE
|
|
|
|
|
+ vueObj.form.pricePv=response.goodsInfo.PRICE_PV
|
|
|
|
|
+ vueObj.form.point=response.goodsInfo.POINT
|
|
|
|
|
+ vueObj.form.storeNums=response.goodsInfo.STORE_NUMS
|
|
|
|
|
+ vueObj.form.content=response.goodsInfo.CONTENT
|
|
|
|
|
+ vueObj.form.sort=response.goodsInfo.SORT
|
|
|
|
|
+ vueObj.form.id=response.goodsInfo.ID
|
|
|
|
|
+ vueObj.form.cover=response.goodsInfo.COVER
|
|
|
|
|
+ vueObj.form.statusdate=response.goodsInfo.STATUS_DATE
|
|
|
|
|
+ vueObj.form.goodsstatusdate=response.goodsInfo.GOODS_STATUS_DATE
|
|
|
|
|
+ vueObj.form.goodsdate=response.goodsInfo.GOODS_DATE
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
handleEdit() {
|
|
handleEdit() {
|
|
|
this.dialogEditFormVisible = false
|
|
this.dialogEditFormVisible = false
|
|
|
|
|
+ this.dialogEditFormVisibleGoodsTimes = false
|
|
|
this.$message({
|
|
this.$message({
|
|
|
message: '正在修改数据',
|
|
message: '正在修改数据',
|
|
|
type: 'info'
|
|
type: 'info'
|
|
@@ -423,4 +540,11 @@
|
|
|
margin-right: 0;
|
|
margin-right: 0;
|
|
|
margin-bottom: 0;
|
|
margin-bottom: 0;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
</style>
|
|
</style>
|
|
|
|
|
+
|
|
|
|
|
+<!-- <style>
|
|
|
|
|
+ .goodsdate{
|
|
|
|
|
+ top: 286px !important;
|
|
|
|
|
+ }
|
|
|
|
|
+</style> -->
|