拖拽的几个事件。

dragShopStart: function (item) {
console.log(item)
this.dropData = item //获取拖传过来的对象
},
// 拖动结束
dragShopOver: function (event) {
event.preventDefault()

},
//获取传过来的URLcode
getQueryString: function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;

},
//放
dropShop: function (event) {
this.addBindModalInit()
const dropData = this.dropData //拖过来的数据
console.log(dropData)
if (!dropData.itemId) {
$("#bindNewItemModal").modal("show")
this.wayIndex = event.currentTarget.getAttribute('wayNumberAttribute') //获取货道号
this.costPrice = dropData.costPrice
this.price = dropData.price
this.shopDropName = dropData.name
this.basicItemId = dropData.basicItemId
this.endDate = dropData.endTime

// this.dropData=
} else {
$("#modalEditShop").modal("show")
this.modalEditInit()
this.editShopDropName = dropData.name,

this.editCostPrice = dropData.costPrice,

this.editPrice = dropData.price,
this.editFullNum = dropData.fullNum,
this.editNum = dropData.num,
this.editItemId = dropData.itemId,
this.editWayIndex = event.currentTarget.getAttribute('wayNumberAttribute')
}
},
posted @ 2018-01-15 10:20  丁丶丁  阅读(150)  评论(0编辑  收藏  举报