|
|
|
@ -28,7 +28,7 @@ |
|
|
|
<view class="collapse-1"> |
|
|
|
<view class="order-notes"> |
|
|
|
<text style="color: red;">备注:</text> |
|
|
|
{{item.remark}} |
|
|
|
{{item.remark==null?'暂无':item.remark}} |
|
|
|
</view> |
|
|
|
<view class="shop-list" v-for="(items,index1) in item.saleDetailDTOList"> |
|
|
|
<view class="order-name"> |
|
|
|
@ -116,7 +116,7 @@ |
|
|
|
<view class="shop-checkList-box"> |
|
|
|
{{item.name}} |
|
|
|
</view> |
|
|
|
<uni-number-box v-model="item.productCount" @change="temporaryChange" /> |
|
|
|
<uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" /> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="shop-popup-bottom" v-for="item in temporaryList"> |
|
|
|
@ -152,7 +152,7 @@ |
|
|
|
</uni-popup> |
|
|
|
<!-- 编辑挂单 --> |
|
|
|
<uni-popup ref="setDialog" type="dialog"> |
|
|
|
<uni-popup-dialog ref="inputClose" mode="input" :value="value" title="挂单名称" placeholder="请输入挂单名称" |
|
|
|
<uni-popup-dialog ref="inputClose" mode="input" v-model="value" @input='' title="挂单名称" placeholder="请输入挂单名称" |
|
|
|
@confirm="setDetail"></uni-popup-dialog> |
|
|
|
</uni-popup> |
|
|
|
<!-- 查看大图弹出层 --> |
|
|
|
@ -410,7 +410,8 @@ |
|
|
|
} |
|
|
|
this.carList.push(data) |
|
|
|
// this.temporaryList = [] |
|
|
|
this.purchasePrice = '' |
|
|
|
this.purchasePrice = '' |
|
|
|
this.temporaryList = [] |
|
|
|
this.zPrice = '' |
|
|
|
this.zNum = '' |
|
|
|
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) { |
|
|
|
@ -432,7 +433,8 @@ |
|
|
|
saleId: this.hangId |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.getRegList() |
|
|
|
this.getRegList() |
|
|
|
this.carList = [] |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
@ -470,33 +472,45 @@ |
|
|
|
this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.goodsDetail = res.result; |
|
|
|
if (typeof(this.goodsDetail.attributeList) == 'string') { |
|
|
|
let newObj = JSON.parse(this.goodsDetail.attributeList) |
|
|
|
let newArr = [] |
|
|
|
for (let val in newObj) { |
|
|
|
let valueObj = []; |
|
|
|
for (var i = 0; i < newObj[val].length; i++) { |
|
|
|
valueObj.push({ |
|
|
|
value: newObj[val][i], |
|
|
|
isChecked: false |
|
|
|
}) |
|
|
|
this.attrNameList.push({ |
|
|
|
value: newObj[val][i], |
|
|
|
name: val, |
|
|
|
isChecked: false |
|
|
|
this.tui.request("/app/productAttribute/selectByCategoryId", "POST", { |
|
|
|
categoryId: this.goodsDetail.categoryId |
|
|
|
}, false, true).then((res1) => { |
|
|
|
if (res1.code == 200) { |
|
|
|
this.attrList = res1.result; |
|
|
|
if (res1.result.length > 0) { |
|
|
|
let newArr = [] |
|
|
|
this.attrList.forEach((items) => { |
|
|
|
this.tui.request("/app/productAttributeValue/selectByAttributeId","get", { |
|
|
|
id: items.id |
|
|
|
}, false, true).then((res2) => { |
|
|
|
if (res2.code == 200) { |
|
|
|
let valueObj = []; |
|
|
|
for (var i = 0; i < res2.result.length; i++) { |
|
|
|
valueObj.push({ |
|
|
|
value: res2.result[i].value, |
|
|
|
isChecked: false |
|
|
|
}) |
|
|
|
} |
|
|
|
newArr.push({ |
|
|
|
name: items.attributeName, |
|
|
|
value: valueObj |
|
|
|
}) |
|
|
|
this.goodsDetail.attributeList = newArr; |
|
|
|
this.goodsDetail.attributeList.forEach((item, index) => { |
|
|
|
this.columns[index] = item.value; |
|
|
|
this.keyList[index] = item.name; |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
console.log(this.goodsDetail) |
|
|
|
}).catch((res) => {}) |
|
|
|
}) |
|
|
|
} |
|
|
|
newArr.push({ |
|
|
|
name: val, |
|
|
|
value: valueObj |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
this.goodsDetail.attributeList = newArr; |
|
|
|
this.goodsDetail.attributeList.forEach((item, index) => { |
|
|
|
this.columns[index] = item.value; |
|
|
|
this.keyList[index] = item.name; |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
@ -510,8 +524,8 @@ |
|
|
|
//新增挂单 |
|
|
|
addReg(e) { |
|
|
|
this.tui.request("/app/sale/saveOrder", "POST", { |
|
|
|
saleName: e, |
|
|
|
status:7 |
|
|
|
saleName: e, |
|
|
|
status: 7 |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.tui.toast("新增成功") |
|
|
|
@ -581,15 +595,18 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
//编辑挂单信息 |
|
|
|
setDetail() { |
|
|
|
setDetail(e) { |
|
|
|
this.tui.request("/app/sale/updateOrder", "POST", { |
|
|
|
saleName: this.value, |
|
|
|
saleName: e.detail?'':e, |
|
|
|
id: this.list.id, |
|
|
|
remark: this.voiceText |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
if (res.code == 200) { |
|
|
|
this.value = '' |
|
|
|
this.voiceText = '' |
|
|
|
this.tui.toast("编辑成功") |
|
|
|
this.getRegList(); |
|
|
|
this.getRegList(); |
|
|
|
this.$refs.popup.close() |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
@ -604,23 +621,25 @@ |
|
|
|
}, |
|
|
|
//带参数跳转到开单页 |
|
|
|
goSaleGoods(item) { |
|
|
|
let dataList = [] |
|
|
|
for (let i=0;i<item.saleDetailDTOList.length;i++) { |
|
|
|
let obj = {} |
|
|
|
obj.saleDetailQueryDTO = item.saleDetailDTOList[i].stockLogList1 |
|
|
|
obj.id = item.saleDetailDTOList[i].productId |
|
|
|
obj.lsprice = item.saleDetailDTOList[i].price |
|
|
|
obj.num = item.saleDetailDTOList[i].productCount |
|
|
|
obj.price = item.saleDetailDTOList[i].discountAmount |
|
|
|
obj.productName = item.saleDetailDTOList[i].productName |
|
|
|
obj.producticture = item.saleDetailDTOList[i].productPicture |
|
|
|
obj.productSn = item.saleDetailDTOList[i].productSn |
|
|
|
obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice |
|
|
|
obj.saleId = item.saleDetailDTOList[i].saleId |
|
|
|
obj.remark = item.remark |
|
|
|
dataList.push(obj) |
|
|
|
} |
|
|
|
uni.setStorageSync('carList1',JSON.stringify(dataList)) |
|
|
|
if(item){ |
|
|
|
let dataList = [] |
|
|
|
for (let i = 0; i < item.saleDetailDTOList.length; i++) { |
|
|
|
let obj = {} |
|
|
|
obj.saleDetailQueryDTO = item.saleDetailDTOList[i].stockLogList1 |
|
|
|
obj.id = item.saleDetailDTOList[i].productId |
|
|
|
obj.lsprice = item.saleDetailDTOList[i].price |
|
|
|
obj.num = item.saleDetailDTOList[i].productCount |
|
|
|
obj.price = item.saleDetailDTOList[i].discountAmount |
|
|
|
obj.productName = item.saleDetailDTOList[i].productName |
|
|
|
obj.producticture = item.saleDetailDTOList[i].productPicture |
|
|
|
obj.productSn = item.saleDetailDTOList[i].productSn |
|
|
|
obj.wholesalePrice = item.saleDetailDTOList[i].wholesalePrice |
|
|
|
obj.saleId = item.saleDetailDTOList[i].saleId |
|
|
|
obj.remark = item.remark |
|
|
|
dataList.push(obj) |
|
|
|
} |
|
|
|
uni.setStorageSync('carList1', JSON.stringify(dataList)) |
|
|
|
} |
|
|
|
uni.switchTab({ |
|
|
|
url: '/pages/inventory/goodsList1' |
|
|
|
}) |
|
|
|
@ -656,7 +675,7 @@ |
|
|
|
font-size: 37rpx; |
|
|
|
border-bottom: 0.5px solid #eee; |
|
|
|
margin: 0 auto; |
|
|
|
position: relative; |
|
|
|
position: relative; |
|
|
|
background: #ECF5FF; |
|
|
|
} |
|
|
|
|
|
|
|
|