|
@@ -30,7 +30,7 @@
|
|
|
<el-form-item label="退货类型" prop="returnSourceType">
|
|
<el-form-item label="退货类型" prop="returnSourceType">
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="form.returnSourceType"
|
|
v-model="form.returnSourceType"
|
|
|
- @change="handleSetReturnSourceType"
|
|
|
|
|
|
|
+ @change="onchangeLink"
|
|
|
style="width: 100%"
|
|
style="width: 100%"
|
|
|
>
|
|
>
|
|
|
<el-option :value="3" label="销售发货退货"></el-option>
|
|
<el-option :value="3" label="销售发货退货"></el-option>
|
|
@@ -50,7 +50,7 @@
|
|
|
dictName="退货类型"
|
|
dictName="退货类型"
|
|
|
clearable
|
|
clearable
|
|
|
v-model="form.type"
|
|
v-model="form.type"
|
|
|
- @change="onchangeLink"
|
|
|
|
|
|
|
+ @change="handleSetReturnSourceType"
|
|
|
>
|
|
>
|
|
|
</DictSelection>
|
|
</DictSelection>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -286,7 +286,7 @@
|
|
|
import inventoryTable1 from '@/BIZComponents/inventoryTable.vue';
|
|
import inventoryTable1 from '@/BIZComponents/inventoryTable.vue';
|
|
|
import { getSendSaleOrderConfirmDetail } from '@/api/saleManage/invoiceConfirm';
|
|
import { getSendSaleOrderConfirmDetail } from '@/api/saleManage/invoiceConfirm';
|
|
|
import { contactDetail } from '@/api/saleManage/contact';
|
|
import { contactDetail } from '@/api/saleManage/contact';
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
mixins: [dictMixins],
|
|
|
components: {
|
|
components: {
|
|
@@ -339,21 +339,14 @@
|
|
|
entrustedCode: '',
|
|
entrustedCode: '',
|
|
|
entrustedId: '',
|
|
entrustedId: '',
|
|
|
entrustedReceiveId: '',
|
|
entrustedReceiveId: '',
|
|
|
- entrustedReceiveCode: '',
|
|
|
|
|
- type: ''
|
|
|
|
|
|
|
+ entrustedReceiveCode: ''
|
|
|
|
|
+ // type: '10'
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
fullscreen: false, //全屏
|
|
fullscreen: false, //全屏
|
|
|
- customerMark:'',
|
|
|
|
|
|
|
+ customerMark: '',
|
|
|
oldProductList: [],
|
|
oldProductList: [],
|
|
|
- returnList: [
|
|
|
|
|
- { label: '原货退回', value: '1' },
|
|
|
|
|
- { label: '部分原货+实物赔偿', value: '2' },
|
|
|
|
|
- { label: '部分原货+现金赔偿', value: '3' },
|
|
|
|
|
- { label: '全部实物赔偿', value: '4' },
|
|
|
|
|
- { label: '全部现金赔偿', value: '5' }
|
|
|
|
|
- ],
|
|
|
|
|
|
|
|
|
|
oldColumns: [
|
|
oldColumns: [
|
|
|
{
|
|
{
|
|
@@ -493,8 +486,11 @@
|
|
|
slot: 'pricingWay',
|
|
slot: 'pricingWay',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
formatter: (row, column) => {
|
|
formatter: (row, column) => {
|
|
|
- return row.pricingWay == 1 ? '按数量计费' : row.pricingWay == 2 ? '按重量计费':'';
|
|
|
|
|
-
|
|
|
|
|
|
|
+ return row.pricingWay == 1
|
|
|
|
|
+ ? '按数量计费'
|
|
|
|
|
+ : row.pricingWay == 2
|
|
|
|
|
+ ? '按重量计费'
|
|
|
|
|
+ : '';
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
@@ -636,7 +632,7 @@
|
|
|
if (this.form.returnSourceType == 1) {
|
|
if (this.form.returnSourceType == 1) {
|
|
|
if (this.form.type === '10') {
|
|
if (this.form.type === '10') {
|
|
|
allcountAmount =
|
|
allcountAmount =
|
|
|
- his.$refs.inventoryTableref &&
|
|
|
|
|
|
|
+ this.$refs.inventoryTableref &&
|
|
|
this.$refs.inventoryTableref.totalAmount;
|
|
this.$refs.inventoryTableref.totalAmount;
|
|
|
}
|
|
}
|
|
|
if (this.form.type === '20') {
|
|
if (this.form.type === '20') {
|
|
@@ -684,34 +680,35 @@
|
|
|
},
|
|
},
|
|
|
onchangeLink() {
|
|
onchangeLink() {
|
|
|
// this.getSendSaleOrderDetail(this.form.sendId);
|
|
// this.getSendSaleOrderDetail(this.form.sendId);
|
|
|
|
|
+ this.form.type=''
|
|
|
this.handleSetReturnSourceType();
|
|
this.handleSetReturnSourceType();
|
|
|
},
|
|
},
|
|
|
- async contactDetail(id){
|
|
|
|
|
- const {base}= await contactDetail(id)
|
|
|
|
|
- this.customerMark=base.serialNo
|
|
|
|
|
- this.$refs.inventoryTableref1.setCustomerMark(base.serialNo)
|
|
|
|
|
|
|
+ async contactDetail(id) {
|
|
|
|
|
+ const { base } = await contactDetail(id);
|
|
|
|
|
+ this.customerMark = base.serialNo;
|
|
|
|
|
+ this.$refs.inventoryTableref1.setCustomerMark(base.serialNo);
|
|
|
},
|
|
},
|
|
|
//设置退货类型
|
|
//设置退货类型
|
|
|
handleSetReturnSourceType(val) {
|
|
handleSetReturnSourceType(val) {
|
|
|
|
|
+ this.form = Object.assign({}, this.form, {
|
|
|
|
|
+ orderId: '',
|
|
|
|
|
+ sendNo: '',
|
|
|
|
|
+ orderNo: '',
|
|
|
|
|
+ sendId: '',
|
|
|
|
|
+ contactName: '',
|
|
|
|
|
+ contactId: '',
|
|
|
|
|
+ pricingWay: '',
|
|
|
|
|
+ entrustedCode: '',
|
|
|
|
|
+ entrustedId: '',
|
|
|
|
|
+ entrustedReceiveId: '',
|
|
|
|
|
+ entrustedReceiveCode: '',
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- this.form = Object.assign({}, this.form, {
|
|
|
|
|
- orderId: '',
|
|
|
|
|
- sendNo: '',
|
|
|
|
|
- orderNo: '',
|
|
|
|
|
- sendId: '',
|
|
|
|
|
- contactName: '',
|
|
|
|
|
- contactId: '',
|
|
|
|
|
- pricingWay: '',
|
|
|
|
|
- entrustedCode: '',
|
|
|
|
|
- entrustedId: '',
|
|
|
|
|
- entrustedReceiveId: '',
|
|
|
|
|
- entrustedReceiveCode: ''
|
|
|
|
|
- // type:''
|
|
|
|
|
- });
|
|
|
|
|
this.$refs.inventoryTableref &&
|
|
this.$refs.inventoryTableref &&
|
|
|
this.$refs.inventoryTableref.putTableValue([]);
|
|
this.$refs.inventoryTableref.putTableValue([]);
|
|
|
- this.productList = [];
|
|
|
|
|
});
|
|
});
|
|
|
|
|
+ this.productList = [];
|
|
|
},
|
|
},
|
|
|
//选择受托收货单弹框
|
|
//选择受托收货单弹框
|
|
|
handleEntrustedReceive(e) {
|
|
handleEntrustedReceive(e) {
|
|
@@ -799,14 +796,14 @@
|
|
|
data = await getSendSaleOrderCordList(params);
|
|
data = await getSendSaleOrderCordList(params);
|
|
|
} else {
|
|
} else {
|
|
|
res = await getSendSaleOrderConfirmDetail(params.sendNoList);
|
|
res = await getSendSaleOrderConfirmDetail(params.sendNoList);
|
|
|
- params.sendNoList=[res.sendNo]
|
|
|
|
|
|
|
+ params.sendNoList = [res.sendNo];
|
|
|
data = await getSendSaleOrderCordList(params);
|
|
data = await getSendSaleOrderCordList(params);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
if (data) {
|
|
if (data) {
|
|
|
- if(data.contactId){
|
|
|
|
|
- this.contactDetail(data.contactId)
|
|
|
|
|
|
|
+ if (data.contactId) {
|
|
|
|
|
+ this.contactDetail(data.contactId);
|
|
|
}
|
|
}
|
|
|
data.productList.forEach((item) => {
|
|
data.productList.forEach((item) => {
|
|
|
item.sendProductId = item.productId;
|
|
item.sendProductId = item.productId;
|
|
@@ -830,7 +827,7 @@
|
|
|
entrustedReceiveCode: ''
|
|
entrustedReceiveCode: ''
|
|
|
});
|
|
});
|
|
|
if (params.activeName == 2) {
|
|
if (params.activeName == 2) {
|
|
|
- this.productList = data.productList;
|
|
|
|
|
|
|
+ this.productList = data.productList;
|
|
|
this.$refs.inventoryTableref &&
|
|
this.$refs.inventoryTableref &&
|
|
|
this.$refs.inventoryTableref.putTableValue(res.productList);
|
|
this.$refs.inventoryTableref.putTableValue(res.productList);
|
|
|
return;
|
|
return;
|
|
@@ -866,17 +863,18 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
saveDate(data) {
|
|
saveDate(data) {
|
|
|
- console.log(this.productList,'this.productList')
|
|
|
|
|
|
|
+ console.log(this.productList, 'this.productList');
|
|
|
data.forEach((item) => {
|
|
data.forEach((item) => {
|
|
|
item['totalCount'] = item.measureQuantity;
|
|
item['totalCount'] = item.measureQuantity;
|
|
|
item['qmsResult'] = item.result;
|
|
item['qmsResult'] = item.result;
|
|
|
item['qmsStatus'] = item.status;
|
|
item['qmsStatus'] = item.status;
|
|
|
this.productList.forEach((val) => {
|
|
this.productList.forEach((val) => {
|
|
|
- console.log(val,'val')
|
|
|
|
|
|
|
+ console.log(val, 'val');
|
|
|
if (item.productCode == val.productCode) {
|
|
if (item.productCode == val.productCode) {
|
|
|
item['singlePrice'] = val.singlePrice;
|
|
item['singlePrice'] = val.singlePrice;
|
|
|
item['clientCode'] = item.clientCode || val.customerMark;
|
|
item['clientCode'] = item.clientCode || val.customerMark;
|
|
|
- item['pricingWay'] = item.pricingWay || val.pricingWay||this.form.pricingWay;
|
|
|
|
|
|
|
+ item['pricingWay'] =
|
|
|
|
|
+ item.pricingWay || val.pricingWay || this.form.pricingWay;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
@@ -888,9 +886,9 @@
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
const data = await getSendSaleOrderrecordDetailSplit(id);
|
|
const data = await getSendSaleOrderrecordDetailSplit(id);
|
|
|
this.productList = data.productList;
|
|
this.productList = data.productList;
|
|
|
- if(data.contactId){
|
|
|
|
|
- this.contactDetail(data.contactId)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (data.contactId) {
|
|
|
|
|
+ this.contactDetail(data.contactId);
|
|
|
|
|
+ }
|
|
|
if (type) return;
|
|
if (type) return;
|
|
|
if (data.entrustedCode) {
|
|
if (data.entrustedCode) {
|
|
|
await this.getInfo({ id: data.entrustedId });
|
|
await this.getInfo({ id: data.entrustedId });
|
|
@@ -939,7 +937,9 @@
|
|
|
this.$refs.inventoryTableref &&
|
|
this.$refs.inventoryTableref &&
|
|
|
this.$refs.inventoryTableref.putTableValue(data.productList);
|
|
this.$refs.inventoryTableref.putTableValue(data.productList);
|
|
|
this.$refs.inventoryTableref1 &&
|
|
this.$refs.inventoryTableref1 &&
|
|
|
- this.$refs.inventoryTableref1.putTableValue({productList:data.redressProductList});
|
|
|
|
|
|
|
+ this.$refs.inventoryTableref1.putTableValue({
|
|
|
|
|
+ productList: data.redressProductList
|
|
|
|
|
+ });
|
|
|
if (this.form.returnSourceType != 2) {
|
|
if (this.form.returnSourceType != 2) {
|
|
|
this.getSendSaleOrderDetail(data.sendId, 1);
|
|
this.getSendSaleOrderDetail(data.sendId, 1);
|
|
|
} else {
|
|
} else {
|