|
|
@@ -38,18 +38,21 @@
|
|
|
</el-select>
|
|
|
</el-form-item> -->
|
|
|
<el-form-item label="总金额:" prop="totalAmount">
|
|
|
- <el-input v-model="totalAmount" disabled>
|
|
|
- <template slot="append">元</template>
|
|
|
- </el-input>
|
|
|
- </el-form-item>
|
|
|
+ <el-input v-model="totalAmount" disabled>
|
|
|
+ <template slot="append">元</template>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item
|
|
|
label="赔偿金额"
|
|
|
prop="redressAmount"
|
|
|
style="margin-bottom: 22px"
|
|
|
:rules="{
|
|
|
- required: ['30', '50'].includes(form.type)&&form.returnSourceType==1
|
|
|
+ required:
|
|
|
+ ['30', '50'].includes(form.type) && form.returnSourceType == 1
|
|
|
}"
|
|
|
- v-show="['30', '50'].includes(form.type)&&form.returnSourceType==1"
|
|
|
+ v-show="
|
|
|
+ ['30', '50'].includes(form.type) && form.returnSourceType == 1
|
|
|
+ "
|
|
|
>
|
|
|
<el-input
|
|
|
clearable
|
|
|
@@ -101,11 +104,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <headerTitle
|
|
|
- title="原产品清单"
|
|
|
- style="margin-top: 30px"
|
|
|
-
|
|
|
- ></headerTitle>
|
|
|
+ <headerTitle title="原产品清单" style="margin-top: 30px"></headerTitle>
|
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
|
:needPage="false"
|
|
|
@@ -114,11 +113,14 @@
|
|
|
:datasource="productList"
|
|
|
row-key="id"
|
|
|
>
|
|
|
-
|
|
|
</ele-pro-table>
|
|
|
- <headerTitle title="退货产品明细" style="margin-top: 30px" v-show="!['40', '50'].includes(form.type)||form.returnSourceType!=1"></headerTitle>
|
|
|
+ <headerTitle
|
|
|
+ title="退货产品明细"
|
|
|
+ style="margin-top: 30px"
|
|
|
+ v-show="!['40', '50'].includes(form.type) || form.returnSourceType != 1"
|
|
|
+ ></headerTitle>
|
|
|
<inventoryTable
|
|
|
- v-show="!['40', '50'].includes(form.type)||form.returnSourceType!=1"
|
|
|
+ v-show="!['40', '50'].includes(form.type) || form.returnSourceType != 1"
|
|
|
ref="inventoryTableref"
|
|
|
:pricingWay="form.pricingWay"
|
|
|
:entrustedCode="form.sendNo"
|
|
|
@@ -129,18 +131,15 @@
|
|
|
></inventoryTable>
|
|
|
<headerTitle
|
|
|
title="实物赔偿清单"
|
|
|
- v-show="['20', '40'].includes(form.type)&&form.returnSourceType==1"
|
|
|
+ v-show="['20', '40'].includes(form.type) && form.returnSourceType == 1"
|
|
|
style="margin-top: 30px"
|
|
|
></headerTitle>
|
|
|
<inventoryTable1
|
|
|
- v-show="['20', '40'].includes(form.type)&&form.returnSourceType==1"
|
|
|
+ v-show="['20', '40'].includes(form.type) && form.returnSourceType == 1"
|
|
|
ref="inventoryTableref1"
|
|
|
- :type="form.type"
|
|
|
- :pricingWay="form.pricingWay"
|
|
|
- :entrustedCode="form.sendNo"
|
|
|
- :sendId="form.sendId"
|
|
|
- :isSinglePrice="false"
|
|
|
- :taskDefinitionKey="this.taskDefinitionKey"
|
|
|
+ :customerMark="customerMark"
|
|
|
+ :isDiscount="false"
|
|
|
+ :isProduceDeliveryDeadline="taskDefinitionKey == 'produceLeader'"
|
|
|
></inventoryTable1>
|
|
|
</el-form>
|
|
|
<!--出库详情-->
|
|
|
@@ -162,7 +161,10 @@
|
|
|
getSendSaleOrderrecordDetail
|
|
|
} from '@/api/bpm/components/saleManage/saleorder';
|
|
|
import inventoryTable from './inventoryTable.vue';
|
|
|
- import inventoryTable1 from './inventoryTableReturn.vue';
|
|
|
+ // import inventoryTable1 from './inventoryTableReturn.vue';
|
|
|
+ import inventoryTable1 from '@/BIZComponents/inventoryTable.vue';
|
|
|
+ import { contactDetail } from '@/api/bpm/components/saleManage/contact';
|
|
|
+
|
|
|
import sendListDialog from './sendListDialog.vue';
|
|
|
import { copyObj } from '@/utils/util';
|
|
|
import fileMain from '@/components/addDoc/index.vue';
|
|
|
@@ -175,7 +177,8 @@
|
|
|
fileUpload,
|
|
|
sendListDialog,
|
|
|
inventoryTable,
|
|
|
- inventoryTable1,outboundDetailsDialog
|
|
|
+ inventoryTable1,
|
|
|
+ outboundDetailsDialog
|
|
|
},
|
|
|
props: {
|
|
|
businessId: {
|
|
|
@@ -204,9 +207,10 @@
|
|
|
};
|
|
|
|
|
|
return {
|
|
|
- outboundDetailsDialogFlag:false,
|
|
|
+ outboundDetailsDialogFlag: false,
|
|
|
+ customerMark: '',
|
|
|
oldColumns: [
|
|
|
- {
|
|
|
+ {
|
|
|
width: 45,
|
|
|
type: 'index',
|
|
|
columnKey: 'index',
|
|
|
@@ -336,6 +340,20 @@
|
|
|
slot: 'weightUnit',
|
|
|
align: 'center'
|
|
|
},
|
|
|
+ {
|
|
|
+ width: 160,
|
|
|
+ prop: 'pricingWay',
|
|
|
+ label: '计价方式',
|
|
|
+ slot: 'pricingWay',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row, column) => {
|
|
|
+ return row.pricingWay == 1
|
|
|
+ ? '按数量计费'
|
|
|
+ : row.pricingWay == 2
|
|
|
+ ? '按重量计费'
|
|
|
+ : '';
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
width: 160,
|
|
|
prop: 'singlePrice',
|
|
|
@@ -423,7 +441,7 @@
|
|
|
align: 'center'
|
|
|
}
|
|
|
],
|
|
|
- productList:[],
|
|
|
+ productList: [],
|
|
|
detailData: {},
|
|
|
payWayOptions: [],
|
|
|
delDetailIds: [],
|
|
|
@@ -462,41 +480,41 @@
|
|
|
computed: {
|
|
|
totalAmount() {
|
|
|
let allcountAmount = 0;
|
|
|
- if(this.form.returnSourceType==1){
|
|
|
+ if (this.form.returnSourceType == 1) {
|
|
|
if (this.form.type === '10') {
|
|
|
- allcountAmount =
|
|
|
- his.$refs.inventoryTableref &&
|
|
|
- this.$refs.inventoryTableref.totalAmount;
|
|
|
- }
|
|
|
- if (this.form.type === '20') {
|
|
|
- allcountAmount =
|
|
|
- (this.$refs.inventoryTableref &&
|
|
|
- this.$refs.inventoryTableref.totalAmount) +
|
|
|
- Number(
|
|
|
+ allcountAmount =
|
|
|
+ his.$refs.inventoryTableref &&
|
|
|
+ this.$refs.inventoryTableref.totalAmount;
|
|
|
+ }
|
|
|
+ if (this.form.type === '20') {
|
|
|
+ allcountAmount =
|
|
|
+ (this.$refs.inventoryTableref &&
|
|
|
+ this.$refs.inventoryTableref.totalAmount) +
|
|
|
+ Number(
|
|
|
+ this.$refs.inventoryTableref1 &&
|
|
|
+ this.$refs.inventoryTableref1.getPrice()[0]
|
|
|
+ );
|
|
|
+ }
|
|
|
+ if (this.form.type === '30') {
|
|
|
+ allcountAmount =
|
|
|
+ (this.$refs.inventoryTableref &&
|
|
|
+ this.$refs.inventoryTableref.totalAmount) +
|
|
|
+ Number(this.form.redressAmount);
|
|
|
+ }
|
|
|
+ if (this.form.type === '40') {
|
|
|
+ allcountAmount =
|
|
|
this.$refs.inventoryTableref1 &&
|
|
|
- this.$refs.inventoryTableref1.getPrice()[0]
|
|
|
- );
|
|
|
- }
|
|
|
- if (this.form.type === '30') {
|
|
|
- allcountAmount =
|
|
|
- (this.$refs.inventoryTableref &&
|
|
|
- this.$refs.inventoryTableref.totalAmount) +
|
|
|
- Number(this.form.redressAmount);
|
|
|
- }
|
|
|
- if (this.form.type === '40') {
|
|
|
- allcountAmount =
|
|
|
- this.$refs.inventoryTableref1 &&
|
|
|
- this.$refs.inventoryTableref1.getPrice()[0];
|
|
|
- }
|
|
|
- if (this.form.type === '50') {
|
|
|
- allcountAmount = Number(this.form.redressAmount);
|
|
|
- }
|
|
|
- }else{
|
|
|
+ this.$refs.inventoryTableref1.getPrice()[0];
|
|
|
+ }
|
|
|
+ if (this.form.type === '50') {
|
|
|
+ allcountAmount = Number(this.form.redressAmount);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
allcountAmount =
|
|
|
this.$refs.inventoryTableref &&
|
|
|
this.$refs.inventoryTableref.totalAmount;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
return allcountAmount;
|
|
|
}
|
|
|
},
|
|
|
@@ -530,8 +548,7 @@
|
|
|
//发货单详情
|
|
|
async getSendSaleOrderDetail(id) {
|
|
|
const data = await getSendSaleOrderrecordDetail(id);
|
|
|
- this.productList=data.productList
|
|
|
-
|
|
|
+ this.productList = data.productList;
|
|
|
},
|
|
|
|
|
|
//获取退货单详情
|
|
|
@@ -541,16 +558,22 @@
|
|
|
this.loading = false;
|
|
|
if (data) {
|
|
|
this.form = data;
|
|
|
- this.form.pricingWay = data?.saleOrder?.pricingWay;
|
|
|
- this.form.entrustedCode = data?.entrustedReceiveCode;
|
|
|
- this.form.entrustedId = data?.entrustedReceiveId;
|
|
|
+ this.form.pricingWay = data?.saleOrder?.pricingWay;
|
|
|
+ this.form.entrustedCode = data?.entrustedReceiveCode;
|
|
|
+ this.form.entrustedId = data?.entrustedReceiveId;
|
|
|
+ if (data.contactId) {
|
|
|
+ const { base } = await contactDetail(data.contactId);
|
|
|
+ this.customerMark = base.serialNo;
|
|
|
+ }
|
|
|
+
|
|
|
this.$nextTick(() => {
|
|
|
-
|
|
|
this.$refs.inventoryTableref &&
|
|
|
this.$refs.inventoryTableref.putTableValue(data.productList);
|
|
|
this.$refs.inventoryTableref1 &&
|
|
|
- this.$refs.inventoryTableref1.putTableValue(data);
|
|
|
- this.getSendSaleOrderDetail(data.sendId)
|
|
|
+ this.$refs.inventoryTableref1.putTableValue({
|
|
|
+ productList: data.redressProductList
|
|
|
+ });
|
|
|
+ this.getSendSaleOrderDetail(data.sendId);
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
@@ -618,9 +641,8 @@
|
|
|
]);
|
|
|
},
|
|
|
onchangeLink() {
|
|
|
- if(this.form.type=='10'){
|
|
|
- this.handleSelectGoods()
|
|
|
-
|
|
|
+ if (this.form.type == '10') {
|
|
|
+ this.handleSelectGoods();
|
|
|
}
|
|
|
// this.getSendSaleOrderDetail(this.form.sendId);
|
|
|
},
|
|
|
@@ -661,7 +683,7 @@
|
|
|
handleSelectGoods(list) {
|
|
|
this.outboundDetailsDialogFlag = true;
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.outboundDetailsDialogRef.init(this.form,list);
|
|
|
+ this.$refs.outboundDetailsDialogRef.init(this.form, list);
|
|
|
});
|
|
|
},
|
|
|
saveDate(data) {
|
|
|
@@ -672,8 +694,8 @@
|
|
|
this.productList.forEach((val) => {
|
|
|
if (item.productCode == val.productCode) {
|
|
|
item['singlePrice'] = val.singlePrice;
|
|
|
- item['clientCode']= item.clientCode||val.customerMark;
|
|
|
- item['pricingWay'] = item.pricingWay || this.form.pricingWay||1;
|
|
|
+ item['clientCode'] = item.clientCode || val.customerMark;
|
|
|
+ item['pricingWay'] = item.pricingWay || this.form.pricingWay || 1;
|
|
|
}
|
|
|
});
|
|
|
});
|