Commit 1f796607 authored by dragondean@qq.com's avatar dragondean@qq.com

待出列表增加导出

parent 6c9cdd1b
......@@ -884,6 +884,16 @@ export function exportCanShipment(params){
})
}
// 导出待出订单
export function exportWaitingShipment(params){
return request({
url: '/ecw/order/export/waiting-shipment/search',
method: 'get',
params,
responseType: 'blob'
})
}
// 无需打包
export function noNeedPack(orderItemId){
return request({
......
......@@ -106,6 +106,8 @@
<el-col :span="1.5">
<el-button :disabled="!multipleSelection.length" type="primary" plain size="mini" @click="batchCanShipment" v-hasPermi="['ecw:order:peddingList:batch_can_shipment']">{{$t('批量可出')}}</el-button>
<el-button :disabled="!multipleSelection.length" type="primary" plain size="mini" @click="batchException" v-hasPermi="['ecw:order:peddingList:batch_exception']">{{$t('批量转异')}}</el-button>
<el-button :disabled="!multipleSelection.length" type="primary" :loading="exporting" plain size="mini" @click="exportXls(ids)" v-hasPermi="['ecw:order:peddingList:export_selected']">{{$t('导出所选')}}</el-button>
<el-button type="primary" :loading="exporting" plain size="mini" @click="exportXls(queryParams)" v-hasPermi="['ecw:order:peddingList:export_search']">{{$t('导出搜索')}}</el-button>
</el-col>
</el-row>
......@@ -212,7 +214,14 @@ import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import { setCanShipment, canShipmentPage, batchCanShipment, batchException, waitingShipmentPage } from "@/api/ecw/order";
import {
setCanShipment,
canShipmentPage,
batchCanShipment,
batchException,
waitingShipmentPage,
orderSpecialNeed, exportCanShipment, exportWaitingShipment
} from "@/api/ecw/order";
import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
......@@ -242,6 +251,8 @@ export default {
},
data() {
return {
// 导出中
exporting: false,
// 选中数组
ids: [],
// 非单个禁用
......@@ -416,7 +427,36 @@ export default {
})
}
})
}
},
specialRendering(val){
console.log('val', val)
if(val !== undefined){
let i = val.split(',')
return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(e => {
return i.indexOf(e.value) > -1
}).map(item => {
// 打字开头的用最后一个字,否则取第一个字
item.symbol = item.label[0] == '' ? item.label[item.label.length-1]: item.label[0]
return item
})
}
},
deleteSpecial(id,orderId){
this.$confirm(this.$t('确定删除此特需么?')).then(() => {
return orderSpecialNeed({orderId:orderId,advanceType:id})
}).then(() => {
this.getList()
})
},
exportXls(params){
this.exporting = true
const exportParams = Array.isArray(params) ? {orderIdList: params} : {...params}
exportWaitingShipment(exportParams).then(res => {
this.$download.excel(res, this.$t('待出订单') + '.xls');
}).finally(() => {
this.exporting = false
})
}
}
};
</script>
......
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