|
|
@@ -121,10 +121,17 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
+ <template v-slot:describes="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.describes"
|
|
|
+ placeholder="请输入"
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
<template v-slot:exceptionDetermine="scope">
|
|
|
<el-select
|
|
|
v-model="scope.row.exceptionDetermine"
|
|
|
- :disabled="title== '详情'"
|
|
|
+ :disabled="title == '详情'"
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
<el-option
|
|
|
@@ -136,6 +143,27 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
+ <template v-slot:totalCount="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.totalCount"
|
|
|
+ type="number"
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-input>
|
|
|
+ </template>
|
|
|
+ <!-- 操作列 -->
|
|
|
+ <template v-slot:action="scope" v-if="title!='详情'">
|
|
|
+ <el-popconfirm
|
|
|
+ class="ele-action"
|
|
|
+ title="确定要删除吗?"
|
|
|
+ @confirm="remove(scope.$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-form>
|
|
|
|
|
|
@@ -169,20 +197,30 @@
|
|
|
ref="processSubmitDialogRef"
|
|
|
@reload="reload"
|
|
|
></process-submit-dialog>
|
|
|
- <sendConfirmDialog ref="sendConfirmDialogRef" @changeParent="changeParent"></sendConfirmDialog>
|
|
|
+ <sendConfirmDialog
|
|
|
+ ref="sendConfirmDialogRef"
|
|
|
+ @changeParent="changeParent"
|
|
|
+ ></sendConfirmDialog>
|
|
|
</ele-modal>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
- import { getById, update } from '@/api/exceptionManagement/index';
|
|
|
+ import { getById, update, save } from '@/api/exceptionManagement/index';
|
|
|
import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
|
|
|
- import {
|
|
|
- getSendSaleOrderConfirmDetail,
|
|
|
- } from '@/api/saleManage/invoiceConfirm';
|
|
|
+ import { getSendSaleOrderConfirmDetail } from '@/api/saleManage/invoiceConfirm';
|
|
|
import { relationType } from '@/enum/dict.js';
|
|
|
import bpmDetail from '@/views/bpm/processInstance/detail.vue';
|
|
|
import sendConfirmDialog from '@/views/saleManage/saleOrder/invoiceConfirm/components/sendConfirmDialog.vue';
|
|
|
+ const def = {
|
|
|
+ name: '',
|
|
|
+ relationCode: '',
|
|
|
+ relationType: '',
|
|
|
+ relationName: '',
|
|
|
+ relationTypeName: '',
|
|
|
+ relationId: '',
|
|
|
+ detailList: []
|
|
|
+ };
|
|
|
export default {
|
|
|
mixins: [dictMixins],
|
|
|
components: {
|
|
|
@@ -221,14 +259,7 @@
|
|
|
{ required: true, message: '请选择来源', trigger: 'change' }
|
|
|
]
|
|
|
},
|
|
|
- form: {
|
|
|
- name: '',
|
|
|
- relationCode: '',
|
|
|
- relationType: '',
|
|
|
- relationName: '',
|
|
|
- relationTypeName: '',
|
|
|
- relationId:''
|
|
|
- },
|
|
|
+ form: { ...def },
|
|
|
columns: [
|
|
|
{
|
|
|
width: 45,
|
|
|
@@ -271,15 +302,31 @@
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- minWidth: 100,
|
|
|
- prop: 'totalCount',
|
|
|
- label: '发货数量',
|
|
|
- showOverflowTooltip: true,
|
|
|
+ width: 120,
|
|
|
+ prop: 'specification',
|
|
|
+ label: '规格',
|
|
|
+ slot: 'specification',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ width: 120,
|
|
|
+ prop: 'modelType',
|
|
|
+ label: '型号',
|
|
|
+ slot: 'modelType',
|
|
|
align: 'center'
|
|
|
},
|
|
|
+
|
|
|
+ // {
|
|
|
+ // minWidth: 100,
|
|
|
+ // prop: 'saleCount',
|
|
|
+ // label: '发货数量',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
{
|
|
|
minWidth: 100,
|
|
|
prop: 'totalCount',
|
|
|
+ slot: 'totalCount',
|
|
|
label: '异常数量',
|
|
|
showOverflowTooltip: true,
|
|
|
align: 'center'
|
|
|
@@ -321,27 +368,27 @@
|
|
|
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: 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: 150,
|
|
|
@@ -364,35 +411,35 @@
|
|
|
// : '';
|
|
|
// }
|
|
|
// },
|
|
|
- {
|
|
|
- width: 100,
|
|
|
- prop: 'singlePrice',
|
|
|
- label: '单价',
|
|
|
- slot: 'singlePrice',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // width: 100,
|
|
|
+ // prop: 'singlePrice',
|
|
|
+ // label: '单价',
|
|
|
+ // slot: 'singlePrice',
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
|
|
|
- {
|
|
|
- width: 100,
|
|
|
- prop: 'totalPrice',
|
|
|
- label: '合计',
|
|
|
- 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'
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // minWidth: 80,
|
|
|
+ // prop: 'receiveTotalWeight',
|
|
|
+ // label: '重量',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // minWidth: 100,
|
|
|
+ // prop: 'weightUnit',
|
|
|
+ // label: '重量单位',
|
|
|
+ // showOverflowTooltip: true,
|
|
|
+ // align: 'center'
|
|
|
+ // },
|
|
|
|
|
|
{
|
|
|
width: 220,
|
|
|
@@ -400,6 +447,16 @@
|
|
|
label: '描述',
|
|
|
slot: 'describes',
|
|
|
align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnKey: 'action',
|
|
|
+ label: '操作',
|
|
|
+ width: 120,
|
|
|
+ align: 'center',
|
|
|
+ resizable: false,
|
|
|
+ slot: 'action',
|
|
|
+ fixed: 'right',
|
|
|
+ showOverflowTooltip: true
|
|
|
}
|
|
|
]
|
|
|
};
|
|
|
@@ -418,12 +475,12 @@
|
|
|
this.form.relationTypeName = relationType[1];
|
|
|
}
|
|
|
},
|
|
|
- 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.form.detailList=res.productList
|
|
|
+ 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);
|
|
|
},
|
|
|
|
|
|
//获取订单详情
|
|
|
@@ -437,8 +494,25 @@
|
|
|
this.form = data;
|
|
|
}
|
|
|
},
|
|
|
+ getValidate() {
|
|
|
+ return Promise.all([
|
|
|
+ new Promise((resolve, reject) => {
|
|
|
+ this.$refs.form.validate((valid) => {
|
|
|
+ if (!valid) {
|
|
|
+ reject(false);
|
|
|
+ } else {
|
|
|
+ resolve(true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ ]).catch((e) => {
|
|
|
+ this.$message.warning('有必填项未填写,请检查');
|
|
|
+ return Promise.reject(e);
|
|
|
+ });
|
|
|
+ },
|
|
|
async save(type) {
|
|
|
try {
|
|
|
+ await this.getValidate()
|
|
|
this.loading = true;
|
|
|
let isExceptionDispose = false;
|
|
|
let isExceptionDetermine = false;
|
|
|
@@ -446,9 +520,7 @@
|
|
|
if (!item.exceptionDispose) {
|
|
|
isExceptionDispose = true;
|
|
|
}
|
|
|
- if (!item.exceptionDispose) {
|
|
|
- is = true;
|
|
|
- }
|
|
|
+
|
|
|
if (!item.exceptionDetermine) {
|
|
|
isExceptionDetermine = true;
|
|
|
}
|
|
|
@@ -461,7 +533,8 @@
|
|
|
this.$message.error('异常类型不能为空');
|
|
|
return;
|
|
|
}
|
|
|
- update(this.form)
|
|
|
+ let api = this.form.id ? update : save;
|
|
|
+ api(this.form)
|
|
|
.then((res) => {
|
|
|
this.loading = false;
|
|
|
this.$message.success('操作成功');
|
|
|
@@ -479,6 +552,10 @@
|
|
|
// 表单验证未通过,不执行保存操作
|
|
|
}
|
|
|
},
|
|
|
+ remove(index) {
|
|
|
+ this.form.detailList.splice(index, 1);
|
|
|
+ },
|
|
|
+
|
|
|
async submit() {
|
|
|
this.processSubmitDialogFlag = true;
|
|
|
|
|
|
@@ -497,6 +574,9 @@
|
|
|
});
|
|
|
},
|
|
|
reload() {
|
|
|
+ this.form = {
|
|
|
+ ...form
|
|
|
+ };
|
|
|
this.cancel();
|
|
|
},
|
|
|
cancel() {
|