Commit bc6ca011 authored by dragondean@qq.com's avatar dragondean@qq.com

完善新建订单,快速创建客户TODO

parent bd8c536b
...@@ -300,3 +300,12 @@ export function listByOrderId(params){ ...@@ -300,3 +300,12 @@ export function listByOrderId(params){
params, params,
}) })
} }
// 获取快递单号
export function getOrderCourierNumber(params){
return request({
url:'/ecw/order/courier/number',
method:'get',
params,
})
}
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
placeholder="请输入商品关键词" placeholder="请输入商品关键词"
:disabled="disabled" :disabled="disabled"
:remote-method="remoteMethod" :remote-method="remoteMethod"
@focus="remoteMethod()"
:loading="loading"> :loading="loading">
<el-option <el-option
v-for="(item, index) in list" v-for="(item, index) in list"
...@@ -72,7 +73,9 @@ export default { ...@@ -72,7 +73,9 @@ export default {
} }
}, },
remoteMethod(keyword){ remoteMethod(keyword){
let params = {} let params = {
pageSize: keyword ? 100000 : 10
}
if(this.productType){ if(this.productType){
params.typeId = this.productType params.typeId = this.productType
} }
......
...@@ -48,75 +48,7 @@ ...@@ -48,75 +48,7 @@
</div> </div>
</el-col> </el-col>
<div v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 20"> <div v-if="this.processInstance.processDefinition && this.processInstance.processDefinition.formType === 20">
<component v-if="businessKeyToComponent" :is="businessKeyToComponent.component" v-bind="businessKeyToComponent" />
<!-- <span>{{this.processInstance.processDefinition.formCustomViewPath}}</span>-->
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='special-discount'"><!--特价审核-->
<special-discount :id="this.processInstance.businessKey" readonly="true"></special-discount>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='free_apply'"><!--费用审核-->
<warehouseDetails :processId="this.processInstance.businessKey" :type="2" ></warehouseDetails>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='retired_warehouse'"><!--退仓申请-->
<warehouseDetails :processId="this.processInstance.businessKey" :type="3" ></warehouseDetails>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='warehouse_transfer'"><!--调仓申请-->
<warehouseDetails :processId="this.processInstance.businessKey" :type="1" ></warehouseDetails>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='container_modify'"><!--出货审核-柜子修改审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='trailer_modify'"><!--出货审核-拖车修改审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='ship_modify'"><!--出货审核-配船修改审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='ship_modify'"><!--出货审核-配船修改审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='customs_declare_modify'"><!--出货审核-报关修改审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='arrival_modify'"><!--出货审核-到港修改审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='customs_clearance_modify'"><!--出货审核-清关修改审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='customs_exit_part'"><!--出货审核-报关部分退场审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='customs_exit_all'"><!--出货审核-报关退场审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='start_port_modify'"><!--出货审核-起运修改审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='book_space_modify'"><!--出货审核-订舱修改审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='sorting_apply_no'"><!--出货审核-分拣反审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='sorting_apply'"><!--出货审核-分拣审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='unload_container_no'"><!--出货审核-卸柜反审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='unload_container'"><!--出货审核-卸柜审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='close_container'"><!--出货审核-封柜审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='shipment_preassemble_no'"><!--出货审核-预装反审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-if="this.processInstance.processDefinition.formCustomViewPath=='shipment_preassemble'"><!--出货审核-预装审核-->
<shippingDetail :processId="this.processInstance.businessKey"></shippingDetail>
</div>
<div v-else> <div v-else>
<router-link :to="this.processInstance.processDefinition.formCustomViewPath + '?id=' <router-link :to="this.processInstance.processDefinition.formCustomViewPath + '?id='
...@@ -203,6 +135,7 @@ import specialDiscount from "@/views/ecw/offer/specialDiscount" ...@@ -203,6 +135,7 @@ import specialDiscount from "@/views/ecw/offer/specialDiscount"
import warehouseDetails from "@/views/ecw/order/components/warehouseDetails"; import warehouseDetails from "@/views/ecw/order/components/warehouseDetails";
import shippingDetail from '@/views/ecw/box/shippingDetail' import shippingDetail from '@/views/ecw/box/shippingDetail'
// 流程实例的详情页,可用于审批 // 流程实例的详情页,可用于审批
export default { export default {
name: "ProcessInstanceDetail", name: "ProcessInstanceDetail",
...@@ -215,6 +148,98 @@ export default { ...@@ -215,6 +148,98 @@ export default {
computed:{ computed:{
matterNum(){ matterNum(){
return this.$store.state.user.matterNum return this.$store.state.user.matterNum
},
businessKeyToComponent(){
if(!this.processInstance.processDefinition || !this.processInstance.processDefinition.formCustomViewPath){
return false
}
const map = {
"special-discount": {
component: 'special-discount',
id: this.processInstance.businessKey,
readonly: true
},
free_apply: {
component: "warehouseDetails",
processId: this.processInstance.businessKey,
type: 2
},
retired_warehouse: {
component: "warehouseDetails",
processId: this.processInstance.businessKey,
type: 3
},
warehouse_transfer: {
component: "warehouseDetails",
processId: this.processInstance.businessKey,
type: 1
},
container_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
trailer_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
ship_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
customs_declare_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
arrival_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
customs_clearance_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
customs_exit_part: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
customs_exit_all: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
start_port_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
book_space_modify: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
sorting_apply_no: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
sorting_apply: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
unload_container_no: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
unload_container: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
close_container: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
},
shipment_preassemble: {
component: "shippingDetail",
processId: this.processInstance.businessKey,
}
}
return map[this.processInstance.processDefinition.formCustomViewPath]
} }
}, },
data() { data() {
......
<template>
<div>
<el-row type="flex" style="margin-top: 15px;margin-bottom: 15px" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="20" :xl="16">
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
<el-form-item label="客户类别" prop="type">
<dict-selector :type="DICT_TYPE.CUSTOMER_TYPE" form-type="checkbox" multiple v-model="form.type"></dict-selector>
</el-form-item>
<el-form-item label="客户名称" prop="name">
<el-input v-model="form.name" placeholder="请输入客户名称" />
</el-form-item>
<el-form-item label="联系人" prop="customerContacts.0.name">
<el-input v-model="form.customerContacts[0].name" placeholder="请输入联系人" />
</el-form-item>
<el-form-item label="手机号" prop="customerContacts.0.phoneNew">
<el-select v-model="form.customerContacts[0].areaCode" placeholder="请选择区号" filterable>
<el-option v-for="(item, index) in countryList"
:key="index" :label="item.nameShort + item.nameZh + '(' + item.tel + ')'" :value="item.tel" />
</el-select>
<el-input v-model="form.customerContacts[0].phoneNew" placeholder="请输入联系方式" style="width:200px; margin-left:10px"/>
</el-form-item>
<el-form-item label="客户来源" prop="source">
<el-select v-model="form.source" placeholder="请选择客户来源">
<el-option v-for="dict in getDictDatas(DICT_TYPE.CUSTOMER_SOURCE)"
:key="dict.value" :label="dict.label" :value="parseInt(dict.value)" />
</el-select>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="form.createTime"
type="datetime"
value-format="timestamp"
placeholder="选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="客户经理" prop="customerService">
<el-select v-model="form.customerService" placeholder="请选择客户经理">
<el-option v-for="item in serviceUserList"
:key="item.id" :label="item.nickname" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注"/>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-col>
</el-row>
</div>
</template>
<script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import upload from '@/components/ImageUpload'
import {createCustomer, getCustomer, updateCustomer, userMemberUserList,} from '@/api/ecw/customer'
import {getNodeList} from "@/api/ecw/node"
import { getProductTypeList } from '@/api/ecw/productType'
import { getProductList } from '@/api/ecw/product'
import {getTradeCityList} from "@/api/ecw/region"
import {getWarehouseList} from "@/api/ecw/warehouse"
import CustomerLineTable from '@/components/CustomerLineTable'
import {getCustomerSelect} from "@/api/ecw/customer"
import {listServiceUser} from "@/api/system/user"
import {getZhongPaoPage} from '@/api/ecw/zhongPao'
import { getCustomerContactsListByCustomer } from '@/api/ecw/customerContacts'
import { getCountryListAll } from '@/api/ecw/country'
export default {
name: "quickCreateCustomer",
created() {
listServiceUser().then(r => {
this.serviceUserList = r.data
})
getCountryListAll().then(r => {
this.countryList = r.data
})
},
data(){
return {
// 表单参数
form: {
customerContacts:[{}]
},
// 表单校验
rules: {
name: [{ required: true, message: "客户名称不能为空", trigger: "blur" }],
'customerContacts.0.phoneNew': [{ required: true, message: "手机号不能为空", trigger: "blur" }],
// country: [{ required: true, message: "国家不能为空", trigger: "blur" }],
// level: [{ required: true, message: "客户等级不能为空", trigger: "blur" }],
type: [{ required: true, message: "客户类别不能为空", trigger: "blur" }],
createTime: [{ required: true, message: "创建时间不能为空", trigger: "blur" }],
source: [{ required: true, message: "客户来源不能为空", trigger: "blur" }],
customerService: [{ required: true, message: "跟进客服不能为空", trigger: "blur" }],
status: [{ required: true, message: "客户状态不能为空", trigger: "blur" }],
founder: [{ required: true, message: "创建人不能为空", trigger: "blur" }],
},
serviceUserList: [],
countryList: [],
}
},
methods: {
/** 取消按钮 */
cancel() {
this.$emit('cancel')
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (!valid) {
return;
}
// 添加的提交
createCustomer(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.$emit('success', res.data)
// this.getList();
});
});
},
}
}
</script>
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<dict-selector v-model="row.unit" :type="DICT_TYPE.ECW_PACKAGE_TYPE" defaultable @input="calculationPrice" /> <dict-selector v-model="row.unit" :type="DICT_TYPE.ECW_PACKAGE_TYPE" defaultable @input="calculationPrice" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量"> <el-table-column label="数量(个)">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model.number="row.quantity" @input="calculationPrice" /> <el-input v-model.number="row.quantity" @input="calculationPrice" />
</template> </template>
...@@ -216,12 +216,19 @@ ...@@ -216,12 +216,19 @@
</el-table-column> --> </el-table-column> -->
<el-table-column label="运费" width="200px"> <el-table-column label="运费" width="200px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<template v-if="row.fee"> <template v-if="row.fee && row.fee.charging == 1">
<template v-if="!row.fee.freight">未报价</template>
<template v-else>
全包价:{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</template>
</template>
<template v-else-if="!row.fee.freight && !row.fee.clearanceFee">未报价</template>
<template v-else-if="row.fee">
<div> <div>
运费:{{row.fee.seaFreight}} {{currentMap[row.fee.seaFreightCurrency]}} / {{unitMap[row.fee.seaFreightVolume]}} 运费:{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</div> </div>
<div> <div>
清关费:{{row.fee.clearanceFreight}} {{currentMap[row.fee.clearanceFreightCurrency]}} / {{unitMap[row.fee.clearanceFreightVolume]}} 清关费:{{row.fee.clearanceFee}} {{currentcyMap[row.fee.clearanceFeeCurrency]}} / {{unitMap[row.fee.clearanceFeeVolume]}}
</div> </div>
</template> </template>
</template> </template>
......
...@@ -9,56 +9,56 @@ ...@@ -9,56 +9,56 @@
<el-input v-model.number="form.start" type="number"></el-input> <el-input v-model.number="form.start" type="number"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="结束标签" prop="end" required> <el-form-item label="结束标签" prop="end" required>
<el-input v-model.number="form.end" type="number" :max="detail ? detail.num : 1"></el-input> <el-input v-model.number="form.end" type="number"></el-input>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-button type="primary" @click="showPreview">去打印</el-button> <el-button type="primary" @click="showPreview">去打印</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<template v-if="step=='preview'"> <div v-if="step=='preview'" style="height:250px; overflow-y:hidden">
<div style="width: 80mm; margin: 0 auto;" id="order-print-tag" v-if="detail"> <div class="order-print-tag-item" v-for="item in tags.filter(tag => tag.num >= form.start && tag.num <= form.end)" style="width: 80mm; margin: 0 auto;" :id="'order-print-tag' + item.num" :key="item.num">
<div style="float: left; width: 28mm; border-bottom: 0.2mm solid #333; border-right: 0.2mm solid #333; " > <div style="float: left; width: 28mm; border-bottom: 0.2mm solid #333; border-right: 0.2mm solid #333; " >
<img :src="detail.url" alt="ECP0063704N-1" style="width: 26mm" /> <img :src="detail.url" alt="ECP0063704N-1" style="width: 26mm" />
<p style=" text-align: center; height: 5mm; font-size: 3mm; -webkit-margin-before: 0em; -webkit-margin-after: 0em; margin-top: 0mm; " > <p style=" text-align: center; height: 5mm; font-size: 3mm; -webkit-margin-before: 0em; -webkit-margin-after: 0em; margin-top: 0mm; " >
{{detail.orderNo}}-{{currentNo}} {{item.tag}}
</p> </p>
<p style="margin-top: -1mm; text-align: center"> <p style="margin-top: -1mm; text-align: center">
<span style="text-align: center; font-weight: 600; font-size: 6mm" >{{currentNo}}</span> <span style="text-align: center; font-weight: 600; font-size: 6mm" >{{item.num}}</span>
</p> </p>
</div> </div>
<div style="float: left; width: 50mm; margin-bottom: 2mm"> <div style="float: left; width: 50mm; margin-bottom: 2mm">
<p style=" padding-top: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; padding-bottom: 2.5mm; margin: 0px; font-weight: 600; font-size: 6mm; " > <p style=" padding-top: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; padding-bottom: 2.5mm; margin: 0px; font-weight: 600; font-size: 6mm; " >
{{detail.orderNo}} {{item.orderNo}}
</p> </p>
<p style=" padding: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; padding-top: 2.6mm; padding-bottom: 2.6mm; margin: 0px; font-weight: 600; font-size: 6mm; " > <p style=" padding: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; padding-top: 2.6mm; padding-bottom: 2.6mm; margin: 0px; font-weight: 600; font-size: 6mm; " >
{{detail.marks}} {{item.marks}}
</p> </p>
<p style=" padding: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; margin: 0px; font-size: 5mm; text-transform: uppercase; padding-top: 3.5mm; padding-bottom: 2.5mm; " > <p style=" padding: 0px; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; padding: 0px; margin: 0px; font-size: 5mm; text-transform: uppercase; padding-top: 3.5mm; padding-bottom: 2.5mm; " >
{{detail.startTitleEn}} --&gt; {{item.startTitleEn}} --&gt;
<label style="font-weight: 600; font-size: 5.5mm">{{detail.destTitleEn}} </label> <label style="font-weight: 600; font-size: 5.5mm">{{item.destTitleEn}} </label>
</p> </p>
<p style=" padding: 0px; padding-top: 2.7mm; padding-bottom: 2.7mm; padding-left: 3mm; float: left; width: 29%; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; font-size: 4mm; text-transform: uppercase; margin: 0px; " > <p style=" padding: 0px; padding-top: 2.7mm; padding-bottom: 2.7mm; padding-left: 3mm; float: left; width: 29%; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; font-size: 4mm; text-transform: uppercase; margin: 0px; " >
LCL LCL
</p> </p>
<p style=" padding: 0px; padding-top: 2.7mm; padding-bottom: 2.7mm; padding-left: 4mm; float: left; border-left: 0.2mm solid #333; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; margin: 0px; font-size: 5mm; text-transform: uppercase; font-weight: 500; " > <p style=" padding: 0px; padding-top: 2.7mm; padding-bottom: 2.7mm; padding-left: 4mm; float: left; border-left: 0.2mm solid #333; border-bottom: 0.2mm solid #333; text-align: center; line-height: 6mm; margin: 0px; font-size: 5mm; text-transform: uppercase; font-weight: 500; " >
{{detail.inTime|parseTime('{y}-{m}-{d}')}} {{item.inTime|parseTime('{y}-{m}-{d}')}}
</p> </p>
</div> </div>
<div style="width: 76mm"> <div style="width: 76mm">
<p style="text-align: center"> <p style="text-align: center">
<label <!-- <label
style="font-size: 5mm; font-weight: 600; padding-right: 1mm" style="font-size: 5mm; font-weight: 600; padding-right: 1mm"
>E&amp;C</label >E&amp;C</label
>{{detail.foot}} > -->{{item.foot}}
</p> </p>
</div> </div>
</div> </div>
<div style="text-align:center;"> </div>
<el-button type="primary" @click="print">确定打印</el-button> <div v-if="step=='preview'" style="text-align:center;">
</div> <el-button type="primary" @click="print">确定打印</el-button>
</template> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
data(){ data(){
return { return {
show: false, show: false,
detail: null, tags: [],
step: 'form', step: 'form',
form:{ form:{
start: 1, start: 1,
...@@ -84,6 +84,9 @@ export default { ...@@ -84,6 +84,9 @@ export default {
} }
}, },
computed:{ computed:{
detail(){
return this.tags.length ? this.tags[0] : null
},
title(){ title(){
let t = '打印标签' let t = '打印标签'
if(this.detail){ if(this.detail){
...@@ -99,7 +102,8 @@ export default { ...@@ -99,7 +102,8 @@ export default {
methods:{ methods:{
loadData(){ loadData(){
printTag(this.orderId).then(res => { printTag(this.orderId).then(res => {
this.$set(this, 'detail', res.data[0]) this.$set(this, 'tags', res.data)
this.form.end = res.data.length
}) })
}, },
closeDialog(){ closeDialog(){
...@@ -108,6 +112,9 @@ export default { ...@@ -108,6 +112,9 @@ export default {
this.$emit('close'); this.$emit('close');
}, },
showPreview(){ showPreview(){
if(this.form.end > this.tags.length){
return this.$message.error('结束标签不对')
}
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (!valid) { if (!valid) {
return; return;
...@@ -117,15 +124,21 @@ export default { ...@@ -117,15 +124,21 @@ export default {
}) })
}, },
print(){ print(){
let items = document.getElementsByClassName('order-print-tag-item')
if(!items.length){
return this.$message.error('没有可打印的内容')
}
lodop().then(LODOP => { lodop().then(LODOP => {
LODOP.PRINT_INIT(this.title); LODOP.PRINT_INIT(this.title);
LODOP.SET_PRINT_STYLE("FontSize",18); LODOP.SET_PRINT_STYLE("FontSize",18);
LODOP.SET_PRINT_STYLE("Bold",1); LODOP.SET_PRINT_STYLE("Bold",1);
// LODOP.ADD_PRINT_TEXT(50,231,260,39,"打印页面部分内容"); // LODOP.ADD_PRINT_TEXT(50,231,260,39,"打印页面部分内容");
LODOP.SET_PRINT_PAGESIZE(0, 800, 600, "TAG"); LODOP.SET_PRINT_PAGESIZE(0, 800, 600, "TAG");
for(let i = this.form.start; i <= this.form.end; i ++){ for(let i in items){
LODOP.ADD_PRINT_HTM(0,0,800,600, document.getElementById("order-print-tag").innerHTML); LODOP.ADD_PRINT_HTM(0,0,800,600, items[i].innerHTML);
if(i < this.form.end){ if(i < items.length){
LODOP.NewPage() LODOP.NewPage()
} }
} }
...@@ -137,7 +150,7 @@ export default { ...@@ -137,7 +150,7 @@ export default {
console.log('打印哦') console.log('打印哦')
}).catch(err => { }).catch(err => {
console.error('lodop异常', err) console.error('lodop异常', err)
alert('请检查LODOP打印控件是否安装并启动'); // alert('请检查LODOP打印控件是否安装并启动');
}) })
} }
......
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
<dict-selector v-model="row.unit" :type="DICT_TYPE.ECW_PACKAGE_TYPE" defaultable :disabled="!form.lineId" /> <dict-selector v-model="row.unit" :type="DICT_TYPE.ECW_PACKAGE_TYPE" defaultable :disabled="!form.lineId" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="数量"> <el-table-column label="数量(个)">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-model="row.quantity" type="number" :disabled="!form.lineId" /> <el-input v-model="row.quantity" type="number" :disabled="!form.lineId" />
</template> </template>
...@@ -165,8 +165,12 @@ ...@@ -165,8 +165,12 @@
<el-table-column label="运费" width="200px"> <el-table-column label="运费" width="200px">
<template slot-scope="{row}"> <template slot-scope="{row}">
<template v-if="row.fee && row.fee.charging == 1"> <template v-if="row.fee && row.fee.charging == 1">
全包价:{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}} <template v-if="!row.fee.freight">未报价</template>
<template v-else>
全包价:{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
</template>
</template> </template>
<template v-else-if="!row.fee || (!row.fee.freight && !row.fee.clearanceFee)">未报价</template>
<template v-else-if="row.fee"> <template v-else-if="row.fee">
<div> <div>
运费:{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}} 运费:{{row.fee.freight}} {{currentcyMap[row.fee.freightCurrency]}} / {{unitMap[row.fee.freightVolume]}}
...@@ -290,10 +294,10 @@ ...@@ -290,10 +294,10 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="单证报关" :span="2"> <el-descriptions-item label="单证报关" :span="2">
<dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" /> <dict-selector :type="DICT_TYPE.ECW_CUSTOMS_TYPE" v-model="form.customsType" form-type="radio" defaultable />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="出单方式"> <el-descriptions-item label="出单方式">
<dict-selector :type="DICT_TYPE.ECW_SUING_METHOD" v-model="form.issuingMethod" form-type="radio" /> <dict-selector :type="DICT_TYPE.ECW_SUING_METHOD" v-model="form.issuingMethod" form-type="radio" defaultable />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="送货日期"> <el-descriptions-item label="送货日期">
<el-form-item label="" label-width="0" style="margin-bottom: 0" prop="deliveryDate" required error="送货日期不能为空"> <el-form-item label="" label-width="0" style="margin-bottom: 0" prop="deliveryDate" required error="送货日期不能为空">
...@@ -338,7 +342,9 @@ ...@@ -338,7 +342,9 @@
<el-card class="mt-10" v-if="transport"> <el-card class="mt-10" v-if="transport">
<div class="card-title" slot="header">{{transport.label}}</div> <div class="card-title" slot="header">{{transport.label}}</div>
<el-form-item label="快递单号"> <el-form-item label="快递单号">
<el-input v-model="form.number" placeholder="请输入购买商品的快递单号"></el-input> <el-input v-model="form.number" placeholder="请输入购买商品的快递单号">
<el-button type="primary" slot="append" @click="getOrderCourierNumber">生成单号</el-button>
</el-input>
</el-form-item> </el-form-item>
<el-form-item label="是否双清" v-if="[2,3,4].indexOf(+form.transportId) > -1"> <el-form-item label="是否双清" v-if="[2,3,4].indexOf(+form.transportId) > -1">
<dict-selector v-model="form.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" /> <dict-selector v-model="form.doubleClear" form-type="radio" :type="DICT_TYPE.ECW_DOUBLE_CLEAR" />
...@@ -387,7 +393,7 @@ ...@@ -387,7 +393,7 @@
</template> </template>
<script> <script>
import { createOrder, updateOrder, getOrder, getProductFeeList, getOrderDetail } from "@/api/ecw/order"; import { createOrder, updateOrder, getOrder, getProductFeeList, getOrderDetail, getOrderCourierNumber } from "@/api/ecw/order";
import ProductSelector from '@/components/ProductSelector' import ProductSelector from '@/components/ProductSelector'
import {getProductAttrList} from '@/api/ecw/productAttr' import {getProductAttrList} from '@/api/ecw/productAttr'
import {getChannelList} from '@/api/ecw/channel' import {getChannelList} from '@/api/ecw/channel'
...@@ -432,7 +438,9 @@ export default { ...@@ -432,7 +438,9 @@ export default {
fee: {}, // 费用 fee: {}, // 费用
// 表单参数 // 表单参数
form: { form: {
sendstatus:0 sendstatus:0,
isCargoControl: false,
}, },
// 表单校验 // 表单校验
rules: { rules: {
...@@ -597,6 +605,12 @@ export default { ...@@ -597,6 +605,12 @@ export default {
onAreaChange(type, val){ onAreaChange(type, val){
this.$set(this.form, type, val) this.$set(this.form, type, val)
}, },
// 生成快递单号
getOrderCourierNumber(){
getOrderCourierNumber().then(res => {
this.$set(this.form, 'number', res.data)
})
},
/* // 获取发货人 /* // 获取发货人
getConsignor(){ getConsignor(){
if(!this.consignorContact){ if(!this.consignorContact){
......
...@@ -232,10 +232,6 @@ ...@@ -232,10 +232,6 @@
@pagination="getList" /> @pagination="getList" />
<special-needs :show.sync="isShow":order-id="orderId" @determine="getList" ></special-needs> <special-needs :show.sync="isShow":order-id="orderId" @determine="getList" ></special-needs>
<!-- <el-dialog :title="'打印标签'" visible.sync="showPrintTag">
</el-dialog> -->
<print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" /> <print-tag v-if="printTagOrderId !== null" :order-id="printTagOrderId" @close="printTagOrderId=null" />
<print-warehouse-receipt v-if="printWarehouseReceiptOrderId !== null" :order-id="printWarehouseReceiptOrderId" @close="printWarehouseReceiptOrderId=null" /> <print-warehouse-receipt v-if="printWarehouseReceiptOrderId !== null" :order-id="printWarehouseReceiptOrderId" @close="printWarehouseReceiptOrderId=null" />
<print-lading-bill v-if="printLadingBillInfo !== null" v-bind="printLadingBillInfo" @close="printLadingBillInfo=null" /> <print-lading-bill v-if="printLadingBillInfo !== null" v-bind="printLadingBillInfo" @close="printLadingBillInfo=null" />
......
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