Commit 2033e1b1 authored by dragondean@qq.com's avatar dragondean@qq.com

完善打印入仓单,确认放货页面

parent f4784031
......@@ -35,6 +35,15 @@ export function getOrder(orderId) {
})
}
// 获得订单编辑详情
export function getOrderDetail(orderId) {
return request({
url: '/ecw/order/get',
method: 'get',
params: {orderId}
})
}
// 获得订单分页
export function getOrderPage(query) {
return request({
......@@ -163,3 +172,11 @@ export function recoveryOrder(orderId){
})
}
// 获得我的订单分页
export function getMyOrderPage(query) {
return request({
url: '/ecw/order/my/page',
method: 'get',
params: query
})
}
\ No newline at end of file
......@@ -45,6 +45,7 @@ export default {
},
methods:{
init(){
console.log('初始化联系人选择', this.value)
if(!this.value) return
let index = this.list.findIndex(item => item.customerContactsId == this.value)
if(index < 0){
......
<template>
<div v-if="fee">
<div class="" v-if="fee.clearanceNGN || fee.clearanceRMB || fee.clearanceUSD">
清关费:
<span v-if="fee.clearanceNGN">{{fee.clearanceNGN}}N</span>
<span v-if="fee.clearanceRMB">{{fee.clearanceRMB}}</span>
<span v-if="fee.clearanceUSD">{{fee.clearanceUSD}}$</span>
</div>
<div class="" v-if="fee.seaNGN || fee.seaRMB || fee.seaUSD">
运费:
<span v-if="fee.seaNGN">{{fee.seaNGN}}N</span>
<span v-if="fee.seaRMB">{{fee.seaRMB}}</span>
<span v-if="fee.seaUSD">{{fee.seaUSD}}$</span>
</div>
</div>
<div v-else></div>
</template>
<script>
export default {
props:{
fee: Object
}
}
</script>
\ No newline at end of file
......@@ -350,13 +350,12 @@ import CustomerSelector from '@/components/CustomerSelector'
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {getTradeCityList} from '@/api/ecw/region'
import {getDictData} from '@/utils/dict'
import Fee from '@/components/Fee'
import {getCurrencyList} from '@/api/ecw/currency'
import {getUnitList} from '@/api/ecw/unit'
export default {
name: "OfferEdit",
components: {
ProductSelector, Selector, CustomerSelector, Fee
ProductSelector, Selector, CustomerSelector
},
data() {
return {
......
<template>
<el-dialog :title="title" visible :before-close="closeDialog" width="1200px">
<div id="laay">
<div id="laay" v-if="detail">
<!--startprint-->
<div id="myproa">
<p style="padding-bottom:10px;font-size:16px;">
订单号:ECP0063705N
&nbsp;&nbsp;&nbsp;发货人电话:Alex +8613802728881
&nbsp;&nbsp;&nbsp;提货地点:Alaba
<img src="http://v4.groupage.cn//qrcode/images/ECP0063705N_rcd.png" alt="ECP0063705N" style="margin-left: 10px;width:17mm;vertical-align:middle">
订单号:{{detail.orderNo}}
&nbsp;&nbsp;&nbsp;发货人电话:{{detail.name}} {{detail.phone}}
&nbsp;&nbsp;&nbsp;提货地点:{{objective.titleZh}}
<img :src="qrcode" style="margin-left: 10px;width:17mm;vertical-align:middle" />
</p>
<div id="table1" width="205mm">
<table class="ptab" id="rclist" cellspacing="0" cellpadding="0" style="border:1px dashed #ccc;width:100%;">
<tr>
<th style="text-align:center;width: 50px;" v-if="!preview">
<label class="checkbox checkbox-indent">
<input type="checkbox" name="" value="" id="checkboxa" data-on="0" onclick="checkboxs();">
<i class="fa fa-check-square"></i>
<input type="checkbox" name="" value="" v-model="checkAll">
</label>
</th>
<th style="text-align:center;padding:0 0px;width:80px;text-align: center;font-size: 14px;border:1px dashed #ccc;">唛头</th>
......@@ -26,24 +25,36 @@
<th style="text-align:center;padding:0 0px;width:80px;text-align: center;font-size: 14px;border:1px dashed #ccc;">重量</th>
<th style="text-align:center;padding:0 0px;width:110px;text-align: center;font-size: 14px;border:1px dashed #ccc;">入仓时间</th>
</tr>
<tr>
<template v-for="(item, index) in items">
<tr v-if="!preview || item.checked" :key="index">
<td style="text-align:center;width: 50px;" v-if="!preview">
<label class="checkbox checkbox-indent">
<input type="checkbox" class="alla" name="ids[]" value="111819" data-on="0" >
<i class="fa fa-check-square"></i>
<input type="checkbox" class="alla" name="ids[]" v-model="item.checked">
</label>
</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">QQ</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">
手机皮套<br/>phone leather cover
{{item.marks}}
</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">
{{item.prodTitleZh}}<br/>{{item.prodTitleEn}}
</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">
{{item.cartonsNum}}
</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">
{{item.boxGauge}}
</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">
{{item.volume}}
</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">
{{item.weight}}
</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">
{{item.inTime|parseTime}}
</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">50</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">cm x cm x cm</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">0.01</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">0</td>
<td style="text-align:center;padding:0 0px;border:1px dashed #ccc;">2022-07-20 18:23:29</td>
</tr>
</template>
</table>
</div>
<!--edit by liuyc 20210121 结尾增加文字-->
......@@ -62,9 +73,11 @@
<script>
import {parseTime} from '@/utils/ruoyi'
import lodop from '@/utils/lodop'
import {getOrderWarehouseIn, getOrderDetail} from '@/api/ecw/order'
import qrcode from 'qrcode'
export default {
filters: {parseTime},
components: { },
props:{
orderId: [String, Number]
},
......@@ -72,7 +85,10 @@ export default {
return {
show: false,
detail: null,
preview: false
list: [],
qrcode: null,
preview: false,
checkAll: false
}
},
computed:{
......@@ -82,6 +98,37 @@ export default {
t += '-' + this.detail.orderNo
}
return t
},
objective(){
if(this.detail && this.detail.orderObjectiveVO && this.detail.orderObjectiveVO.objective){
return JSON.parse(this.detail.orderObjectiveVO.objective)
}
return {}
},
items(){
let arr = []
this.list.forEach(item => {
item.orderWarehouseInBackItemDoList.forEach(witem => {
arr.push({
marks: this.detail.remarks,
prodTitleEn: item.prodTitleEn,
prodTitleZh: item.prodTitleZh,
cartonsNum: witem.cartonsNum,
boxGauge: witem.boxGauge,
volume: witem.volume,
weight: witem.weight,
inTime: witem.inTime
})
})
})
return arr
}
},
watch:{
checkAll(val){
this.items.forEach(item => {
this.$set(item, 'checked', val)
})
}
},
created(){
......@@ -90,7 +137,15 @@ export default {
},
methods:{
loadData(){
getOrderDetail(this.orderId).then(res => {
this.detail = res.data
qrcode.toDataURL(this.detail.orderNo, (err, url) => {
this.qrcode = url
})
})
getOrderWarehouseIn(this.orderId).then(res => {
this.list = res.data
})
},
closeDialog(){
this.show = false
......@@ -100,18 +155,13 @@ export default {
this.$nextTick(() => {
lodop().then(LODOP => {
LODOP.PRINT_INIT(this.title);
LODOP.SET_PRINT_STYLE("FontSize",18);
LODOP.SET_PRINT_STYLE("Bold",1);
LODOP.SET_PRINT_PAGESIZE(0);
LODOP.SET_PRINT_PAGESIZE(0,2970,2100,"A4");
LODOP.ADD_PRINT_HTM("5%","5%","90%","90%", document.getElementById("myproa").innerHTML);
LODOP.PRINT();
this.$alert('已发起打印任务');
LODOP.SET_PRINT_PAGESIZE(0, 2100, 1800, "A4");
LODOP.ADD_PRINT_HTM("2%","2%","96%","96%", document.getElementById("myproa").innerHTML);
LODOP.PREVIEW();
// LODOP.PREVIEW(); // 预览
/* LODOP.PRINTA(); // 选择打印机
// 直接打印 */
console.log('打印哦')
}).catch(err => {
console.error('lodop异常', err)
alert('请检查LODOP打印控件是否安装并启动');
......
......@@ -373,8 +373,9 @@
<el-form-item label="">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="$router.back()">取 消</el-button>
<el-button type="primary" @click="submitForm(0)">保 存</el-button> <!--草稿-->
<el-button type="primary" @click="submitForm(2)">新建</el-button> <!--待入仓-->
<el-button @click="$router.back()">返回</el-button>
</el-form-item>
</el-form>
</div>
......@@ -390,18 +391,16 @@ import CustomerContactSelector from '@/components/CustomerContactSelector'
import {openedRouterList as getOpenedRouterList} from '@/api/ecw/warehouse'
import {getTradeCityList} from '@/api/ecw/region'
import {getDictData, getDictDatas} from '@/utils/dict'
import Fee from '@/components/Fee'
import {getCurrencyList} from '@/api/ecw/currency'
import {getUnitList} from '@/api/ecw/unit'
import { getCustomer } from '@/api/ecw/customer';
import { getListTree } from "@/api/ecw/region";
import AreaSelector from '@/components/AreaSelector'
import {calculationPrice} from '@/api/ecw/product'
import {getCustomerAvailableCouponList} from '@/api/ecw/coupon'
export default {
name: "OrderEdit",
components: {
ProductSelector, Selector, CustomerContactSelector, Fee, AreaSelector
ProductSelector, Selector, CustomerContactSelector, AreaSelector
},
data() {
return {
......@@ -457,7 +456,6 @@ export default {
getRouterNameById(){
return routerId => {
let router = this.routerList.find(item => item.id == routerId)
console.log({router})
if(router){
return router.startTitleZh + ' > ' + router.destTitleZh
}
......@@ -540,24 +538,20 @@ export default {
},
created() {
if(this.$route.query.id){
getOrder(this.$route.query.id).then(res => {
this.form = res.data
this.form.consignorContactsId = res.data.consignorVO.customerContactsId
this.form.consigneeContactsId = res.data.consigneeVO.customerContactsId
})
}else this.addProduct()
getProductAttrList().then(res => this.productAttrList = res.data)
getChannelList().then(res => this.channelList = res.data)
getTradeCityList().then(res => this.tradeCityList = res.data)
getCurrencyList().then(res => this.currencyList = res.data)
getUnitList().then(res => this.unitList = res.data)
this.transportList = this.getDictDatas(this.DICT_TYPE.ECW_TRANSPORT_TYPE)
/* .forEach(res => {
this.transportList.push({
transportId: +res.value, // 转为整形
label: res.label,
})
}) */
if(this.$route.query.id){
getOrder(this.$route.query.id).then(res => {
})
}else this.addProduct()
},
methods: {
onProductChange(row, product){
......@@ -669,7 +663,8 @@ export default {
})
},
/** 提交按钮 */
submitForm() {
// type 在新建的时候表示状态,0草稿,2带入仓
submitForm(type) {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
......@@ -701,7 +696,8 @@ export default {
let data = Object.assign({
consigneeId: this.consignee.id,
consignorId: this.consignor.id,
customerId: this.consignor.id
customerId: this.consignor.id,
status: type
}, this.form, {
customDraweeVOList: this.customDraweeVOList,
// transportUpdateReqVOList: this.transportList.filter(item => item._enabled),
......
......@@ -114,7 +114,7 @@
<el-table v-loading="loading" :data="list" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="订单编号" width="200px" align="center" prop="orderNo" >
<el-table-column label="订单编号" width="120px" align="center" prop="orderNo" >
<template slot-scope="scope">
<router-link :to="{path: '/order/detail',query: {orderId: scope.row.orderId}}" class="link-type">
<span>{{ scope.row.orderNo }}</span>
......@@ -125,15 +125,23 @@
</template>
</el-table-column>
<el-table-column label="唛头" align="center" prop="marks" />
<el-table-column label="入仓箱数" align="center" prop="sumNum" />
<el-table-column label="入仓重量" align="center" prop="sumWeight" />
<el-table-column label="总箱数/入仓箱数" align="center" prop="sumNum">
<template slot-scope="{row}">{{row.totalNum}}箱/{{row.sumNum}}</template>
</el-table-column>
<el-table-column label="体积/重量" align="center" prop="sumWeight">
<template slot-scope="{row}">{{row.totalVolume}}m³ /{{row.totalWeight}}Kg</template>
</el-table-column>
<el-table-column label="运输方式" align="center" prop="transportId">
<template slot-scope="scope">
<span>{{ scope.row.transportId | transportFilter(transportList) }}</span>
<el-table-column label="运输方式/目的地" align="center" prop="transportId">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.ECW_TRANSPORT_TYPE" :value="row.transportId" /> / {{row.objectiveName}}
</template>
</el-table-column>
<el-table-column label="控货" align="center" prop="transportId">
<template slot-scope="{row}">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="row.isCargoControl" />
</template>
</el-table-column>
<el-table-column label="订单状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :type="DICT_TYPE.ORDER_STATUS" :value="scope.row.status" />
......@@ -163,6 +171,8 @@
<el-button type="text" size="mini" @click="$router.push(`/order/mutex-order/${scope.row.orderId}`)" >互斥</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="$router.push('/order/special?id=' + scope.row.orderId)"
v-hasPermi="['ecw:order:update']">特价</el-button>
<el-button type="text" size="mini" @click="$router.push(`/order/release?orderId=${scope.row.orderId}`)">确认放货</el-button>
</div>
</el-popover>
......@@ -201,7 +211,7 @@
</el-table-column>
</el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.rows"
@pagination="getList" />
<special-needs :show.sync="isShow":order-id="orderId" @determine="getList" ></special-needs>
......@@ -231,9 +241,10 @@ import {
exportOrderExcel,
orderSpecialNeed,
cancelOrder,
recoveryOrder
recoveryOrder,
getMyOrderPage
} from "@/api/ecw/order";
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
/* import { getDictDatas, DICT_TYPE } from '@/utils/dict'; */
import PrintTag from './components/PrintTag'
import PrintWarehouseReceipt from './components/PrintWarehouseReceipt'
import PrintLadingBill from './components/PrintLadingBill'
......@@ -243,7 +254,10 @@ export default {
components: {
CustomerSelector, ProductSelector, Selector,specialNeeds,PrintTag, PrintWarehouseReceipt, PrintLadingBill
},
filters: {
props: {
mine: Boolean
},
/* filters: {
cargoControlStatusFilter(e, cargoControlStatusList) {
if (e) return cargoControlStatusList.find(item => item.value == e).label
},
......@@ -259,7 +273,7 @@ export default {
transportFilter(e, transportList) {
if (e) return transportList.find(item => item.value == e).label
}
},
}, */
data() {
return {
// 选中数组
......@@ -282,7 +296,7 @@ export default {
title: "",
// 是否显示弹出层
open: false,
dateRangeRucangtime: [],
/* dateRangeRucangtime: [],
dateRangeDaogangtime: [],
dateRangeQingguantime: [],
dateRangePreLoadTime: [],
......@@ -290,26 +304,18 @@ export default {
dateRangeUnloadTime: [],
dateRangeTakeTime: [],
dateRangeSplitTime: [],
dateRangeCreateTime: [],
dateRangeCreateTime: [], */
// 查询参数
queryParams: {
pageNo: 1,
pageSize: 10
page: 1,
rows: 10
},
// 表单参数
form: {},
// 表单校验
rules: {
orderNo: [{ required: true, message: "订单编号不能为空", trigger: "blur" }],
sumVolume: [{ required: true, message: "入仓方数不能为空", trigger: "blur" }],
sumWeight: [{ required: true, message: "入仓重量不能为空", trigger: "blur" }],
weightRatio: [{ required: true, message: "重货比不能为空", trigger: "blur" }],
},
productRecordList: getDictDatas(DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE),
/* productRecordList: getDictDatas(DICT_TYPE.PRODUCT_RECORD_ATTRIBUTE),
cargoControlStatusList: getDictDatas(DICT_TYPE.CONTROL_GOODS_STATUS),
customsTypeList: getDictDatas(DICT_TYPE.ECW_CUSTOMS_TYPE),
orderStatusList: getDictDatas(DICT_TYPE.PAY_ORDER_STATUS),
transportList: getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE),
transportList: getDictDatas(DICT_TYPE.ECW_TRANSPORT_TYPE), */
tradeCityList: [],
productAttrList: [], // 商品属性
molecule: '', //重货比分子
......@@ -322,8 +328,8 @@ export default {
printLadingBillInfo: null, // 打印提单
isShow:false,//特殊显示
orderId:undefined,
DICT_TYPE,
getDictDatas
/* DICT_TYPE,
getDictDatas */
};
},
computed: {
......@@ -379,6 +385,13 @@ export default {
getList() {
this.loading = true;
console.log('this.combinedQueryParams', this.combinedQueryParams)
if(this.mine){
return getMyOrderPage(this.combinedQueryParams).then(response => {
this.list = response.data.list;
this.total = response.data.total;
this.loading = false;
});
}
// 执行查询
getOrderPage(this.combinedQueryParams).then(response => {
this.list = response.data.list;
......@@ -386,79 +399,7 @@ export default {
this.loading = false;
});
},
/** 取消按钮 */
cancel() {
this.open = false;
this.reset();
},
/** 表单重置 */
reset() {
this.form = {
orderId: undefined,
orderNo: undefined,
number: undefined,
tidanNo: undefined,
parentNumber: undefined,
oldNumbers: undefined,
transportId: undefined,
lineId: undefined,
channelId: undefined,
orderType: undefined,
userId: undefined,
marks: undefined,
productRecord: undefined,
isCargoControl: undefined,
cargoControlStatus: undefined,
customsType: undefined,
upFile: undefined,
payType: undefined,
status: undefined,
isDel: undefined,
collectionProxy: undefined,
isCollection: undefined,
zhongPao: undefined,
wVolume: undefined,
vWeight: undefined,
weightUnit: undefined,
warehouseType: undefined,
countryAbbreviation: undefined,
countryCode: undefined,
sendsms: undefined,
commissionId: undefined,
documentsFile: undefined,
remarks: undefined,
isTodoOrder: undefined,
advanceType: undefined,
transFee: undefined,
transCurrency: undefined,
plateFee: undefined,
boxFee: undefined,
todoDetail: undefined,
advanceWho: undefined,
toDepartureId: undefined,
sumNum: undefined,
sumVolume: undefined,
sumWeight: undefined,
weightRatio: undefined,
customerId: undefined,
wareId: undefined,
areaId: undefined,
locationId: undefined,
locationName: undefined,
sumValue: undefined,
valuationFee: undefined,
rucangtime: undefined,
daogangtime: undefined,
cost: undefined,
qingguantime: undefined,
preLoadTime: undefined,
loadTime: undefined,
unloadTime: undefined,
takeTime: undefined,
splitTime: undefined,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNo = 1;
......@@ -477,39 +418,7 @@ export default {
handleUpdate(row) {
this.$router.push('edit?id=' + row.orderId)
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 修改的提交
if (this.form.orderId != null) {
updateOrder(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
return;
}
// 添加的提交
createOrder(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
});
},
/** 删除按钮操作 */
handleDelete(row) {
const orderId = row.orderId;
this.$modal.confirm('是否确认删除订单编号为"' + orderId + '"的数据项?').then(function () {
return deleteOrder(orderId);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
/** 导出按钮操作 */
handleExport() {
// 处理查询参数
......
<template>
<index mine />
</template>
<script>
import Index from './index'
export default {
components: {Index}
}
</script>
\ No newline at end of file
<template>
<div class="app-container">
<el-form :model="form" label-position="left" label-width="120px">
<el-form-item label="放货方式">
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.pickType" form-type="radio"></dict-selector>
</el-form-item>
<el-form-item label="提货时间" v-if="form.pickType == 1">
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<template v-if="form.pickType == 2">
<el-form-item label="收货人">
{{order.consigneeVO.name}}
</el-form-item>
<el-form-item label="收货电话">
{{order.consigneeVO.phone}}
</el-form-item>
<el-form-item label="收货地址">
<!--缺少国城名字-->
{{order.consigneeVO.address}}
</el-form-item>
<el-form-item label="快递单号">
<el-input v-model="form.trackingNumber" placeholder=""></el-input>
</el-form-item>
<el-form-item label="送货时间">
<el-date-picker v-model="form.deliverTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
<el-form-item label="签收时间">
<el-date-picker v-model="form.pickTime" placeholder="" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</template>
<el-form-item label="附件">
<dict-selector :type="DICT_TYPE.ECW_HARVEST_METHOD" v-model="form.harvest_method"></dict-selector>
</el-form-item>
<el-form-item label="备注">
<el-input v-model="form.remark" type="textarea" placeholder=""></el-input>
</el-form-item>
<el-form-item label="">
<el-button type="primary" @click="submit">确认放货</el-button>
<el-button type="default" @click="$router.back()">取消</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import {getOrder} from '@/api/ecw/order'
export default {
data(){
return {
order: null,
form: {}
}
},
created(){
this.loadOrderData()
},
methods:{
loadOrderData(){
getOrder(this.$route.query.orderId).then(res => {
this.order = res.data
this.$set(this.form, 'pickType', this.order.harvestMethod)
})
},
submit(){
this.$alert('暂未对接接口')
}
}
}
</script>
\ No newline at end of file
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