Commit bfa345e9 authored by 我在何方's avatar 我在何方

渠道异常修复

parent e1275214
...@@ -319,7 +319,7 @@ ...@@ -319,7 +319,7 @@
style="margin-bottom: 0" style="margin-bottom: 0"
:prop="`receiptAccountList.${scope.$index}.platformAccountId`" :prop="`receiptAccountList.${scope.$index}.platformAccountId`"
> >
<el-select <!-- <el-select
v-model="scope.row.platformAccountId" v-model="scope.row.platformAccountId"
:placeholder="$t('请选择收款账户')" :placeholder="$t('请选择收款账户')"
@change="(platformAccountId)=>changePlatformAccountId(platformAccountId,scope.$index)" @change="(platformAccountId)=>changePlatformAccountId(platformAccountId,scope.$index)"
...@@ -330,6 +330,21 @@ ...@@ -330,6 +330,21 @@
:label="item.baAccountName + '(' + item.baAccountNum + ')'" :label="item.baAccountName + '(' + item.baAccountNum + ')'"
:value="item.id" :value="item.id"
/> />
</el-select> -->
<el-select
filterable
clear
v-model="scope.row.platformAccountId"
:placeholder="$t('请选择收款账户')"
@change="(platformAccountId)=>changePlatformAccountId(platformAccountId,scope.$index)"
v-el-select-loadmore="loadmore"
:loading="codeLoading">
<el-option
v-for="(item, i) in bankData"
:key="'opt-code' + i"
:label="item.baAccountName + '(' + item.baAccountNum + ')'"
:value="item.id"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
...@@ -376,7 +391,7 @@ ...@@ -376,7 +391,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount }}</span> <span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount }}</span>
<div v-else> <div v-else>
<div v-for="itemAmount in scope.row.collectionAmount">{{$i18n.locale=='zh_CN'?(itemAmount?itemAmount.currencyNameZh:''):(itemAmount?itemAmount.currencyNameEn:'')}}: {{ itemAmount.amount||''}}</div> <div v-for="itemAmount in scope.row.collectionAmount">{{$i18n.locale=='zh_CN'?(itemAmount?itemAmount.currencyNameZh:''):(itemAmount?itemAmount.currencyNameEn:'')}}: {{itemAmount?itemAmount.amount:''}}</div>
<!-- <div v-if="scope.row.collectionAmount[1]">{{ $t('人民币') }}: {{ scope.row.collectionAmount[1].toFixed(6) }}</div> <!-- <div v-if="scope.row.collectionAmount[1]">{{ $t('人民币') }}: {{ scope.row.collectionAmount[1].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[2]">{{ $t('奈拉') }}: {{ scope.row.collectionAmount[2].toFixed(6) }}</div> <div v-if="scope.row.collectionAmount[2]">{{ $t('奈拉') }}: {{ scope.row.collectionAmount[2].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[3]">{{ $t('西非法郎') }}: {{ scope.row.collectionAmount[3].toFixed(6) }}</div> --> <div v-if="scope.row.collectionAmount[3]">{{ $t('西非法郎') }}: {{ scope.row.collectionAmount[3].toFixed(6) }}</div> -->
...@@ -742,13 +757,35 @@ export default { ...@@ -742,13 +757,35 @@ export default {
warehouseList:[], warehouseList:[],
selectedUsers:[], selectedUsers:[],
dialogVisible:false, dialogVisible:false,
isUpdate:false isUpdate:false,
codeLoading: false,
codePage: {
pageNo: 1,
pageSize: 100
},
pages:1
}; };
}, },
activated(){ activated(){
console.log(11) console.log(11)
// this.getList(); // this.getList();
}, },
directives: {
'el-select-loadmore': {
bind (el, binding) {
const SELECTWRAP_DOM = el.querySelector(
'.el-select-dropdown .el-select-dropdown__wrap'
)
SELECTWRAP_DOM.addEventListener('scroll', function () {
const condition =
this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
}
}
},
async created() { async created() {
getUserProfile().then(res => { getUserProfile().then(res => {
this.discountForm.author = res.data.username this.discountForm.author = res.data.username
...@@ -850,9 +887,7 @@ export default { ...@@ -850,9 +887,7 @@ export default {
listSimpleUsers().then((res) => (that.creatorData = res.data)); listSimpleUsers().then((res) => (that.creatorData = res.data));
getChannelList().then((res) => (that.channelList = res.data)); getChannelList().then((res) => (that.channelList = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data)); getTradeCityList().then((res) => (that.tradeCityList = res.data));
getBankAccountPage(that.params).then( this.getCodeList()
(res) => (that.bankData = res.data.list)
);
listSimpleDepts().then((res) => { listSimpleDepts().then((res) => {
res.data.forEach((item) => { res.data.forEach((item) => {
if (item.parentId == 0) { if (item.parentId == 0) {
...@@ -904,6 +939,29 @@ export default { ...@@ -904,6 +939,29 @@ export default {
} }
}, },
methods: { methods: {
// 懒加载
loadmore () {
this.codePage.pageNo++
// 大于页码不请求了
console.log(111)
if (this.codePage.pageNo > this.pages) {
return
}
this.getCodeList()
},
getCodeList (flag) {
if (flag) {
this.bankData = []
this.codeLoading = true
}
setTimeout(() => {
getBankAccountPage(this.codePage).then(res => {
this.codeLoading = false
this.pages = res.data.pages
this.bankData = this.bankData.concat(res.data.list)
})
}, 200)
},
getCurrencyLabel(id){ getCurrencyLabel(id){
var label = this.currencyList.filter(item=>item.id == id) var label = this.currencyList.filter(item=>item.id == id)
if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn if(label.length>0) return this.$i18n.locale=='zh_CN'?label[0].titleZh:label[0].titleEn
......
...@@ -724,7 +724,7 @@ ...@@ -724,7 +724,7 @@
this.getList() this.getList()
} }
getUnitList().then(res => this.unitList = res.data) getUnitList().then(res => this.unitList = res.data)
this.channelList = (await getChannelList()).data this.channelList=(await getChannelList()).data
this.productAttrList = (await getProductAttrList()).data this.productAttrList = (await getProductAttrList()).data
listServiceUser().then(r=>{ listServiceUser().then(r=>{
this.customerServiceList = r.data; this.customerServiceList = r.data;
...@@ -914,7 +914,10 @@ ...@@ -914,7 +914,10 @@
getOrderData(){ getOrderData(){
getOrder(this.orderId).then(response => { getOrder(this.orderId).then(response => {
this.orderData = response.data this.orderData = response.data
if(this.orderData.channelId!=0){
this.handlerParams.channelId = this.orderData.channelId this.handlerParams.channelId = this.orderData.channelId
}
this.handlerParams.lineId = this.orderData.lineId this.handlerParams.lineId = this.orderData.lineId
if(response.data.customerId){ if(response.data.customerId){
this.getCustomerData(response.data.customerId) this.getCustomerData(response.data.customerId)
...@@ -1016,6 +1019,12 @@ ...@@ -1016,6 +1019,12 @@
return return
} }
} }
if((this.orderExceptionData.orderExceptionType=='not_shipping_channel_exception'&&this.handlerParams.orderExceptionHandlerResult=='change_channel')||(this.orderExceptionData.orderExceptionType=='channel_exception'&&this.handlerParams.orderExceptionHandlerResult=='set_shipment_channel')){
if(this.handlerParams.channelId==0){
this.$modal.msgError(this.$t('请选择出货渠道'));
return
}
}
handlerExceptionByExceptionId(this.handlerParams).then(res=>{ handlerExceptionByExceptionId(this.handlerParams).then(res=>{
this.$modal.msgSuccess(this.$t('提交成功')); this.$modal.msgSuccess(this.$t('提交成功'));
this.$redirect('/order/pending?id=' + this.orderData.orderId) this.$redirect('/order/pending?id=' + this.orderData.orderId)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment