|
@@ -19,7 +19,7 @@
|
|
<el-collapse-item title="基本信息" name="1" class="add-order-item">
|
|
<el-collapse-item title="基本信息" name="1" class="add-order-item">
|
|
<by-form :propConfig="baseConfig" ref="baseform" @formChange="formChangeBase">
|
|
<by-form :propConfig="baseConfig" ref="baseform" @formChange="formChangeBase">
|
|
<template v-slot:sourceFrom_desc='{ value }'>
|
|
<template v-slot:sourceFrom_desc='{ value }'>
|
|
- {{ getFromText(value.sourceFrom) }}
|
|
|
|
|
|
+ {{ getFromText(value.operationFlag) }}
|
|
</template>
|
|
</template>
|
|
<template v-slot:shopName="{value}">
|
|
<template v-slot:shopName="{value}">
|
|
<el-input :placeholder="!orderValue.id?'请选择标签':''" :value="value.shopName" :disabled="orderValue.id?true:false" @clear="clearShop" size="small" class="myinpuy-with-select" clearable>
|
|
<el-input :placeholder="!orderValue.id?'请选择标签':''" :value="value.shopName" :disabled="orderValue.id?true:false" @clear="clearShop" size="small" class="myinpuy-with-select" clearable>
|
|
@@ -35,8 +35,8 @@
|
|
</el-collapse-item>
|
|
</el-collapse-item>
|
|
<el-collapse-item title="买家信息" name="2" class="add-order-item">
|
|
<el-collapse-item title="买家信息" name="2" class="add-order-item">
|
|
<by-form :propConfig="buyerInfoConfig" ref="infoform">
|
|
<by-form :propConfig="buyerInfoConfig" ref="infoform">
|
|
- <template v-slot:shopBuyerId="{value}">
|
|
|
|
- <el-input placeholder="请选择买家'" :value="value.shopBuyerId" @clear="clearBuyer" size="small" class="myinpuy-with-select" clearable>
|
|
|
|
|
|
+ <template v-slot:buyerNickname="{value}">
|
|
|
|
+ <el-input placeholder="请选择买家'" :value="value.buyerNickname" @clear="clearBuyer" size="small" class="myinpuy-with-select" clearable>
|
|
<el-button slot="append" icon="el-icon-more" @click="showBuyer"></el-button>
|
|
<el-button slot="append" icon="el-icon-more" @click="showBuyer"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
</template>
|
|
</template>
|
|
@@ -85,10 +85,9 @@
|
|
</el-collapse-item>
|
|
</el-collapse-item>
|
|
<el-collapse-item title="商品订单" name="3" class="add-order-item">
|
|
<el-collapse-item title="商品订单" name="3" class="add-order-item">
|
|
<div class="addProductTool">
|
|
<div class="addProductTool">
|
|
- <by-tool :propConfig="toolConfig" ref="tool"></by-tool>
|
|
|
|
|
|
+ <by-tool :propConfig="toolConfig" v-if="orderValue.status !== 'Delivering' && orderValue.status !== 'Sent'" ref="tool"></by-tool>
|
|
<div class="preferential">
|
|
<div class="preferential">
|
|
- <div class="pre-title">抵扣金额<i class="el-icon-info" title="支持输入数字和百分比。若输入百分比,将自动计算折扣金额=商品成交总金额*百分比(举例:打9折,请输入10%),
|
|
|
|
- 只在订单创建时计算一次,在订单创建后修改商品价格不会自动计算,运费不参与折扣。"></i>:</div>
|
|
|
|
|
|
+ <div class="pre-title">抵扣金额<i class="el-icon-info" title="支持输入数字和百分比。若输入百分比,将自动计算折扣金额=商品成交总金额*百分比(举例:打9折,请输入10%),只在订单创建时计算一次,在订单创建后修改商品价格不会自动计算,运费不参与折扣。"></i>:</div>
|
|
<vxe-input v-if="!orderValue.id" v-model="freeAmount" class="freeAmount" placeholder="请输入" size="mini" @change="freeAmountChange"></vxe-input>
|
|
<vxe-input v-if="!orderValue.id" v-model="freeAmount" class="freeAmount" placeholder="请输入" size="mini" @change="freeAmountChange"></vxe-input>
|
|
<span v-else>{{ freeAmount }}</span>
|
|
<span v-else>{{ freeAmount }}</span>
|
|
</div>
|
|
</div>
|
|
@@ -209,7 +208,7 @@ export default class AddOrder extends Vue {
|
|
topStep=['WaitPay','WaitConfirm','Delivering']
|
|
topStep=['WaitPay','WaitConfirm','Delivering']
|
|
stepCon=['WaitPay','WaitConfirm','WaitFConfirm','WaitOuterSent','Sent','Delivering']
|
|
stepCon=['WaitPay','WaitConfirm','WaitFConfirm','WaitOuterSent','Sent','Delivering']
|
|
activeNames:Array<any> =['1','2','3','4','5','save'];
|
|
activeNames:Array<any> =['1','2','3','4','5','save'];
|
|
- sourceFrom:any={
|
|
|
|
|
|
+ operationFlag:any={
|
|
'ERP':'手工下单',
|
|
'ERP':'手工下单',
|
|
'COPY':'复制',
|
|
'COPY':'复制',
|
|
'MERGE':'合并',
|
|
'MERGE':'合并',
|
|
@@ -230,9 +229,6 @@ export default class AddOrder extends Vue {
|
|
size:'small',
|
|
size:'small',
|
|
itemCount:4,
|
|
itemCount:4,
|
|
rules:{
|
|
rules:{
|
|
- shopName:[{
|
|
|
|
- required: true, message: '店铺名称不能为空!', trigger: 'change'
|
|
|
|
- }],
|
|
|
|
orderDate:[{
|
|
orderDate:[{
|
|
required: true, message: '订单日期不能为空!', trigger: 'blur'
|
|
required: true, message: '订单日期不能为空!', trigger: 'blur'
|
|
}]
|
|
}]
|
|
@@ -241,17 +237,18 @@ export default class AddOrder extends Vue {
|
|
columns:[
|
|
columns:[
|
|
[{
|
|
[{
|
|
span:6,
|
|
span:6,
|
|
- label:'店铺名称',
|
|
|
|
- prop:'shopName',
|
|
|
|
- slot:true,
|
|
|
|
- // component:'by-input',
|
|
|
|
- // compConfig:{
|
|
|
|
- // attr:{
|
|
|
|
- // type:'integer',
|
|
|
|
- // placeholder:'请输入店铺名称',
|
|
|
|
- // clearable:true
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
|
|
+ label:'订单来源',
|
|
|
|
+ prop:'upSourceName',
|
|
|
|
+ // slot:true,
|
|
|
|
+ component:'by-input',
|
|
|
|
+ compConfig:{
|
|
|
|
+ attr:{
|
|
|
|
+ readonly:true
|
|
|
|
+ // type:'integer',
|
|
|
|
+ // placeholder:'请输入店铺名称',
|
|
|
|
+ // clearable:true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},{
|
|
},{
|
|
span:6,
|
|
span:6,
|
|
label:'线上订单',
|
|
label:'线上订单',
|
|
@@ -302,18 +299,6 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // {
|
|
|
|
- // span:6,
|
|
|
|
- // label:'快递单号',
|
|
|
|
- // prop:'logisticsId',
|
|
|
|
- // component:'by-input',
|
|
|
|
- // compConfig:{
|
|
|
|
- // attr:{
|
|
|
|
- // readonly:true,
|
|
|
|
- // clearable:true
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
{
|
|
{
|
|
span:6,
|
|
span:6,
|
|
label:'业务员',
|
|
label:'业务员',
|
|
@@ -328,8 +313,8 @@ export default class AddOrder extends Vue {
|
|
}],
|
|
}],
|
|
[{
|
|
[{
|
|
span:6,
|
|
span:6,
|
|
- label:'订单来源',
|
|
|
|
- prop:'sourceFrom',
|
|
|
|
|
|
+ label:'操作标记',
|
|
|
|
+ prop:'operationFlag',
|
|
descSlot:true,
|
|
descSlot:true,
|
|
component:'by-select',
|
|
component:'by-select',
|
|
colspan:2,
|
|
colspan:2,
|
|
@@ -339,7 +324,7 @@ export default class AddOrder extends Vue {
|
|
disabled:true,
|
|
disabled:true,
|
|
data:[{
|
|
data:[{
|
|
label:'手工下单',
|
|
label:'手工下单',
|
|
- value:'ERP'
|
|
|
|
|
|
+ value:'OMS'
|
|
},{
|
|
},{
|
|
label:'复制',
|
|
label:'复制',
|
|
value:'COPY'
|
|
value:'COPY'
|
|
@@ -357,10 +342,10 @@ export default class AddOrder extends Vue {
|
|
value:'IMPORT'
|
|
value:'IMPORT'
|
|
},{
|
|
},{
|
|
label:'供销推送',
|
|
label:'供销推送',
|
|
- value:'drp-s'
|
|
|
|
|
|
+ value:'DRP-S'
|
|
},{
|
|
},{
|
|
label:'分销推送',
|
|
label:'分销推送',
|
|
- value:'drp-d'
|
|
|
|
|
|
+ value:'DRP-D'
|
|
},{
|
|
},{
|
|
label:'快手;微商城',
|
|
label:'快手;微商城',
|
|
value:'KWAISHOP'
|
|
value:'KWAISHOP'
|
|
@@ -426,7 +411,7 @@ export default class AddOrder extends Vue {
|
|
size:'small',
|
|
size:'small',
|
|
itemCount:4,
|
|
itemCount:4,
|
|
rules:{
|
|
rules:{
|
|
- shopBuyerId:[{
|
|
|
|
|
|
+ buyerNickname:[{
|
|
required: true, message: '买家账号不能为空!', trigger: 'blur'
|
|
required: true, message: '买家账号不能为空!', trigger: 'blur'
|
|
}],
|
|
}],
|
|
receiverDistrictCode:[{
|
|
receiverDistrictCode:[{
|
|
@@ -446,7 +431,7 @@ export default class AddOrder extends Vue {
|
|
[{
|
|
[{
|
|
span:6,
|
|
span:6,
|
|
label:'买家',
|
|
label:'买家',
|
|
- prop:'shopBuyerId',
|
|
|
|
|
|
+ prop:'buyerNickname',
|
|
slot:true,
|
|
slot:true,
|
|
// component:'by-input',
|
|
// component:'by-input',
|
|
// compConfig:{
|
|
// compConfig:{
|
|
@@ -469,40 +454,6 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}],
|
|
}],
|
|
- [{
|
|
|
|
- span:24,
|
|
|
|
- label:'收货地址',
|
|
|
|
- // slot:true,
|
|
|
|
- prop:'receiverProvinceCode',
|
|
|
|
- component:'by-area',
|
|
|
|
- colspan:2,
|
|
|
|
- descSlot:true,
|
|
|
|
- compConfig:{
|
|
|
|
- attr:{
|
|
|
|
- province:'receiverProvince', //省
|
|
|
|
- provinceCode:'receiverProvinceCode', //省编码
|
|
|
|
- city:'receiverCity', //市
|
|
|
|
- cityCode:'receiverCityCode', //市编码
|
|
|
|
- county:'receiverDistrict', //县/区
|
|
|
|
- countyCode:'receiverDistrictCode', //县/区编码
|
|
|
|
- townCode:'receiverTownCode',
|
|
|
|
- town:'receiverTown',
|
|
|
|
- // show:'county'
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }],
|
|
|
|
- [{
|
|
|
|
- span:24,
|
|
|
|
- label:'详细地址',
|
|
|
|
- prop:'receiverAddress',
|
|
|
|
- component:'by-input',
|
|
|
|
- compConfig:{
|
|
|
|
- attr:{
|
|
|
|
- placeholder:'请输入详细地址',
|
|
|
|
- clearable:true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }],
|
|
|
|
[{
|
|
[{
|
|
span:6,
|
|
span:6,
|
|
label:'手机',
|
|
label:'手机',
|
|
@@ -536,6 +487,40 @@ export default class AddOrder extends Vue {
|
|
clearable:true
|
|
clearable:true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ }],
|
|
|
|
+ [{
|
|
|
|
+ span:24,
|
|
|
|
+ label:'收货地址',
|
|
|
|
+ // slot:true,
|
|
|
|
+ prop:'receiverProvinceCode',
|
|
|
|
+ component:'by-area',
|
|
|
|
+ colspan:2,
|
|
|
|
+ descSlot:true,
|
|
|
|
+ compConfig:{
|
|
|
|
+ attr:{
|
|
|
|
+ province:'receiverProvince', //省
|
|
|
|
+ provinceCode:'receiverProvinceCode', //省编码
|
|
|
|
+ city:'receiverCity', //市
|
|
|
|
+ cityCode:'receiverCityCode', //市编码
|
|
|
|
+ county:'receiverDistrict', //县/区
|
|
|
|
+ countyCode:'receiverDistrictCode', //县/区编码
|
|
|
|
+ townCode:'receiverTownCode',
|
|
|
|
+ town:'receiverTown',
|
|
|
|
+ // show:'county'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }],
|
|
|
|
+ [{
|
|
|
|
+ span:24,
|
|
|
|
+ label:'详细地址',
|
|
|
|
+ prop:'receiverAddress',
|
|
|
|
+ component:'by-input',
|
|
|
|
+ compConfig:{
|
|
|
|
+ attr:{
|
|
|
|
+ placeholder:'请输入详细地址',
|
|
|
|
+ clearable:true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}]
|
|
}]
|
|
]
|
|
]
|
|
}
|
|
}
|
|
@@ -881,11 +866,11 @@ export default class AddOrder extends Vue {
|
|
if(f){
|
|
if(f){
|
|
let arr:Array<any>=f.split(',');
|
|
let arr:Array<any>=f.split(',');
|
|
for(const item of arr){
|
|
for(const item of arr){
|
|
- if(this.sourceFrom[item]){
|
|
|
|
|
|
+ if(this.operationFlag[item]){
|
|
if(t){
|
|
if(t){
|
|
- t = t + ' , ' + this.sourceFrom[item]
|
|
|
|
|
|
+ t = t + ' , ' + this.operationFlag[item]
|
|
}else{
|
|
}else{
|
|
- t = this.sourceFrom[item]
|
|
|
|
|
|
+ t = this.operationFlag[item]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -932,7 +917,7 @@ export default class AddOrder extends Vue {
|
|
clearBuyer(){
|
|
clearBuyer(){
|
|
let value:any = (this.$refs.infoform as any).getValue();
|
|
let value:any = (this.$refs.infoform as any).getValue();
|
|
value.buyerId = '';
|
|
value.buyerId = '';
|
|
- value.shopBuyerId = '';
|
|
|
|
|
|
+ value.buyerNickname = '';
|
|
(this.$refs.infoform as any).setValue(value);
|
|
(this.$refs.infoform as any).setValue(value);
|
|
}
|
|
}
|
|
setDetail(data:any){
|
|
setDetail(data:any){
|
|
@@ -1020,11 +1005,9 @@ export default class AddOrder extends Vue {
|
|
let payFormValue = (this.$refs.payform as any).getValue();
|
|
let payFormValue = (this.$refs.payform as any).getValue();
|
|
payFormValue.sellerId = this.userInfo.userId;
|
|
payFormValue.sellerId = this.userInfo.userId;
|
|
payFormValue.orderId = this.orderValue.id;
|
|
payFormValue.orderId = this.orderValue.id;
|
|
- payFormValue.sourceFrom = this.orderValue.sourceFrom;
|
|
|
|
|
|
+ payFormValue.operationFlag = this.orderValue.operationFlag;
|
|
payFormValue.isOrderPay = 1;
|
|
payFormValue.isOrderPay = 1;
|
|
- payFormValue.shopBuyerId = this.orderValue.shopBuyerId;
|
|
|
|
- payFormValue.shopId = this.orderValue.shopId;
|
|
|
|
- payFormValue.shopName = this.orderValue.shopName;
|
|
|
|
|
|
+ payFormValue.buyerNickname = this.orderValue.buyerNickname;
|
|
payFormValue.status = this.orderValue.status;
|
|
payFormValue.status = this.orderValue.status;
|
|
this.load = true;
|
|
this.load = true;
|
|
addPay(payFormValue).then(()=>{
|
|
addPay(payFormValue).then(()=>{
|
|
@@ -1044,7 +1027,7 @@ export default class AddOrder extends Vue {
|
|
// 买家信息
|
|
// 买家信息
|
|
confirmBuyerInfo(data:any) {
|
|
confirmBuyerInfo(data:any) {
|
|
let v:any = {}
|
|
let v:any = {}
|
|
- v.shopBuyerId = data[0].name
|
|
|
|
|
|
+ v.buyerNickname = data[0].name
|
|
v.buyerId = data[0].id
|
|
v.buyerId = data[0].id
|
|
v.receiverName = data[0].contacts
|
|
v.receiverName = data[0].contacts
|
|
v.receiverProvince = data[0].province
|
|
v.receiverProvince = data[0].province
|
|
@@ -1057,12 +1040,20 @@ export default class AddOrder extends Vue {
|
|
v.receiverTown = data[0].street
|
|
v.receiverTown = data[0].street
|
|
v.receiverAddress = data[0].address
|
|
v.receiverAddress = data[0].address
|
|
v.receiverMobile = data[0].telephone
|
|
v.receiverMobile = data[0].telephone
|
|
|
|
+ v.receiverPhone = data[0].phonenum
|
|
if(this.$refs.infoform){
|
|
if(this.$refs.infoform){
|
|
(this.$refs.infoform as any).setValue(v)
|
|
(this.$refs.infoform as any).setValue(v)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
//添加商品
|
|
//添加商品
|
|
toolAddProduct(){
|
|
toolAddProduct(){
|
|
|
|
+ if (this.orderValue.status == 'Delivering' || this.orderValue.status == 'Sent') {
|
|
|
|
+ this.$message({
|
|
|
|
+ message:'该订单已发货不能进行修改!',
|
|
|
|
+ type:'warning'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if(this.orderValue.id){
|
|
if(this.orderValue.id){
|
|
(this.$refs.addProductModal as any).setBillValue(this.orderValue.id);
|
|
(this.$refs.addProductModal as any).setBillValue(this.orderValue.id);
|
|
(this.$refs.addProductModal as any).setShow(true);
|
|
(this.$refs.addProductModal as any).setShow(true);
|
|
@@ -1073,6 +1064,13 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
//添加赠品
|
|
//添加赠品
|
|
toolAddGift(){
|
|
toolAddGift(){
|
|
|
|
+ if (this.orderValue.status == 'Delivering' || this.orderValue.status == 'Sent') {
|
|
|
|
+ this.$message({
|
|
|
|
+ message:'该订单已发货不能进行修改!',
|
|
|
|
+ type:'warning'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if(this.orderValue.id){
|
|
if(this.orderValue.id){
|
|
(this.$refs.addProductModal as any).setBillValue([this.orderValue.id]);
|
|
(this.$refs.addProductModal as any).setBillValue([this.orderValue.id]);
|
|
(this.$refs.addProductModal as any).setShow(true);
|
|
(this.$refs.addProductModal as any).setShow(true);
|
|
@@ -1100,6 +1098,13 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
//商品编辑
|
|
//商品编辑
|
|
editProduct(){
|
|
editProduct(){
|
|
|
|
+ if (this.orderValue.status == 'Delivering' || this.orderValue.status == 'Sent') {
|
|
|
|
+ this.$message({
|
|
|
|
+ message:'该订单已发货不能进行修改!',
|
|
|
|
+ type:'warning'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
let tableValue = (this.$refs.table as any).getValue();
|
|
let tableValue = (this.$refs.table as any).getValue();
|
|
(this.$refs.editProductModal as any).setShow(true);
|
|
(this.$refs.editProductModal as any).setShow(true);
|
|
(this.$refs.editProductModal as any).setOrderValue(this.orderValue);
|
|
(this.$refs.editProductModal as any).setOrderValue(this.orderValue);
|
|
@@ -1128,12 +1133,12 @@ export default class AddOrder extends Vue {
|
|
info.remark = data.remark;
|
|
info.remark = data.remark;
|
|
info.labels = data.labels;
|
|
info.labels = data.labels;
|
|
info.logisticsId = data.logisticsId;
|
|
info.logisticsId = data.logisticsId;
|
|
- info.sourceFrom = data.sourceFrom;
|
|
|
|
|
|
+ info.operationFlag = data.operationFlag;
|
|
this.baseConfig.attr.data = info;
|
|
this.baseConfig.attr.data = info;
|
|
(this.$refs.baseform as any).setValue(info);
|
|
(this.$refs.baseform as any).setValue(info);
|
|
//买家
|
|
//买家
|
|
let buyerInfo:any={};
|
|
let buyerInfo:any={};
|
|
- buyerInfo.shopBuyerId = data.shopBuyerId;
|
|
|
|
|
|
+ buyerInfo.buyerNickname = data.buyerNickname;
|
|
buyerInfo.receiverName = data.receiverName;
|
|
buyerInfo.receiverName = data.receiverName;
|
|
buyerInfo.receiverProvince=data.receiverProvince;//省
|
|
buyerInfo.receiverProvince=data.receiverProvince;//省
|
|
buyerInfo.receiverProvinceCode=data.receiverProvinceCode; //省编码
|
|
buyerInfo.receiverProvinceCode=data.receiverProvinceCode; //省编码
|