wangfukang 2 years ago
parent
commit
d8ad4781e5
  1. 8
      pages/billing/addUser.vue
  2. 41
      pages/index/index.vue
  3. 982
      pages/inventory/goodsList1.vue
  4. 4
      pages/inventory/inventory.vue
  5. 2
      pages/login/login.vue

8
pages/billing/addUser.vue

@ -17,16 +17,16 @@
<uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.fenlei" <uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.fenlei"
placeholder="请选择分类" @change="categoryChange" style="width: 60%;"></uni-data-select> placeholder="请选择分类" @change="categoryChange" style="width: 60%;"></uni-data-select>
</uni-forms-item> </uni-forms-item>
<uni-forms-item class="qichu" label="期初欠款" name="consigneeMobile" v-if="popleType == 'khName'"> <uni-forms-item class="qichu" label="期初欠款" name="consigneeMobile" v-if="popleType == 'khName' && type!='edit'">
<input type="number" @tap="showPrice = true" disabled v-model="formData.noEarn" placeholder="请输入客户已有欠款" style="width: 100%;height: 100%;border: 1px solid #eee;padding-left: 20rpx;"/> <input type="number" @tap="showPrice = true" disabled v-model="formData.noEarn" placeholder="请输入客户已有欠款" style="width: 100%;height: 100%;border: 1px solid #eee;padding-left: 20rpx;"/>
</uni-forms-item> </uni-forms-item>
<view v-if="popleType == 'khName'" style="color: red;font-size:22rpx;text-align:right;margin-bottom: 20rpx;"> <view v-if="popleType == 'khName' && type!='edit'" style="color: red;font-size:22rpx;text-align:right;margin-bottom: 20rpx;">
*客户欠款输入正数,如有余额则此处输入负数 *客户欠款输入正数,如有余额则此处输入负数
</view> </view>
<uni-forms-item class="qichu" label="期初欠款" name="consigneeMobile" v-if="popleType == 'gysName'"> <uni-forms-item class="qichu" label="期初欠款" name="consigneeMobile" v-if="popleType == 'gysName' && type!='edit'">
<input type="number" @tap="showPrice = true" disabled v-model="formData.noEarn" placeholder="请输入已有供应商欠款" style="width: 100%;height: 100%;border: 1px solid #eee;padding-left: 20rpx;"/> <input type="number" @tap="showPrice = true" disabled v-model="formData.noEarn" placeholder="请输入已有供应商欠款" style="width: 100%;height: 100%;border: 1px solid #eee;padding-left: 20rpx;"/>
</uni-forms-item> </uni-forms-item>
<view v-if="popleType == 'gysName'" style="color: red;font-size:22rpx;text-align:right;margin-bottom: 20rpx;"> <view v-if="popleType == 'gysName' && type!='edit'" style="color: red;font-size:22rpx;text-align:right;margin-bottom: 20rpx;">
*供应商的欠款需输入正数,如有余额则此处输入负数 *供应商的欠款需输入正数,如有余额则此处输入负数
</view> </view>
<uni-forms-item label="地址" name="address1"> <uni-forms-item label="地址" name="address1">

41
pages/index/index.vue

