Commit 2ee96827 authored by 邓春圆's avatar 邓春圆

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

parents 4b99cd2e be916223
...@@ -789,10 +789,6 @@ export function batchCanShipment(orderIdList){ ...@@ -789,10 +789,6 @@ export function batchCanShipment(orderIdList){
data: {orderIdList} data: {orderIdList}
}) })
} }
// 批量转异
export function batchException(ids){
throw new Error('接口未出,待完善,以下代码是copilot生成')
}
// 导出备货订单 // 导出备货订单
export function exportReadyStock(params){ export function exportReadyStock(params){
...@@ -803,3 +799,37 @@ export function exportReadyStock(params){ ...@@ -803,3 +799,37 @@ export function exportReadyStock(params){
responseType: 'blob' responseType: 'blob'
}) })
} }
// 无需打包
export function noNeedPack(orderItemId){
return request({
url: '/order/order-warehouse-in/no-need-to-pack',
method: 'get',
params: {orderItemId}
})
}
// 完成打包
export function finishPacked(data){
return request({
url: '/order/order-warehouse-in/finish-packed',
method: 'post',
data
})
}
// 完成备货
export function finishStock(data){
return request({
url: '/order/order-warehouse-in/finish-stocked',
method: 'put',
data
})
}
// 批量转异
export function batchException(data){
return request({
url: '/air/order/manual-exception/batch',
method: 'put',
data
})
}
...@@ -120,6 +120,8 @@ export const DICT_TYPE = { ...@@ -120,6 +120,8 @@ export const DICT_TYPE = {
ECW_CUSTOMER_TRANSPORT_TYPE: 'customer_transport_type', // 客户出货渠道(跟运输方式相同,但是显示全部) ECW_CUSTOMER_TRANSPORT_TYPE: 'customer_transport_type', // 客户出货渠道(跟运输方式相同,但是显示全部)
ECW_ORDER_APPROVAL_TYPE: 'order_approval_type', // 订单相关审批类型 ECW_ORDER_APPROVAL_TYPE: 'order_approval_type', // 订单相关审批类型
ECW_FEE_SOURCE: 'fee_source', // 费用来源 ECW_FEE_SOURCE: 'fee_source', // 费用来源
STOCK_UP_EXCEPTION_TYPE: 'stock_up_exception_type', // 备货异常类型,
ORDER_ITEM_PACK_STATUS: 'order_item_pack_status', // 空运备货打包状态
//--------ecw--------- //--------ecw---------
CUSTOMER_STATUS: 'customer_status', CUSTOMER_STATUS: 'customer_status',
CUSTOMER_SOURCE: 'customer_source', CUSTOMER_SOURCE: 'customer_source',
......
...@@ -145,7 +145,7 @@ ...@@ -145,7 +145,7 @@
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-card class="card" v-if="[3].indexOf(+order.transportId) > -1"> <el-card class="card" v-if="[3,4].indexOf(+order.transportId) > -1">
<el-descriptions class="mr-10" border :title="$t('空运专线')" :column="2" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}"> <el-descriptions class="mr-10" border :title="$t('空运专线')" :column="2" :labelStyle="{width:'110px'}" :contentStyle="{width:'150px'}">
<el-descriptions-item :label="$t('是否双清')"> <el-descriptions-item :label="$t('是否双清')">
<dict-tag :type="DICT_TYPE.ECW_DOUBLE_CLEAR" :value="order.doubleClear" /> <dict-tag :type="DICT_TYPE.ECW_DOUBLE_CLEAR" :value="order.doubleClear" />
......
...@@ -196,6 +196,14 @@ ...@@ -196,6 +196,14 @@
<el-button v-else-if="scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<!-- 2.0 -->
<el-button v-else-if="scope.row.orderExceptionType=='line_loop_exception'" v-hasPermi="['ecw:exception:lineLoopException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='customs_fee_not_quote_exception'" v-hasPermi="['ecw:exception:notQuoteException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='overweight_exception'" v-hasPermi="['ecw:exception:overweightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='not_shipping_channel_exception'" v-hasPermi="['ecw:exception:notChannelException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='goods_weight_exception'" v-hasPermi="['ecw:exception:goodsWeightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='in_warehousing_diff_exception'" v-hasPermi="['ecw:exception:inWarehousingException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='stock_up_exception'" v-hasPermi="['ecw:exception:stockUpException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row.orderId)">{{$t('处理')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
<span>{{ scope.row.orderNo }}</span> <span>{{ scope.row.orderNo }}</span>
</router-link> </router-link>
<div style="display: flex;flex-wrap: wrap;" v-if="scope.row.advanceType"> <div style="display: flex;flex-wrap: wrap;" v-if="scope.row.advanceType">
<el-button @click="deleteSpecial(item.value,scope.row.orderId)" size="mini" style="margin-left: 20px" type="danger" circle v-for="(item,index) in specialRendering(scope.row.advanceType)" :key="index">{{item.label[0]}}</el-button> <el-button @click="deleteSpecial(item.value,scope.row.orderId)" size="mini" style="margin-left: 20px" type="danger" circle v-for="(item,index) in specialRendering(scope.row.advanceType)" :key="index">{{item.symbol}}</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
...@@ -895,10 +895,15 @@ export default { ...@@ -895,10 +895,15 @@ export default {
moleculeChange() { }, moleculeChange() { },
denominatorChange() { }, denominatorChange() { },
specialRendering(val){ specialRendering(val){
console.log('val', val)
if(val !== undefined){ if(val !== undefined){
let i = val.split(',') let i = val.split(',')
return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(e => { return this.getDictDatas(this.DICT_TYPE.ORDER_SPECIAL_NEEDS).filter(e => {
return i.indexOf(e.value) > -1 return i.indexOf(e.value) > -1
}).map(item => {
// 打字开头的用最后一个字,否则取第一个字
item.symbol = item.label[0] == '' ? item.label[item.label.length-1]: item.label[0]
return item
}) })
} }
}, },
......
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
<dict-selector v-model="batchExceptionForm.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector> <dict-selector v-model="batchExceptionForm.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('附件')"> <el-form-item :label="$t('附件')">
<image-upload v-model="batchExceptionForm.exceptionUrls"></image-upload> <image-and-video-upload v-model="batchExceptionForm.exceptionUrls"></image-and-video-upload>
</el-form-item> </el-form-item>
<el-form-item :label="$t('详细信息')"> <el-form-item :label="$t('详细信息')">
<el-input v-model="batchExceptionForm.descZh" type="textarea"></el-input> <el-input v-model="batchExceptionForm.descZh" type="textarea"></el-input>
...@@ -212,33 +212,7 @@ import ProductSelector from '@/components/ProductSelector' ...@@ -212,33 +212,7 @@ import ProductSelector from '@/components/ProductSelector'
import { getProductAttrList } from '@/api/ecw/productAttr' import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector' import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds'; import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import { import { setCanShipment, canShipmentPage, batchCanShipment, batchException, waitingShipmentPage } from "@/api/ecw/order";
createOrder,
updateOrder,
deleteOrder,
getOrder,
getOrderPage,
exportOrderExcel,
orderSpecialNeed,
cancelOrder,
recoveryOrder,
getMyOrderPage,
deptOrderPage,
orderStatistics,
orderMyStatistics,
orderDeptStatistics,
orderExportSearch,
orderExportMySearch,
orderExportDeptSearch,
exportAbnormal,
exportHeavyOrder,
exportReturnOrder,
exportSaleRepay,
exportCustomsDatas,
exportShippingDatas,
exportShipFee,
exportUnload, setCanShipment, canShipmentPage, batchCanShipment, batchException, waitingShipmentPage
} from "@/api/ecw/order";
import PrintTag from './components/PrintTag' import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt' import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill' import PrintLadingBill from './components/PrintLadingBill'
...@@ -253,6 +227,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse' ...@@ -253,6 +227,7 @@ import {getWarehouseList} from '@/api/ecw/warehouse'
import { getCurrencyPage } from "@/api/ecw/currency"; import { getCurrencyPage } from "@/api/ecw/currency";
import SplitRevoke from "@/views/ecw/order/components/SplitRevoke"; import SplitRevoke from "@/views/ecw/order/components/SplitRevoke";
import {getChannelList} from "@/api/ecw/channel"; import {getChannelList} from "@/api/ecw/channel";
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload";
export default { export default {
name: "EcwPeddingList", name: "EcwPeddingList",
components: { components: {
...@@ -262,6 +237,7 @@ export default { ...@@ -262,6 +237,7 @@ export default {
MergeLog, MergeLog,
PickupLog, PickupLog,
SplitRevoke, SplitRevoke,
ImageAndVideoUpload,
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill, BatchPickup,withdrawal
}, },
data() { data() {
...@@ -432,6 +408,7 @@ export default { ...@@ -432,6 +408,7 @@ export default {
this.$refs.batchExceptionForm.validate(valid => { this.$refs.batchExceptionForm.validate(valid => {
if (valid) { if (valid) {
let params = Object.assign({}, this.batchExceptionForm, {orderIds: this.ids}) let params = Object.assign({}, this.batchExceptionForm, {orderIds: this.ids})
params.manualExceptionType = params.manualExceptionType.join(',')
batchException(params).then(res =>{ batchException(params).then(res =>{
this.$message.success(res.message || this.$t('操作成功')) this.$message.success(res.message || this.$t('操作成功'))
this.showBatchException = false this.showBatchException = false
......
...@@ -22,6 +22,10 @@ ...@@ -22,6 +22,10 @@
<el-descriptions-item :label="$t('运输方式')"> <el-descriptions-item :label="$t('运输方式')">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" /> <dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />
</el-descriptions-item> </el-descriptions-item>
<!-- v2.0空运专线,显示出货渠道 -->
<el-descriptions-item :label="$t('出货渠道')" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'">
{{channelName}}
</el-descriptions-item>
<el-descriptions-item :label="$t('始发地')"> <el-descriptions-item :label="$t('始发地')">
{{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:$t('')}} {{orderData.logisticsInfoDto?orderData.logisticsInfoDto.startTitleZh:$t('')}}
</el-descriptions-item> </el-descriptions-item>
...@@ -127,7 +131,15 @@ ...@@ -127,7 +131,15 @@
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button> <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button> <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button> <el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<!-- v2.0 -->
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='line_loop_exception'" v-hasPermi="['ecw:exception:lineLoopException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='customs_fee_not_quote_exception'" v-hasPermi="['ecw:exception:notQuoteException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='overweight_exception'" v-hasPermi="['ecw:exception:overweightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='not_shipping_channel_exception'" v-hasPermi="['ecw:exception:notChannelException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='goods_weight_exception'" v-hasPermi="['ecw:exception:goodsWeightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='in_warehousing_diff_exception'" v-hasPermi="['ecw:exception:inWarehousingException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionStatus==2&&scope.row.orderExceptionType=='stock_up_exception'" v-hasPermi="['ecw:exception:stockUpException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('查看')}}</el-button>
<el-tag style="margin-left:10px" v-if="scope.row.orderExceptionStatus==2">{{$t('已完成')}}</el-tag> <el-tag style="margin-left:10px" v-if="scope.row.orderExceptionStatus==2">{{$t('已完成')}}</el-tag>
<el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='order_superfluous_box_exception'" v-hasPermi="['ecw:exception:superfluousBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='order_lack_box_exception'" v-hasPermi="['ecw:exception:lackBox']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
...@@ -146,6 +158,14 @@ ...@@ -146,6 +158,14 @@
<el-button v-else-if="scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='order_pick_up_exception'" v-hasPermi="['ecw:exception:pickUp']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='not_customer_service_exception'" v-hasPermi="['ecw:exception:notCustomer']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button> <el-button v-else-if="scope.row.orderExceptionType=='goods_add_exception'" v-hasPermi="['ecw:exception:goodsAddException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<!-- v2.0 -->
<el-button v-else-if="scope.row.orderExceptionType=='line_loop_exception'" v-hasPermi="['ecw:exception:lineLoopException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='customs_fee_not_quote_exception'" v-hasPermi="['ecw:exception:notQuoteException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='overweight_exception'" v-hasPermi="['ecw:exception:overweightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='not_shipping_channel_exception'" v-hasPermi="['ecw:exception:notChannelException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='goods_weight_exception'" v-hasPermi="['ecw:exception:goodsWeightException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='in_warehousing_diff_exception'" v-hasPermi="['ecw:exception:inWarehousingException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
<el-button v-else-if="scope.row.orderExceptionType=='stock_up_exception'" v-hasPermi="['ecw:exception:stockUpException']" size="mini" type="text" icon="el-icon-edit" @click="handEdit(scope.row)">{{$t('处理')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -163,6 +183,8 @@ import {getOrder} from '@/api/ecw/order' ...@@ -163,6 +183,8 @@ import {getOrder} from '@/api/ecw/order'
import FilePreview from '@/components/FilePreview' import FilePreview from '@/components/FilePreview'
import {getProduct} from '@/api/ecw/product' import {getProduct} from '@/api/ecw/product'
import {getProductPriceGetPrice} from '@/api/ecw/productPrice' import {getProductPriceGetPrice} from '@/api/ecw/productPrice'
import { getChannel } from '@/api/ecw/channel';
import {getDictData, getDictDatas} from '@/utils/dict'
export default { export default {
name: "Pending", name: "Pending",
...@@ -181,7 +203,8 @@ export default { ...@@ -181,7 +203,8 @@ export default {
timers:"", //时间戳 timers:"", //时间戳
FilePreAll:[], // 预览数组 FilePreAll:[], // 预览数组
TragetPic:{}, TragetPic:{},
currencyList:[] currencyList:[],
channelName:'/'
}; };
}, },
computed:{ computed:{
...@@ -192,6 +215,9 @@ export default { ...@@ -192,6 +215,9 @@ export default {
}) })
return map return map
}, },
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
}, },
created() { created() {
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
...@@ -201,6 +227,11 @@ export default { ...@@ -201,6 +227,11 @@ export default {
this.getOrders() this.getOrders()
} }
}, },
watch:{
'orderData.channelId'(){
this.getChannel()
},
},
methods: { methods: {
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
...@@ -218,6 +249,12 @@ export default { ...@@ -218,6 +249,12 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getChannel(){
if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return
getChannel(this.order.channelId).then(res => {
this.channelName = res.data.nameZh
})
},
checkCode(data){ checkCode(data){
if(data.indexOf('+')==-1){ if(data.indexOf('+')==-1){
return '+'+data return '+'+data
...@@ -254,11 +291,22 @@ export default { ...@@ -254,11 +291,22 @@ export default {
lineId: this.orderData.logisticsInfoDto.lineId, lineId: this.orderData.logisticsInfoDto.lineId,
channelId: this.orderData.logisticsInfoDto.channelId channelId: this.orderData.logisticsInfoDto.channelId
} }
let url = '../../lineProject/product-price/edit?' + (new URLSearchParams(params)).toString() let url = ''
if([3,4].indexOf(this.orderData.transportId) > -1){
url = '../../lineProject/product-price/edit-air?' + (new URLSearchParams(params)).toString()
}else{
url = '../../lineProject/product-price/edit-sea?' + (new URLSearchParams(params)).toString()
}
getProductPriceGetPrice(queryParams).then(res=>{ getProductPriceGetPrice(queryParams).then(res=>{
console.log(res) console.log(res)
if(res.data){ if(res.data){
url = '../../lineProject/product-price/edit?action=update&id='+res.data.id if([3,4].indexOf(+this.orderData.transportId) > -1){
url = '../../lineProject/product-price/edit-air?action=update&id='+res.data.id
}else{
url = '../../lineProject/product-price/edit-sea?action=update&id='+res.data.id
}
} }
return this.$router.push(url) return this.$router.push(url)
}) })
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
{{orderData.orderNo || ''}} {{orderData.orderNo || ''}}
</el-form-item> </el-form-item>
</el-row> </el-row>
<div v-if="shopData&&orderExceptionData.orderExceptionType!='goods_add_exception'"> <div v-if="shopData&&['goods_add_exception','line_loop_exception','customs_fee_not_quote_exception','overweight_exception','stock_up_exception','in_warehousing_diff_exception'].indexOf(orderExceptionData.orderExceptionType) == -1">
<el-row> <el-row>
<el-form-item :label="$t('产品名称')+':'" > <el-form-item :label="$t('产品名称')+':'" >
{{shopData.prodTitleZh || ''}} {{shopData.prodTitleZh || ''}}
...@@ -26,12 +26,13 @@ ...@@ -26,12 +26,13 @@
<el-row> <el-row>
<el-form-item :label="$t('运输路线')+':'" > <el-form-item :label="$t('运输路线')+':'" >
<span v-if="orderData">{{ $t('') }}<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />{{ $t('') }}</span> <span v-if="orderData">{{ $t('') }}<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="orderData.transportId" />{{ $t('') }}</span>
<span v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'">{{ $t('') }}{{channelName}}{{ $t('') }}</span>
{{orderData?getRouterNameById():''}} {{orderData?getRouterNameById():''}}
</el-form-item> </el-form-item>
</el-row> </el-row>
<!-- 单证异常,发货人异常,其他异常 不显示这部分内容 --> <!-- 单证异常,发货人异常,其他异常 不显示这部分内容 -->
<div v-if="['order_doc_exception','order_consignor_exception', 'order_other_exception'].indexOf(orderExceptionData.orderExceptionType) == -1"> <div v-if="['order_doc_exception','order_consignor_exception', 'order_other_exception','line_loop_exception','customs_fee_not_quote_exception','overweight_exception','stock_up_exception','in_warehousing_diff_exception'].indexOf(orderExceptionData.orderExceptionType) == -1">
<!-- 预付异常,提货异常,代收货款是针对整个订单的 --> <!-- 预付异常,提货异常,代收货款是针对整个订单的 -->
<template v-if="['order_pay_exception','order_pick_up_exception', 'order_cod_exception','not_customer_service_exception'].indexOf(orderExceptionData.orderExceptionType) > -1"> <template v-if="['order_pay_exception','order_pick_up_exception', 'order_cod_exception','not_customer_service_exception'].indexOf(orderExceptionData.orderExceptionType) > -1">
<el-row> <el-row>
...@@ -96,7 +97,7 @@ ...@@ -96,7 +97,7 @@
<span>{{orderExceptionData.orderExceptionDetails}}</span> <span>{{orderExceptionData.orderExceptionDetails}}</span>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'||orderExceptionData.orderExceptionType!='goods_add_exception'"> <el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'">
<el-form-item :label="$t('收费参数')+':'"> <el-form-item :label="$t('收费参数')+':'">
<span>{{orderData.sumNum||0}}{{$t('')}} {{orderData.wvolume||0}}m³ {{orderData.vweight||0}}Kg {{orderData.sumQuantity||0}}{{$t('')}}</span> <span>{{orderData.sumNum||0}}{{$t('')}} {{orderData.wvolume||0}}m³ {{orderData.vweight||0}}Kg {{orderData.sumQuantity||0}}{{$t('')}}</span>
</el-form-item> </el-form-item>
...@@ -159,7 +160,7 @@ ...@@ -159,7 +160,7 @@
</el-table> </el-table>
<!-- 单证异常,发货人异常,其他异常的表格 --> <!-- 单证异常,发货人异常,其他异常的表格 -->
<el-table v-if="['order_doc_exception', 'order_consignor_exception', 'order_other_exception'].indexOf(orderExceptionData.orderExceptionType) > -1" v-loading="loading" border :data="orderData.orderItemVOList"> <el-table v-if="['order_doc_exception', 'order_consignor_exception', 'order_other_exception','line_loop_exception','customs_fee_not_quote_exception','overweight_exception','stock_up_exception','in_warehousing_diff_exception'].indexOf(orderExceptionData.orderExceptionType) > -1" v-loading="loading" border :data="orderData.orderItemVOList">
<el-table-column :label="$t('序号')" align="center" prop="id" type="index"> <el-table-column :label="$t('序号')" align="center" prop="id" type="index">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{scope.$index + 1}}</span> <span>{{scope.$index + 1}}</span>
...@@ -173,16 +174,28 @@ ...@@ -173,16 +174,28 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('填单箱数')" prop="num" /> <el-table-column :label="$t('填单箱数')" prop="num" />
<!-- v2.0 入仓特性异常 -->
<el-table-column :label="$t('填单特性')" prop="prodAttrIds">
<template slot-scope="scope">
{{getProdAtrr(scope.row.prodAtrIds)}}
</template>
</el-table-column>
<el-table-column :label="$t('入仓箱数')"> <el-table-column :label="$t('入仓箱数')">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.cartonsNum:0}} {{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.cartonsNum:0}}
</template>
</el-table-column>
<!-- v2.0 入仓特性异常 -->
<el-table-column :label="$t('入仓特性')" prop="num">
<template slot-scope="scope">
{{scope.row.warehouseInInfoVO&&scope.row.warehouseInInfoVO.prodAtrIds?getProdAtrr(scope.row.warehouseInInfoVO.prodAtrIds):''}}
</template>
</el-table-column>
<el-table-column :label="$t('方数')" prop="volume">
<template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('方数')" prop="volume">
<template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.volume:0}}
</template>
</el-table-column>
<el-table-column :label="$t('重量')" prop="weight"> <el-table-column :label="$t('重量')" prop="weight">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.weight:0}} {{scope.row.warehouseInInfoVO?scope.row.warehouseInInfoVO.weight:0}}
...@@ -314,6 +327,12 @@ ...@@ -314,6 +327,12 @@
</div> </div>
</template> </template>
</el-form-item> </el-form-item>
<!--货物重量异常-->
<el-row :span="8" v-if="orderExceptionData.orderExceptionType=='goods_weight_exception' ">
<el-form-item :label="$t('备注')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" :disabled="orderExceptionData.orderExceptionStatus==2" />
</el-form-item>
</el-row>
<!--预付异常的备选需要根据接口数据过滤--> <!--预付异常的备选需要根据接口数据过滤-->
<el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'||orderExceptionData.orderExceptionType=='not_customer_service_exception'"> <el-row v-if="orderExceptionData.orderExceptionType=='order_pay_exception'||orderExceptionData.orderExceptionType=='not_customer_service_exception'">
<el-form-item :label="$t('处理结果')+':'" required> <el-form-item :label="$t('处理结果')+':'" required>
...@@ -324,7 +343,7 @@ ...@@ -324,7 +343,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row v-else-if="orderExceptionData.orderExceptionType!='order_miss_exception'&&orderExceptionData.orderExceptionType!='order_superfluous_goods_exception'&&orderExceptionData.orderExceptionType!='order_in_water_exception'&&orderExceptionData.orderExceptionType!='order_damage_exception'"> <el-row v-else-if="['order_miss_exception','order_superfluous_goods_exception', 'order_in_water_exception','order_damage_exception','goods_weight_exception','not_shipping_channel_exception'].indexOf(orderExceptionData.orderExceptionType) == -1">
<el-form-item :label="$t('处理结果')+':'" required> <el-form-item :label="$t('处理结果')+':'" required>
<el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable @change="handlerResultChange" :disabled="orderExceptionData.orderExceptionStatus==2"> <el-select v-model="handlerParams.orderExceptionHandlerResult" :placeholder="$t('请选择')" clearable @change="handlerResultChange" :disabled="orderExceptionData.orderExceptionStatus==2">
<template v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"> <template v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')">
...@@ -407,13 +426,13 @@ ...@@ -407,13 +426,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row :span="8" v-if="orderExceptionData.orderExceptionType!='not_customer_service_exception'&&orderExceptionData.orderExceptionType!='goods_add_exception'"> <el-row :span="8" v-if="orderExceptionData.orderExceptionType!='not_customer_service_exception'&&orderExceptionData.orderExceptionType!='goods_add_exception'&&orderExceptionData.orderExceptionType!='goods_weight_exception'">
<el-form-item :label="$t('备注')+':'" size="medium"> <el-form-item :label="$t('备注')+':'" size="medium">
<el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" :disabled="orderExceptionData.orderExceptionStatus==2" /> <el-input style="width: 500px;" type="textarea" v-model="handlerParams.orderExceptionHandlerRemark" :disabled="orderExceptionData.orderExceptionStatus==2" />
</el-form-item> </el-form-item>
</el-row> </el-row>
<div v-if="orderExceptionData.orderExceptionType=='order_miss_exception'||orderExceptionData.orderExceptionType=='order_superfluous_goods_exception'||orderExceptionData.orderExceptionType=='order_in_water_exception'||orderExceptionData.orderExceptionType=='order_damage_exception'"> <div v-if="['order_miss_exception','order_superfluous_goods_exception', 'order_in_water_exception','order_damage_exception','goods_weight_exception','not_shipping_channel_exception'].indexOf(orderExceptionData.orderExceptionType) > -1">
<el-row > <el-row >
<el-form-item :label="$t('状态')+':'"> <el-form-item :label="$t('状态')+':'">
<el-radio-group v-model="handlerParams.orderExceptionStatus" @change="changeExceptionStatus" :disabled="orderExceptionData.orderExceptionStatus==2"> <el-radio-group v-model="handlerParams.orderExceptionStatus" @change="changeExceptionStatus" :disabled="orderExceptionData.orderExceptionStatus==2">
...@@ -431,7 +450,14 @@ ...@@ -431,7 +450,14 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row > <el-row >
<el-form-item :label="$t('赔付金额')+':'" size="medium" required v-if="handlerParams.orderExceptionStatus==2"> <el-form-item :label="$t('赔付金额')+':'" size="medium" required v-if="orderExceptionData.orderExceptionType=='goods_weight_exception'&&handlerParams.orderExceptionStatus==2&&handlerParams.orderExceptionHandlerResult!='customer_not_pay'">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in currencyList "
:key="dict.id" :label="dict.titleZh" :value="dict.id"/>
</el-select>
</el-form-item>
<el-form-item :label="$t('赔付金额')+':'" size="medium" required v-else-if="handlerParams.orderExceptionStatus==2&&orderExceptionData.orderExceptionType!='goods_weight_exception'&&orderExceptionData.orderExceptionType!='not_shipping_channel_exception'">
<el-input style="width: 100px;" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2" /> <el-input style="width: 100px;" type="text" v-model="handlerParams.amount" :disabled="orderExceptionData.orderExceptionStatus==2" />
<el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable :disabled="orderExceptionData.orderExceptionStatus==2"> <el-select v-model="handlerParams.currency" style="width: 100px;margin-left: 10px;" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in currencyList " <el-option v-for="dict in currencyList "
...@@ -439,13 +465,42 @@ ...@@ -439,13 +465,42 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row> </el-row>
<el-row> <el-row v-if="handlerParams.orderExceptionStatus==1">
<el-form-item :label="$t('查明原因')+':'" required v-if="handlerParams.orderExceptionStatus==1"> <el-form-item :label="$t('查明原因')+':'" required v-if="orderExceptionData.orderExceptionType!='not_shipping_channel_exception'">
<el-select v-model="handlerParams.orderExceptionHandlerResult" clearable :disabled="orderExceptionData.orderExceptionStatus==2"> <el-select v-model="handlerParams.orderExceptionHandlerResult" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')" <el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/> :key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="$t('查明原因')+':'" required v-if="orderExceptionData.orderExceptionType=='not_shipping_channel_exception'">
<el-select v-model="handlerParams.orderExceptionHandlerResult" clearable :disabled="orderExceptionData.orderExceptionStatus==2">
<el-option v-for="dict in getDictDatas(orderExceptionData.orderExceptionType+'_result')"
:key="dict.value" :label="dict.label" :value="dict.value"/>
</el-select>
</el-form-item>
<div v-if="orderExceptionData.orderExceptionType=='not_shipping_channel_exception'&&handlerParams.orderExceptionHandlerResult=='change_channel'">
<el-form-item :label="$t('出货渠道')" prop="channelId" v-if="getDictData(DICT_TYPE.ECW_TRANSPORT_TYPE, orderData.transportId).cssClass == 'channel'">
<!--嵌套一个form来脱离disabled控制-->
<el-form>
<selector
v-model="handlerParams.channelId"
:options="channelList"
value-field="channelId"
:label-field="$l(null, 'name')"
></selector>
</el-form>
</el-form-item>
<el-form-item :label="$t('选择线路')" prop="lineId">
<el-input :value="selectedRouter ? $l(selectedRouter, 'startTitle') + ' > ' + $l(selectedRouter, 'destTitle') : ''" disabled :placeholder="$t('请在右侧选择线路')"></el-input>
</el-form-item>
<!--select是原生组件,不受el-formdisabled控制-->
<select size="5" v-model="handlerParams.lineId" style="min-width: 300px; border:1px solid #DCDFE6; border-radius:4px">
<option v-for="item in routerList" :value="item.id" :key="item.id">
{{$l(item, 'startTitle')}} >> {{$l(item, 'destTitle')}}
(<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="item.transportType"></dict-tag>)
</option>
</select>
</div>
</el-row> </el-row>
</div> </div>
</el-form> </el-form>
...@@ -493,10 +548,16 @@ ...@@ -493,10 +548,16 @@
import {cancelProcessInstance} from '@/api/bpm/processInstance' import {cancelProcessInstance} from '@/api/bpm/processInstance'
import {getCustomer} from '@/api/ecw/customer' import {getCustomer} from '@/api/ecw/customer'
import ProductSelector from '@/components/ProductSelector' import ProductSelector from '@/components/ProductSelector'
import {getProductAttrList} from '@/api/ecw/productAttr'
import {getChannelList} from '@/api/ecw/channel'
import Selector from '@/components/Selector'
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {getTradeCityList} from '@/api/ecw/region'
export default { export default {
name: "PrepayDeal", name: "PrepayDeal",
components: { components: {
FileUpload, WorkFlow,FilePreview,ProductSelector FileUpload, WorkFlow,FilePreview,ProductSelector,Selector
}, },
data() { data() {
return { return {
...@@ -531,20 +592,28 @@ ...@@ -531,20 +592,28 @@
customerData:{},//归属客户 customerData:{},//归属客户
customerServiceList:[],//客户经理 customerServiceList:[],//客户经理
productId1:null, productId1:null,
productId2:null productId2:null,
productAttrList:[], // 商品属性
channelName:'/',
channelList: [], // 出货取到
tradeCityList:[]
}; };
}, },
created() { async created() {
if(this.$route.query.id){ if(this.$route.query.id){
this.orderExceptionId = this.$route.query.id this.orderExceptionId = this.$route.query.id
this.handlerParams.orderExceptionId = this.$route.query.id this.handlerParams.orderExceptionId = this.$route.query.id
this.getList() this.getList()
} }
this.channelList = (await getChannelList()).data
this.productAttrList = (await getProductAttrList()).data
listServiceUser().then(r=>{ listServiceUser().then(r=>{
this.customerServiceList = r.data; this.customerServiceList = r.data;
}) })
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
this.tradeCityList = (await getTradeCityList()).data
}, },
watch:{ watch:{
'handlerParams.orderExceptionHandlerResult'(val){ 'handlerParams.orderExceptionHandlerResult'(val){
...@@ -567,6 +636,12 @@ ...@@ -567,6 +636,12 @@
}) })
this.region = region this.region = region
}) })
},
'orderData.channelId'(){
this.getChannel()
},
'orderData.transportId'(){
this.getOpenedRouterList()
} }
}, },
computed: { computed: {
...@@ -577,6 +652,15 @@ ...@@ -577,6 +652,15 @@
}) })
return map return map
}, },
// 是否已完成入仓
inWarehouse(){
return (!!this.orderData.inWarehouseState && this.orderData.inWarehouseState > 201) || this.orderData.shipmentState > 0
},
selectedRouter(){
// otherService 1 集运服务 2 送货上门 3 非控货订单代收货款 4 海外仓 5 提货异常
if(!this.handlerParams.lineId)return null
return this.routerList.find(item => item.id == this.handlerParams.lineId)
},
shopData(){ shopData(){
if(this.orderExceptionData.orderItemId && this.orderData && this.orderData.orderItemVOList){ if(this.orderExceptionData.orderItemId && this.orderData && this.orderData.orderItemVOList){
if(this.orderExceptionData.orderExceptionType=='goods_add_exception'&&!this.handlerParams.productId){ if(this.orderExceptionData.orderExceptionType=='goods_add_exception'&&!this.handlerParams.productId){
...@@ -586,9 +670,34 @@ ...@@ -586,9 +670,34 @@
} }
return this.orderData.orderItemVOList.find(item => item.orderItemId == this.orderExceptionData.orderItemId) return this.orderData.orderItemVOList.find(item => item.orderItemId == this.orderExceptionData.orderItemId)
} }
} },
getDictData(){
return (type, value) => getDictData(type, value) || {}
},
exportCityList(){
return this.tradeCityList.filter(item => item.type == 2 || item.type == 3)
},
importCityList(){
return this.tradeCityList.filter(item => item.type == 1 || item.type == 3)
},
exportCityIds(){
let ids = []
this.exportCityList.forEach(item => {
ids.push(item.id)
})
return ids
},
importCityIds(){
let ids = []
this.importCityList.forEach(item => {
ids.push(item.id)
})
return ids
},
}, },
methods: { methods: {
getDictData,
onTableMounted(e){ onTableMounted(e){
// console.warn('onTableMounted', e) // console.warn('onTableMounted', e)
}, },
...@@ -598,6 +707,23 @@ ...@@ -598,6 +707,23 @@
if(label.length>0) return label[0].titleZh if(label.length>0) return label[0].titleZh
return '' return ''
}, },
getProdAtrr(ids){
if(!ids) return ''
let attr = []
let attrIds = ids.split(',')
this.productAttrList.forEach(item=>{
if(attrIds.indexOf(item.id)!==-1){
attr.push(this.$l(item, 'attrName'))
}
})
return attr.join(',')
},
getChannel(){
if(!this.order || !this.order.channelId || this.order.transportId == 1 || this.order.transportId == 2) return
getChannel(this.order.channelId).then(res => {
this.channelName = res.data.nameZh
})
},
getList() { getList() {
let that = this let that = this
that.loading = true; that.loading = true;
...@@ -606,7 +732,7 @@ ...@@ -606,7 +732,7 @@
// that.orderExceptionData.orderExceptionType = 'order_other_exception' // that.orderExceptionData.orderExceptionType = 'order_other_exception'
// that.orderExceptionData.orderExceptionType = 'order_miss_exception' // that.orderExceptionData.orderExceptionType = 'order_miss_exception'
// that.orderExceptionData.orderExceptionType = 'not_customer_service_exception' // that.orderExceptionData.orderExceptionType = 'not_customer_service_exception'
// that.orderExceptionData.orderExceptionType = 'goods_add_exception' // that.orderExceptionData.orderExceptionType = 'not_shipping_channel_exception'
that.loading = false; that.loading = false;
that.orderId = response.data.orderId that.orderId = response.data.orderId
that.getOrderData() that.getOrderData()
...@@ -627,12 +753,36 @@ ...@@ -627,12 +753,36 @@
}); });
}, },
// 获取路线
getOpenedRouterList(){
let params = {}
if(this.orderData.departureVO&&this.orderData.departureVO.departureId){
params.startCityId = this.orderData.departureVO.departureId
}
if(this.orderData.objectiveVO&&this.orderData.objectiveVO.objectiveId){
params.destCityId = this.orderData.objectiveVO.objectiveId
}
if(this.orderData.transportId){
params.transportType = this.handlerParams.transportId
}
// 始发,目的和运输方式都没有的时候不获取
if(!params.startCityId && !params.destCityId && !params.transportType) return false
getOpenedRouterList(params).then(res => {
this.routerList = res.data.filter(item => {
return this.exportCityIds.indexOf(item.startCityId) > -1 && this.importCityIds.indexOf(item.destCityId) > -1
})
}
)
},
changeExceptionStatus(){ changeExceptionStatus(){
this.$set(this.handlerParams,'orderExceptionHandlerResult','') this.$set(this.handlerParams,'orderExceptionHandlerResult','')
}, },
getOrderData(){ getOrderData(){
getOrder(this.orderId).then(response => { getOrder(this.orderId).then(response => {
this.orderData = response.data this.orderData = response.data
this.handlerParams.channelId = this.orderData.channelId
this.handlerParams.lineId = this.orderData.lineId
if(response.data.customerId){ if(response.data.customerId){
this.getCustomerData(response.data.customerId) this.getCustomerData(response.data.customerId)
} }
......
<template> <template>
<div style="display: inline-block;margin-right: 10px"> <el-dialog
<el-button size="mini" @click="visible = true" type="text">{{ title }}</el-button> :title="title + ' - ' + warehousing.orderNo"
<el-dialog :visible.sync="visible"
:title="title + ' - ' + warehousing.orderNo" width="1280px"
:visible.sync="visible" >
width="1280px" <el-form ref="form" :model="form" :rules="formRules" label-width="80px">
> <el-descriptions border :column="2">
<el-tabs v-model="activeName" type="card"> <el-descriptions-item>
<el-tab-pane :label="edit ? $t('货物修改') : $t('货物入仓')" name="first"> <template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<el-form ref="form" :model="form" :rules="formRules" label-width="80px"> <span style="min-width: 200px;margin-right: 15px;display: inline-block">
<el-descriptions border :column="2"> {{ warehousing.prodTitleZh }}
<el-descriptions-item> </span>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template> </el-descriptions-item>
<span style="min-width: 200px;margin-right: 15px;display: inline-block"> <el-descriptions-item>
<product-selector v-if="!order.parentOrderId && !isAdd" v-model="form.prodId" @change="onProductChange" determined/> <template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<span v-else>{{ warehousing.prodTitleZh }}</span> <span>{{ warehousing.prodTitleEn }}</span>
</span> </el-descriptions-item>
<el-button v-if="!order.parentOrderId && !isAdd" type="text" @click="isShowProduct = true">添加新商品</el-button> <el-descriptions-item :label="$t('品牌')">
</el-descriptions-item> <template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
<el-descriptions-item> <el-form-item required label="" prop="brand" label-width="0">
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template> <el-select
<product-selector v-if="!order.parentOrderId && !isAdd" lang="En" v-model="form.prodId" @change="onProductChange" determined/> v-model="form.brand"
<span v-else>{{ warehousing.prodTitleEn }}</span> :placeholder="$t('可修改')"
</el-descriptions-item> filterable
<el-descriptions-item :label="$t('品牌')"> remote
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template> @change="handleBrandChange"
<el-form-item required label="" prop="brand" label-width="0"> :remote-method="getProductBrandPage"
<el-select disabled>
v-model="form.brand" <el-option
:placeholder="$t('可修改')" v-for="item in brandList"
filterable :key="item.id"
remote :label="item.titleZh"
@change="handleBrandChange" :value="item.id">
:remote-method="getProductBrandPage" </el-option>
clearable> </el-select>
<el-option </el-form-item>
v-for="item in brandList" </el-descriptions-item>
:key="item.id" <el-descriptions-item :label="$t('是否备案')">
:label="item.titleZh" <template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template>
:value="item.id"> {{ isBeian }}
</el-option> </el-descriptions-item>
</el-select> <el-descriptions-item :label="$t('收费模式')">
</el-form-item> <template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template>
</el-descriptions-item> {{ feeType }}
<el-descriptions-item :label="$t('是否备案')"> </el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template> <el-descriptions-item :label="$t('填单参数')">
{{ isBeian }} {{ $t('箱数:') }}<span>{{ warehousing.num }}</span><br>
</el-descriptions-item> {{ $t('体积:') }}<span>{{ warehousing.volume }}</span><br>
<el-descriptions-item :label="$t('收费模式')"> {{ $t('重量:') }}<span>{{ warehousing.weight }}</span>Kg
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template> </el-descriptions-item>
{{ feeType }} </el-descriptions>
</el-descriptions-item> <el-row>
<el-descriptions-item :label="$t('填单参数')">{{ $t('箱数:') }}<el-input size="mini" v-if="edit" v-model="warehousing.num" style="display: inline-block;width: 100px"></el-input> <el-col :span="8">
<span v-else>{{ warehousing.num }}</span><br>{{ $t('体积:') }}<el-input size="mini" v-if="edit" v-model="warehousing.volume" style="display: inline-block;width: 100px"></el-input> <el-form-item :label="$t('材质')" style="margin-top: 20px">
<span v-else>{{ warehousing.volume }}</span><br>{{ $t('重量:') }}<el-input size="mini" v-if="edit" v-model="warehousing.weight" style="display: inline-block;width: 100px"></el-input> <dict-tag :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" :value="orderItemB.material" clearable></dict-tag>
<span v-else>{{ warehousing.weight }}</span>Kg </el-form-item>
</el-descriptions-item> </el-col>
</el-descriptions> <el-col :span="16">
<el-row> <el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-col :span="8"> <el-checkbox-group v-model="form.prodAttrIds" disabled>
<el-form-item :label="$t('材质')" style="margin-top: 20px"> <el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material" clearable></dict-selector> </el-checkbox-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="16"> </el-row>
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px"> <!--<el-form-item :label="$t('入仓时间')" v-if="!edit">
<el-checkbox-group v-model="form.prodAttrIds"> {{form.inTime}}
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox> </el-form-item>-->
</el-checkbox-group> </el-form>
</el-form-item>
</el-col> <el-card class="box-card">
</el-row> <div slot="header" class="clearfix">
<el-form-item :label="$t('入仓时间')" v-if="!edit"> <span>{{ $t('入仓记录') }}</span>
<el-date-picker v-model="form.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> <el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete" :disabled="form.table.length < protectRowCount"></el-button>
</el-form-item> <el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{ $t('入仓记录') }}</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete" :disabled="form.table.length < protectRowCount"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd()"></el-button>
</div>
<el-form ref="tableForm" :rules="tableFormRules" :model="form" size="mini">
<el-table
:data="form.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.cartonsNum">
<el-input v-model="form.table[$index].cartonsNum" placeholder="" @blur="handleVolume($index)" :disabled="$index < protectRowCount">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, form.table[$index].specificationType) }}</span>
</el-input>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="form.table[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('包装类型') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form.table[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].volume" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].weight" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="130px">
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.quantityAll">
<el-input :disabled="$index < protectRowCount" v-model.number="form.table[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}">
<el-form-item>
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-if="visible"
v-model="form.table[$index].orderLocationBackVOList"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
v-if="$index >= protectRowCount"
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
<el-tab-pane :label="$t('添加新品名')" name="second" v-if="!edit">
<el-form ref="form1" :model="form1" :rules="formRules" label-width="80px">
<el-descriptions border :column="2">
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('中文品名') }}</template>
<el-form-item required label="" prop="prodId" label-width="0">
<product-selector v-model="form1.prodId" @change="onProductChange1"/>
<el-button type="text" @click="isShowProduct = true" style="margin-left: 15px">添加新商品</el-button>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label"><span style="color: red">*</span>{{ $t('英文品名') }}</template>
<el-form-item required label="" prop="prodId" label-width="0">
<product-selector lang="En" v-model="form1.prodId" @change="onProductChange1"/>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('品牌')">
<template slot="label"><span style="color: red">*</span>{{ $t('品牌') }}</template>
<el-form-item required label="" prop="brand" label-width="0">
<el-select
v-model="form1.brand"
:placeholder="$t('可修改')"
filterable
remote
@change="handleBrandChange"
:remote-method="getProductBrandPage1"
clearable>
<el-option
v-for="item in brandList1"
:key="item.id"
:label="item.titleZh"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-descriptions-item>
<el-descriptions-item :label="$t('是否备案')">
<template slot="label"><span style="color: red">*</span>{{ $t('是否备案') }}</template>
{{ isBeian1 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('收费模式')">
<template slot="label"><span style="color: red">*</span>{{ $t('收费模式') }}</template>
{{ feeType1 }}
</el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">{{ $t('非填单货物') }}</el-descriptions-item>
</el-descriptions>
<el-row>
<el-col :span="8">
<el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form1.material" clearable></dict-selector>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form1.prodAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('入仓时间')">
<el-date-picker v-model="form1.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>{{ $t('入仓记录') }}</span>
<el-button style="float: right;margin-left: 15px" size="mini" type="primary" icon="el-icon-minus" circle @click="handleDelete(1)"></el-button>
<el-button style="float: right" size="mini" type="primary" icon="el-icon-plus" circle @click="handleAdd(1)"></el-button>
</div>
<el-form ref="tableForm1" :model="form1" :rules="tableFormRules" size="mini">
<el-table
:data="form1.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">
{{ form1.table[$index].cartonsNum }}
{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}
</span>
<el-input v-else v-model="form1.table[$index].cartonsNum" placeholder="">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}</span>
</el-input>
<dict-selector :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="form1.table[$index].specificationType" @change="handleVolume($index, 1)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('包装类型') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ getDictDataLabel(DICT_TYPE.ECW_PACKAGING_TYPE, form1.table[$index].unit) }}</span>
<dict-selector v-else :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form1.table[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[0] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[1] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].boxGauge ? form1.table[$index].boxGauge.split('*')[2] : '' }}</span>
<el-input v-else type="number" v-model="form1.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index, 1)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].volume }}</span>
<el-input v-else type="number" v-model="form1.table[$index].volume" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].weight }}</span>
<el-input v-else type="number" v-model="form1.table[$index].weight" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="130px">
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].quantityAll }}</span>
<el-input v-else v-model.number="form1.table[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}">
<el-form-item>
<span v-if="form1.table[$index].id">{{ form1.table[$index].expressNo }}</span>
<el-input v-else v-model="form1.table[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-model="form1.table[$index].orderLocationBackVOList"
:readonly="form1.table[$index].id && !edit"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form1.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index, 1)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">删除</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
</el-tab-pane>
</el-tabs>
<div v-if="edit && order.status !== 3">
<h2>{{ $t('审批流程') }}</h2>
<work-flow xmlkey="free_apply" v-model="selectedUsers" />
<!-- <div>选择的用户:{{selectedUsers}}</div>-->
</div> </div>
<el-form ref="tableForm" :rules="tableFormRules" :model="form" size="mini">
<el-table
:data="form.table"
style="width: 100%">
<el-table-column :label="$t('箱数')" width="150px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('箱数') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.cartonsNum">
<el-input v-model="form.table[$index].cartonsNum" placeholder="" @blur="handleVolume($index)" :disabled="$index < protectRowCount">
<span slot="append">{{ getDictDataLabel(DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE, form.table[$index].specificationType) }}</span>
</el-input>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.WAREHOUSING_SPECIFICATION_TYPE" v-model="form.table[$index].specificationType" @change="handleVolume($index)"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('包装类型')" width="100px">
<template v-slot:header>
<span style="color: red">*</span>{{ $t('包装类型') }}</template>
<template v-slot="{r,c,$index}">
<el-form-item>
<dict-selector :disabled="$index < protectRowCount" :type="DICT_TYPE.ECW_PACKAGING_TYPE" v-model="form.table[$index].unit"></dict-selector>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="长(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge1">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge1" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="宽(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge2">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge2" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="高(cm)">
<template v-slot:header>
<span>{{ $t('') }}</span>(cm)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.boxGauge3">
<el-input :disabled="$index < protectRowCount" type="number" v-model="form.table[$index].boxGauge3" placeholder="" @blur="handleVolume($index)"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="体积(m³)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('体积') }}</span>(m³)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.volume">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].volume" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column label="重量(Kg)">
<template v-slot:header>
<span style="color: red">*</span> <span>{{ $t('重量') }}</span>(Kg)
</template>
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.weight">
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].weight" placeholder="" type="number"></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('数量')" width="130px">
<template v-slot="{r,c,$index}">
<el-form-item :rules="tableFormRules.quantityAll">
<el-input :disabled="$index < protectRowCount" v-model.number="form.table[$index].quantityAll" placeholder="">
<template slot="append">{{ $t('') }}</template>
</el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('快递单号')">
<template v-slot="{r,c,$index}">
<el-form-item>
<el-input :disabled="$index < protectRowCount" v-model="form.table[$index].expressNo" placeholder=""></el-input>
</el-form-item>
</template>
</el-table-column>
<el-table-column :label="$t('储位')" prop="orderLocationBackVOList" width="150px">
<template v-slot="{ row, column, $index }">
<warehouse-area-select
v-if="visible"
v-model="form.table[$index].orderLocationBackVOList"
:order-id="orderId"
:order-item-id="warehousing.orderItemId"
:warehouse-in-id="form.table[$index].id"
:warehouse-id="warehouseId"
:is-editing="edit"></warehouse-area-select>
</template>
</el-table-column>
<el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}">
<el-popconfirm
v-if="$index >= protectRowCount"
title="确定要删除该行记录吗?"
@confirm="handleDeleteRow($index)"
>
<template v-slot:reference>
<el-button size="mini" type="danger">{{$t('删除')}}</el-button>
</template>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
</el-form>
</el-card>
<span slot="footer"> <span slot="footer">
<template v-if="!isEditing"> <el-button type="primary" @click="handleSubmit">{{ $t('完成打包') }}</el-button>
<el-button @click="handleClose">{{ $t('关 闭') }}</el-button> <el-button @click="handleClose">{{ $t('返回')}}</el-button>
<el-button type="primary" @click="handleSubmit()">{{ edit ? $t('确认修改') : $t('提 交') }}</el-button>
</template>
<template v-else>
<el-button type="primary" @click="$router.push('/bpm/process-instance/detail?id=' + formId)">{{ $t('审核中') }}</el-button>
<el-button type="primary" @click="handleCancelProcessInstance">{{ $t('取消审核') }}</el-button>
<el-button @click="handleClose">{{ $t('返回') }}</el-button>
</template>
<template v-else>
</template>
</span> </span>
</el-dialog> </el-dialog>
<!-- 对话框(添加 / 修改) -->
<el-dialog title="添加商品" :visible.sync="isShowProduct" width="550px" append-to-body>
<el-form ref="productForm" :model="productForm" :rules="productRules" label-width="110px">
<el-form-item :label="$t('商品类型')" prop="typeId">
<el-select v-model="productForm.typeId" :placeholder="$t('选择商品类型')" clearable>
<el-option v-for="types in typeList" :key="types.id" :label="types.titleZh" :value="types.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('中文标题')" prop="titleZh">
<el-input v-model="productForm.titleZh" :placeholder="$t('请输入中文标题')" />
</el-form-item>
<el-form-item :label="$t('英文标题')" prop="titleEn">
<el-input v-model="productForm.titleEn" :placeholder="$t('请输入英文标题')" />
</el-form-item>
<el-form-item :label="$t('商品特性')" prop="attrArray">
<el-select v-model="productForm.attrArray" :placeholder="$t('选择商品特性')" clearable multiple>
<el-option v-for="attr in attrList" :key="attr.id" :label="attr.attrName" :value="attr.id" />
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="productSubmit">{{$t('确定')}}</el-button>
<el-button @click="productCancel">{{$t('取消')}}</el-button>
</div>
</el-dialog>
</div>
</template> </template>
<script> <script>
...@@ -470,13 +209,13 @@ import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBr ...@@ -470,13 +209,13 @@ import {getFeeTypeByOrderProduct, getProductBrankPage} from "@/api/ecw/productBr
import {cancelProcessInstance} from "@/api/bpm/processInstance" import {cancelProcessInstance} from "@/api/bpm/processInstance"
import WorkFlow from "@/components/WorkFlow" import WorkFlow from "@/components/WorkFlow"
import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict" import {DICT_TYPE, getDictDataLabel, getDictDatas} from "@/utils/dict"
import {orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order" import {finishPacked, orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr" import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType" import {getProductTypeList} from "@/api/ecw/productType"
import {addProduct} from "@/api/ecw/product" import {addProduct} from "@/api/ecw/product"
export default { export default {
name: "Warehouse", name: "Package",
components: { components: {
ProductSelector, ProductSelector,
...@@ -493,15 +232,17 @@ export default { ...@@ -493,15 +232,17 @@ export default {
type: Object, type: Object,
default: undefined default: undefined
}, },
// 是否集运
isJiyun: { isJiyun: {
type: Boolean, type: Boolean,
default: false default: false
}, },
// 入仓修改 // 是否修改
edit: { edit: {
type: Boolean, type: Boolean,
default: false default: false
}, },
// 订单信息中的商品项
orderItemA: { orderItemA: {
type: Object, type: Object,
default: () => { default: () => {
...@@ -512,6 +253,7 @@ export default { ...@@ -512,6 +253,7 @@ export default {
} }
} }
}, },
// 入仓的商品项
orderItemB: { orderItemB: {
type: Object, type: Object,
default: () => { default: () => {
...@@ -691,7 +433,9 @@ export default { ...@@ -691,7 +433,9 @@ export default {
attrList: [] attrList: []
} }
}, },
created() {
this.visible = true
},
methods: { methods: {
init(){ init(){
this.form.brandType = this.warehousing.brandType this.form.brandType = this.warehousing.brandType
...@@ -758,115 +502,39 @@ export default { ...@@ -758,115 +502,39 @@ export default {
}, 0) }, 0)
}, },
handleSubmit() { handleSubmit() {
if (this.activeName !== "first"){ if (this.form.prodAttrIds.indexOf(4) !== -1) {
// 添加非填单货物 return this.$notify({
if (this.form1.prodAttrIds.indexOf(4) !== -1) { title: this.$t('提示'),
return this.$notify({ message: this.$t("订单包含不接受货物,请检查"),
title: this.$t('提示'), type: 'warning'
message: this.$t("订单包含不接受货物,请检查"),
type: 'warning'
})
}
this.$refs['form1'].validate(valid => {
this.$refs['tableForm1'].validate(valid1 => {
if (!valid || !valid1) {
return
}
return orderWarehouseIn({
...this.form1,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: undefined,
orderNo: this.warehousing.orderNo,
prodAttrIds: this.form.prodAttrIds.join(','),
orderWarehouseInItemDoList: this.form1.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
})
}).then(r => {
if (r.data) {
this.$message.success('新增入仓成功')
this.handleClose()
} else {
this.$message.success('新增入仓失败')
}
})
})
}) })
} else { }
if (this.form.prodAttrIds.indexOf(4) !== -1) { this.$refs['form'].validate(valid => {
return this.$notify({ this.$refs['tableForm'].validate(valid1 => {
title: this.$t('提示'), if (!valid || !valid1) {
message: this.$t("订单包含不接受货物,请检查"), return
type: 'warning' }
}) // 首次入仓、入仓补充
} return finishPacked({
this.$refs['form'].validate(valid => { orderId: this.warehousing.orderId,
this.$refs['tableForm'].validate(valid1 => { orderItemId: this.warehousing.orderItemId,
if (!valid || !valid1) { orderWarehouseInItemDtoList: this.form.table.map(e => {
return return {
} ...e,
if (this.edit) { boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
// 入仓修改 orderLocationCreateReqVOList: e.orderLocationBackVOList
return orderWarehouseInUpdateApply({ }
...this.form, }),
brandType: this.warehousing.brandType, }).then(r => {
orderId: this.warehousing.orderId, if (r.data) {
orderItemId: this.warehousing.orderItemId, this.$message.success('打包成功')
orderNo: this.warehousing.orderNo, this.handleClose()
num: this.warehousing.num,
volume: (+this.warehousing.volume)?.toFixed(2) || '',
weight: (+this.warehousing.weight)?.toFixed(2) || '',
prodId: this.form.prodId,
prodAttrIds: this.form.prodAttrIds.join(','),
"orderWarehouseInUpdateItemDoList": this.form.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
copyUserId: this.selectedUsers
}).then(r => {
if (r.data) {
this.$message.success(r.msg || '入仓修改发起成功')
this.handleClose()
} else {
this.$message.success(r.msg || '入仓修改发起失败')
}
})
} else { } else {
// 首次入仓、入仓补充 this.$message.success('打包失败')
return orderWarehouseIn({
...this.form,
brandType: this.warehousing.brandType,
orderId: this.warehousing.orderId,
orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined,
prodAttrIds: this.form.prodAttrIds.join(','),
orderWarehouseInItemDoList: this.form.table.map(e => {
return {
...e,
boxGauge: e.boxGauge1 + '*' + e.boxGauge2 + '*' + e.boxGauge3,
orderLocationCreateReqVOList: e.orderLocationBackVOList
}
}),
}).then(r => {
if (r.data) {
this.$message.success('入仓成功')
this.handleClose()
} else {
this.$message.success('入仓失败')
}
})
} }
}) })
}) })
} })
}, },
handleCancelProcessInstance(){ handleCancelProcessInstance(){
this.$prompt('请输入取消原因?', this.$t("取消流程"), { this.$prompt('请输入取消原因?', this.$t("取消流程"), {
......
...@@ -78,23 +78,23 @@ ...@@ -78,23 +78,23 @@
prop="createTime" prop="createTime"
:label="$t('打包状态')"> :label="$t('打包状态')">
<template v-slot="{row}"> <template v-slot="{row}">
待完善 <dict-tag :type="DICT_TYPE.ORDER_ITEM_PACK_STATUS" :value="wareItemPackStatus(row.orderItemId)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="address" prop="address"
:label="$t('操作')"> :label="$t('操作')">
<template v-slot="{ row, column, $index }"> <template v-slot="{ row, column, $index }">
<el-button size="mini" type="warning" @click="$alert('TODO')">{{$t('无需打包')}}</el-button> <el-button v-if="row.packStatus == 1" size="mini" type="warning" @click="noNeedPack(row)">{{$t('无需打包')}}</el-button>
<el-button size="mini" type="primary" @click="$router.push(`package?orderId=${row.orderId}&orderItemId=${row.orderItemId}`)">{{$t('打包')}}</el-button> <el-button v-if="row.packStatus == 1" size="mini" type="primary" @click="package(row, $t('打包'))">{{$t('打包')}}</el-button>
<el-button size="mini" type="primary" @click="$router.push(`package?orderId=${row.orderId}&orderItemId=${row.orderItemId}`)">{{$t('修改打包')}}</el-button> <el-button v-else size="mini" type="primary" @click="package(row, $t('修改打包'))">{{$t('修改打包')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<h2 v-if="orderSpecialNeeds.length > 0">{{$t('特殊需求')}}</h2> <!--<h2 v-if="orderSpecialNeeds.length > 0">{{$t('特殊需求')}}</h2>-->
<el-form ref="form" :model="form" label-width="200px"> <el-form ref="form" :model="form" label-width="200px">
<el-form-item :label="$i18n.locale === 'en_US' ? item.labelEn : item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value" style="width: 600px"> <!--<el-form-item :label="$i18n.locale === 'en_US' ? item.labelEn : item.label" v-for="(item, index) in orderSpecialNeeds" :key="item.value" style="width: 600px">
<el-input v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoney" :placeholder="$t('请输入') + ($i18n.locale === 'en_US' ? item.labelEn : item.label)"> <el-input v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoney" :placeholder="$t('请输入') + ($i18n.locale === 'en_US' ? item.labelEn : item.label)">
<el-select v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoneyCurrency" :placeholder="$t('请选择')" slot="append" style="width: 100px"> <el-select v-model="form.orderSpecialNeedReceivableReqVoList[index].receivableMoneyCurrency" :placeholder="$t('请选择')" slot="append" style="width: 100px">
<el-option <el-option
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
</el-option> </el-option>
</el-select> </el-select>
</el-input> </el-input>
</el-form-item> </el-form-item>-->
<h2>{{$t('订单数据')}}</h2> <h2>{{$t('订单数据')}}</h2>
<el-form-item :label="$t('总方数')" style="width: 380px"> <el-form-item :label="$t('总方数')" style="width: 380px">
...@@ -124,22 +124,23 @@ ...@@ -124,22 +124,23 @@
<span style="font-size: 18px">{{$t('入仓影像')}}</span> <span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div> </div>
<div> <div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.urls" ></image-and-video-upload> <image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.exceptionUrls" ></image-and-video-upload>
</div> </div>
</el-card> </el-card>
<div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)"> <div style="text-align: center;margin-top: 15px">
<el-button @click="escapeBol = true;" type="primary">{{$t('转异')}}</el-button> <el-button @click="escapeBol = true;" type="primary">{{$t('转异')}}</el-button>
<el-button type="primary" @click="finishVisible = true">{{$t('完成备货')}}</el-button> <el-button type="primary" @click="handleSubmit">{{$t('完成备货')}}</el-button>
</div> </div>
</el-form> </el-form>
<el-dialog :title="order.orderNo + $t('订单转异')" center :visible.sync="escapeBol"> <el-dialog :title="order.orderNo + $t('订单转异')" center :visible.sync="escapeBol">
<el-form label-position="top" label-width="200" ref="exceptionForm" :model="form" :rules="exceptionRules"> <el-form label-position="top" label-width="200" ref="exceptionForm" :model="form" :rules="exceptionRules">
<el-form-item :label="$t('原因类型')" prop="manualExceptionType"> <el-form-item :label="$t('异常类型')" prop="manualExceptionType">
<dict-selector v-model="form.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.MANUAL_EXCEPTION_TYPE" multiple ></dict-selector> <dict-selector v-model="form.manualExceptionType" form-type="checkbox" :type="DICT_TYPE.STOCK_UP_EXCEPTION_TYPE" multiple ></dict-selector>
</el-form-item> </el-form-item>
<el-form-item :label="$t('附件')"> <el-form-item :label="$t('附件')">
<image-upload v-model="form.exceptionUrls"></image-upload> <!--<image-upload v-model="form.exceptionUrls"></image-upload>-->
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.exceptionUrls" ></image-and-video-upload>
</el-form-item> </el-form-item>
<el-form-item :label="$t('详细信息')"> <el-form-item :label="$t('详细信息')">
<el-input v-model="form.descZh" type="textarea"></el-input> <el-input v-model="form.descZh" type="textarea"></el-input>
...@@ -152,16 +153,25 @@ ...@@ -152,16 +153,25 @@
</el-dialog> </el-dialog>
<print-tag v-if="isShowPrintTag" :order-id="orderId" @close="isShowPrintTag = false"></print-tag> <print-tag v-if="isShowPrintTag" :order-id="orderId" @close="isShowPrintTag = false"></print-tag>
<package
:order="order"
:order-item-a="packageOrderItem"
:order-item-b="packageWarehouseItem"
:title="packageTitle"
v-if="!!packageOrderItem"
@close="packageOrderItem=null;packageOrderItem=null"
></package>
</div> </div>
</template> </template>
<script> <script>
import {getCurrencyList} from "@/api/ecw/currency" import {getCurrencyList} from "@/api/ecw/currency"
import { import {
finishPacked, finishStock,
getLabelByOrder, getLabelWaitInByOrder, getLabelByOrder, getLabelWaitInByOrder,
getOrder, getOrder,
getOrderWarehouseIn, getOrderWarehouseIn,
getSpecialListByOrderId, listByOrderId, getSpecialListByOrderId, listByOrderId, noNeedPack,
orderWarehouseInFinish, orderWarehouseInUpdateLabel, orderWarehouseInFinish, orderWarehouseInUpdateLabel,
rollbackDelete, warehousePictureList rollbackDelete, warehousePictureList
} from '@/api/ecw/order' } from '@/api/ecw/order'
...@@ -194,17 +204,7 @@ export default { ...@@ -194,17 +204,7 @@ export default {
this.getOrderItemList() this.getOrderItemList()
getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data) getSpecialListByOrderId(this.orderId).then(r => this.specialList = r.data)
Promise.all([ this.getOrder()
this.getOrder(),
listByOrderId({ orderId: this.orderId }).then(r => {
this.form.orderLocationCreateReqVOList = r.data
})
]).then(() => {
/*// 等待仓库id和已选的储位后初始化储位信息
this.$nextTick(() => {
this.$refs.area.updateArea()
})*/
})
} }
getCurrencyList().then(res => this.currencyList = res.data) getCurrencyList().then(res => this.currencyList = res.data)
}, },
...@@ -217,12 +217,9 @@ export default { ...@@ -217,12 +217,9 @@ export default {
finishVisible: false, finishVisible: false,
warehousingVisible: false, warehousingVisible: false,
form: { form: {
orderSpecialNeedReceivableReqVoList: [],
orderLocationCreateReqVOList: [],
exceptionUrls:[], exceptionUrls:[],
descZh:'', descZh:'',
manualExceptionType:[], manualExceptionType:[],
urls: [],
sumVolume: '', sumVolume: '',
sumWeight: '', sumWeight: '',
}, },
...@@ -257,7 +254,13 @@ export default { ...@@ -257,7 +254,13 @@ export default {
}, trigger: 'change' }, trigger: 'change'
} }
] ]
} },
// 打包弹层的标题
packageTitle: null,
// 当前打包的订单商品项
packageOrderItem: null,
// 打包商品的入仓商品项
packageWarehouseItem: null
} }
}, },
...@@ -288,67 +291,17 @@ export default { ...@@ -288,67 +291,17 @@ export default {
return arr.indexOf(state) == -1 return arr.indexOf(state) == -1
} }
}, },
handleLabelSubmit(){
orderWarehouseInUpdateLabel({
...this.label,
orderId: this.orderId
}).then(r => {
if (r.code === 0){
this.$message.success(r.msg || this.$t('修改标签箱号成功'))
}
})
},
// 箱号标签回显
getLabelByOrder(){
getLabelByOrder(this.orderId).then(r => {
if (r.code === 0 && !! r.data && r.data.length > 0) {
this.label.orderLabelDtoList = r.data
} else {
// 没有历史数据,查默认值
getLabelWaitInByOrder(this.orderId).then(r => {
console.log(r)
if (r.code === 0 && !! r.data) {
this.label.orderLabelDtoList = [r.data]
}
})
}
})
},
handleLabelAdd(index){
this.label.orderLabelDtoList.splice(index + 1, 0, {
"end": '',
"start": ''
})
},
getTowSum(){
// let sumVolume = 0
// let sumWeight = 0
// this.order.orderItemVOList.forEach(e => {
// if (e?.warehouseInInfoVO?.volume) sumVolume += e.warehouseInInfoVO.volume
// if (e?.warehouseInInfoVO?.weight) sumWeight += e.warehouseInInfoVO.weight
// })
this.form.sumVolume = this.order.sumVolume// || sumVolume
this.form.sumWeight = this.order.sumWeight// || sumWeight
},
getOrder(){ getOrder(){
return getOrder(this.orderId).then(r => { return getOrder(this.orderId).then(r => {
this.order = r.data this.order = r.data
this.getTowSum() this.form.sumVolume = this.order.sumVolume
this.form.sumWeight = this.order.sumWeight
}).then(() => { }).then(() => {
this.getLabelByOrder() // this.getLabelByOrder()
this.getWarehousePictureList() this.getWarehousePictureList()
}) })
}, },
specialHas0(){ // 提交转异
let result = false
this.form.orderSpecialNeedReceivableReqVoList.forEach(e => {
if (e.receivableMoney === '0' || e.receivableMoney === ''){
result = true
}
})
return result
},
handleException() { handleException() {
this.$refs.exceptionForm.validate((valid) => { this.$refs.exceptionForm.validate((valid) => {
if (valid) { if (valid) {
...@@ -358,86 +311,32 @@ export default { ...@@ -358,86 +311,32 @@ export default {
} }
}) })
}, },
// 完成备货
async handleSubmit() { async handleSubmit() {
if (this.specialHas0()) { // TODO 判断是否有未完成打包
const confirm = await this.$confirm(this.$t('有特需费用为0或未填写,请问是否继续?'), this.$t('注意'), {
confirmButtonText: this.$t('继续'),
cancelButtonText: this.$t('取消'),
type: 'warning'
})
if (confirm !== 'confirm'){
return
}
}
let form = {
orderSpecialNeedReceivableReqVoList: this.form.orderSpecialNeedReceivableReqVoList,
"orderLocationCreateReqVOList": this.form.orderLocationCreateReqVOList,
"orderId": this.order.orderId,
urls: this.form.urls,
sumVolume: this.form.sumVolume,
sumWeight: this.form.sumWeight,
isAppend: this.isAdd
}
// 标签箱号
if (this.order.parentOrderId) {
form.labelList = this.label.orderLabelDtoList || []
}
if (this.escapeBol) { let form = {...this.form}
form.exceptionUrls = this.form.exceptionUrls.length !== 0 ? this.form.exceptionUrls?.split(',') : [] form.orderId = this.orderId
form.descZh = this.form.descZh; form.manualExceptionType = form.manualExceptionType.join(',')
form.manualExceptionType = this.form.manualExceptionType.join(',') finishStock(form).then(res => {
} this.$message.success(this.$t('操作成功'))
orderWarehouseInFinish(form).then(r => { })
if (r.code === 0) { },
this.escapeBol = false; // 显示打包弹层
this.finishVisible = false package(row, title = null){
const message = !r.data ? this.$t('该订单已成功入仓,是否打印?') : `<h3>${this.$t('货物已入仓,存在异常')}</h3>${this.$t('该订单已成功入仓,是否打印?')}` this.packageOrderItem = row
this.$confirm( this.packageWarehouseItem = this.orderItemList.find(item => item.orderItemId = row.orderItemId)
message, this.packageTitle = title || this.$t('打包')
this.$t('货物已入仓'), },
{ // 无需打包
confirmButtonText: this.$t(''), noNeedPack(row){
cancelButtonText: this.$t(''), noNeedPack(row.orderItemId).then(res => {
dangerouslyUseHTMLString: true this.$message.success(this.$t('操作成功'))
}
).then(() => {
this.isShowPrint = true
}).catch(() => {
// this.$store.dispatch('tagsView/delVisitedView')
this.$message.success(this.$t('入仓成功'))
this.$tab.closePage()
})
}
}) })
}, },
handleWarehousingReturn(item){
this.$confirm(item.prodTitleZh + this.$t('退仓后不可恢复,是否确认退仓?'), this.$t('确定要退仓?'), {
confirmButtonText: this.$t('确定'),
cancelButtonText: this.$t('取消'),
type: 'warning'
}).then(() => {
rollbackDelete({
"orderId": item.orderId,
"orderItemId": item.orderItemId
}).then(() => {
this.$message({
type: 'success',
message: this.$t('货物退仓成功!')
});
this.getOrderItemList()
this.getOrder()
})
}).catch(e => {
});
}
}, },
watch: { watch: {
orderSpecialNeeds(val){ /*orderSpecialNeeds(val){
val.forEach(e => { val.forEach(e => {
this.form.orderSpecialNeedReceivableReqVoList.push({ this.form.orderSpecialNeedReceivableReqVoList.push({
"id": e.id, "id": e.id,
...@@ -445,7 +344,7 @@ export default { ...@@ -445,7 +344,7 @@ export default {
"receivableMoneyCurrency": e.transCurrency || 3 "receivableMoneyCurrency": e.transCurrency || 3
}) })
}) })
} }*/
}, },
computed: { computed: {
...@@ -455,11 +354,11 @@ export default { ...@@ -455,11 +354,11 @@ export default {
return this.orderItemList.find(item => item.orderItemId == orderItemId) return this.orderItemList.find(item => item.orderItemId == orderItemId)
} }
}, },
isAdd() { // 获取打包状态
return this.$route.path === "/order/warehousing-add" wareItemPackStatus(){
}, return orderItemId => {
isEdit() { return this.wareItem(orderItemId)?.packStatus
return this.$route.path === "/order/warehousing-update" }
}, },
title() { title() {
return this.$i18n.locale === 'en_US' ? this.$route.meta.titleEn : this.$route.name return this.$i18n.locale === 'en_US' ? this.$route.meta.titleEn : this.$route.name
......
...@@ -192,7 +192,7 @@ import { getProductAttrList } from '@/api/ecw/productAttr' ...@@ -192,7 +192,7 @@ import { getProductAttrList } from '@/api/ecw/productAttr'
import CustomerSelector from '@/components/CustomerSelector' import CustomerSelector from '@/components/CustomerSelector'
import specialNeeds from '@/views/ecw/order/components/specialNeeds'; import specialNeeds from '@/views/ecw/order/components/specialNeeds';
import {canReadyStockShipmentPage, exportReadyStock, getOrderPage} from "@/api/ecw/order"; import {canReadyStockShipmentPage, exportReadyStock, getOrderPage, orderSpecialNeed} from "@/api/ecw/order";
import PrintTag from './components/PrintTag' import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt' import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill' import PrintLadingBill from './components/PrintLadingBill'
...@@ -220,6 +220,8 @@ export default { ...@@ -220,6 +220,8 @@ export default {
}, },
data() { data() {
return { return {
// 导出中状态
exporting: false,
// 选中数组 // 选中数组
ids: [], ids: [],
// 非单个禁用 // 非单个禁用
...@@ -280,7 +282,7 @@ export default { ...@@ -280,7 +282,7 @@ export default {
} }
let queryParams = Object.assign({}, this.queryParams, timeParams) let queryParams = Object.assign({}, this.queryParams, timeParams)
return queryParams return queryParams
} },
}, },
activated(){ activated(){
this.getList() this.getList()
...@@ -345,7 +347,29 @@ export default { ...@@ -345,7 +347,29 @@ export default {
}).finally(() => { }).finally(() => {
this.exporting = false this.exporting = false
}) })
} },
// 特需标识处理
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()
})
},
} }
}; };
</script> </script>
......
...@@ -202,6 +202,16 @@ ...@@ -202,6 +202,16 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card style="margin-top: 15px;">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.pictureUrls" ></image-and-video-upload>
</div>
</el-card>
</el-tab-pane> </el-tab-pane>
...@@ -407,6 +417,15 @@ ...@@ -407,6 +417,15 @@
</el-form> </el-form>
</el-card> </el-card>
<el-card style="margin-top: 15px;">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form1.pictureUrls" ></image-and-video-upload>
</div>
</el-card>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -474,11 +493,13 @@ import {orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order" ...@@ -474,11 +493,13 @@ import {orderWarehouseIn, orderWarehouseInUpdateApply} from "@/api/ecw/order"
import {getProductAttrList} from "@/api/ecw/productAttr" import {getProductAttrList} from "@/api/ecw/productAttr"
import {getProductTypeList} from "@/api/ecw/productType" import {getProductTypeList} from "@/api/ecw/productType"
import {addProduct} from "@/api/ecw/product" import {addProduct} from "@/api/ecw/product"
import ImageAndVideoUpload from "@/components/ImageAndVideoUpload/index.vue"
export default { export default {
name: "Warehouse", name: "Warehouse",
components: { components: {
ImageAndVideoUpload,
ProductSelector, ProductSelector,
WarehouseAreaSelect, WarehouseAreaSelect,
WorkFlow WorkFlow
...@@ -624,7 +645,8 @@ export default { ...@@ -624,7 +645,8 @@ export default {
prodType: undefined, prodType: undefined,
type: undefined, type: undefined,
feeType: undefined, feeType: undefined,
recordMode: undefined recordMode: undefined,
pictureUrls: []
}, },
form1: { form1: {
table: [], table: [],
...@@ -642,7 +664,8 @@ export default { ...@@ -642,7 +664,8 @@ export default {
prodType: undefined, prodType: undefined,
type: 1, type: 1,
feeType: undefined, feeType: undefined,
recordMode: undefined recordMode: undefined,
pictureUrls: []
}, },
brandList: [], brandList: [],
brandList1: [], brandList1: [],
...@@ -712,6 +735,7 @@ export default { ...@@ -712,6 +735,7 @@ export default {
this.form.prodType = this.warehousing.prodType this.form.prodType = this.warehousing.prodType
this.form.type = this.warehousing.type this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType this.form.feeType = this.warehousing.feeType
this.form.pictureUrls = this.warehousing.pictureUrls
this.warehousing.orderWarehouseInBackItemDoList.forEach(e => { this.warehousing.orderWarehouseInBackItemDoList.forEach(e => {
let bg = {} let bg = {}
......
...@@ -158,15 +158,6 @@ ...@@ -158,15 +158,6 @@
<span slot="append">kg</span> <span slot="append">kg</span>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-card style="margin-top: 15px;">
<div slot="header" class="clearfix">
<span style="font-size: 18px">{{$t('入仓影像')}}</span>
</div>
<div>
<image-and-video-upload :fileSize="50" :isShowTip="true" v-model="form.urls" ></image-and-video-upload>
</div>
</el-card>
<div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)"> <div style="text-align: center;margin-top: 15px" v-if="!(order.status !== 3 && isEdit)">
<el-button @click="escapeBol = true;" type="primary">{{$t('转异')}}</el-button> <el-button @click="escapeBol = true;" type="primary">{{$t('转异')}}</el-button>
<el-button type="primary" @click="finishVisible = true">{{$t('完成入仓')}}</el-button> <el-button type="primary" @click="finishVisible = true">{{$t('完成入仓')}}</el-button>
...@@ -231,7 +222,6 @@ import PrintTag from "@/views/ecw/order/components/PrintTag" ...@@ -231,7 +222,6 @@ import PrintTag from "@/views/ecw/order/components/PrintTag"
import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt" import PrintWarehouseReceipt from "@/views/ecw/order/components/PrintWarehouseReceipt"
import imageUpload from "@/components/ImageUpload"; import imageUpload from "@/components/ImageUpload";
import {parseTime} from "@/utils/ruoyi" import {parseTime} from "@/utils/ruoyi"
import ImageAndVideoUpload from '@/components/ImageAndVideoUpload'
import Warehouse from "@/views/ecw/order/warehousing/components/Warehouse" import Warehouse from "@/views/ecw/order/warehousing/components/Warehouse"
export default { export default {
name: "Warehousing", name: "Warehousing",
...@@ -242,7 +232,6 @@ export default { ...@@ -242,7 +232,6 @@ export default {
PrintTag, PrintTag,
PrintWarehouseReceipt, PrintWarehouseReceipt,
imageUpload, imageUpload,
ImageAndVideoUpload,
Warehouse Warehouse
}, },
......
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