Browse Source

修改bug

master
wangfukang 3 years ago
parent
commit
cfa9474d1d
  1. 83
      pages/index/addHangOrder.vue
  2. 8
      pages/index/index.vue
  3. 6
      pages/index/orderDetail.vue
  4. 2
      pages/index/returnList.vue
  5. 3
      pages/inventory/addGoods.vue

83
pages/index/addHangOrder.vue

@ -117,7 +117,7 @@
</ul>
<view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index">
<view class="shop-checkList-box">
{{item.name}}
<text style="padding-right:40rpx;">{{item.name}}</text> 库存数:{{item.productNum}}
</view>
<uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" />
</view>
@ -159,7 +159,7 @@
placeholder="请输入挂单名称" cancelText="删除" @confirm="setDetail" @close="dialogDel">
</uni-popup-dialog>
</uni-popup>
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此分类?'" showCancelButton="true" @cancel="show = false" @confirm="delItemModal"></u-modal>
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此条挂单?'" showCancelButton="true" @cancel="show = false" @confirm="delItemModal"></u-modal>
<!-- 查看大图弹出层 -->
<uni-popup ref="imgPopup" background-color="#fff">
<view class="img-popup-content">
@ -206,7 +206,9 @@
zNum: 0,
storageType: 0,
hangId: '',
bigImg: ''
bigImg: '',
productId:'',
productNum:0,
}
},
filters: {
@ -312,7 +314,8 @@
//扫一扫功能
scanCodeAdd(item) {
uni.scanCode({
success: (res) => {
success: (res) => {
this.productId = res.result
this.hangId = item.id
if (item.saleDetailDTOList) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
@ -329,7 +332,8 @@
})
}
})
},
},
//点击规格选择后,下方出现所选规格和库存数
attrNameChange(index, index1) {
this.goodsDetail.attributeList[index].value.forEach(item => {
item.isChecked = false;
@ -357,36 +361,49 @@
}
}
if (this.goodsDetail.attributeList.length == jishuqi) {
this.attributeList = {
attributeList: JSON.stringify(obj),
productCount: this.temporaryNum,
name: name,
price: this.purchasePrice
}
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
this.goodsDetail.attributeList[i].isChecked = false;
for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} else {
for (var i = 0; i < this.temporaryList.length; i++) {
if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) {
if (this.temporaryList.length == (i + 1)) {
this.temporaryList.push(this.attributeList);
return
}
this.tui.request("/app/stock/productCount", "post", {
productId: this.productId,
// productId: "1718617874370793472",
attributeList: JSON.stringify(obj)
// attributeList: '{\"颜色\":\"黑色\",\"尺码\":\"S码\",\"类别\":\"童装\"}'
}, false, true).then((res) => {
if (res.code == 200) {
this.productNum = res.result
this.attributeList = {
attributeList: JSON.stringify(obj),
productCount: this.temporaryNum,
productNum:this.productNum,
name: name,
price: this.purchasePrice
}
for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
this.goodsDetail.attributeList[i].isChecked = false;
for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
this.goodsDetail.attributeList[i].value[m].isChecked = false
}
}
if (this.temporaryList.length == 0) {
this.temporaryList.push(this.attributeList);
} else {
this.temporaryList[i] = this.attributeList
return
}
}
for (var i = 0; i < this.temporaryList.length; i++) {
if (this.temporaryList[i].name.indexOf(this.attributeList.name) == -1 || this.temporaryList[i].name.indexOf(this.attributeList.name) == 1) {
if (this.temporaryList.length == (i + 1)) {
this.temporaryList.push(this.attributeList);
return
}
} else {
this.temporaryList[i] = this.attributeList
return
}
}
}
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
}
}

8
pages/index/index.vue

@ -243,11 +243,13 @@
}]
};
this.chartData = JSON.parse(JSON.stringify(dataList));
for (var i = 0; i <= res.result.salePage.records.length; i++) {
this.waitCount = res.result.countMap
console.log('头上',this.waitCount.waitPurchaseCount)
for (var i = 0; i < res.result.salePage.records.length; i++) {
res.result.salePage.records[i].img = '/static/images/dingdan/dd' + i + '.png'
this.inventoryList = res.result.salePage.records
}
this.waitCount = res.result.countMap
}
} else {
this.tui.toast(res.message)
}

6
pages/index/orderDetail.vue

@ -190,7 +190,7 @@
<view class="tui-order-flex">
<view class="tui-item-title">配送人员:</view>
<view class="tui-item-content">
{{ sales.transCompany == null ?'暂无':sales.transCompany}}
{{orderXd.worker.workerName == null ?'暂无':orderXd.worker.workerName}}
</view>
</view>
<view class="tui-order-flex">
@ -228,13 +228,13 @@
export default {
data() {
return {
radio1: 1,
radio1: 0,
sex: [{
text: '是',
value: 0
}, {
text: '否',
value: 1
value: 2
}],
orderByWorkerCandidates: [],
orderByWorker: '',

2
pages/index/returnList.vue

@ -5,7 +5,7 @@
<li v-for="item in inventoryList" @tap="toggle(item)">
<uni-card :title="item.userName == null ?'暂无':item.userName" :sub-title="item.createTime == null ?'暂无':item.createTime"
:thumbnail="item.saleDetailDTOList[0].productPicture">
<view class="uni-body"><text class="cardText">配送人员:</text> {{item.createByName == null ?'暂无':item.createByName}}</view>
<view class="uni-body"><text class="cardText">配送人员:</text> {{item.workerName == null ?'暂无':item.workerName}}</view>
<view class="uni-body"> <text class="cardText"> 退款金额:</text> <text class="priceText">
{{item.alreadyEarn == null ?'暂无':item.alreadyEarn}} </text> <text decode class="cardText">
{{'&nbsp;&nbsp;&nbsp;&nbsp; 数量: '}} </text> <text class="priceText">{{item.productCount == null ?'暂无':item.productCount}}

3
pages/inventory/addGoods.vue

@ -208,6 +208,9 @@
res.id = that.dataList.id
}else{
url = '/app/product/save'
}
if(res.productPicture == ''){
res.productPicture = ''
}
that.tui.request(url, "post", res, false, false).then((res1) => {
if (res1.code == 200) {

Loading…
Cancel
Save