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),
......
This diff is collapsed.
<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