|
@@ -79,18 +79,19 @@
|
|
|
<a-button type="primary" @click.stop="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button>
|
|
|
</div>
|
|
|
|
|
|
- <!-- 子表 :model="form" rowKey="id" -->
|
|
|
+ <!-- 子表 :model="form" rowKey="id" ,y:800 -->
|
|
|
<a-spin :spinning="confirmLoading">
|
|
|
<a-form-model ref="formRef">
|
|
|
<a-table
|
|
|
+ :loading="loading"
|
|
|
v-if="syShippingDetailsItemList"
|
|
|
bordered
|
|
|
:rowKey="record => record.id"
|
|
|
:columns="columns"
|
|
|
:data-source="syShippingDetailsItemList"
|
|
|
- :loading="loading"
|
|
|
:pagination="false"
|
|
|
:scroll="{ x: 1500 }"
|
|
|
+ size="small"
|
|
|
>
|
|
|
<!-- 款号 输入框 :rules="rules.itemNumber" -->
|
|
|
<template slot="itemNumber" slot-scope="text, record, index">
|
|
@@ -127,9 +128,10 @@
|
|
|
|
|
|
<!-- 操作 -->
|
|
|
<span slot="operationSlot" slot-scope="text, record">
|
|
|
- <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
|
|
|
+ <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record)">
|
|
|
<a href="javascript:void(0);" style="color:red;">删除</a>
|
|
|
</a-popconfirm>
|
|
|
+
|
|
|
<a-divider type="vertical" />
|
|
|
<a @click="copy(record)">复制</a>
|
|
|
</span>
|
|
@@ -137,6 +139,7 @@
|
|
|
</a-form-model>
|
|
|
</a-spin>
|
|
|
</a-card>
|
|
|
+
|
|
|
<!-- 页面底部保存取消 -->
|
|
|
<div
|
|
|
:style="{
|
|
@@ -188,7 +191,7 @@ export default {
|
|
|
{
|
|
|
title: '账套',
|
|
|
dataIndex: 'pkOrg',
|
|
|
- width: 120,
|
|
|
+ width: 80,
|
|
|
fixed: 'left',
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -221,21 +224,17 @@ export default {
|
|
|
dataIndex: 'orderDate',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
- // sorter: true,
|
|
|
- // customRender: text => {
|
|
|
- // return moment(text).format('YYYY-MM-DD')
|
|
|
- // }
|
|
|
},
|
|
|
{
|
|
|
title: '业务类型',
|
|
|
- dataIndex: 'businessTypeValue',
|
|
|
+ dataIndex: 'businessTypeText',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '客户订单',
|
|
|
- dataIndex: 'customerOrder',
|
|
|
+ dataIndex: 'customerOrderNumber',
|
|
|
width: 120,
|
|
|
|
|
|
className: 'replacecolor'
|
|
@@ -260,7 +259,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '订单剩余数量',
|
|
|
- dataIndex: 'orderRemaQuantity',
|
|
|
+ dataIndex: 'orderRemainingQuantity',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -289,7 +288,7 @@ export default {
|
|
|
|
|
|
{
|
|
|
title: '销售类型',
|
|
|
- dataIndex: 'salesTypeValue',
|
|
|
+ dataIndex: 'salesTypeText',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -313,7 +312,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '整单合计',
|
|
|
- dataIndex: 'wholeOrderTota',
|
|
|
+ dataIndex: 'wholeOrderTotal',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -407,7 +406,7 @@ export default {
|
|
|
title: '操作',
|
|
|
dataIndex: 'operation',
|
|
|
scopedSlots: { customRender: 'operationSlot' },
|
|
|
- width: 220,
|
|
|
+ width: 160,
|
|
|
fixed: 'right',
|
|
|
className: 'replacecolor'
|
|
|
}
|
|
@@ -418,8 +417,8 @@ export default {
|
|
|
visible: false,
|
|
|
confirmLoading: false,
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
- state: '0' // 单据状态初始未【保存】
|
|
|
-
|
|
|
+ state: '0', // 单据状态初始未【仅保存】
|
|
|
+ pushState: '0' // 推送状态初始未【仅保存】
|
|
|
// validatorRules: {
|
|
|
// documentNo: [{ required: true, message: '单据号不能为空', trigger: 'blur' }], 单据号
|
|
|
}
|
|
@@ -447,17 +446,19 @@ export default {
|
|
|
},
|
|
|
// 新增 保存
|
|
|
addSave() {
|
|
|
- // console.log('点击了保存新增')
|
|
|
var newObj = {} // 新增对象
|
|
|
newObj.documentNo = this.addShipDet.documentNo // 单据号
|
|
|
newObj.documentDate = this.addShipDet.documentDate.format('YYYY-MM-DD') // 单据日期
|
|
|
newObj.customer = this.addShipDet.customer
|
|
|
newObj.preDeliveryDate = this.addShipDet.preDeliveryDate.format('YYYY-MM-DD') // 预发货日期
|
|
|
- newObj.preCompletionDate = this.addShipDet.preCompletionDate.format('YYYY-MM-DD') // 到货日期
|
|
|
+ newObj.preCompletionDate = this.addShipDet.preCompletionDate.format('YYYY-MM-DD') // 预完工日期
|
|
|
newObj.memo = this.addShipDet.memo // U8系统适用
|
|
|
newObj.syShippingDetailsItemList = this.syShippingDetailsItemList // 子表信息赋值
|
|
|
// 单据状态
|
|
|
- newObj.state = this.state
|
|
|
+ // newObj.state = this.state
|
|
|
+ // newObj.pushState = this.pushState
|
|
|
+
|
|
|
+ // 必须选择子表 --- 参照订单数据
|
|
|
if (newObj.syShippingDetailsItemList.length == 0) {
|
|
|
this.$message.error('请选择参照订单数据')
|
|
|
} else {
|
|
@@ -466,6 +467,9 @@ export default {
|
|
|
this.$message.success('新增成功')
|
|
|
console.log('新增的对象', newObj)
|
|
|
this.close()
|
|
|
+ //清空信息
|
|
|
+ newObj = {}
|
|
|
+ newObj.syShippingDetailsItemList = []
|
|
|
this.fatherList() // 调用父组件 查询方法
|
|
|
// this.msgFormSon = {} 清空子表信息
|
|
|
console.log('空')
|
|
@@ -515,8 +519,9 @@ export default {
|
|
|
},
|
|
|
// --------------------------------------
|
|
|
// 操作 删除
|
|
|
- handleDelete(id) {
|
|
|
- console.log('id:', id)
|
|
|
+ handleDelete(record) {
|
|
|
+ console.log('删除该项订单数据', record)
|
|
|
+ return this.syShippingDetailsItemList.splice(record)
|
|
|
},
|
|
|
// 操作 复制
|
|
|
copy(record) {},
|
|
@@ -530,7 +535,8 @@ export default {
|
|
|
close() {
|
|
|
this.$emit('close')
|
|
|
this.visible = false
|
|
|
- this.$refs.form.resetFields()
|
|
|
+ this.addShipDet = {}
|
|
|
+ this.syShippingDetailsItemList = []
|
|
|
},
|
|
|
|
|
|
// 参照订单数据弹框 ok-------------------------------------
|
|
@@ -563,4 +569,9 @@ export default {
|
|
|
/deep/ .ant-drawer-body {
|
|
|
padding: 10px;
|
|
|
}
|
|
|
+
|
|
|
+// 子表下拉显示
|
|
|
+/deep/ .ant-card-body {
|
|
|
+ margin-bottom: 50px;
|
|
|
+}
|
|
|
</style>
|