|
@@ -8,26 +8,26 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="订单号">
|
|
|
- <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
|
|
|
+ <a-input placeholder="请输入订单号" v-model="queryParam.orderNumber"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="订单日期" has-feedback>
|
|
|
- <a-date-picker style="width: 100%" v-model="queryParam.orderDate"> </a-date-picker>
|
|
|
+ <a-date-picker style="width: 100%" v-model="queryParam.aa"> </a-date-picker>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="客户简称">
|
|
|
- <a-input placeholder="请输入客户简称" v-model="queryParam.customerShortName"></a-input>
|
|
|
+ <a-input placeholder="请输入客户简称" v-model="queryParam.clientAbbreviation"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
|
<template v-if="toggleSearchStatus">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-item label="箱号">
|
|
|
- <a-input placeholder="请输入箱号" v-model="queryParam.boxNo"></a-input>
|
|
|
+ <a-form-item label="集装箱号">
|
|
|
+ <a-input placeholder="请输入集装箱号" v-model="queryParam.containerNumber"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -39,7 +39,7 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-item label="预托书号">
|
|
|
- <a-input placeholder="请输入预托书号" v-model="queryParam.preBookNum"></a-input>
|
|
|
+ <a-input placeholder="请输入预托书号" v-model="queryParam.depositaryReceiptNo"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
@@ -61,22 +61,22 @@
|
|
|
<!-- 操作按钮区域 新增-->
|
|
|
<a-card :bordered="false" style="marginTop:10px;">
|
|
|
<div class="table-operator">
|
|
|
- <a-button type="primary" @click="addPreBookDrawer" icon="plus">新增</a-button>
|
|
|
+ <a-button type="primary" @click="addPreBook" icon="plus">新增</a-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- 子表 -->
|
|
|
<a-table
|
|
|
bordered
|
|
|
- :row-key="record => record.id"
|
|
|
+ v-if="preBookListData"
|
|
|
+ rowKey="id"
|
|
|
:columns="preBookListColumns"
|
|
|
:data-source="preBookListData"
|
|
|
:loading="loading"
|
|
|
- :pagination="ipagination"
|
|
|
+ :pagination="pagination"
|
|
|
@change="handleTableChange"
|
|
|
:scroll="{ x: 1500 }"
|
|
|
>
|
|
|
<!-- 金额 输入框-->
|
|
|
-
|
|
|
<template slot="money" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="money" :rules="rules.money" required>
|
|
|
<a-input style="width:100%" type="text" v-model="record.money" />
|
|
@@ -84,31 +84,45 @@
|
|
|
</template>
|
|
|
|
|
|
<!-- 单据状态 -->
|
|
|
- <span slot="documentStateSlot">
|
|
|
- <a-tag color="#2db7f5">已保存</a-tag>
|
|
|
+ <span slot="documentStateSlot" slot-scope="text, record">
|
|
|
+ <a-tag color="orange" v-if="record.theDocumentsState == '0'">仅保存</a-tag>
|
|
|
+ <a-tag color="green" v-if="record.theDocumentsState == '1'">已提交</a-tag>
|
|
|
</span>
|
|
|
- <!-- if 已提交 -->
|
|
|
- <!-- <span slot="documentStateSlot">
|
|
|
- <a-tag color="#2db7f5">已提交</a-tag>
|
|
|
- </span> -->
|
|
|
|
|
|
<!-- 操作 -->
|
|
|
<span slot="operationSlot" slot-scope="text, record">
|
|
|
- <a @click="submit(record)" style="color:green;">提交</a>
|
|
|
+ <a @click="print(record)">打印</a>
|
|
|
+
|
|
|
<a-divider type="vertical" />
|
|
|
|
|
|
<a-dropdown>
|
|
|
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
|
|
|
- <a-menu slot="overlay">
|
|
|
+
|
|
|
+ <!-- 仅保存 -->
|
|
|
+ <a-menu slot="overlay" v-if="record.theDocumentsState == '0'">
|
|
|
<a-menu-item><a @click="details(record)">详情</a></a-menu-item>
|
|
|
<a-menu-item><a @click="edit(record)">编辑</a></a-menu-item>
|
|
|
- <a-menu-item><a @click="print(record)">打印</a></a-menu-item>
|
|
|
<a-menu-item>
|
|
|
- <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
|
|
|
+ <a-popconfirm title="确定提交吗?" ok-text="是" cancel-text="否" @confirm="submit(record)">
|
|
|
+ <a href="javascript:void(0);" style="color:green;">提交</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record)">
|
|
|
<a href="javascript:void(0);" style="color:red;">删除</a>
|
|
|
</a-popconfirm></a-menu-item
|
|
|
>
|
|
|
</a-menu>
|
|
|
+
|
|
|
+ <!-- 已提交 -->
|
|
|
+ <a-menu slot="overlay" v-if="record.theDocumentsState == '1'">
|
|
|
+ <a-menu-item><a @click="details(record)">详情</a></a-menu-item>
|
|
|
+ <a-menu-item>
|
|
|
+ <a-popconfirm title="确定取消提交吗?" ok-text="是" cancel-text="否" @confirm="cancel(record)">
|
|
|
+ <a href="javascript:void(0);" style="color:red;">取消提交</a>
|
|
|
+ </a-popconfirm>
|
|
|
+ </a-menu-item>
|
|
|
+ </a-menu>
|
|
|
</a-dropdown>
|
|
|
</span>
|
|
|
</a-table>
|
|
@@ -130,6 +144,8 @@ import addPreBookDrawer from '@views/pre-book/addPreBookDrawer.vue'
|
|
|
import detailsPreBookDrawer from '@views/pre-book/detailsPreBookDrawer.vue'
|
|
|
import editPreBookDrawer from '@views/pre-book/editPreBookDrawer.vue'
|
|
|
|
|
|
+import { preBookList, addPreBook, preBookById, editById } from '@api/document/pre-book.js'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'PreBookList', // 预托书列表
|
|
|
mixins: [JeecgListMixin],
|
|
@@ -140,10 +156,17 @@ export default {
|
|
|
return {
|
|
|
// 表头
|
|
|
preBookListColumns: [
|
|
|
- { title: '预托书号', width: 120, dataIndex: 'preBookNum', fixed: 'left', className: 'replacecolor' },
|
|
|
- { title: '订单号', width: 120, dataIndex: 'orderNum', fixed: 'left', className: 'replacecolor' },
|
|
|
- { title: '外销发票号码', dataIndex: 'exportInvoiceNo', width: 120, className: 'replacecolor' },
|
|
|
- { title: '客户简称', dataIndex: 'customerShortName', width: 120, className: 'replacecolor' },
|
|
|
+ {
|
|
|
+ title: '预托书号',
|
|
|
+ width: 220,
|
|
|
+ dataIndex: 'depositaryReceiptNo',
|
|
|
+ fixed: 'left',
|
|
|
+ align: 'left',
|
|
|
+ className: 'replacecolor'
|
|
|
+ },
|
|
|
+ { title: '订单号', width: 120, dataIndex: 'orderNumber', fixed: 'left', className: 'replacecolor' },
|
|
|
+ { title: '外销发票号码', dataIndex: 'exportInvoiceNo', width: 220, align: 'left', className: 'replacecolor' },
|
|
|
+ { title: '客户简称', dataIndex: 'clientAbbreviation', width: 120, className: 'replacecolor' },
|
|
|
{
|
|
|
title: '分销点',
|
|
|
dataIndex: 'distributionPoint',
|
|
@@ -153,13 +176,13 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '经营单位',
|
|
|
- dataIndex: 'unitOperation',
|
|
|
+ dataIndex: 'unitInOperation',
|
|
|
width: 150,
|
|
|
customRender: t => ellipsis(t),
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
- { title: '总箱数', dataIndex: 'totalBoxes', width: 120, className: 'replacecolor' },
|
|
|
- { title: '总毛重', dataIndex: 'totalRoughWeigh', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '总箱数', dataIndex: 'boxNumber', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '总毛重', dataIndex: 'totalGrossWeight', width: 120, className: 'replacecolor' },
|
|
|
{ title: '总体积', dataIndex: 'totalVolume', width: 100, className: 'replacecolor' },
|
|
|
{
|
|
|
title: '金额',
|
|
@@ -177,8 +200,8 @@ export default {
|
|
|
// return moment(text).format('YYYY-MM-DD')
|
|
|
// }
|
|
|
// },
|
|
|
- { title: '实际船期', dataIndex: 'actualShipDate', width: 120, className: 'replacecolor' },
|
|
|
- { title: '收汇方式', dataIndex: 'collectionMethod', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '实际船期', dataIndex: 'theActualShippingDate', width: 120, className: 'replacecolor' },
|
|
|
+ { title: '收汇方式', dataIndex: 'exchangeEarningsValue', width: 120, className: 'replacecolor' },
|
|
|
{
|
|
|
title: '收货人',
|
|
|
dataIndex: 'consignee',
|
|
@@ -188,20 +211,20 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '提单或承运收据',
|
|
|
- dataIndex: 'billLadingOrCarriageReceipt',
|
|
|
+ dataIndex: 'billOfLadingOrCarriageReceipt',
|
|
|
width: 140,
|
|
|
customRender: t => ellipsis(t),
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '抬头人',
|
|
|
- dataIndex: 'headPerson',
|
|
|
+ dataIndex: 'addressee',
|
|
|
width: 120,
|
|
|
customRender: t => ellipsis(t),
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{ title: '贸易国别', dataIndex: 'tradeCountry', width: 100, className: 'replacecolor' },
|
|
|
- { title: '运抵国别', dataIndex: 'arriveCountry', width: 100, className: 'replacecolor' },
|
|
|
+ { title: '运抵国别', dataIndex: 'arriveInCountry', width: 100, className: 'replacecolor' },
|
|
|
{ title: '出口口岸', dataIndex: 'exportPort', width: 100, className: 'replacecolor' },
|
|
|
{
|
|
|
title: '通知人',
|
|
@@ -210,12 +233,12 @@ export default {
|
|
|
customRender: t => ellipsis(t),
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
- { title: 'NOTIFY', dataIndex: 'NOTIFY', width: 150, className: 'replacecolor' },
|
|
|
+ { title: 'nottfy', dataIndex: 'nottfy', width: 150, className: 'replacecolor' },
|
|
|
{ title: '目的港', dataIndex: 'destinationPort', width: 100, className: 'replacecolor' },
|
|
|
- { title: '装运期限', dataIndex: 'latestShipmentDate', width: 100, className: 'replacecolor' },
|
|
|
+ { title: '装运期限', dataIndex: 'latestDateOfShipment', width: 120, className: 'replacecolor' },
|
|
|
{
|
|
|
title: '单据状态',
|
|
|
- dataIndex: 'documentState',
|
|
|
+ dataIndex: 'theDocumentsState',
|
|
|
width: 90,
|
|
|
scopedSlots: { customRender: 'documentStateSlot' },
|
|
|
fixed: 'right',
|
|
@@ -230,66 +253,139 @@ export default {
|
|
|
className: 'replacecolor'
|
|
|
}
|
|
|
],
|
|
|
- preBookListData: [{ orderNum: 'AA002200001' }, {}, {}],
|
|
|
+ preBookListData: [],
|
|
|
id: '', //
|
|
|
loading: false, // 表格加载
|
|
|
|
|
|
// 查询条件
|
|
|
queryParam: {
|
|
|
- orderNum: '',
|
|
|
- orderDate: '',
|
|
|
- customerShortName: '',
|
|
|
- boxNo: '',
|
|
|
+ orderNumber: '',
|
|
|
+ aa: '',//订单日期
|
|
|
+ clientAbbreviation: '',
|
|
|
+ containerNumber: '',
|
|
|
smallPo: '',
|
|
|
- preBookNum: ''
|
|
|
- }
|
|
|
+ depositaryReceiptNo: '',
|
|
|
+ pageNo: '' // 点击的页数
|
|
|
+ },
|
|
|
+ pagination: {
|
|
|
+ // total: '',
|
|
|
+ // current: 0,
|
|
|
+ // pageSize: 0
|
|
|
+ },
|
|
|
+ dateFormat: 'YYYY-MM-DD'
|
|
|
}
|
|
|
},
|
|
|
|
|
|
created() {
|
|
|
- // this.getOrderList() // 渲染预托书
|
|
|
+ this.getPreBookData() // 渲染预托书
|
|
|
},
|
|
|
methods: {
|
|
|
- // 查询按钮
|
|
|
- searchQuery() {
|
|
|
- // this.getpreBookList() // 渲染渲染预托书
|
|
|
- },
|
|
|
- // 重置
|
|
|
- searchReset() {
|
|
|
- this.queryParam = {}
|
|
|
- // this.getpreBookList()
|
|
|
+ // 分页查询 预托书
|
|
|
+ getPreBookData() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ preBookList(this.queryParam).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.preBookListData = res.result.records
|
|
|
+ console.log('预托书列表', this.preBookListData)
|
|
|
+ this.pagination = {
|
|
|
+ total: res.result.total,
|
|
|
+ current: res.result.current,
|
|
|
+ pageSize: res.result.size
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
- // -----------------------------------
|
|
|
// 新增
|
|
|
- addPreBookDrawer() {
|
|
|
+ addPreBook() {
|
|
|
console.log('新增预托书')
|
|
|
this.$refs.addPreBookDrawer.visible = true
|
|
|
},
|
|
|
|
|
|
- // -----------------------------------
|
|
|
- // 操作 提交
|
|
|
- submit(record) {},
|
|
|
- // 操作 详情
|
|
|
+ // 详情
|
|
|
details(record) {
|
|
|
- this.$refs.detailsPreBookDrawer.visible = true
|
|
|
+ this.$refs.addPreBookDrawer.visible = true
|
|
|
+ // console.log('点击项的ID', record.id)
|
|
|
+ preBookById({ id: record.id }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ console.log('点击的对象', res.result)
|
|
|
+ // 把通过id查询到的对象,赋值给子组件
|
|
|
+ this.$refs.addPreBookDrawer.preBookDetails = res.result //主表
|
|
|
+ this.$refs.addPreBookDrawer.data = res.result.syLetterDepositItemList //子表
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- // 操作 编辑
|
|
|
+
|
|
|
+ // 编辑
|
|
|
edit(record) {
|
|
|
this.$refs.editPreBookDrawer.visible = true
|
|
|
+ preBookById({ id: record.id }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ console.log('编辑对象', res.result)
|
|
|
+ // console.log('子表信息', res.result.syShippingDetailsItemList)
|
|
|
+ this.$refs.editPreBookDrawer.editPreBook = res.result
|
|
|
+ this.$refs.editPreBookDrawer.data = res.result.syLetterDepositItemList
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ // 操作 提交
|
|
|
+ submit(record) {
|
|
|
+ console.log('点击id:', record.id)
|
|
|
+ this.$nextTick(() => {
|
|
|
+ submit({ id: record.id, type: '1' }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ console.log('提交成功,单据状态改为【已提交】')
|
|
|
+ this.preBookListData.theDocumentsState == '1'
|
|
|
+ this.getPreBookData()
|
|
|
+ this.$message.success('提交成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 取消提交
|
|
|
+ cancel(record) {
|
|
|
+ console.log('取消订单id:', record.id)
|
|
|
+ this.$nextTick(() => {
|
|
|
+ cancelSubmit({ id: record.id, type: '2' }).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ console.log('取消提交成功,单据状态改为【仅保存】')
|
|
|
+ this.preBookListData.theDocumentsState == '0'
|
|
|
+ this.getPreBookData()
|
|
|
+ this.$message.success('取消提交成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ handleDelete(record) {
|
|
|
+ console.log('点击删除项id:', record.id)
|
|
|
+ this.$nextTick(() => {
|
|
|
+ deletePreBook({ id: record.id }).then(res => {
|
|
|
+ console.log('res:', res)
|
|
|
+ this.getPreBookData()
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
+
|
|
|
+ // 查询按钮
|
|
|
+ searchQuery() {
|
|
|
+ this.getPreBookData() /// 渲染渲染预托书
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ searchReset() {
|
|
|
+ this.queryParam = {}
|
|
|
+ this.getPreBookData()
|
|
|
+ },
|
|
|
+
|
|
|
// 操作 打印
|
|
|
print(record) {},
|
|
|
- // 操作 删除
|
|
|
- handleDelete(id) {
|
|
|
- console.log('id:', id)
|
|
|
- },
|
|
|
|
|
|
- // // 分页、排序、筛选变化时触发
|
|
|
- // handleTableChange(pagination, filters, sorter) {
|
|
|
- // // console.log('当前页信息>>>>',pagination)
|
|
|
- // this.queryParam.pageNo = pagination.current
|
|
|
- // this.getOrderList()
|
|
|
- // }
|
|
|
+ handleTableChange(pagination, filters, sorter) {
|
|
|
+ this.queryParam.pageNo = pagination.current
|
|
|
+ this.getPreBookData()
|
|
|
+ },
|
|
|
aa() {},
|
|
|
bb() {},
|
|
|
cc() {}
|