Commit d2ea69cd authored by Mac's avatar Mac

样式的修改

parent b2af4ba6
......@@ -465,7 +465,7 @@ export default {
Tier:0,
ParentId:0,
Enabled:1,
IsShow:1,
IsShow:0,
},
msg2:{
pageIndex:0,
......@@ -475,7 +475,7 @@ export default {
Tier:0,
ParentId:0,
Enabled:1,
IsShow:1,
IsShow:0,
},
tableData1:[],
tableData2:[],
......
......@@ -1531,7 +1531,7 @@
},
goCollection(item,list){//跳到erp收款单
let currentUser = this.getLocalStorage()
let companyID =currentUser.ERPBranchId
let companyID =currentUser.ERPBranchId !=0 ?currentUser.ERPBranchId :1224;
let orderObj = {
OrderSource:16,
OtherType:21,
......@@ -1544,7 +1544,7 @@
},
goPayment(item,list){//跳到erp付款单
let currentUser = this.getLocalStorage()
let companyID =currentUser.ERPBranchId
let companyID =currentUser.ERPBranchId !=0 ?currentUser.ERPBranchId :1224;
let orderObj = {
OrderSource:16,
OtherType:22,
......
......@@ -57,7 +57,7 @@
<div class="splist" v-if="msg.UseType==2">
<div v-for="(item,index) in commoditylist" :label="item.ProductId" :key="index" style="margin-right: 20px; position: relative; cursor: pointer;" >
<div class="app-image" :style="{backgroundImage:'url(' + domainManager().ImageUrl+item.CoverImage + ')',backgroundSize:'cover'}" ></div>
<div class="app-image" :style="{backgroundImage:'url(' + item.CoverImage + ')',backgroundSize:'cover'}" ></div>
<i class="el-icon-error" style="position: absolute;right: -5px;top:-5px;color: #F56C6C;font-size: 20px" @click="deletecommod(index,1)"></i>
</div>
</div>
......@@ -198,7 +198,7 @@
label="商品图"
width="80">
<template slot-scope="scope">
<img style="width:50px;height:50px;margin-right:1px" :src="domainManager().ImageUrl+scope.row.CoverImage" alt="">
<img style="width:50px;height:50px;margin-right:1px" :src="scope.row.CoverImage" alt="">
</template>
</el-table-column>
......@@ -230,7 +230,6 @@
<div class="el-input el-input--small" style="width: 40%;" >
<input type="text" autocomplete="off" placeholder="商品名称" class="el-input__inner" v-model="msg2.Name"
@clear="msg2.pageIndex=1,getProductGoodsPageList()"
@keyup.enter.native="msg2.pageIndex=1,getProductGoodsPageList()"
>
</div>
<button type="button" class="el-button el-button--default el-button--small" style="margin-left: 15px" @click="msg2.pageIndex=1,getProductGoodsPageList()">查找商品</button>
......@@ -257,7 +256,7 @@
label="商品图"
width="80">
<template slot-scope="scope">
<img style="width:50px;height:50px;margin-right:1px" :src="domainManager().ImageUrl+scope.row.CoverImage" alt="">
<img style="width:50px;height:50px;margin-right:1px" :src="scope.row.CoverImage" alt="">
</template>
</el-table-column>
......@@ -456,11 +455,26 @@
let ProductList = res.data.data.ProductList;
let newData = []
for(let i= 0;i<ProductList.length;i++){
for(let j=0;j<this.tableData.length;j++){
if(ProductList[i].ProductId == this.tableData[j].Id){
newData.push(this.tableData[j])
this.apipost("/api/product/GetProductGoodsPageList",
{
pageIndex:1,
pageSize:15,
Name:'',
GoodsStatus:0,
IsSelectSellOut:0,
CategoryIds:'',
Id:ProductList[i].ProductId,
StartTime:'',
EndTime:'',
}
}
, res => {
if(res.data.resultCode==1){
let pageData= res.data.data.pageData;
newData.push(pageData[0])
}
})
}
this.commoditylist = newData
}
......@@ -499,7 +513,12 @@
if(res.data.resultCode==1){
let pageData= res.data.data.pageData;
for(let i= 0;i<pageData.length;i++){
pageData[i].disabled=false
pageData[i].disabled=false;
this.commoditylist.forEach(x=>{
if(pageData[i].Id == x.Id){
pageData[i].disabled=true;
}
})
}
this.tableData = pageData
this.count = res.data.data.count
......@@ -551,7 +570,10 @@
batchAdd(){ //批量添加
let newdata=[]
for(let i=0;i<this.multipleSelection.length;i++){
console.log(this.commoditylist)
console.log(this.multipleSelection)
if(this.commoditylist.length>0){
console.log('有的情况')
for(let j=0;j<this.commoditylist.length;j++){
if(this.multipleSelection[i].Id!=this.commoditylist[j].Id){
newdata.push(this.multipleSelection[i])
......@@ -564,6 +586,7 @@
}
}
}else {
console.log('没有的情况')
newdata.push(this.multipleSelection[i])
for(let z =0;z<this.tableData.length;z++){
if(this.tableData[z].Id==this.multipleSelection[i].Id){
......@@ -579,7 +602,20 @@
if(newdata.length>0){
this.Success('添加成功');
}
this.commoditylist = this.commoditylist.concat(newdata)
this.commoditylist = this.unique(this.commoditylist.concat(newdata))
},
// 数组去重
unique(arr) {
for (var i = 0, len = arr.length; i < len; i++) {
for (var j = i + 1, len = arr.length; j < len; j++) {
if (arr[i].Id === arr[j].Id ) {
arr.splice(j, 1);
j--; // 每删除一个数j的值就减1
len--; // j值减小时len也要相应减1(减少循环次数,节省性能)
}
}
}
return arr;
},
addcommoditybtn(){
this.addcommodity=true;
......@@ -603,7 +639,6 @@
}
},
handleSelectionChange(val) {
this.multipleSelection=val
},
getUseType(val){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment