Commit 72cc7938 authored by 邓春圆's avatar 邓春圆

Merge remote-tracking branch 'origin/dev' into dev

parents b9261ffd 84cc7bc4
......@@ -83,7 +83,9 @@ export default {
if(index < 0){
getProduct(this.value).then(res => {
this.list.unshift(res.data)
this.index = 0
this.$nextTick(() => {
this.index = 0
})
})
}else this.index = index
},
......
......@@ -319,7 +319,7 @@
style="margin-bottom: 0"
:prop="`receiptAccountList.${scope.$index}.platformAccountId`"
>
<el-select
<!-- <el-select
v-model="scope.row.platformAccountId"
:placeholder="$t('请选择收款账户')"
@change="(platformAccountId)=>changePlatformAccountId(platformAccountId,scope.$index)"
......@@ -330,6 +330,21 @@
:label="item.baAccountName + '(' + item.baAccountNum + ')'"
: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-form-item>
</template>
......@@ -376,7 +391,7 @@
<template slot-scope="scope">
<span v-if="scope.row.type !== 'total'">{{ scope.row.collectionAmount }}</span>
<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[2]">{{ $t('奈拉') }}: {{ scope.row.collectionAmount[2].toFixed(6) }}</div>
<div v-if="scope.row.collectionAmount[3]">{{ $t('西非法郎') }}: {{ scope.row.collectionAmount[3].toFixed(6) }}</div> -->
......@@ -742,13 +757,35 @@ export default {
warehouseList:[],
selectedUsers:[],
dialogVisible:false,
isUpdate:false
isUpdate:false,
codeLoading: false,
codePage: {
pageNo: 1,
pageSize: 100
},
pages:1
};
},
activated(){
console.log(11)
// 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() {
getUserProfile().then(res => {
this.discountForm.author = res.data.username
......@@ -850,9 +887,7 @@ export default {
listSimpleUsers().then((res) => (that.creatorData = res.data));
getChannelList().then((res) => (that.channelList = res.data));
getTradeCityList().then((res) => (that.tradeCityList = res.data));
getBankAccountPage(that.params).then(
(res) => (that.bankData = res.data.list)
);
this.getCodeList()
listSimpleDepts().then((res) => {
res.data.forEach((item) => {
if (item.parentId == 0) {
......@@ -904,6 +939,29 @@ export default {
}
},
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.bankData = this.bankData.concat(res.data.list)
this.pages = (res.data.total/this.codePage.pageSize)+1
})
}, 200)
},
getCurrencyLabel(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
......
......@@ -724,7 +724,7 @@
this.getList()
}
getUnitList().then(res => this.unitList = res.data)
this.channelList = (await getChannelList()).data
this.channelList=(await getChannelList()).data
this.productAttrList = (await getProductAttrList()).data
listServiceUser().then(r=>{
this.customerServiceList = r.data;
......@@ -914,7 +914,10 @@
getOrderData(){
getOrder(this.orderId).then(response => {
this.orderData = response.data
this.handlerParams.channelId = this.orderData.channelId
if(this.orderData.channelId!=0){
this.handlerParams.channelId = this.orderData.channelId
}
this.handlerParams.lineId = this.orderData.lineId
if(response.data.customerId){
this.getCustomerData(response.data.customerId)
......@@ -1016,6 +1019,12 @@
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=>{
this.$modal.msgSuccess(this.$t('提交成功'));
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