|
|
@@ -11,8 +11,11 @@
|
|
|
width="70%"
|
|
|
@close="cancel"
|
|
|
>
|
|
|
- <template slot="title">
|
|
|
- <modalTitle :title="title" @setFullscreen="fullscreen=!fullscreen"></modalTitle>
|
|
|
+ <template slot="title">
|
|
|
+ <modalTitle
|
|
|
+ :title="title"
|
|
|
+ @setFullscreen="fullscreen = !fullscreen"
|
|
|
+ ></modalTitle>
|
|
|
</template>
|
|
|
<el-form
|
|
|
ref="form"
|
|
|
@@ -143,33 +146,54 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item prop="sendFiles" label="发货附件">
|
|
|
<fileMain v-model="form.sendFiles" type="view"></fileMain>
|
|
|
- <!-- <fileUpload-->
|
|
|
- <!-- v-model="form.sendFiles"-->
|
|
|
- <!-- module="main"-->
|
|
|
- <!-- :showLib="false"-->
|
|
|
- <!-- :limit="10"-->
|
|
|
- <!-- />-->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<el-tabs v-model="activeName" style="margin-top: 15px" type="border-card">
|
|
|
- <el-tab-pane label="产品清单" name="first">
|
|
|
- <!-- <headerTitle title="产品清单" style="margin-top: 30px"></headerTitle>-->
|
|
|
+ <el-tab-pane label="收货产品明细" name="first">
|
|
|
+ <el-button
|
|
|
+ size="small"
|
|
|
+ type="primary"
|
|
|
+ icon="el-icon-plus"
|
|
|
+ class="ele-btn-icon"
|
|
|
+ @click="handlAdd"
|
|
|
+ >选择出库单
|
|
|
+ </el-button>
|
|
|
<ele-pro-table
|
|
|
ref="table"
|
|
|
:needPage="false"
|
|
|
- :columns="competAnalysisListcolumns"
|
|
|
+ :columns="columns"
|
|
|
:toolkit="[]"
|
|
|
:datasource="form.productList"
|
|
|
row-key="id"
|
|
|
>
|
|
|
- <!-- <template v-slot:toolbar>
|
|
|
- <div class="headbox">
|
|
|
- <span class="amount">总计:{{detailData.totalAmount}}元</span>
|
|
|
- <span class="amount">应付金额:{{detailData.payAmount}}元</span>
|
|
|
- </div>
|
|
|
- </template> -->
|
|
|
+ <template v-slot:action="{ $index }">
|
|
|
+ <el-popconfirm
|
|
|
+
|
|
|
+ class="ele-action"
|
|
|
+ title="确定要删除吗?"
|
|
|
+ @confirm="remove($index)"
|
|
|
+ >
|
|
|
+ <template v-slot:reference>
|
|
|
+ <el-link type="danger" :underline="false" icon="el-icon-delete">
|
|
|
+ 删除
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ </el-popconfirm>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+ <!-- <el-tab-pane label="原产品清单" name="first1">
|
|
|
+ <ele-pro-table
|
|
|
+ ref="table"
|
|
|
+ :needPage="false"
|
|
|
+ :columns="competAnalysisListcolumns"
|
|
|
+ :toolkit="[]"
|
|
|
+ :datasource="productList"
|
|
|
+ row-key="id"
|
|
|
+ >
|
|
|
<template v-slot:technicalDrawings="{ row }">
|
|
|
<div v-if="row.technicalDrawings && row.technicalDrawings?.length">
|
|
|
<el-link
|
|
|
@@ -183,56 +207,15 @@
|
|
|
</el-link>
|
|
|
</div>
|
|
|
</template>
|
|
|
- <!-- <template v-slot:packagingStrength="scope">
|
|
|
- <DictSelection
|
|
|
- disabled
|
|
|
- dict-name="包装强度"
|
|
|
- v-model="scope.row.extField.packagingStrength"
|
|
|
- ></DictSelection>
|
|
|
- </template>
|
|
|
- <template v-slot:packagingDensity="scope">
|
|
|
- <DictSelection
|
|
|
- disabled
|
|
|
- dict-name="包装密度"
|
|
|
- v-model="scope.row.extField.packagingDensity"
|
|
|
- ></DictSelection>
|
|
|
- </template> -->
|
|
|
- <template v-slot:totalCount="{ row }">
|
|
|
- <el-input
|
|
|
- v-model="row.totalCount"
|
|
|
- @input="totalCountChange(row)"
|
|
|
- type="number"
|
|
|
- ></el-input>
|
|
|
- </template>
|
|
|
- <template v-slot:stockLedger="scope">
|
|
|
- <el-popover placement="right" width="60%" trigger="hover">
|
|
|
- <ele-pro-table
|
|
|
- :ref="'childrenTable' + scope.$index"
|
|
|
- row-key="id"
|
|
|
- max-height="300px"
|
|
|
- :needPage="false"
|
|
|
- :columns="childrenColumns"
|
|
|
- :toolkit="[]"
|
|
|
- :datasource="scope.row.sendProductDetail"
|
|
|
- cache-key="stockLedgerRoleTable"
|
|
|
- class="time-form"
|
|
|
- >
|
|
|
- </ele-pro-table>
|
|
|
- <el-button type="text" slot="reference">明细</el-button>
|
|
|
- </el-popover>
|
|
|
- </template>
|
|
|
</ele-pro-table>
|
|
|
- </el-tab-pane>
|
|
|
+ </el-tab-pane> -->
|
|
|
<el-tab-pane label="托盘清单" name="second">
|
|
|
- <!-- <headerTitle title="托盘清单" style="margin-top: 30px"></headerTitle>-->
|
|
|
<palletTable ref="palletTableRef" type="view"></palletTable>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="装载车叉车信息" name="third">
|
|
|
- <!-- <headerTitle title="装载车叉车信息" style="margin-top: 30px"></headerTitle>-->
|
|
|
<stowageTable ref="stowageTableRef" dialogType="view"></stowageTable>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="运输清单" name="fourth">
|
|
|
- <!-- <headerTitle title="运输清单" style="margin-top: 30px"></headerTitle>-->
|
|
|
<taskInfoTable ref="taskInfoTableRef" dialogType="view"></taskInfoTable>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -254,6 +237,13 @@
|
|
|
@changeParent="changeOrder"
|
|
|
:contactData="contactData"
|
|
|
></sendListDialog>
|
|
|
+ <!--出库详情-->
|
|
|
+ <outbound-details-dialog
|
|
|
+ v-if="outboundDetailsDialogFlag"
|
|
|
+ ref="outboundDetailsDialogRef"
|
|
|
+ :outboundDetailsDialogFlag.sync="outboundDetailsDialogFlag"
|
|
|
+ @saveDate="saveDate"
|
|
|
+ ></outbound-details-dialog>
|
|
|
<process-submit-dialog
|
|
|
:isNotNeedProcess="false"
|
|
|
:processSubmitDialogFlag.sync="processSubmitDialogFlag"
|
|
|
@@ -268,7 +258,7 @@
|
|
|
import { acceptUnpackoptions } from '@/enum/dict';
|
|
|
import fileUpload from '@/components/upload/fileUpload';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
-
|
|
|
+ import outboundDetailsDialog from '@/views/saleManage/saleOrder/returnGoods/components/outboundDetailsDialog.vue';
|
|
|
import { getSaleOrderDetail } from '@/api/saleManage/saleorder';
|
|
|
import taskInfoTable from '../../invoice/components/taskInfoTable.vue';
|
|
|
import {
|
|
|
@@ -305,7 +295,9 @@
|
|
|
taskInfoTable,
|
|
|
fileUpload,
|
|
|
inventoryTable,
|
|
|
- stowageTable,modalTitle
|
|
|
+ stowageTable,
|
|
|
+ modalTitle,
|
|
|
+ outboundDetailsDialog
|
|
|
},
|
|
|
|
|
|
//客户管理数据
|
|
|
@@ -350,10 +342,12 @@
|
|
|
};
|
|
|
|
|
|
return {
|
|
|
- fullscreen:false,
|
|
|
+ fullscreen: false,
|
|
|
+ outboundDetailsDialogFlag: false,
|
|
|
payWayOptions: [],
|
|
|
delDetailIds: [],
|
|
|
linkNameOptions: [],
|
|
|
+ productList: [],
|
|
|
acceptUnpackoptions,
|
|
|
visible: false,
|
|
|
entrustedReceiveDialogFlag: false,
|
|
|
@@ -362,6 +356,169 @@
|
|
|
row: {},
|
|
|
activeName: 'first',
|
|
|
formDef,
|
|
|
+
|
|
|
+ qualityStatus: {
|
|
|
+ 0: '未质检',
|
|
|
+ 1: '已质检'
|
|
|
+ }, // 质检状态 0未检 1已检
|
|
|
+ qualityResults: {
|
|
|
+ 1: '合格',
|
|
|
+ 2: '不合格'
|
|
|
+ }, // 质检结果 1合格 2不合格
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ width: 45,
|
|
|
+ type: 'index',
|
|
|
+ columnKey: 'index',
|
|
|
+ align: 'center',
|
|
|
+ fixed: 'left'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 160,
|
|
|
+ prop: 'productCode',
|
|
|
+ label: '编码',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 120,
|
|
|
+ prop: 'productName',
|
|
|
+ label: '名称',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ minWidth: 160,
|
|
|
+ prop: 'batchNo',
|
|
|
+ label: '批次号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ slot: 'batchNo',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 160,
|
|
|
+ prop: 'barcodes',
|
|
|
+ label: '发货条码',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ slot: 'barcodes',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 120,
|
|
|
+ prop: 'materielDesignation',
|
|
|
+ label: '物料代号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 120,
|
|
|
+ prop: 'clientCode',
|
|
|
+ label: '客户代号',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 120,
|
|
|
+ prop: 'engrave',
|
|
|
+ label: '刻码',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 160,
|
|
|
+ prop: 'packageNo',
|
|
|
+ align: 'center',
|
|
|
+ label: '包装编码',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 100,
|
|
|
+ prop: 'packingQuantity',
|
|
|
+ align: 'center',
|
|
|
+ label: '包装数量',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 120,
|
|
|
+ prop: 'packingUnit',
|
|
|
+ align: 'center',
|
|
|
+ label: '包装单位',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 100,
|
|
|
+ prop: 'totalCount',
|
|
|
+ label: '计量数量',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 150,
|
|
|
+ prop: 'measuringUnit',
|
|
|
+ label: '计量单位',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ width: 160,
|
|
|
+ prop: 'pricingWay',
|
|
|
+ label: '计价方式',
|
|
|
+ slot: 'pricingWay',
|
|
|
+ align: 'center',
|
|
|
+ formatter: (row, column) => {
|
|
|
+ return row.pricingWay == 1 ? '数量' : '重量';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ width: 100,
|
|
|
+ prop: 'singlePrice',
|
|
|
+ label: '单价',
|
|
|
+ slot: 'singlePrice',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ width: 100,
|
|
|
+ prop: 'totalPrice',
|
|
|
+ label: '合计',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ minWidth: 80,
|
|
|
+ prop: 'receiveTotalWeight',
|
|
|
+ label: '重量',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ minWidth: 100,
|
|
|
+ prop: 'weightUnit',
|
|
|
+ label: '重量单位',
|
|
|
+ showOverflowTooltip: true,
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ width: 220,
|
|
|
+ prop: 'remark',
|
|
|
+ label: '备注',
|
|
|
+ slot: 'remark',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 120,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ fixed: 'right',
|
|
|
+ showOverflowTooltip: true
|
|
|
+ }
|
|
|
+ ],
|
|
|
+
|
|
|
childrenColumns: [
|
|
|
{
|
|
|
width: 45,
|
|
|
@@ -402,16 +559,6 @@
|
|
|
repliedFiles: [
|
|
|
{ required: true, message: '请上传回执附件', trigger: 'change' }
|
|
|
]
|
|
|
- // linkName: [
|
|
|
- // { required: true, message: '请输入', trigger: ['blur', 'change'] }
|
|
|
- // ],
|
|
|
- // orderNo: [{ required: true, message: '请选择', trigger: 'change' }],
|
|
|
- // receiveAddress: [
|
|
|
- // { required: true, message: '请输入', trigger: 'change' }
|
|
|
- // ],
|
|
|
- // deviceName: [
|
|
|
- // { required: true, message: '前选择车辆', trigger: 'change' }
|
|
|
- // ]
|
|
|
},
|
|
|
|
|
|
// 提交状态
|
|
|
@@ -495,13 +642,13 @@
|
|
|
slot: 'warehouseName',
|
|
|
align: 'center'
|
|
|
},
|
|
|
- {
|
|
|
- width: 100,
|
|
|
- prop: 'stockLedger',
|
|
|
- label: '发货明细',
|
|
|
- slot: 'stockLedger',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // width: 100,
|
|
|
+ // prop: 'stockLedger',
|
|
|
+ // label: '发货明细',
|
|
|
+ // slot: 'stockLedger',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
|
|
|
{
|
|
|
width: 120,
|
|
|
@@ -510,13 +657,13 @@
|
|
|
slot: 'sendTotalCount',
|
|
|
align: 'center'
|
|
|
},
|
|
|
- {
|
|
|
- width: 120,
|
|
|
- prop: 'totalCount',
|
|
|
- label: '实收数量',
|
|
|
- slot: 'totalCount',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // width: 120,
|
|
|
+ // prop: 'totalCount',
|
|
|
+ // label: '实收数量',
|
|
|
+ // slot: 'totalCount',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
{
|
|
|
width: 120,
|
|
|
prop: 'measuringUnit',
|
|
|
@@ -561,7 +708,7 @@
|
|
|
slot: 'weightUnit',
|
|
|
align: 'center'
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
{
|
|
|
width: 160,
|
|
|
prop: 'singlePrice',
|
|
|
@@ -654,12 +801,11 @@
|
|
|
prop: 'isException',
|
|
|
label: '状态',
|
|
|
align: 'center',
|
|
|
- fixed:'right',
|
|
|
- formatter:(_row)=>{
|
|
|
- return _row.isException==1?'异常':'无异常'
|
|
|
+ fixed: 'right',
|
|
|
+ formatter: (_row) => {
|
|
|
+ return _row.isException == 1 ? '异常' : '无异常';
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
];
|
|
|
}
|
|
|
},
|
|
|
@@ -692,12 +838,43 @@
|
|
|
this.$refs.stowageTableRef.putTableValue(data.carList);
|
|
|
this.$refs.palletTableRef &&
|
|
|
this.$refs.palletTableRef.putTableValue(data.trayList);
|
|
|
- this.$refs.inventoryTableref &&
|
|
|
- this.$refs.inventoryTableref.putTableValue(data.productList);
|
|
|
+ this.productList = data.productList;
|
|
|
+
|
|
|
this.form.pricingWay = data?.saleOrder?.pricingWay;
|
|
|
+ this.form.productList = [];
|
|
|
+ this.handleSelectGoods();
|
|
|
}
|
|
|
},
|
|
|
+ //选择退货明细
|
|
|
+ handleSelectGoods(list) {
|
|
|
+ this.outboundDetailsDialogFlag = true;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.outboundDetailsDialogRef.init(this.form, list);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ saveDate(data) {
|
|
|
+ data.forEach((item) => {
|
|
|
+ item['totalCount'] = item.measureQuantity;
|
|
|
+ item['qmsResult'] = item.result;
|
|
|
+ item['qmsStatus'] = item.status;
|
|
|
|
|
|
+ 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;
|
|
|
+ if (item.pricingWay == 1) {
|
|
|
+ item.totalPrice = item.singlePrice * item.totalCount;
|
|
|
+ }
|
|
|
+ if (item.pricingWay == 2) {
|
|
|
+ item.totalPrice =
|
|
|
+ item.singlePrice * item.totalCount * receiveTotalWeight;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ this.form.productList = data;
|
|
|
+ },
|
|
|
// //发货单确认详情
|
|
|
async getSendSaleOrderDetail(id) {
|
|
|
this.businessId = id;
|
|
|
@@ -775,11 +952,9 @@
|
|
|
if (row.totalCount > row.sendTotalCount) {
|
|
|
row.totalCount = row.sendTotalCount;
|
|
|
}
|
|
|
- if(row.totalCount<0){
|
|
|
- row.totalCount = 0
|
|
|
-
|
|
|
+ if (row.totalCount < 0) {
|
|
|
+ row.totalCount = 0;
|
|
|
}
|
|
|
-
|
|
|
},
|
|
|
getValidate() {
|
|
|
return Promise.all([
|
|
|
@@ -797,6 +972,14 @@
|
|
|
return Promise.reject(e);
|
|
|
});
|
|
|
},
|
|
|
+ // 添加
|
|
|
+ handlAdd() {
|
|
|
+ if (!this.form.sendNo)
|
|
|
+ return this.$message.error('请先选择来源单据');
|
|
|
+ this.handleSelectGoods()
|
|
|
+
|
|
|
+ // this.$refs.productListRef.open(this.form.datasource);
|
|
|
+ },
|
|
|
async save(type) {
|
|
|
try {
|
|
|
await this.getValidate();
|
|
|
@@ -868,6 +1051,10 @@
|
|
|
// this.$emit('done');
|
|
|
// });
|
|
|
},
|
|
|
+ remove(index) {
|
|
|
+ this.form.productList.splice(index, 1);
|
|
|
+
|
|
|
+ },
|
|
|
reload() {
|
|
|
this.cancel();
|
|
|
this.$emit('done');
|