Commit 08730cf0 authored by dragondean@qq.com's avatar dragondean@qq.com

批量提货等

parent edce21e5
......@@ -179,4 +179,31 @@ export function getMyOrderPage(query) {
method: 'get',
params: query
})
}
// 创建提货
export function createOrderPickup(data){
return request({
url: '/ecw/order-pickup/create',
method: 'post',
data
})
}
// 批量提货
export function createOrderPickupBatch(data){
return request({
url: '/ecw/order-pickup/createBatch',
method: 'post',
data
})
}
// 分批提货
export function createOrderPickupSplitBatch(data){
return request({
url: '/ecw/order-pickup/createSplitBatch',
method: 'post',
data
})
}
\ No newline at end of file
<template>
<el-dialog title="批量提货" visible :before-close="closeDialog" :close-on-click-modal="false">
<el-form :model="form">
<el-tabs v-model="current" type="card">
<el-tab-pane label="全部提货" name="createOrderPickupBatch">
<el-form-item label="订单号/提单号" required>
<el-input v-model="form.orderId" placeholder="例:NA2200001L"></el-input>
<div>注:单号之间使用逗号或空格隔开</div>
</el-form-item>
<el-form-item label="提货时间">
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</el-tab-pane>
<el-tab-pane label="分批提货" name="createOrderPickupSplitBatch">
// TODO
</el-tab-pane>
</el-tabs>
<el-form-item label="">
<el-button type="primary" @click="submit">提交</el-button>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
import {createOrderPickupBatch, createOrderPickupSplitBatch} from '@/api/ecw/order'
export default {
props:{
},
data(){
return {
current: 'createOrderPickupBatch',
show: false,
form:{
orderId: '',
pickTime: '',
pickType: 1
},
}
},
computed:{
},
created(){
},
methods:{
submit(){
if(this.form.orderId == '' || this.form.pickTime==''){
return this.$message.error('请填写订单号和提货时间')
}
let orderIdArr = this.form.orderId.replace(/,/g, ' ').split(' ').filter(item => item !='')
let data = []
for(let orderId of orderIdArr){
data.push({
pickType: 1,
orderId,
pickTime: this.form.pickTime
})
}
({createOrderPickupBatch, createOrderPickupSplitBatch}[this.current])(data).then(res => {
this.$message.success("操作成功");
this.form.orderId = ''
})
},
closeDialog(){
this.show = false
this.$emit('close');
}
}
}
</script>
\ No newline at end of file
......@@ -102,6 +102,8 @@
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="handleEdit" :disabled="multiple">批量调仓
</el-button>
<el-button type="primary" plain icon="el-icon-setting" size="mini" @click="showBatchPickup=true">批量提货
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
......@@ -222,6 +224,7 @@
<print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" />
<print-warehouse-receipt v-if="printWarehouseReceiptOrderId !== null" :order-id="printWarehouseReceiptOrderId" @close="printWarehouseReceiptOrderId=null" />
<print-lading-bill v-if="printLadingBillInfo !== null" v-bind="printLadingBillInfo" @close="printLadingBillInfo=null" />
<batch-pickup v-if="showBatchPickup" @close="showBatchPickup=false"/>
</div>
</template>
......@@ -248,11 +251,11 @@ import {
import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
import BatchPickup from './components/BatchPickup'
export default {
name: "Order",
components: {
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup
},
props: {
mine: Boolean
......@@ -326,6 +329,7 @@ export default {
printTagOrderId: null, // 显示打印标签的订单ID
printWarehouseReceiptOrderId: null, // 打印入仓单的订单ID
printLadingBillInfo: null, // 打印提单
showBatchPickup: false, // 是否显示批量提货弹窗
isShow:false,//特殊显示
orderId:undefined,
/* DICT_TYPE,
......@@ -433,7 +437,7 @@ export default {
},
// 表格多选
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.ids = selection.map(item => item.orderId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
......
......@@ -2,10 +2,10 @@
<div class="app-container">
<el-form :model="form" label-position="left" label-width="120px">
<el-form-item label="放货方式">
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.pickType" form-type="radio"></dict-selector>
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.pickType" form-type="radio" formatter="number"></dict-selector>
</el-form-item>
<el-form-item label="提货时间" v-if="form.pickType == 1">
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<template v-if="form.pickType == 2">
......@@ -13,7 +13,7 @@
{{order.consigneeVO.name}}
</el-form-item>
<el-form-item label="收货电话">
{{order.consigneeVO.phone}}
{{order.consigneeVO.countryCode}} {{order.consigneeVO.phone}}
</el-form-item>
<el-form-item label="收货地址">
<!--缺少国城名字-->
......@@ -23,15 +23,15 @@
<el-input v-model="form.trackingNumber" placeholder=""></el-input>
</el-form-item>
<el-form-item label="送货时间">
<el-date-picker v-model="form.deliverTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker v-model="form.deliverTime" placeholder="" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
<el-form-item label="签收时间">
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd"></el-date-picker>
</el-form-item>
</template>
<el-form-item label="附件">
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.harvest_method"></dict-selector>
<image-upload v-model="form.attachment" />
</el-form-item>
<el-form-item label="备注">
......@@ -45,8 +45,10 @@
</div>
</template>
<script>
import {getOrder} from '@/api/ecw/order'
import {getOrder, createOrderPickup} from '@/api/ecw/order'
import ImageUpload from '@/components/ImageUpload'
export default {
components: {ImageUpload},
data(){
return {
order: null,
......@@ -60,11 +62,15 @@ export default {
loadOrderData(){
getOrder(this.$route.query.orderId).then(res => {
this.order = res.data
this.$set(this.form, 'pickType', this.order.harvestMethod)
this.$set(this.form, 'pickType', this.order.consigneeVO.harvestMethod)
})
},
submit(){
this.$alert('暂未对接接口')
createOrderPickup(Object.assign({orderId: this.order.orderNo}, this.form)).then(res => {
return this.$alert(res.message || '操作成功')
}).then(res => {
this.$router.back()
})
}
}
}
......
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