uu
This commit is contained in:
parent
471577f735
commit
ac33e7f2c5
@ -18,7 +18,12 @@
|
|||||||
<text class="">{{item.billCode}}</text>
|
<text class="">{{item.billCode}}</text>
|
||||||
</u-col>
|
</u-col>
|
||||||
<u-col span="4">
|
<u-col span="4">
|
||||||
|
<u-row>
|
||||||
<text class="clr-sub">{{item.scanDate}}</text>
|
<text class="clr-sub">{{item.scanDate}}</text>
|
||||||
|
<u-row v-if="canDel" @click="handleDel(index)" justify="center" custom-style="height: 60rpx;width: 60rpx;">
|
||||||
|
<u-icon name="trash" size="32"></u-icon>
|
||||||
|
</u-row>
|
||||||
|
</u-row>
|
||||||
</u-col>
|
</u-col>
|
||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
@ -42,6 +47,11 @@
|
|||||||
default () {
|
default () {
|
||||||
return { list: [] }
|
return { list: [] }
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
canDel: {
|
||||||
|
default () {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -57,7 +67,9 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleDel(index){
|
||||||
|
this.modelRes.list.splice(index, 1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -89,7 +89,7 @@
|
|||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
<view class="pt-20">
|
<view class="pt-20">
|
||||||
<u-textarea v-model="modelInfo.feeRemaker" border="surround" height="120" placeholder="费用备注"
|
<u-textarea v-model="modelInfo.feeRemark" border="surround" height="120" placeholder="费用备注"
|
||||||
maxlength="50" count></u-textarea>
|
maxlength="50" count></u-textarea>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -114,7 +114,7 @@
|
|||||||
suffix="CNY"></tpx-input>
|
suffix="CNY"></tpx-input>
|
||||||
</u-row>
|
</u-row>
|
||||||
<u-row custom-style="width:300rpx;">
|
<u-row custom-style="width:300rpx;">
|
||||||
<text :class="`font-26 label-text ${tempObject.value.feeCode == '9999'?'label-text-required':''} `">实收</text>
|
<text :class="`font-26 label-text label-text-required `">实收</text>
|
||||||
<tpx-input v-model:value="tempObject.value.realFee" _digit="5" :isWhite="true" custom-style="width: 120rpx;height: 46rpx;"
|
<tpx-input v-model:value="tempObject.value.realFee" _digit="5" :isWhite="true" custom-style="width: 120rpx;height: 46rpx;"
|
||||||
suffix="CNY"></tpx-input>
|
suffix="CNY"></tpx-input>
|
||||||
</u-row>
|
</u-row>
|
||||||
@ -161,12 +161,15 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
searchParam: {
|
searchParam: {
|
||||||
handler(newVal){
|
handler(newVal, oldVal){
|
||||||
let vals = Object.values(newVal)
|
let vals = Object.values(newVal)
|
||||||
// 所有关联入参都有值再 执行自动计算
|
// 所有关联入参都有值再 执行自动计算,数据未变化不做计算
|
||||||
if(vals.length == vals.filter(v => !!v).length) {
|
if(vals.length == vals.filter(v => !!v).length) {
|
||||||
|
if(JSON.stringify(newVal) != JSON.stringify(oldVal || {})) {
|
||||||
|
console.log("====watch cost calcWaybillFee===")
|
||||||
this.calcWaybillFee(newVal);
|
this.calcWaybillFee(newVal);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
}
|
}
|
||||||
@ -180,7 +183,8 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
costModal: { item: {}, show: false }
|
costModal: { item: {}, show: false },
|
||||||
|
daiDianCode: '1002'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -193,17 +197,27 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
getNewCostItem(code, extData = {}){
|
||||||
|
return {
|
||||||
|
blAutoGen: 0, // 手动添加的费用标识
|
||||||
|
feeCode: code,
|
||||||
|
feeName: this.dicData.emis_fee_type.filter(t => t.val == code)[0].title,
|
||||||
|
...extData
|
||||||
|
}
|
||||||
|
},
|
||||||
handleDelFee(index) {
|
handleDelFee(index) {
|
||||||
|
// 同步变量
|
||||||
|
if(this.modelInfo.feeItems[index].feeCode == this.daiDianCode) {
|
||||||
|
this.modelInfo.blPrepareInFreight = 0
|
||||||
|
this.modelInfo.prepareInEstFee = undefined
|
||||||
|
}
|
||||||
this.modelInfo.feeItems.splice(index, 1)
|
this.modelInfo.feeItems.splice(index, 1)
|
||||||
this.calteFreight()
|
this.calteFreight()
|
||||||
|
|
||||||
},
|
},
|
||||||
handleAddFee(val) {
|
handleAddFee(code) {
|
||||||
this.costModal.show = {}
|
this.costModal.show = {}
|
||||||
this.costModal.item = {
|
this.costModal.item = this.getNewCostItem(code)
|
||||||
blAutoGen: 0, // 手动添加的费用标识
|
|
||||||
feeCode: val,
|
|
||||||
feeName: this.dicData.emis_fee_type.filter(t => t.val == val)[0].title
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async calcWaybillFee(params = {}) {
|
async calcWaybillFee(params = {}) {
|
||||||
// calcFeeType计算入参特殊处理
|
// calcFeeType计算入参特殊处理
|
||||||
@ -217,6 +231,10 @@
|
|||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
this.calteFreight()
|
this.calteFreight()
|
||||||
}, 500)
|
}, 500)
|
||||||
|
// 同步外层变量
|
||||||
|
if(item.feeCode == this.daiDianCode) {
|
||||||
|
this.modelInfo.prepareInEstFee = val
|
||||||
|
}
|
||||||
},
|
},
|
||||||
handleAwPriceChange(item) {
|
handleAwPriceChange(item) {
|
||||||
setTimeout(()=> {
|
setTimeout(()=> {
|
||||||
@ -249,17 +267,39 @@
|
|||||||
this.modelInfo.freight = total
|
this.modelInfo.freight = total
|
||||||
},
|
},
|
||||||
async handleCostItemSure(data){
|
async handleCostItemSure(data){
|
||||||
if(data.feeCode == '9999') {
|
|
||||||
if(!data.realFee) {
|
if(!data.realFee) {
|
||||||
this.showToast("实收不能为空")
|
this.showToast("实收不能为空")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this.modelInfo.feeItems.push({ ...data })
|
this.modelInfo.feeItems.push({ ...data })
|
||||||
this.costModal.show = false
|
this.costModal.show = false
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
this.calteFreight()
|
this.calteFreight()
|
||||||
}, 500)
|
}, 500)
|
||||||
|
},
|
||||||
|
getCostItemByFeeCode(code){
|
||||||
|
let item, index;
|
||||||
|
this.modelInfo.feeItems.map((t, i)=> {
|
||||||
|
if(t.feeCode == code) {
|
||||||
|
item = t;
|
||||||
|
index = i
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return { item, index }
|
||||||
|
},
|
||||||
|
updateDaiDianFeeData() {
|
||||||
|
let { item, index } = this.getCostItemByFeeCode(this.daiDianCode)
|
||||||
|
// 开启 代垫运费开关,需要同步外层录入数据
|
||||||
|
if(this.modelInfo.blPrepareInFreight == '1'){
|
||||||
|
if(item) {
|
||||||
|
item.realFee = this.modelInfo.prepareInEstFee
|
||||||
|
} else {
|
||||||
|
item = this.getNewCostItem(this.daiDianCode, { realFee: this.modelInfo.prepareInEstFee })
|
||||||
|
this.handleCostItemSure(item)
|
||||||
|
}
|
||||||
|
} else if(typeof index != 'undefined'){
|
||||||
|
this.handleDelFee(index)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@
|
|||||||
<u-row justify="between">
|
<u-row justify="between">
|
||||||
<u-row>
|
<u-row>
|
||||||
<text class="clr-sub pr-10">费用备注</text>
|
<text class="clr-sub pr-10">费用备注</text>
|
||||||
<text>{{modelInfo.feeRemaker || '-'}}</text>
|
<text>{{modelInfo.feeRemark || '-'}}</text>
|
||||||
</u-row>
|
</u-row>
|
||||||
</u-row>
|
</u-row>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -101,7 +101,12 @@
|
|||||||
}
|
}
|
||||||
this.showLoadMore = true
|
this.showLoadMore = true
|
||||||
this.page.pageNum++
|
this.page.pageNum++
|
||||||
|
try{
|
||||||
await this.getDataList()
|
await this.getDataList()
|
||||||
|
}catch(e){
|
||||||
|
// 滚动下一页加载失败,重置 page.pageNum
|
||||||
|
this.page.pageNum --
|
||||||
|
}
|
||||||
this.showLoadMore = false
|
this.showLoadMore = false
|
||||||
},
|
},
|
||||||
async getDataList(reload) {
|
async getDataList(reload) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user