@ -312,6 +312,7 @@
src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg', src: 'http://pic2.sc.chinaz.com/Files/pic/pic9/202002/hpic2119_s.jpg',
inventoryList: [], inventoryList: [],
settingShow: false, settingShow: false,
isCancel:false,
showFormula: false, showFormula: false,
chartData: {}, chartData: {},
showDan:'', showDan:'',
@ -480,8 +481,10 @@
res.result.saleDetailDTOList[i].returnPrice = res.result.saleDetailDTOList[i].discountAmount res.result.saleDetailDTOList[i].returnPrice = res.result.saleDetailDTOList[i].discountAmount
res.result.saleDetailDTOList[i].stockLogList = new Map() res.result.saleDetailDTOList[i].stockLogList = new Map()
that.returnList.set(res.result.saleDetailDTOList[i].productId,res.result.saleDetailDTOList[i]) that.returnList.set(res.result.saleDetailDTOList[i].productId,res.result.saleDetailDTOList[i])
for(let m=0;m<res.result.saleDetailDTOList[i].stockLogList1.length;m++){ for(let m=0;m<res.result.saleDetailDTOList[i].stockLogList1.length;m++){
res.result.saleDetailDTOList[i].stockLogList1[m].productCount = 0-res.result.saleDetailDTOList[i].stockLogList1[m].productCount // res.result.saleDetailDTOList[i].stockLogList1[m].stockCount = res.result.saleDetailDTOList[i].stockLogList1[m].stockCount - res.result.saleDetailDTOList[i].stockLogList1[m].productCount
res.result.saleDetailDTOList[i].stockLogList1[m].productCount = 0-res.result.saleDetailDTOList[i].stockLogList1[m].productCount
that.returnList.get(res.result.saleDetailDTOList[i].productId).stockLogList.set(res.result.saleDetailDTOList[i].stockLogList1[m].attributeList,res.result.saleDetailDTOList[i].stockLogList1[m]) that.returnList.get(res.result.saleDetailDTOList[i].productId).stockLogList.set(res.result.saleDetailDTOList[i].stockLogList1[m].attributeList,res.result.saleDetailDTOList[i].stockLogList1[m])
} }
@ -511,6 +514,7 @@
}, true, true).then((res1) => { }, true, true).then((res1) => {
if (res1.code == 200) { if (res1.code == 200) {
if (type == 'goPay') { if (type == 'goPay') {
this.isCancel = true
this.goSaleGoods(item,'cancel') this.goSaleGoods(item,'cancel')
} else { } else {
this.getSaleInfo() this.getSaleInfo()
@ -523,20 +527,20 @@
// 取消订单 // 取消订单
getOrderInfoList(item,type) { getOrderInfoList(item,type) {
let that = this; let that = this;
// if(item.status == 0 || item.status == 1){ if(item.status == 0 || item.status == 1){
// this.tui.request('/app/sale/status', "POST", { this.tui.request('/app/sale/status', "POST", {
// status: 4, status: 4,
// orderId: item.id orderId: item.id
// }, true, true).then((res1) => { }, true, true).then((res1) => {
// if (res1.code == 200) { if (res1.code == 200) {
this.cancelSale(item,type) this.cancelSale(item,type)
// } else { } else {
// this.tui.toast(res.message) this.tui.toast(res.message)
// } }
// }).catch((res1) => {}) }).catch((res1) => {})
// }else{ }else{
// this.cancelSale(item,type) this.cancelSale(item,type)
// } }
}, },
sliceMsg(val) { sliceMsg(val) {
var name = '' var name = ''
@ -570,9 +574,16 @@
let hasCount = attrMap.get(item.saleDetailDTOList[i].stockLogList1[m].attributeList) let hasCount = attrMap.get(item.saleDetailDTOList[i].stockLogList1[m].attributeList)
newSaleDetailDTOList[hasCount].productCount = Number(newSaleDetailDTOList[hasCount] newSaleDetailDTOList[hasCount].productCount = Number(newSaleDetailDTOList[hasCount]
.productCount) + Number(item.saleDetailDTOList[i].stockLogList1[m].productCount) .productCount) + Number(item.saleDetailDTOList[i].stockLogList1[m].productCount)
if(this.isCancel == true){
newSaleDetailDTOList[hasCount].stockCount = newSaleDetailDTOList[hasCount].stockCount + newSaleDetailDTOList[hasCount].productCount
}
} else { } else {
item.saleDetailDTOList[i].stockLogList1[m].name = this.sliceMsg(item.saleDetailDTOList[i] item.saleDetailDTOList[i].stockLogList1[m].name = this.sliceMsg(item.saleDetailDTOList[i]
.stockLogList1[m].attributeList) .stockLogList1[m].attributeList)
if(this.isCancel == true){
item.saleDetailDTOList[i].stockLogList1[m].stockCount = item.saleDetailDTOList[i].stockLogList1[m].stockCount + item.saleDetailDTOList[i].stockLogList1[m].productCount
}
newSaleDetailDTOList.push(item.saleDetailDTOList[i].stockLogList1[m]) newSaleDetailDTOList.push(item.saleDetailDTOList[i].stockLogList1[m])
attrMap.set(item.saleDetailDTOList[i].stockLogList1[m].attributeList, num) attrMap.set(item.saleDetailDTOList[i].stockLogList1[m].attributeList, num)
num++ num++

982
pages/inventory/goodsList1.vue

File diff suppressed because it is too large

4
pages/inventory/inventory.vue

@ -58,10 +58,10 @@
<view class="content-right" style="width: 570rpx;background: #fff;margin-left:170rpx;margin-top: 300rpx;"> <view class="content-right" style="width: 570rpx;background: #fff;margin-left:170rpx;margin-top: 300rpx;">
<view style="display: flex;height: 60rpx;line-height: 60rpx;background: #C6E2FF;color: #777;text-align: center;"> <view style="display: flex;height: 60rpx;line-height: 60rpx;background: #C6E2FF;color: #777;text-align: center;">
<view style="width: 33%;"> <view style="width: 33%;">
商品数:{{indexList[categoryIndex].count != undefined ? indexList[categoryIndex].count : 0}} 款数:{{indexList[categoryIndex].count != undefined ? indexList[categoryIndex].count : 0}}
</view> </view>
<view style="width: 46%;" @tap.stop="seeStockCount(indexList[categoryIndex].stockCount,indexList[categoryIndex].minusStockCount)"> <view style="width: 46%;" @tap.stop="seeStockCount(indexList[categoryIndex].stockCount,indexList[categoryIndex].minusStockCount)">
库存数:{{indexList[categoryIndex].stockCount != undefined ? indexList[categoryIndex].stockCount + indexList[categoryIndex].minusStockCount: 0}} 库存数:{{indexList[categoryIndex].stockCount != undefined ? indexList[categoryIndex].stockCount + indexList[categoryIndex].minusStockCount: 0}}
<uni-icons type="help" size="15" style="padding-right: 50rpx;" @tap.stop="seeStockCount(indexList[categoryIndex].stockCount,indexList[categoryIndex].minusStockCount)"></uni-icons> <uni-icons type="help" size="15" style="padding-right: 50rpx;" @tap.stop="seeStockCount(indexList[categoryIndex].stockCount,indexList[categoryIndex].minusStockCount)"></uni-icons>
</view> </view>
<view style="width: 17%;position: relative;" @tap.stop="goodsListSort"> <view style="width: 17%;position: relative;" @tap.stop="goodsListSort">

2
pages/login/login.vue

@ -239,7 +239,7 @@
uni.setStorageSync('username',res.result.logiticsCompany.username) uni.setStorageSync('username',res.result.logiticsCompany.username)
uni.setStorageSync('mobile',res.result.logiticsCompany.mobile) uni.setStorageSync('mobile',res.result.logiticsCompany.mobile)
uni.setStorageSync("hiver_token", res.result.lcomToken) uni.setStorageSync("hiver_token", res.result.lcomToken)
uni.setStorageSync("transCompany", res.result.logiticsCompany.id) uni.setStorageSync("transCompany", res.result.logiticsCompany.companyId)
uni.setStorageSync("isOnLine", res.result.logiticsCompany.isOnLine) uni.setStorageSync("isOnLine", res.result.logiticsCompany.isOnLine)
uni.setStorageSync("companyMobile", res.result.logiticsCompany.mobile) uni.setStorageSync("companyMobile", res.result.logiticsCompany.mobile)
uni.setStorageSync("companyName", res.result.logiticsCompany.companyName) uni.setStorageSync("companyName", res.result.logiticsCompany.companyName)

Loading…
Cancel
Save