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

6
pages/index/orderDetail.vue

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

2
pages/index/returnList.vue

@ -5,7 +5,7 @@
<li v-for="item in inventoryList" @tap="toggle(item)"> <li v-for="item in inventoryList" @tap="toggle(item)">
<uni-card :title="item.userName == null ?'暂无':item.userName" :sub-title="item.createTime == null ?'暂无':item.createTime" <uni-card :title="item.userName == null ?'暂无':item.userName" :sub-title="item.createTime == null ?'暂无':item.createTime"
:thumbnail="item.saleDetailDTOList[0].productPicture"> :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"> <view class="uni-body"> <text class="cardText"> 退款金额:</text> <text class="priceText">
{{item.alreadyEarn == null ?'暂无':item.alreadyEarn}} </text> <text decode class="cardText"> {{item.alreadyEarn == null ?'暂无':item.alreadyEarn}} </text> <text decode class="cardText">
{{'&nbsp;&nbsp;&nbsp;&nbsp; 数量: '}} </text> <text class="priceText">{{item.productCount == null ?'暂无':item.productCount}} {{'&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 res.id = that.dataList.id
}else{ }else{
url = '/app/product/save' url = '/app/product/save'
}
if(res.productPicture == ''){
res.productPicture = ''
} }
that.tui.request(url, "post", res, false, false).then((res1) => { that.tui.request(url, "post", res, false, false).then((res1) => {
if (res1.code == 200) { if (res1.code == 200) {

Loading…
Cancel
Save