|
@@ -14,19 +14,19 @@
|
|
|
<a-form-model layout="inline" ref="form" :model="addBook" :rules="validatorRules">
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="托书日期" prop="bookDate">
|
|
|
+ <a-form-model-item label="托书日期" prop="shippingOrderDate">
|
|
|
<a-date-picker
|
|
|
placeholder="请选择托书日期"
|
|
|
style="width:100%;"
|
|
|
:format="dateFormat"
|
|
|
- v-model="addBook.bookDate"
|
|
|
+ v-model="addBook.shippingOrderDate"
|
|
|
/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="托书号" prop="bookNum">
|
|
|
- <a-input placeholder="请输入托书号" v-model="addBook.bookNum"></a-input>
|
|
|
+ <a-form-model-item label="托书号" prop="shippingOrderNumber">
|
|
|
+ <a-input placeholder="请输入托书号" v-model="addBook.shippingOrderNumber"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -38,17 +38,17 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="经营单位" prop="businessUnit">
|
|
|
- <a-input placeholder="请输入经营单位" v-model="addBook.businessUnit"></a-input>
|
|
|
+ <a-input placeholder="请输入经营单位" v-model="addBook.unitInOperation"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="经营单位地址" prop="businessUnitAdd">
|
|
|
- <a-select placeholder="请选择经营单位地址" v-model="addBook.businessUnitAdd">
|
|
|
+ <a-select placeholder="请选择经营单位地址" v-model="addBook.unitInOperationAddress">
|
|
|
<a-select-option value="">请选择</a-select-option>
|
|
|
- <a-select-option :value="0">客户1</a-select-option>
|
|
|
- <a-select-option :value="1">客户2</a-select-option>
|
|
|
- <a-select-option :value="2">客户3</a-select-option>
|
|
|
+ <a-select-option value="0">客户1</a-select-option>
|
|
|
+ <a-select-option value="1">客户2</a-select-option>
|
|
|
+ <a-select-option value="2">客户3</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
@@ -59,43 +59,47 @@
|
|
|
placeholder="请选择装运期限"
|
|
|
style="width:100%;"
|
|
|
:format="dateFormat"
|
|
|
- v-model="addBook.latestShipmentDate"
|
|
|
+ v-model="addBook.latestDateOfShipment"
|
|
|
/>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="最终船期" prop="finalShipDate">
|
|
|
- <a-input placeholder="请输入最终船期" v-model="addBook.finalShipDate"></a-input>
|
|
|
+ <a-input placeholder="请输入最终船期" v-model="addBook.theFinalShippingDate"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
- <a-col :md="6" :sm="8">
|
|
|
+ <a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="收货人" prop="consignee">
|
|
|
- <a-input placeholder="请输入收货人" v-model="addBook.consignee"></a-input>
|
|
|
+ <!-- <j-dict-select-tag
|
|
|
+ style="width:100%;margin-bottom: 10px;" v-model="addBook.consignee"
|
|
|
+ dictCode="sys_dict_item,item_text,description,dict_id in(select id from sys_dict where dict_code='receiving_goods_info')"
|
|
|
+ @change="consigneeSelectChange"/> -->
|
|
|
+ <j-search-select-tag
|
|
|
+ placeholder="请选择收货人"
|
|
|
+ v-model="addBook.consignee"
|
|
|
+ @change="consigneeSelectChange"
|
|
|
+ dict="receiving_goods_info">
|
|
|
+ </j-search-select-tag>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="收货人地址" prop="consigneeAdd">
|
|
|
- <a-select placeholder="请选择收货人地址" v-model="addBook.consigneeAdd">
|
|
|
- <a-select-option value="">请选择</a-select-option>
|
|
|
- <a-select-option value="0">收货人1</a-select-option>
|
|
|
- <a-select-option value="1">收货人2</a-select-option>
|
|
|
- <a-select-option value="2">收货人3</a-select-option>
|
|
|
- </a-select>
|
|
|
+ <a-form-model-item label="收货人地址" prop="consigneeAddress">
|
|
|
+ <a-input placeholder="根据收货人自动带出" v-model="addBook.consigneeAddress" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="通知方" prop="notifying">
|
|
|
- <a-input placeholder="请输入通知方" v-model="addBook.notifying"></a-input>
|
|
|
+ <a-form-model-item label="通知方" prop="notifyParty">
|
|
|
+ <a-input placeholder="根据收货人自动带出" v-model="addBook.notifyParty" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
- <a-form-model-item label="通知方地址" prop="notifyingAdd">
|
|
|
- <a-input placeholder="请输入通知方地址" v-model="addBook.notifyingAdd"></a-input>
|
|
|
+ <a-form-model-item label="通知方地址" prop="notifyPartyAddress">
|
|
|
+ <a-input placeholder="根据收货人自动带出" v-model="addBook.notifyPartyAddress" ></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -107,7 +111,7 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="运抵国别" prop="arriveCountry">
|
|
|
- <a-input placeholder="请输入运抵国别" v-model="addBook.arriveCountry"></a-input>
|
|
|
+ <a-input placeholder="请输入运抵国别" v-model="addBook.arriveInCountry"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="8">
|
|
@@ -118,19 +122,19 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="目的港" prop="destinationport">
|
|
|
- <a-input placeholder="请输入目的港" v-model="addBook.destinationport"></a-input>
|
|
|
+ <a-input placeholder="请输入目的港" v-model="addBook.destinationPort"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="收汇方式" prop="collectionMethod">
|
|
|
- <a-input placeholder="请输入收汇方式" v-model="addBook.collectionMethod"></a-input>
|
|
|
+ <a-input placeholder="请输入收汇方式" v-model="addBook.exchangeEarningsValue"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="成交方式" prop="soldType">
|
|
|
- <a-input placeholder="请输入成交方式" v-model="addBook.soldType"></a-input>
|
|
|
+ <a-input placeholder="请输入成交方式" v-model="addBook.termsOfDeliveryvalue"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
@@ -142,13 +146,13 @@
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="人民币" prop="RMB">
|
|
|
- <a-input placeholder="请输入人民币" v-model="addBook.RMB"></a-input>
|
|
|
+ <a-input placeholder="请输入人民币" v-model="addBook.cny"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :md="6" :sm="8">
|
|
|
<a-form-model-item label="美元" prop="dollar">
|
|
|
- <a-input placeholder="请输入美元" v-model="addBook.dollar"></a-input>
|
|
|
+ <a-input placeholder="请输入美元" v-model="addBook.usd"></a-input>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -159,8 +163,9 @@
|
|
|
<!--操作按钮区域 参照装箱单 増行-->
|
|
|
<a-card :bordered="true" style="margin:10px 0 40px 0;">
|
|
|
<div class="table-operator">
|
|
|
- <a-button type="primary" @click="referPackingList" icon="ordered-list">参照装箱单</a-button>
|
|
|
- <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button>
|
|
|
+ <a-button type="primary" @click="referPackingList('0')" icon="ordered-list">参照装箱单-成衣</a-button>
|
|
|
+ <a-button type="primary" @click="referPackingList('1')" icon="ordered-list">参照装箱单-面料</a-button>
|
|
|
+ <!-- <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button> -->
|
|
|
</div>
|
|
|
|
|
|
<!-- 子表-->
|
|
@@ -179,7 +184,7 @@
|
|
|
>
|
|
|
<!-- 集装箱代号 输入框 -->
|
|
|
<template slot="containerCode" slot-scope="text, record, index">
|
|
|
- <a-form-model-item prop="containerCode" :rules="rules.containerCode" required>
|
|
|
+ <a-form-model-item prop="containerCode" :rules="rules.containerCode" >
|
|
|
<a-input style="width:100%" type="text" v-model="record.containerCode" />
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
@@ -187,13 +192,13 @@
|
|
|
<!-- 集装箱号 输入框-->
|
|
|
<template slot="containerNo" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="containerNo" :rules="rules.containerNo">
|
|
|
- <a-input style="width:100%" type="text" v-model="record.containerNo" />
|
|
|
+ <a-input style="width:100%" type="text" v-model="record.containerNumber" />
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
|
|
|
|
<!-- 操作 -->
|
|
|
- <span slot="operationSlot" slot-scope="text, record">
|
|
|
- <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
|
|
|
+ <span slot="operationSlot" slot-scope="text, record,index">
|
|
|
+ <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(index)">
|
|
|
<a href="javascript:void(0);" style="color:red;">删除</a>
|
|
|
</a-popconfirm>
|
|
|
</span>
|
|
@@ -208,16 +213,27 @@
|
|
|
:row-key="record => record.id"
|
|
|
:loading="loading"
|
|
|
:columns="CNYColumns"
|
|
|
- :data-source="CNYData"
|
|
|
+ :data-source="rmbList"
|
|
|
+ :scroll="{ y: 200 }"
|
|
|
bordered
|
|
|
:pagination="false"
|
|
|
>
|
|
|
+ <template slot="CNYfreighForward" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="CNYfreighForward" :rules="rules.CNYfreighForward" >
|
|
|
+ <a-input placeholder="请输入货代" v-model="record.freightForwarder" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+ <template slot="CNYmoney" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="CNYmoney" :rules="rules.CNYmoney" >
|
|
|
+ <a-input placeholder="请输入金额" v-model="record.amount" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
<!-- CNY项目列 -->
|
|
|
<template slot="CNYProjectList" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="CNYProjectList" :rules="rules.CNYProjectList">
|
|
|
- <a-select v-model="record.CNYProjectList" style="width:100%">
|
|
|
- <a-select-option :value="1">项目列1</a-select-option>
|
|
|
- <a-select-option :value="2">项目列2</a-select-option>
|
|
|
+ <a-select v-model="record.itemColumn" style="width:100%" placeholder="请输入项目列">
|
|
|
+ <a-select-option value="1">项目列1</a-select-option>
|
|
|
+ <a-select-option value="2">项目列2</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
@@ -230,16 +246,27 @@
|
|
|
:row-key="record => record.id"
|
|
|
:loading="loading"
|
|
|
:columns="USDColumns"
|
|
|
- :data-source="USDData"
|
|
|
+ :data-source="usdList"
|
|
|
+ :scroll="{ y: 200 }"
|
|
|
bordered
|
|
|
:pagination="false"
|
|
|
>
|
|
|
+ <template slot="USDfreighForward" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="USDfreighForward" :rules="rules.USDfreighForward" >
|
|
|
+ <a-input placeholder="请输入货代" v-model="record.freightForwarder" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
+ <template slot="USDmoney" slot-scope="text, record, index">
|
|
|
+ <a-form-model-item prop="USDmoney" :rules="rules.USDmoney" >
|
|
|
+ <a-input placeholder="请输入金额" v-model="record.amount" />
|
|
|
+ </a-form-model-item>
|
|
|
+ </template>
|
|
|
<!-- USD项目列 -->
|
|
|
<template slot="USDProjectList" slot-scope="text, record, index">
|
|
|
<a-form-model-item prop="USDProjectList" :rules="rules.USDProjectList">
|
|
|
- <a-select v-model="record.USDProjectList" style="width:100%">
|
|
|
- <a-select-option :value="1">项目列1</a-select-option>
|
|
|
- <a-select-option :value="2">项目列2</a-select-option>
|
|
|
+ <a-select v-model="record.itemColumn" style="width:100%">
|
|
|
+ <a-select-option value="1">项目列1</a-select-option>
|
|
|
+ <a-select-option value="2">项目列2</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-model-item>
|
|
|
</template>
|
|
@@ -272,7 +299,8 @@
|
|
|
</div>
|
|
|
</a-drawer>
|
|
|
<!-- 参照装箱单 -->
|
|
|
- <packingList-modal ref="packingListModal" :father="aa" @ok="modalFormOk"></packingList-modal>
|
|
|
+ <packingList-modal ref="packingListModal" :father="aa" @ok="modalFormOk" @callback="referCallback"></packingList-modal>
|
|
|
+ <packing-list-modal-fabrics ref="packingListModalFabrics" :father="aa" @ok="modalFormOk" @callback="referCallback"></packing-list-modal-fabrics>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -280,13 +308,14 @@
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import moment from 'moment'
|
|
|
-
|
|
|
+import {addPackingList,editPackingList} from '@api/document/book.js'
|
|
|
import packingListModal from '@views/book/packingListModal.vue'
|
|
|
+import packingListModalFabrics from '@views/book/packingListModalFabrics.vue'
|
|
|
|
|
|
export default {
|
|
|
name: 'AddBookDrawer', // 新增 托书
|
|
|
mixins: [JeecgListMixin],
|
|
|
- components: { packingListModal, JEllipsis, moment }, // 参照装箱单 弹框
|
|
|
+ components: { packingListModal, JEllipsis, moment,packingListModalFabrics }, // 参照装箱单 弹框
|
|
|
data() {
|
|
|
let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} />
|
|
|
return {
|
|
@@ -301,39 +330,39 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '款号',
|
|
|
- dataIndex: 'styleNum',
|
|
|
+ dataIndex: 'styleNumber',
|
|
|
width: 120,
|
|
|
fixed: 'left',
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '小po号',
|
|
|
- dataIndex: 'smallPoNum',
|
|
|
+ dataIndex: 'smailPo',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '数量',
|
|
|
- dataIndex: 'quantity',
|
|
|
+ dataIndex: 'number',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '箱数',
|
|
|
- dataIndex: 'boxedNum',
|
|
|
+ dataIndex: 'boxNumber',
|
|
|
width: 90,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '毛重',
|
|
|
- dataIndex: 'roughWeigh',
|
|
|
+ dataIndex: 'grossWeight',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '净重',
|
|
|
- dataIndex: 'suttle',
|
|
|
+ dataIndex: 'netWeight',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -360,14 +389,14 @@ export default {
|
|
|
|
|
|
{
|
|
|
title: '集装箱号',
|
|
|
- dataIndex: 'containerNo',
|
|
|
+ dataIndex: 'containerNumber',
|
|
|
width: 120,
|
|
|
scopedSlots: { customRender: 'containerNo' },
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '单价',
|
|
|
- dataIndex: 'price',
|
|
|
+ dataIndex: 'unitPrice',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -382,7 +411,7 @@ export default {
|
|
|
// },
|
|
|
{
|
|
|
title: '预发货日期',
|
|
|
- dataIndex: 'scheduledShipDate',
|
|
|
+ dataIndex: 'preShipmentDate',
|
|
|
width: 120,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -401,14 +430,14 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
title: '采购/委外订单号',
|
|
|
- dataIndex: 'purchaseAboardOrderNum',
|
|
|
+ dataIndex: 'purchaseOutsourcingOrderNo',
|
|
|
width: 160,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
|
|
|
{
|
|
|
title: '采购/委外工厂',
|
|
|
- dataIndex: 'purchaseAboardFactory',
|
|
|
+ dataIndex: 'outsourcingFactoryForProcurement',
|
|
|
width: 160,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
@@ -422,96 +451,172 @@ export default {
|
|
|
className: 'replacecolor'
|
|
|
}
|
|
|
],
|
|
|
- addBookData: [{ englishName: 'morningFresh', styleNum: 'MWBBW2068', quantity: '1200', boxedNum: '588' }, {}],
|
|
|
+ addBookData: [],
|
|
|
CNYColumns: [
|
|
|
{
|
|
|
title: '货代',
|
|
|
- dataIndex: 'CNYfreighForward',
|
|
|
+ dataIndex: 'freightForwarder',
|
|
|
+ scopedSlots: { customRender: 'CNYfreighForward' },
|
|
|
width: 60,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '金额',
|
|
|
- dataIndex: 'CNYmoney',
|
|
|
+ dataIndex: 'amount',
|
|
|
+ scopedSlots: { customRender: 'CNYmoney' },
|
|
|
width: 60,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '项目列',
|
|
|
- dataIndex: 'CNYProjectList',
|
|
|
+ dataIndex: 'itemColumn',
|
|
|
width: 60,
|
|
|
scopedSlots: { customRender: 'CNYProjectList' },
|
|
|
className: 'replacecolor'
|
|
|
}
|
|
|
],
|
|
|
- CNYData: [{ CNYmoney: '487576,87' }],
|
|
|
+ rmbList: [{}],
|
|
|
USDColumns: [
|
|
|
{
|
|
|
title: '货代',
|
|
|
- dataIndex: 'USDfreighForward',
|
|
|
+ dataIndex: 'freightForwarder',
|
|
|
+ scopedSlots: { customRender: 'USDfreighForward' },
|
|
|
width: 20,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '金额',
|
|
|
- dataIndex: 'USDmoney',
|
|
|
+ dataIndex: 'amount',
|
|
|
+ scopedSlots: { customRender: 'USDmoney' },
|
|
|
width: 20,
|
|
|
className: 'replacecolor'
|
|
|
},
|
|
|
{
|
|
|
title: '项目列',
|
|
|
- dataIndex: 'USDProjectList',
|
|
|
+ dataIndex: 'itemColumn',
|
|
|
width: 90,
|
|
|
scopedSlots: { customRender: 'USDProjectList' },
|
|
|
className: 'replacecolor'
|
|
|
}
|
|
|
],
|
|
|
- USDData: [{}],
|
|
|
+ usdList: [{}],
|
|
|
loading: false, // 表格加载
|
|
|
addBook: {},
|
|
|
+ defaultMethod : 'add',
|
|
|
confirmLoading: false,
|
|
|
visible: false,
|
|
|
dateFormat: 'YYYY-MM-DD',
|
|
|
validatorRules: {
|
|
|
- bookDate: [{ required: true, message: '托书日期不能为空', trigger: 'blur' }]
|
|
|
- // 确定必填项
|
|
|
+ shippingOrderDate:[{required: true, message: '托书日期不能为空!'}],
|
|
|
+ consignee:[{required: true, message: '收货人不能为空!'}],
|
|
|
+ shippingOrderNumber:[{required: true, message: '预托书号不能为空!'}],
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
created() {},
|
|
|
methods: {
|
|
|
// 参照装箱单
|
|
|
- referPackingList() {
|
|
|
+ referPackingList(data) {
|
|
|
console.log('打开参照装箱单')
|
|
|
- this.$refs.packingListModal.packingListModVis = true
|
|
|
- },
|
|
|
- // 増行
|
|
|
- handleAddColumn() {
|
|
|
- console.log('増行')
|
|
|
-
|
|
|
- const addrow = {
|
|
|
- englishName: '',
|
|
|
- styleNum: '',
|
|
|
- smallPoNum: '',
|
|
|
- quantity: '',
|
|
|
- boxedNum: '',
|
|
|
- roughWeigh: '',
|
|
|
- suttle: '',
|
|
|
- volume: '',
|
|
|
- distributionPoint: '',
|
|
|
- containerCode: '',
|
|
|
- containerNo: '',
|
|
|
- price: '',
|
|
|
- scheduledShipDate: '',
|
|
|
- salesman: '',
|
|
|
- operatingDepartment: '',
|
|
|
- purchaseAboardOrderNum: '',
|
|
|
- purchaseAboardFactory: '',
|
|
|
- operation: ''
|
|
|
+ if(data === '0'){
|
|
|
+ this.$refs.packingListModal.packingListModVis = true
|
|
|
+ this.$refs.packingListModal.queryParam.tailoringOrFabric = data
|
|
|
+ this.$refs.packingListModal.getPackingList()
|
|
|
+ if(this.addBookData.length !== 0){
|
|
|
+ this.$refs.packingListModal.fatherList = this.addBookData
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ this.$refs.packingListModalFabrics.packingListModalFabrics = true
|
|
|
+ this.$refs.packingListModalFabrics.queryParam.tailoringOrFabric = data
|
|
|
+ this.$refs.packingListModalFabrics.getPackingList()
|
|
|
+ if(this.addBookData.length !== 0){
|
|
|
+ this.$refs.packingListModal.fatherList = this.addBookData
|
|
|
+ }
|
|
|
}
|
|
|
+ },
|
|
|
+ referCallback(data){
|
|
|
+ var subList = this.convertReferToSub(data);
|
|
|
+ this.addBookData = this.addBookData.concat(subList);
|
|
|
+ },
|
|
|
|
|
|
- this.addBookData.push(addrow)
|
|
|
+ // 参照数据转换成子表
|
|
|
+ convertReferToSub(dataList){
|
|
|
+ var ret = [];
|
|
|
+ for (var i=0; i<dataList.length; i++){
|
|
|
+ var data = dataList[i];
|
|
|
+ var sub = {
|
|
|
+ customer: data.customer,
|
|
|
+ readyFabric:data.readyFabric,
|
|
|
+ tailoringFabricItemId:data.itemId,
|
|
|
+ tailoringFabricId:data.id,
|
|
|
+ englishName:'',
|
|
|
+ styleNumber:data.itemNumber,
|
|
|
+ smailPo:data.smallPo,
|
|
|
+ number : data.inventoryQuantity,
|
|
|
+ boxNumber:'',
|
|
|
+ grossWeight:'',
|
|
|
+ netWeight:'',
|
|
|
+ volume:'',
|
|
|
+ distributionPoint:data.distributionPoint,
|
|
|
+ containerCode:'',
|
|
|
+ containerNumber:'',
|
|
|
+ unitPrice:'',
|
|
|
+ preShipmentDate:data.preDeliveryDate,
|
|
|
+ salesman:'',
|
|
|
+ operatingDepartment:'',
|
|
|
+ purchaseOutsourcingOrderNo:data.purchase,
|
|
|
+ outsourcingFactoryForProcurement:'',
|
|
|
+ };
|
|
|
+ ret.push(sub);
|
|
|
+ }
|
|
|
+ return ret;
|
|
|
},
|
|
|
+ // 増行
|
|
|
+ // handleAddColumn() {
|
|
|
+ // console.log('増行')
|
|
|
+
|
|
|
+ // const addrow = {
|
|
|
+ // englishName: '',
|
|
|
+ // styleNum: '',
|
|
|
+ // smallPoNum: '',
|
|
|
+ // quantity: '',
|
|
|
+ // boxedNum: '',
|
|
|
+ // roughWeigh: '',
|
|
|
+ // suttle: '',
|
|
|
+ // volume: '',
|
|
|
+ // distributionPoint: '',
|
|
|
+ // containerCode: '',
|
|
|
+ // containerNo: '',
|
|
|
+ // price: '',
|
|
|
+ // preShipmentDate: '',
|
|
|
+ // salesman: '',
|
|
|
+ // operatingDepartment: '',
|
|
|
+ // purchaseAboardOrderNum: '',
|
|
|
+ // purchaseAboardFactory: '',
|
|
|
+ // operation: ''
|
|
|
+ // }
|
|
|
+
|
|
|
+ // this.addBookData.push(addrow)
|
|
|
+ // },
|
|
|
+
|
|
|
+ // 收货人下拉框
|
|
|
+ consigneeSelectChange(value){
|
|
|
+ if(value !=null && value !='' &&value != 'undefined'){
|
|
|
+ var valueArr = value.split("+")
|
|
|
+ this.addBook.consignee = valueArr[0];
|
|
|
+ if (valueArr.length == 4){
|
|
|
+ this.addBook.consigneeAddress = valueArr[1];
|
|
|
+ this.addBook.notifyParty = valueArr[2];
|
|
|
+ this.addBook.notifyPartyAddress = valueArr[3];
|
|
|
+ }else{
|
|
|
+ this.$message.error('收货信息维护有问题,请检查!')
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.addBook.consigneeAddress = '';
|
|
|
+ this.addBook.notifyParty = '';
|
|
|
+ this.addBook.notifyPartyAddress = '';
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
// 新增托书 子表合计
|
|
|
addBookFooterShow(data) {
|
|
@@ -530,8 +635,8 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 操作 删除
|
|
|
- handleDelete(id) {
|
|
|
- console.log('id:', id)
|
|
|
+ handleDelete(index) {
|
|
|
+ this.addBookData.splice(index, 1);
|
|
|
},
|
|
|
// 抽屉 取消
|
|
|
handleCancel() {
|
|
@@ -545,15 +650,45 @@ export default {
|
|
|
// 触发表单验证
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (valid) {
|
|
|
- that.confirmLoading = true
|
|
|
+ // that.confirmLoading = true
|
|
|
+ var newObj = this.addBook
|
|
|
+ newObj.rmbList = this.rmbList
|
|
|
+ newObj.usdList = this.usdList
|
|
|
+ newObj.syShippingOrderItemList = this.addBookData
|
|
|
+ if(this.defaultMethod === 'add'){
|
|
|
+ addPackingList(newObj).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('添加成功')
|
|
|
+ this.$emit('back')
|
|
|
+ this.close()
|
|
|
+ }else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ editPackingList(newObj).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('添加成功')
|
|
|
+ this.$emit('back')
|
|
|
+ this.close()
|
|
|
+ }else {
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
- this.close()
|
|
|
// this.getShipmentList() // 刷新托书列表
|
|
|
},
|
|
|
close() {
|
|
|
this.$emit('close')
|
|
|
+ this.addBook ={}
|
|
|
+ this.addBookData =[]
|
|
|
+ this.rmbList = [{}]
|
|
|
+ this.usdList = [{}]
|
|
|
this.visible = false
|
|
|
+ this.defaultMethod = 'add'
|
|
|
this.$refs.form.resetFields()
|
|
|
},
|
|
|
|