|
|
@@ -66,7 +66,7 @@
|
|
|
v-model="form.relationCode"
|
|
|
:disabled="title == '详情'"
|
|
|
redaonly
|
|
|
- @click.native="$refs.sendConfirmDialogRef.open()"
|
|
|
+ @click.native="openDialog"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -122,12 +122,9 @@
|
|
|
</el-select>
|
|
|
</template>
|
|
|
<template v-slot:describes="scope">
|
|
|
- <el-input
|
|
|
- v-model="scope.row.describes"
|
|
|
- placeholder="请输入"
|
|
|
- >
|
|
|
- </el-input>
|
|
|
- </template>
|
|
|
+ <el-input v-model="scope.row.describes" placeholder="请输入">
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
<template v-slot:exceptionDetermine="scope">
|
|
|
<el-select
|
|
|
v-model="scope.row.exceptionDetermine"
|
|
|
@@ -151,7 +148,7 @@
|
|
|
></el-input>
|
|
|
</template>
|
|
|
<!-- 操作列 -->
|
|
|
- <template v-slot:action="scope" v-if="title!='详情'">
|
|
|
+ <template v-slot:action="scope" v-if="title != '详情'">
|
|
|
<el-popconfirm
|
|
|
class="ele-action"
|
|
|
title="确定要删除吗?"
|
|
|
@@ -201,6 +198,10 @@
|
|
|
ref="sendConfirmDialogRef"
|
|
|
@changeParent="changeParent"
|
|
|
></sendConfirmDialog>
|
|
|
+ <receiveTListDialog
|
|
|
+ ref="receiveTListDialogRef"
|
|
|
+ @changeParent="changeParent"
|
|
|
+ ></receiveTListDialog>
|
|
|
</ele-modal>
|
|
|
</template>
|
|
|
|
|
|
@@ -209,9 +210,12 @@
|
|
|
import { getById, update, save } from '@/api/exceptionManagement/index';
|
|
|
import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
|
|
|
import { getSendSaleOrderConfirmDetail } from '@/api/saleManage/invoiceConfirm';
|
|
|
- import { relationType } from '@/enum/dict.js';
|
|
|
+ import { getReceiveConfirmDetail } from '@/api/purchasingManage/invoiceConfirm';
|
|
|
+ import { relationTypeOption } from '@/enum/dict.js';
|
|
|
import bpmDetail from '@/views/bpm/processInstance/detail.vue';
|
|
|
import sendConfirmDialog from '@/views/saleManage/saleOrder/invoiceConfirm/components/sendConfirmDialog.vue';
|
|
|
+ import receiveTListDialog from '@/views/purchasingManage/purchaseOrder/invoiceConfirm/components/receiveTListDialog.vue';
|
|
|
+
|
|
|
const def = {
|
|
|
name: '',
|
|
|
relationCode: '',
|
|
|
@@ -226,7 +230,13 @@
|
|
|
components: {
|
|
|
processSubmitDialog,
|
|
|
bpmDetail,
|
|
|
- sendConfirmDialog
|
|
|
+ sendConfirmDialog,
|
|
|
+ receiveTListDialog
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ relationType: {
|
|
|
+ default: 1
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -245,12 +255,6 @@
|
|
|
{ label: '报损', value: 3 },
|
|
|
{ label: '报废', value: 4 }
|
|
|
],
|
|
|
- options1: [
|
|
|
- { label: '多发', value: 1 },
|
|
|
- { label: '少发', value: 2 },
|
|
|
- { label: '错发', value: 3 },
|
|
|
- { label: '损坏', value: 4 }
|
|
|
- ],
|
|
|
|
|
|
rules: {
|
|
|
name: [{ required: true, message: '请输入名称', trigger: 'change' }],
|
|
|
@@ -259,8 +263,12 @@
|
|
|
{ required: true, message: '请选择来源', trigger: 'change' }
|
|
|
]
|
|
|
},
|
|
|
- form: { ...def },
|
|
|
- columns: [
|
|
|
+ form: { ...def }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ columns() {
|
|
|
+ return [
|
|
|
{
|
|
|
width: 45,
|
|
|
type: 'index',
|
|
|
@@ -357,7 +365,7 @@
|
|
|
{
|
|
|
minWidth: 120,
|
|
|
prop: 'clientCode',
|
|
|
- label: '客户代号',
|
|
|
+ label: this.relationType == 1 ? '客户代号' : '供应商代号',
|
|
|
showOverflowTooltip: true,
|
|
|
align: 'center'
|
|
|
},
|
|
|
@@ -458,11 +466,33 @@
|
|
|
fixed: 'right',
|
|
|
showOverflowTooltip: true
|
|
|
}
|
|
|
- ]
|
|
|
- };
|
|
|
+ ];
|
|
|
+ },
|
|
|
+ options1() {
|
|
|
+ return this.relationType == 1
|
|
|
+ ? [
|
|
|
+ { label: '多发', value: 1 },
|
|
|
+ { label: '少发', value: 2 },
|
|
|
+ { label: '错发', value: 3 },
|
|
|
+ { label: '损坏', value: 4 }
|
|
|
+ ]
|
|
|
+ : [
|
|
|
+ { label: '多收', value: 1 },
|
|
|
+ { label: '少收', value: 2 },
|
|
|
+ { label: '错收', value: 3 },
|
|
|
+ { label: '损坏', value: 4 }
|
|
|
+ ];
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ openDialog() {
|
|
|
+ let ref =
|
|
|
+ this.relationType == 1
|
|
|
+ ? 'sendConfirmDialogRef'
|
|
|
+ : 'receiveTListDialogRef';
|
|
|
+ this.$refs[ref].open();
|
|
|
+ },
|
|
|
//打开新增编辑弹框
|
|
|
async open(type, row) {
|
|
|
this.title = type == 'edit' ? '处置' : type == 'add' ? '新建' : '详情';
|
|
|
@@ -471,23 +501,37 @@
|
|
|
if (row && row?.id) {
|
|
|
await this.getById(row?.id);
|
|
|
} else {
|
|
|
- this.form.relationType = 1;
|
|
|
- this.form.relationTypeName = relationType[1];
|
|
|
+ this.form.relationType = this.relationType;
|
|
|
+ this.form.relationTypeName = relationTypeOption[this.relationType];
|
|
|
}
|
|
|
},
|
|
|
async changeParent(data) {
|
|
|
- const res = await getSendSaleOrderConfirmDetail(data.id);
|
|
|
- this.form.relationCode = res.docNo;
|
|
|
- this.form.relationId = res.id;
|
|
|
- this.form.relationName = res.contactName + '-' + res.docNo;
|
|
|
- this.$set(this.form, 'detailList', res.productList);
|
|
|
+ if (this.relationType == 1) {
|
|
|
+ const res = await getSendSaleOrderConfirmDetail(data.id);
|
|
|
+ this.form.relationCode = res.docNo;
|
|
|
+ this.form.relationId = res.id;
|
|
|
+ this.form.relationName = res.contactName + '-' + res.docNo;
|
|
|
+ this.$set(this.form, 'detailList', res.productList);
|
|
|
+ }
|
|
|
+ if (this.relationType == 2) {
|
|
|
+ const res = await getReceiveConfirmDetail(data.id);
|
|
|
+ this.form.relationCode = res.receiveConfirmNo;
|
|
|
+ this.form.relationId = res.id;
|
|
|
+ res.productList= res.productList.map(item=>{
|
|
|
+ item['clientCode']=item.supplierMark
|
|
|
+ })
|
|
|
+
|
|
|
+ this.form.relationName =
|
|
|
+ res.supplierName + '-' + res.receiveConfirmNo;
|
|
|
+ this.$set(this.form, 'detailList', res.productList);
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
//获取订单详情
|
|
|
async getById(id) {
|
|
|
this.loading = true;
|
|
|
let data = await getById(id);
|
|
|
- data['relationTypeName'] = relationType[data.relationType];
|
|
|
+ data['relationTypeName'] = relationTypeOption[data.relationType];
|
|
|
|
|
|
this.loading = false;
|
|
|
if (data) {
|
|
|
@@ -512,7 +556,7 @@
|
|
|
},
|
|
|
async save(type) {
|
|
|
try {
|
|
|
- await this.getValidate()
|
|
|
+ await this.getValidate();
|
|
|
this.loading = true;
|
|
|
let isExceptionDispose = false;
|
|
|
let isExceptionDetermine = false;
|
|
|
@@ -574,12 +618,12 @@
|
|
|
});
|
|
|
},
|
|
|
reload() {
|
|
|
- this.form = {
|
|
|
- ...form
|
|
|
- };
|
|
|
this.cancel();
|
|
|
},
|
|
|
cancel() {
|
|
|
+ this.form = {
|
|
|
+ ...def
|
|
|
+ };
|
|
|
this.addOrEditDialogFlag = false;
|
|
|
this.$emit('done');
|
|
|
}
|