Browse Source

入库不说颜色尺码,不调通义千问

master
wangfukang 2 years ago
parent
commit
da1b04d287
  1. 154
      pages/index/waitStorageDetail.vue
  2. 3
      pages/inventory/goodsList1.vue

154
pages/index/waitStorageDetail.vue

@ -65,7 +65,18 @@
</view>
<view class="tui-goods-info" v-if="type==0 && sales.inStorageStatus == 0">
<!-- 账号权限是否可以维护成本价格(主账号和被授权的账号可以维护),参数名:shop_admin_cost,维护在用户表中,存在前后端缓存里,把备注栏挪出来,谁都可以备注 -->
<view class="price-box-list">
<view class="price-box-list">
<view class="price-box" v-if="type == 0">
<view style="flex: 1;text-align: left;padding-left: 20rpx;">
供应商:{{dealings.dealingsUserName?dealings.dealingsUserName:''}}
</view>
<view v-if="dealings.lastDebtAmount >= 0" style="flex: 1;text-align: right;padding-right: 20rpx;">
之前欠款:{{dealings.lastDebtAmount}}
</view>
<view v-if="dealings.lastDebtAmount < 0" style="flex: 1;text-align: right;padding-right: 20rpx;">
客户余额:{{Math.abs(dealings.lastDebtAmount)}}
</view>
</view>
<view class="content-list">
<view class="list-name">应付金额</view>
<view class="list-val">
@ -75,14 +86,41 @@
<view class="content-list">
<view class="list-name">已付金额</view>
<view class="list-val">
<input type="text" v-model="alreadyPay" @blur="changePay">
<input type="text" v-model="alreadyPay" @focus="obtainPrice($event,'alreadyPay')" @blur="changePay($event)">
</view>
</view>
<view class="content-list">
<view class="list-name">欠款</view>
<view class="list-val">
<input type="text" v-model="noPay" disabled>
</view>
<view class="content-list" v-if="yuedikou != 0 && type == 0">
<view class="list-name">余额抵扣</view>
<view class="list-val">
<input type="digit" v-model="yuedikou" disabled>
</view>
<!-- <view v-if="yuedikou > 0" @tap="noReturn" style="flex: 1;height: 30px;line-height: 30px;margin-top: 5px;font-size: 24rpx;background: #00BFFF;text-align: center;color: #fff;border-radius: 20px;">
不抵扣
</view> -->
</view>
<view class="content-list" v-if="zhiqianqiankuan > 0 && type == 0">
<view class="list-name">累计欠款</view>
<view class="list-val">
<input type="digit" v-model="leijiqiankuan" disabled>
</view>
</view>
<view class="content-list" v-if="leijiqiankuan < 0 && type == 0">
<view class="list-name">累计余额</view>
<view class="list-val">
<input type="digit" v-model="Math.abs(leijiqiankuan)" disabled>
</view>
</view>
<view class="content-list" v-if="noPay >= 0 && type == 0">
<view class="list-name">本次欠款</view>
<view class="list-val">
<input type="digit" v-model="noPay" disabled>
</view>
</view>
<view class="content-list" v-if="noPay < 0 && type == 0">
<view class="list-name">本次余额</view>
<view class="list-val">
<input type="digit" v-model="Math.abs(noPay)" disabled>
</view>
</view>
<view class="content-list">
<view class="list-name">其他费用</view>
@ -147,10 +185,14 @@
noPay:0,
alreadyPay:0,
otherPay:0,
remark:'',
remark:'',
zhiqianqiankuan:0,
yuedikou:0,
leijiqiankuan:0,
id:'',
type:'',
supplier:[],
supplier:[],
dealings:[],
collection:[]
}
},
@ -195,7 +237,9 @@
}
res.result.purchaseDetails[i].lsPrice = res.result.purchaseDetails[i].lsPrice
}
this.sales = res.result.purchase
this.zhiqianqiankuan = res.result.dealingsRecords[0].lastDebtAmount
this.sales = res.result.purchase
this.dealings = res.result.dealingsRecords[0]
this.noPay = res.result.purchase.noPay
this.supplier = res.result.supplier
this.remark = res.result.purchase.remark
@ -206,9 +250,52 @@
}
}).catch((res) => {})
},
//计算欠款
changePay() {
this.noPay = this.shouldPay - this.alreadyPay
//计算欠款
changePay(e) {
if (this.linshiPrice == e.target.value) {
this.alreadyPay = e.target.value
} else if (Number(e.detail.value) > Number(this.shouldPay)) {
this.alreadyPay = this.shouldPay
} else {
if (e.target.value == '') {
this.alreadyPay = this.linshiPrice
} else {
this.alreadyPay = e.target.value
if((this.shouldPay - this.alreadyPay) <= Math.abs(this.zhiqianqiankuan) && this.zhiqianqiankuan <0){
this.yuedikou = this.shouldPay - this.alreadyPay
}else if((this.shouldPay - this.alreadyPay) > Math.abs(this.zhiqianqiankuan) && this.zhiqianqiankuan <0){
this.yuedikou = Math.abs(this.zhiqianqiankuan)
}
}
}
this.noPay = this.shouldPay - this.alreadyPay - this.yuedikou
this.noPay = this.noPay.toFixed(2)
this.leijiqiankuan = Number(this.zhiqianqiankuan) + Number(this.yuedikou) + Number(this.noPay)
},
obtainPrice(e, type, num,num1) {
this.linshiPrice = e.target.value
if (type == 'danjia') {
this.carList.get(num).purchasePrice = ''
} else if (type == 'pifa') {
this.carList.get(num).wholesalePrice = ''
} else if (type == 'lingshou') {
this.carList.get(num).lsprice = ''
this.$forceUpdate()
}else if(type=='danjishu'){
this.temporaryList[num].productCount = ''
this.$forceUpdate()
} else if (type == 'zongjishu') {
this.allChangeNum = ''
} else if (type == 'shouldPay') {
this.shouldPay = ''
}else if(type=='mapdanjishu'){
this.carList.get(num).stockLogList.get(num1).productCount = ''
this.$forceUpdate()
}else if (type == 'alreadyPay') {
this.alreadyPay = ''
}
this.$forceUpdate()
},
//回款金额输入框
inputDialogToggle() {
@ -305,7 +392,8 @@
let purchase = {
id:this.id,
alreadyPay: this.alreadyPay, //已付金额
noPay: this.noPay, //欠款
noPay: this.noPay, //欠款
balanceDeductionAmount:this.yuedikou,
shouldPay: this.shouldPay, //应付金额
totalAmount: this.sales.totalAmount, //总数量
remark: this.remark,
@ -360,10 +448,25 @@
this.goodsList.forEach(function(value, key) {
that.shouldPay = that.shouldPay + value.zPrice
})
that.shouldPay = that.shouldPay.toFixed(2)
this.alreadyPay = this.shouldPay
that.noPay = this.shouldPay - this.alreadyPay
this.$forceUpdate()
this.$nextTick(()=>{
if(parseFloat(that.zhiqianqiankuan) < 0){
if(that.shouldPay > Math.abs(that.zhiqianqiankuan)){
that.yuedikou = Math.abs(that.zhiqianqiankuan)
this.alreadyPay = this.shouldPay - Math.abs(that.zhiqianqiankuan)
}else if(that.shouldPay <= Math.abs(that.zhiqianqiankuan)){
that.yuedikou = that.shouldPay
that.alreadyPay = 0
}
}else{
this.alreadyPay = this.shouldPay
}
that.shouldPay = that.shouldPay.toFixed(2)
that.noPay = this.shouldPay - (this.alreadyPay == '' ? 0 : this.alreadyPay) - that.yuedikou
that.noPay = that.noPay.toFixed(2)
this.leijiqiankuan = Number(this.zhiqianqiankuan) + Number(this.yuedikou) + Number(this.noPay)
this.$forceUpdate()
})
},
},
}
@ -622,4 +725,19 @@
.uni-tooltip {
display: flex !important;
}
.price-box{
width: 95%;
margin: 10px auto;
background: #eee;
height: 80rpx;
display: flex;
line-height: 80rpx;
text-align: center;
overflow: hidden;
border-radius: 10px;
background: #FDF5E6;
color: #EEB422;
background: linear-gradient(180deg, #fff, #FDF5E6);
border: 1px solid #FAEBD7;
}
</style>

3
pages/inventory/goodsList1.vue

@ -3086,9 +3086,8 @@
if(value.id == ''){
specMap.set(generateUUID(),value)
}else{
specMap.set(value.id,value)
specMap.set(value.productId?value.productId:value.id,value)
}
}else{
specMap.set(key,value)
}

Loading…
Cancel
Save