Commit bc212d37 authored by Marcus's avatar Marcus

入仓特需

parent 249bafb0
......@@ -111,6 +111,14 @@ export function specialNeedCreate(data){
data:data,
})
}
// 创建特殊
export function getSpecialListByOrderId(orderId){
return request({
url: 'ecw/order-special-need/getListByOrderId',
method: 'get',
params: {orderId},
})
}
// 删除特需
export function orderSpecialNeed(params){
return request({
......
......@@ -3,17 +3,19 @@
<el-descriptions border v-if="order.orderId">
<el-descriptions-item label="唛头">{{ order.marks }}</el-descriptions-item>
<el-descriptions-item label="已到箱数">{{ order.sumNum }}</el-descriptions-item>
<el-descriptions-item label="订单状态">{{ order.status }}</el-descriptions-item>
<el-descriptions-item label="订单状态"><dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="order.status" /></el-descriptions-item>
<el-descriptions-item label="送货时间">todo</el-descriptions-item>
<el-descriptions-item label="运输方式">{{ order.logisticsInfoDto.transportId }}</el-descriptions-item>
<el-descriptions-item label="运输方式">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="order.logisticsInfoDto.transportId"></dict-tag>
</el-descriptions-item>
<el-descriptions-item label="始发地">{{ order.logisticsInfoDto.startWarehouseId }}</el-descriptions-item>
<el-descriptions-item label="目的地">{{ order.logisticsInfoDto.destWarehouseId }}</el-descriptions-item>
<el-descriptions-item label="发货人姓名">{{ order.consignorVO.name }}</el-descriptions-item>
<el-descriptions-item label="发货人公司">{{ order.consignorVO.company }}</el-descriptions-item>
<el-descriptions-item label="发货人电话">{{ order.consignorVO.phone }}</el-descriptions-item>
<el-descriptions-item label="收货人姓名">{{ order.consigneeVO.name }}</el-descriptions-item>
<el-descriptions-item label="收货人公司">{{ order.consigneeVO.company }}</el-descriptions-item>
<el-descriptions-item label="收货人电话">{{ order.consigneeVO.phone }}</el-descriptions-item>
<el-descriptions-item label="发货人姓名">{{ order.consignorVO && order.consignorVO.name}}</el-descriptions-item>
<el-descriptions-item label="发货人公司">{{ order.consignorVO && order.consignorVO.company || '' }}</el-descriptions-item>
<el-descriptions-item label="发货人电话">{{ order.consignorVO && order.consignorVO.phone }}</el-descriptions-item>
<el-descriptions-item label="收货人姓名">{{ order.consigneeVO && order.consigneeVO.name}}</el-descriptions-item>
<el-descriptions-item label="收货人公司">{{ order.consigneeVO && order.consigneeVO.company }}</el-descriptions-item>
<el-descriptions-item label="收货人电话">{{ order.consigneeVO && order.consigneeVO.phone }}</el-descriptions-item>
<el-descriptions-item label="入仓类型">{{ order.warehouseType }}</el-descriptions-item>
<el-descriptions-item label="订单号">{{ order.orderNo }}</el-descriptions-item>
</el-descriptions>
......@@ -21,10 +23,18 @@
</template>
<script>
import {DICT_TYPE} from "@/utils/dict"
export default {
name: "orderBaseInfo",
props: {
order: Object
},
data () {
return {
DICT_TYPE
}
}
}
</script>
......
......@@ -147,6 +147,7 @@ export const DICT_TYPE = {
ORDER_ERROR_TYPE:'order_error_type',//订单异常类型
ORDER_EXCEPTION_STATUS:'order_exception_status',//异常订单状态
PAYMENT_TYPE:'payment_type',//收款类型
WAREHOUSE_IN_STATUS: 'warehouse_in_status', // 入仓状态
ECASH_INIT:'ecash_init', //e-cash
FEE_TYPE:'receivable_fee_type',
......
......@@ -40,8 +40,10 @@
</template>
</el-table-column>
<el-table-column
prop="address"
prop="expressNo"
v-slot="{row}"
label="快递单号">
{{ row.warehouseInInfoVO ? row.warehouseInInfoVO.expressNo : '' }}
</el-table-column>
<el-table-column
prop="updateTime"
......@@ -51,97 +53,27 @@
</template>
</el-table-column>
<el-table-column
prop="address"
prop="diffType"
v-slot="{row}"
label="状态">
<dict-tag :type="DICT_TYPE.WAREHOUSE_IN_STATUS" :value="row.warehouseInInfoVO.diffType" />
</el-table-column>
<el-table-column
prop="address"
label="操作">
<template v-slot="{ row, column, $index }">
<el-button v-if="orderItemList[$index].orderWarehouseInBackItemDoList && orderItemList[$index].orderWarehouseInBackItemDoList.length > 0" size="mini" type="text" @click="handleWarehousing($index)">追加</el-button>
<el-button v-if="orderItemList[$index] && orderItemList[$index].orderWarehouseInBackItemDoList && orderItemList[$index].orderWarehouseInBackItemDoList.length > 0" size="mini" type="text" @click="handleWarehousing($index)">追加</el-button>
<el-button v-else size="mini" type="text" @click="handleWarehousing($index)">入仓</el-button>
<el-button size="mini" type="text" @click="handleWarehousingReturn(row)">退仓</el-button>
</template>
</el-table-column>
</el-table>
<h2>特殊需求</h2>
<h2 v-if="orderSpecialNeeds.length > 0">特殊需求</h2>
<el-form ref="form" :model="form" label-width="180px" style="max-width: 600px;">
<el-form-item label="套编织袋费">
<el-input v-model="form.a" placeholder="请输入套编织袋费">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="木架包装费">
<el-input v-model="form.a" placeholder="请输入木架包装费">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="纸箱包装费">
<el-input v-model="form.a" placeholder="请输入纸箱包装费">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="内陆运输费">
<el-input v-model="form.a" placeholder="请输入内陆运输费">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="打包费">
<el-input v-model="form.a" placeholder="请输入打包费">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="易碎标签">
<el-input v-model="form.a" placeholder="请输入易碎标签">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-input>
</el-form-item>
<el-form-item label="其他费用">
<el-input v-model="form.a" placeholder="请输入其他费用">
<el-select v-model="form.b" placeholder="请选择" slot="append" style="width: 100px">
<el-form-item :label="item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value">
<el-input v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoney" :placeholder="'请输入' + item.label">
<el-select v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoneyCurrency" placeholder="请选择" slot="append" style="width: 100px">
<el-option
v-for="item in currencyList"
:key="item.id"
......@@ -152,7 +84,7 @@
</el-input>
</el-form-item>
<div style="text-align: center">
<div style="text-align: center;margin-top: 15px">
<el-button type="primary">转异</el-button>
<el-button type="primary" @click="finishVisible = true">完成入仓</el-button>
</div>
......@@ -181,10 +113,17 @@
<script>
import {getCurrencyList} from "@/api/ecw/currency"
import {getOrder, getOrderWarehouseIn, orderWarehouseInFinish, rollbackApply} from "@/api/ecw/order"
import {
getOrder,
getOrderWarehouseIn,
getSpecialListByOrderId,
orderWarehouseInFinish,
rollbackApply
} from "@/api/ecw/order"
import orderBaseInfo from "@/components/OrderBaseInfo"
import WarehouseAreaDialog from '@/components/WarehouseAreaDialog'
import editDialog from '@/views/ecw/order/warehousing/components/editDialog'
import {DICT_TYPE} from "@/utils/dict"
export default {
name: "Warehousing",
......@@ -200,23 +139,25 @@ export default {
this.orderId = this.$route.query.id
getOrder(this.orderId).then(r => this.order = r.data)
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data)
}
getCurrencyList().then(res => this.currencyList = res.data)
},
data() {
return {
DICT_TYPE,
areaVisible: false,
finishVisible: false,
locationName: '',
warehousingVisible: false,
form: {
a: '',
b: 3
orderSpecialNeedReceivableReqVoList: []
},
currencyList:[],
order: {},
orderItemList: [],
specialList: [],
warehousing: undefined
}
},
......@@ -224,6 +165,7 @@ export default {
methods: {
handleSubmit() {
orderWarehouseInFinish({
orderSpecialNeedReceivableReqVoList: this.form.orderSpecialNeedReceivableReqVoList,
"locationName": this.locationName,
"orderId": this.order.orderId
}).then(r => {
......@@ -275,6 +217,31 @@ export default {
getOrder(this.orderId).then(r => this.order = r.data)
getOrderWarehouseIn(this.orderId).then(r => this.orderItemList = r.data)
}
},
orderSpecialNeeds(val){
val.forEach(e => {
this.form.orderSpecialNeedReceivableReqVoList.push( {
"id": e.id,
"receivableMoney": '',
"receivableMoneyCurrency": 3
})
})
}
},
computed: {
orderSpecialNeedsDict() {
return this.$store.state.dict.dictDatas.order_special_needs
},
orderSpecialNeeds(){
const result = []
this.specialList.forEach(e => {
const t = this.orderSpecialNeedsDict.find(f => f.value === e.advanceType)
if(t) {
result.push({...e, label: t.label})
}
})
return result
}
}
}
......
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