|
@@ -21,6 +21,9 @@
|
|
<template v-slot:sourceFrom_desc='{ value }'>
|
|
<template v-slot:sourceFrom_desc='{ value }'>
|
|
{{ getFromText(value.operationFlag) }}
|
|
{{ getFromText(value.operationFlag) }}
|
|
</template>
|
|
</template>
|
|
|
|
+ <template v-slot:sellType_desc='{ value }'>
|
|
|
|
+ {{ value.sellType ? getSellType(value.sellType) : '--' }}
|
|
|
|
+ </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>
|
|
<el-button slot="append" v-if="!orderValue.id" icon="el-icon-more" @click="showShop"></el-button>
|
|
<el-button slot="append" v-if="!orderValue.id" icon="el-icon-more" @click="showShop"></el-button>
|
|
@@ -33,10 +36,10 @@
|
|
</template>
|
|
</template>
|
|
</by-form>
|
|
</by-form>
|
|
</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:buyerNickname="{value}">
|
|
<template v-slot:buyerNickname="{value}">
|
|
- <el-input placeholder="请选择买家'" :value="value.buyerNickname" @clear="clearBuyer" size="small" class="myinpuy-with-select" clearable>
|
|
|
|
|
|
+ <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>
|
|
@@ -106,12 +109,7 @@
|
|
</template>
|
|
</template>
|
|
<template v-slot:price='{ row,rowIndex }'>
|
|
<template v-slot:price='{ row,rowIndex }'>
|
|
<span v-if="row.isGift == 1">0</span>
|
|
<span v-if="row.isGift == 1">0</span>
|
|
-
|
|
|
|
- <!-- <el-input :placeholder="!orderValue.id?'请选择标签':''" :value="value.shopName" :disabled="orderValue.id?true:false" @clear="clearShop" size="small" class="myinpuy-with-select" clearable>
|
|
|
|
- <el-button slot="append" v-if="!orderValue.id" icon="el-icon-more" @click="showShop"></el-button>
|
|
|
|
- </el-input> -->
|
|
|
|
-
|
|
|
|
- <el-input v-else-if="!orderValue.id" v-model="row.price" placeholder="单价" align="center" size="mini" @input="priceChange($event, row)" >
|
|
|
|
|
|
+ <el-input v-else-if="!orderValue.id" v-model="row.price" type="number" placeholder="单价" align="center" size="mini" @input="priceChange($event, row)" >
|
|
<el-button slot="append" class="price-btn" icon="el-icon-more" @click="showPrice(rowIndex)"></el-button>
|
|
<el-button slot="append" class="price-btn" icon="el-icon-more" @click="showPrice(rowIndex)"></el-button>
|
|
</el-input>
|
|
</el-input>
|
|
|
|
|
|
@@ -394,6 +392,35 @@ export default class AddOrder extends Vue {
|
|
slot:true
|
|
slot:true
|
|
}],
|
|
}],
|
|
[{
|
|
[{
|
|
|
|
+ span:6,
|
|
|
|
+ label:'售卖类型',
|
|
|
|
+ prop:'sellType',
|
|
|
|
+ descSlot:true,
|
|
|
|
+ component:'by-select',
|
|
|
|
+ compConfig:{
|
|
|
|
+ attr:{
|
|
|
|
+ placeholder:'售卖类型',
|
|
|
|
+ clearable:true,
|
|
|
|
+ defaultIndex: 0,
|
|
|
|
+ data:[{
|
|
|
|
+ value: '1',
|
|
|
|
+ label: '自营'
|
|
|
|
+ }, {
|
|
|
|
+ value: '2',
|
|
|
|
+ label: '代发'
|
|
|
|
+ }, {
|
|
|
|
+ value: '3',
|
|
|
|
+ label: '代销'
|
|
|
|
+ }, {
|
|
|
|
+ value: '4',
|
|
|
|
+ label: '经销'
|
|
|
|
+ }, {
|
|
|
|
+ value: '5',
|
|
|
|
+ label: '线下'
|
|
|
|
+ }]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }, {
|
|
label:'线下备注',
|
|
label:'线下备注',
|
|
prop:'note',
|
|
prop:'note',
|
|
component:'by-input',
|
|
component:'by-input',
|
|
@@ -412,7 +439,7 @@ export default class AddOrder extends Vue {
|
|
colspan:2,
|
|
colspan:2,
|
|
compConfig:{
|
|
compConfig:{
|
|
attr:{
|
|
attr:{
|
|
- placeholder:'请输入买家留言',
|
|
|
|
|
|
+ placeholder:'请输入买家/分销商留言',
|
|
clearable:true
|
|
clearable:true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -437,7 +464,7 @@ export default class AddOrder extends Vue {
|
|
itemCount:4,
|
|
itemCount:4,
|
|
rules:{
|
|
rules:{
|
|
buyerNickname:[{
|
|
buyerNickname:[{
|
|
- required: true, message: '买家账号不能为空!', trigger: 'change'
|
|
|
|
|
|
+ required: true, message: '买家/分销商账号不能为空!', trigger: 'change'
|
|
}],
|
|
}],
|
|
receiverDistrictCode:[{
|
|
receiverDistrictCode:[{
|
|
required: true, message: '收货地址不能为空!', trigger: 'blur'
|
|
required: true, message: '收货地址不能为空!', trigger: 'blur'
|
|
@@ -454,9 +481,10 @@ export default class AddOrder extends Vue {
|
|
},
|
|
},
|
|
columns:[
|
|
columns:[
|
|
[{
|
|
[{
|
|
- span:6,
|
|
|
|
- label:'买家',
|
|
|
|
|
|
+ span:8,
|
|
|
|
+ label:'买家/分销商',
|
|
prop:'buyerNickname',
|
|
prop:'buyerNickname',
|
|
|
|
+ colspan: 2,
|
|
slot:true,
|
|
slot:true,
|
|
// component:'by-input',
|
|
// component:'by-input',
|
|
// compConfig:{
|
|
// compConfig:{
|
|
@@ -465,7 +493,8 @@ export default class AddOrder extends Vue {
|
|
// }
|
|
// }
|
|
// }
|
|
// }
|
|
},{
|
|
},{
|
|
- span:6,
|
|
|
|
|
|
+ span:8,
|
|
|
|
+ colspan: 2,
|
|
label:'收货人',
|
|
label:'收货人',
|
|
prop:'receiverName',
|
|
prop:'receiverName',
|
|
component:'by-input',
|
|
component:'by-input',
|
|
@@ -480,8 +509,9 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
}],
|
|
}],
|
|
[{
|
|
[{
|
|
- span:6,
|
|
|
|
|
|
+ span:8,
|
|
label:'手机',
|
|
label:'手机',
|
|
|
|
+ colspan: 1,
|
|
prop:'receiverMobile',
|
|
prop:'receiverMobile',
|
|
component:'by-input',
|
|
component:'by-input',
|
|
compConfig:{
|
|
compConfig:{
|
|
@@ -491,7 +521,8 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},{
|
|
},{
|
|
- span:6,
|
|
|
|
|
|
+ span:8,
|
|
|
|
+ colspan: 1,
|
|
label:'固定电话',
|
|
label:'固定电话',
|
|
prop:'receiverPhone',
|
|
prop:'receiverPhone',
|
|
component:'by-input',
|
|
component:'by-input',
|
|
@@ -502,7 +533,8 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},{
|
|
},{
|
|
- span:6,
|
|
|
|
|
|
+ span:8,
|
|
|
|
+ colspan: 2,
|
|
label:'邮编',
|
|
label:'邮编',
|
|
prop:'receiverZip',
|
|
prop:'receiverZip',
|
|
component:'by-input',
|
|
component:'by-input',
|
|
@@ -519,7 +551,7 @@ export default class AddOrder extends Vue {
|
|
// slot:true,
|
|
// slot:true,
|
|
prop:'receiverProvinceCode',
|
|
prop:'receiverProvinceCode',
|
|
component:'by-area',
|
|
component:'by-area',
|
|
- colspan:2,
|
|
|
|
|
|
+ colspan:4,
|
|
descSlot:true,
|
|
descSlot:true,
|
|
compConfig:{
|
|
compConfig:{
|
|
attr:{
|
|
attr:{
|
|
@@ -538,6 +570,7 @@ export default class AddOrder extends Vue {
|
|
[{
|
|
[{
|
|
span:24,
|
|
span:24,
|
|
label:'详细地址',
|
|
label:'详细地址',
|
|
|
|
+ colspan: 4,
|
|
prop:'receiverAddress',
|
|
prop:'receiverAddress',
|
|
component:'by-input',
|
|
component:'by-input',
|
|
compConfig:{
|
|
compConfig:{
|
|
@@ -850,12 +883,12 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
},{
|
|
},{
|
|
span:6,
|
|
span:6,
|
|
- label:'买家支付账号',
|
|
|
|
|
|
+ label:'买家/分销商支付账号',
|
|
prop:'buyerAccount',
|
|
prop:'buyerAccount',
|
|
component:'by-input',
|
|
component:'by-input',
|
|
compConfig:{
|
|
compConfig:{
|
|
attr:{
|
|
attr:{
|
|
- placeholder:'买家账号',
|
|
|
|
|
|
+ placeholder:'买家/分销商账号',
|
|
clearable:true
|
|
clearable:true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -886,6 +919,28 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
proCurrentIndex:any=null;
|
|
proCurrentIndex:any=null;
|
|
|
|
+ //转换售卖类型
|
|
|
|
+ getSellType(n:any) {
|
|
|
|
+ let name = '--'
|
|
|
|
+ switch(n) {
|
|
|
|
+ case '1':
|
|
|
|
+ name = '自营';
|
|
|
|
+ break;
|
|
|
|
+ case '2':
|
|
|
|
+ name = '代发';
|
|
|
|
+ break;
|
|
|
|
+ case '3':
|
|
|
|
+ name = '代销';
|
|
|
|
+ break;
|
|
|
|
+ case '4':
|
|
|
|
+ name = '经销';
|
|
|
|
+ break;
|
|
|
|
+ case '5':
|
|
|
|
+ name = '线下';
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ return name;
|
|
|
|
+ }
|
|
// 显示价格弹窗
|
|
// 显示价格弹窗
|
|
showPrice(v:any) {
|
|
showPrice(v:any) {
|
|
this.proCurrentIndex = v;
|
|
this.proCurrentIndex = v;
|
|
@@ -1079,7 +1134,7 @@ export default class AddOrder extends Vue {
|
|
})
|
|
})
|
|
|
|
|
|
}
|
|
}
|
|
- // 买家信息
|
|
|
|
|
|
+ // 买家/分销商信息
|
|
confirmBuyerInfo(data:any) {
|
|
confirmBuyerInfo(data:any) {
|
|
let v:any = {}
|
|
let v:any = {}
|
|
v.buyerNickname = data[0].name
|
|
v.buyerNickname = data[0].name
|
|
@@ -1109,13 +1164,14 @@ export default class AddOrder extends Vue {
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if(this.orderValue.id){
|
|
|
|
- (this.$refs.addProductModal as any).setBillValue(this.orderValue.id);
|
|
|
|
- (this.$refs.addProductModal as any).setShow(true);
|
|
|
|
- (this.$refs.addProductModal as any).setGift(false);
|
|
|
|
- }else{
|
|
|
|
- (this.$refs.product as any).setShow(true);
|
|
|
|
- }
|
|
|
|
|
|
+ (this.$refs.product as any).setShow(true);
|
|
|
|
+ // if(this.orderValue.id){
|
|
|
|
+ // (this.$refs.addProductModal as any).setBillValue(this.orderValue.id);
|
|
|
|
+ // (this.$refs.addProductModal as any).setShow(true);
|
|
|
|
+ // (this.$refs.addProductModal as any).setGift(false);
|
|
|
|
+ // }else{
|
|
|
|
+ // (this.$refs.product as any).setShow(true);
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
//添加赠品
|
|
//添加赠品
|
|
toolAddGift(){
|
|
toolAddGift(){
|
|
@@ -1126,13 +1182,14 @@ export default class AddOrder extends Vue {
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- if(this.orderValue.id){
|
|
|
|
- (this.$refs.addProductModal as any).setBillValue([this.orderValue.id]);
|
|
|
|
- (this.$refs.addProductModal as any).setShow(true);
|
|
|
|
- (this.$refs.addProductModal as any).setGift(true);
|
|
|
|
- }else{
|
|
|
|
- (this.$refs.productGift as any).setShow(true);
|
|
|
|
- }
|
|
|
|
|
|
+ (this.$refs.productGift as any).setShow(true);
|
|
|
|
+ // if(this.orderValue.id){
|
|
|
|
+ // (this.$refs.addProductModal as any).setBillValue([this.orderValue.id]);
|
|
|
|
+ // (this.$refs.addProductModal as any).setShow(true);
|
|
|
|
+ // (this.$refs.addProductModal as any).setGift(true);
|
|
|
|
+ // }else{
|
|
|
|
+ // (this.$refs.productGift as any).setShow(true);
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
//获取数据
|
|
//获取数据
|
|
getData(){
|
|
getData(){
|
|
@@ -1187,6 +1244,7 @@ export default class AddOrder extends Vue {
|
|
info.buyerMessage = data.buyerMessage;
|
|
info.buyerMessage = data.buyerMessage;
|
|
info.remark = data.remark;
|
|
info.remark = data.remark;
|
|
info.labels = data.labels;
|
|
info.labels = data.labels;
|
|
|
|
+ info.sellType = data.sellType;
|
|
info.logisticsId = data.logisticsId;
|
|
info.logisticsId = data.logisticsId;
|
|
info.operationFlag = data.operationFlag;
|
|
info.operationFlag = data.operationFlag;
|
|
this.baseConfig.attr.data = info;
|
|
this.baseConfig.attr.data = info;
|
|
@@ -1251,7 +1309,7 @@ export default class AddOrder extends Vue {
|
|
}else{
|
|
}else{
|
|
for(let col of this.baseConfig.columns){
|
|
for(let col of this.baseConfig.columns){
|
|
for(let item of col){
|
|
for(let item of col){
|
|
- let disField:Array<string>=['freight','buyerMessage','remark']
|
|
|
|
|
|
+ let disField:Array<string>=['freight','buyerMessage','remark','sellType']
|
|
if(!item.slot && disField.indexOf(item.prop) == -1){
|
|
if(!item.slot && disField.indexOf(item.prop) == -1){
|
|
if(!item.compConfig.attr) item.compConfig.attr = {};
|
|
if(!item.compConfig.attr) item.compConfig.attr = {};
|
|
item.compConfig.attr.disabled = true;
|
|
item.compConfig.attr.disabled = true;
|
|
@@ -1355,11 +1413,21 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
//确定新增的商品
|
|
//确定新增的商品
|
|
confirmProduct(data:Array<any>){
|
|
confirmProduct(data:Array<any>){
|
|
- this.productHandle(data,false);
|
|
|
|
|
|
+ this.addProductMoadlHandle(data,false)
|
|
}
|
|
}
|
|
//新增赠品
|
|
//新增赠品
|
|
confirmProductGift(data:Array<any>){
|
|
confirmProductGift(data:Array<any>){
|
|
- this.productHandle(data,true);
|
|
|
|
|
|
+ this.addProductMoadlHandle(data,true)
|
|
|
|
+ }
|
|
|
|
+ addProductMoadlHandle(data:Array<any>, isGift:boolean) {
|
|
|
|
+ if(this.orderValue.id){
|
|
|
|
+ (this.$refs.addProductModal as any).setBillValue([this.orderValue.id]);
|
|
|
|
+ (this.$refs.addProductModal as any).setShow(true);
|
|
|
|
+ (this.$refs.addProductModal as any).setGift(isGift);
|
|
|
|
+ (this.$refs.addProductModal as any).setData(data)
|
|
|
|
+ }else{
|
|
|
|
+ this.productHandle(data, isGift);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//商品处理
|
|
//商品处理
|
|
productHandle(data:Array<any>,isGift:boolean){
|
|
productHandle(data:Array<any>,isGift:boolean){
|
|
@@ -1480,8 +1548,8 @@ export default class AddOrder extends Vue {
|
|
}
|
|
}
|
|
//单价的变化
|
|
//单价的变化
|
|
priceChange(v:any,row:any){
|
|
priceChange(v:any,row:any){
|
|
- if(v.value && row.qty){
|
|
|
|
- row.amount =multiply(Number(v.value),Number(row.qty))
|
|
|
|
|
|
+ if(v && row.qty){
|
|
|
|
+ row.amount =multiply(Number(v),Number(row.qty))
|
|
}else{
|
|
}else{
|
|
row.amount = 0
|
|
row.amount = 0
|
|
}
|
|
}
|