Browse Source

提交报关

caojunjie 2 years ago
parent
commit
59936a03e6

+ 2 - 1
src/api/basicData/portinformation.js

@@ -49,10 +49,11 @@ export const getList = (current, size, params,typeId) => {
   })
 }
 //港口列表
-export const getAllList = () => {
+export const getAllList = (params) => {
   return request({
     url: '/api/blade-client/port/portList',
     method: 'get',
+    params
   })
 }
 export const add = (row) => {

+ 20 - 0
src/api/importTrade/importDeclaration.js

@@ -46,6 +46,26 @@ export const tradingBoxItem = (ids) => {
         }
     })
 }
+//删除集装箱
+export const containerItem = (ids) => {
+    return request({
+        url: '/api/blade-box-tube/declareContainer/remove',
+        method: 'post',
+        params: {
+            ids,
+        }
+    })
+}
+//删除单证
+export const documentsItem = (ids) => {
+    return request({
+        url: '/api/blade-box-tube/declareDocuments/remove',
+        method: 'post',
+        params: {
+            ids,
+        }
+    })
+}
 // 请核
 export function pleaseCheck(data) {
     return request({

+ 116 - 16
src/components/boxCost/index.vue

@@ -42,7 +42,112 @@ export default {
   data() {
     return {
       option: {},
-      optionBack: {
+      optionBack: {},
+      boxTube:{
+      align: 'center',
+          index: true,
+          addBtnText: "录入明细",
+          refreshBtn: false,
+          addBtn: true,
+          span: 6,
+          dialogTop: "25%",
+          addRowBtn: false,
+          cellBtn: false,
+          editBtn: false,
+          delBtn: false,
+          menuWidth: 140,
+          dialogDrag: true,
+          dialogWidth: "80%",
+          showSummary: true,
+          sumColumnList: [{
+        name: 'quantity',
+        type: 'sum',
+        decimals: 0
+      },{
+        name: 'amount',
+        type: 'sum',
+        decimals: 2
+      }],
+          column: [{
+        label: '收款对象',
+        prop: 'corpName',
+        overHidden: true,
+        width: 160
+      }, {
+        label: '箱号',
+        prop: 'code',
+        width: 140,
+        overHidden: true,
+        filterable: true,
+        type: "select",
+        dicUrl: "/api/blade-box-tube/archives/selectArchivesList",
+        props: {
+          label: "code",
+          value: "code"
+        },
+      }, {
+        label: '费用名称',
+        prop: 'itemName',
+        overHidden: true,
+        width: 120
+      }, {
+        label: '币别',
+        prop: 'currency',
+        width: 100,
+        overHidden: true,
+        filterable: true,
+        type: "select",
+        dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
+        props: {
+          label: "dictValue",
+          value: "dictKey"
+        },
+      }, {
+        label: '汇率',
+        prop: 'exchangeRate',
+        width: 100,
+        type: 'number',
+        disabled: true,
+        overHidden: true,
+        controls: false,
+        precision: 4
+      }, {
+        label: '单价',
+        prop: 'price',
+        type: 'number',
+        overHidden: true,
+        precision: 2,
+        controls: false,
+        width: 140
+      }, {
+        label: '数量',
+        prop: 'quantity',
+        type: 'number',
+        precision: 0,
+        value: 1,
+        controls: false,
+        overHidden: true,
+        width: 100
+      }, {
+        label: '金额',
+        prop: 'amount',
+        type: 'number',
+        precision: 2,
+        disabled: true,
+        controls: false,
+        overHidden: true,
+        width: 140
+      }, {
+        label: '备注',
+        prop: 'remarks',
+        type: 'textarea',
+        overHidden: true,
+        minRows: 3,
+        span: 24,
+        width: 200
+      }]
+    },
+      customsList: {
         align: 'center',
         index: true,
         addBtnText: "录入明细",
@@ -73,18 +178,6 @@ export default {
           overHidden: true,
           width: 160
         }, {
-          label: '箱号',
-          prop: 'code',
-          width: 140,
-          overHidden: true,
-          filterable: true,
-          type: "select",
-          dicUrl: "/api/blade-box-tube/archives/selectArchivesList",
-          props: {
-            label: "code",
-            value: "code"
-          },
-        }, {
           label: '费用名称',
           prop: 'itemName',
           overHidden: true,
@@ -138,12 +231,11 @@ export default {
           width: 140
         }, {
           label: '备注',
-          prop: 'remarks',
+          prop: 'remark',
           type: 'textarea',
           overHidden: true,
           minRows: 3,
-          span: 24,
-          width: 200
+          span: 24
         }]
       },
       dataList: [],
@@ -200,6 +292,9 @@ export default {
     codeValue: {
       type: String
     },
+    type:{
+      type: String
+    },
     url: {
       type: String
     },
@@ -214,6 +309,11 @@ export default {
     }
   },
   async created() {
+    if (this.type === 'BG'){
+      this.optionBack = this.customsList
+    }else {
+      this.optionBack = this.boxTube
+    }
     if (!this.codeValue) this.codeValue = 235.2
     // 判断tabShow的activeName默认的显示
     this.activeName = this.tabShow == 1 ? "first" : this.tabShow == 2 ? "first" : "second";

+ 3 - 2
src/components/port-info/index.vue

@@ -105,6 +105,7 @@ export default {
     value: String,
     type: String,
     disabled: Boolean,
+    search:Object,
     refresh: {
       type: Boolean,
       default: true
@@ -115,7 +116,7 @@ export default {
     event: "balabala"
   },
   created() {
-    getAllList().then(res => {
+    getAllList(this.search).then(res => {
       this.portList = res.data.data;
     });
   },
@@ -154,7 +155,7 @@ export default {
       this.portinfoVisible = false;
     },
     refreshData() {
-      getAllList().then(res => {
+      getAllList(this.search).then(res => {
         this.portList = res.data.data;
       });
     },

+ 6 - 0
src/enums/column-name.js

@@ -1055,6 +1055,12 @@ const columnName = [{
   code: 246.1,
   name: '进口-进口报关-商品'
 },{
+  code: 246.2,
+  name: '进口-进口报关-集装箱'
+},{
+  code: 246.21,
+  name: '进口-进口报关-单证'
+},{
   code: 246.3,
   name: '进口-进口报关-附件'
 }

+ 39 - 0
src/router/views/index.js

@@ -2129,5 +2129,44 @@ export default [{
     },
     component: () => import( /* webpackChunkName: "views" */ '@/views/boxManagement/importReturnTrip/index')
   }]
+}, {
+  path: '/boxManagement/boxRepair/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/boxManagement/boxRepair/index',
+    name: '修箱',
+    meta: {
+      i18n: '/boxManagement/boxRepair/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/boxManagement/boxRepair/index')
+  }]
+}, {
+  path: '/boxManagement/boxWashing/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/boxManagement/boxWashing/index',
+    name: '洗箱',
+    meta: {
+      i18n: '/boxManagement/boxWashing/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/boxManagement/boxWashing/index')
+  }]
+}, {
+  path: '/purchase/importDeclaration/index',
+  component: Layout,
+  hidden: true,
+  children: [{
+    path: '/purchase/importDeclaration/index',
+    name: '进口报关',
+    meta: {
+      i18n: '/purchase/importDeclaration/index',
+      keepAlive: true,
+    },
+    component: () => import( /* webpackChunkName: "views" */ '@/views/purchase/importDeclaration/index')
+  }]
 }
 ]

+ 5 - 1
src/views/basicData/customerInformation/detailsPageEdit.vue

@@ -759,6 +759,10 @@ export default {
             label: "优势航线",
             prop: "line",
             span: 8
+          },{
+            label: "海关号",
+            prop: "customsNo",
+            span: 8
           },
           // {
           //   label: "总返利",
@@ -787,7 +791,7 @@ export default {
           {
             label: "备注",
             prop: "remarks",
-            span: 16,
+            span: 24,
             mock: {
               type: "county"
             }

+ 0 - 1
src/views/boxManagement/boxRepair/detailsPage.vue

@@ -276,7 +276,6 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(242.1), this.optionBack);
-    this.optionTrack = await this.getColumnData(this.getColumnName(242.4), this.optionTrackBack);
     this.option.selectable = (row, index) => {
       return row.id;
     }

+ 0 - 1
src/views/boxManagement/boxWashing/detailsPage.vue

@@ -276,7 +276,6 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(243.1), this.optionBack);
-    this.optionTrack = await this.getColumnData(this.getColumnName(243.4), this.optionTrackBack);
     this.option.selectable = (row, index) => {
       return row.id;
     }

+ 353 - 165
src/views/purchase/importDeclaration/detailsPage.vue

@@ -36,11 +36,54 @@
     </div>
     <trade-card title="基础资料" style="margin-top: 50px">
       <avue-form :option="optionForm" v-model="form" ref="form">
-        <template slot="purchaseCompanyId" slot-scope="scope">
-          <crop-select v-model="form.purchaseCompanyId"
-                       @getCorpData="(row)=>{getGSData(row,['form','purchaseCompanyName'])}" :disabled="scope.disabled"
+        <!--        <template slot="purchaseCompanyId" slot-scope="scope">-->
+        <!--          <crop-select v-model="form.purchaseCompanyId"-->
+        <!--                       @getCorpData="(row)=>{getGSData(row,['form','purchaseCompanyName'])}" :disabled="scope.disabled"-->
+        <!--                       corpType="KH"/>-->
+        <!--        </template>-->
+        <template slot="domesticNo" slot-scope="scope">
+          <crop-select v-model="form.domesticNo"
+                       label="code"
+                       :disabled="scope.disabled"
+                       @getCorpData="(row)=>{getGSData(row,['form','domesticName','domesticCustomsNo'])}"
+                       corpType="KH"/>
+        </template>
+        <template slot="abroadNo" slot-scope="scope">
+          <crop-select v-model="form.abroadNo"
+                       label="code"
+                       :disabled="scope.disabled"
+                       @getCorpData="(row)=>{getGSData(row,['form','abroadName','abroadCustomsNo'])}"
+                       corpType="KH"/>
+        </template>
+        <template slot="consumptionUnitNo" slot-scope="scope">
+          <crop-select v-model="form.consumptionUnitNo"
+                       label="code"
+                       :disabled="scope.disabled"
+                       @getCorpData="(row)=>{getGSData(row,['form','consumptionUnitName','consumptionUnitCustomsNo'])}"
                        corpType="KH"/>
         </template>
+        <template slot="applicantNo" slot-scope="scope">
+          <crop-select v-model="form.applicantNo"
+                       label="code"
+                       :disabled="scope.disabled"
+                       @getCorpData="(row)=>{getGSData(row,['form','applicantName','applicantCustomsNo'])}"
+                       corpType="KH"/>
+        </template>
+        <template slot="countryOriginId" slot-scope="scope">
+          <port-info v-model="form.countryOriginId" type="id" @balabalaTow="(row)=>{balabala(row,['form','countryOriginName'])}" :search="{typeName: '国家'}" :disabled="scope.disabled"/>
+        </template>
+        <template slot="tradeCountryId" slot-scope="scope">
+          <port-info v-model="form.tradeCountryId" type="id" @balabalaTow="(row)=>{balabala(row,['form','tradeCountryName'])}" :search="{typeName: '国家'}" :disabled="scope.disabled"/>
+        </template>
+        <template slot="stopOverHarborId" slot-scope="scope">
+          <port-info v-model="form.stopOverHarborId" type="id" @balabalaTow="(row)=>{balabala(row,['form','stopOverHarborName'])}" :search="{typeName: '港口'}" :disabled="scope.disabled"/>
+        </template>
+        <template slot="portDepartureId" slot-scope="scope">
+          <port-info v-model="form.portDepartureId" type="id" @balabalaTow="(row)=>{balabala(row,['form','portDepartureName'])}" :search="{typeName: '港口'}" :disabled="scope.disabled"/>
+        </template>
+        <template slot="portEntryId" slot-scope="scope">
+          <port-info v-model="form.portEntryId" type="id" @balabalaTow="(row)=>{balabala(row,['form','portEntryName'])}" :search="{typeName: '港口'}" :disabled="scope.disabled"/>
+        </template>
       </avue-form>
     </trade-card>
     <trade-card title="商品信息">
@@ -60,17 +103,67 @@
                      @click="$refs.crud.rowEdit(row,index)">编辑
           </el-button>
           <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
-                     @click="rowDel(row,index,'MX')">删除
+                     @click="rowDel(row,index,'SP')">删除
           </el-button>
         </template>
         <!--        <template slot="boxMakingCompanyForm" slot-scope="scope">-->
         <!--          <crop-select v-model="formTwo.boxMakingCompanyId" :disabled="scope.disabled" :refresh="false"-->
         <!--                       @getCorpData="(row)=>{getGSData(row,['formTwo','boxMakingCompany'])}" corpType="GS"/>-->
         <!--        </template>-->
+        <template slot="originatedCountriesIdForm" slot-scope="scope">
+          <port-info v-model="formTwo.originatedCountriesId" type="id" @balabalaTow="(row)=>{balabala(row,['formTwo','originatedCountriesName'])}" :search="{typeName: '国家'}" :disabled="scope.disabled"/>
+        </template>
+        <template slot="finalDestinationCountryIdForm" slot-scope="scope">
+          <port-info v-model="formTwo.finalDestinationCountryId" type="id" @balabalaTow="(row)=>{balabala(row,['formTwo','finalDestinationCountryName'])}" :search="{typeName: '国家'}" :disabled="scope.disabled"/>
+        </template>
+      </avue-crud>
+    </trade-card>
+    <trade-card title="集装箱">
+      <avue-crud
+          :option="optionTwo"
+          :data="containerList"
+          v-model="formTwoTwo"
+          ref="crudTwo"
+          :key="key"
+          :before-open="beforeOpen"
+          @row-save="rowSave"
+          @row-update="rowUpdate"
+          @resetColumn="resetColumnTwo('crudTwo','optionTwo','optionTwoBack',246.2)"
+          @saveColumn="saveColumnTwo('crudTwo','optionTwo','optionTwoBack',246.2)">
+        <template slot-scope="{type,size,row,index,disabled}" slot="menu">
+          <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
+                     @click="$refs.crudTwo.rowEdit(row,index)">编辑
+          </el-button>
+          <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
+                     @click="rowDel(row,index,'JZX')">删除
+          </el-button>
+        </template>
+      </avue-crud>
+    </trade-card>
+    <trade-card title="单证">
+      <avue-crud
+          :option="optionThree"
+          :data="documentsList"
+          v-model="formTwoThree"
+          ref="crudThree"
+          :key="key"
+          :before-open="beforeOpen"
+          @row-save="rowSave"
+          @row-update="rowUpdate"
+          @resetColumn="resetColumnTwo('crudThree','optionThree','optionThreeBack',246.21)"
+          @saveColumn="saveColumnTwo('crudThree','optionThree','optionThreeBack',246.21)">
+        <template slot-scope="{type,size,row,index,disabled}" slot="menu">
+          <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
+                     @click="$refs.crudThree.rowEdit(row,index)">编辑
+          </el-button>
+          <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
+                     @click="rowDel(row,index,'DZ')">删除
+          </el-button>
+        </template>
       </avue-crud>
     </trade-card>
     <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" activeName="second" ref="boxCost" @resetTrigger="resetTrigger" url="/api/blade-box-tube/declareCustomsFees/remove"></box-cost>
+    <box-cost v-model="dataListTwo" activeName="second" ref="boxCost" type="BG" @resetTrigger="resetTrigger" url="/api/blade-box-tube/declareCustomsFees/remove"></box-cost>
     <trade-card title="附件明细">
       <c-upload
           basic
@@ -109,6 +202,8 @@ import {
   selectArchivesList,
   tradingBoxItem,
   tradingBoxFees,
+  containerItem,
+  documentsItem,
   pleaseCheck,
   repealCancel
 } from "@/api/importTrade/importDeclaration.js";
@@ -126,6 +221,10 @@ export default {
   data() {
     return {
       key: 0,
+      formTwoTwo:{},
+      formTwoThree:{},
+      containerList:[],
+      documentsList:[],
       checkScheduleDialog: false,
       checkId: '',
       batchNo: '',
@@ -149,22 +248,20 @@ export default {
           prop: 'customsDeclarationPlace',
           filterable: true,
           type: 'select',
-          dataType: 'number',
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '申报状态',
           prop: 'declareStatus',
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=declare_status",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '统一编号',
@@ -180,16 +277,25 @@ export default {
           prop: 'exitCustoms',
           filterable: true,
           type: 'select',
-          dataType: 'number',
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '已实施防御性防疫',
           prop: 'whetherEpidemicPrevention',
-          labelWidth:115
+          labelWidth:115,
+          overHidden: true,
+          filterable: true,
+          type: 'select',
+          dicData:[{
+            label:'是',
+            value:1
+          },{
+            label:'否',
+            value:0
+          }]
         }, {
           label: '备案号',
           prop: 'filingNo'
@@ -267,11 +373,10 @@ export default {
           prop: 'transportType',
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '运输工具名称',
@@ -288,11 +393,10 @@ export default {
           span: 8,
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=supervise_mode",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '征免性质',
@@ -300,11 +404,10 @@ export default {
           span: 8,
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=expropriation_nature",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '许可证号',
@@ -312,11 +415,11 @@ export default {
           span: 8
         }, {
           label: '启运国',
-          prop: 'countryOrigin',
+          prop: 'countryOriginId',
           span: 8
         }, {
           label: '经停港',
-          prop: 'stopOverHarbor',
+          prop: 'stopOverHarborId',
           span: 8
         }, {
           label: '成交方式',
@@ -324,11 +427,10 @@ export default {
           span: 8,
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=transaction_mode",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '运费',
@@ -341,11 +443,10 @@ export default {
           prop: 'freightMethod',
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=method",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '金额',
@@ -362,7 +463,7 @@ export default {
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           },
         }, {
           label: '保险',
@@ -375,11 +476,10 @@ export default {
           prop: 'insuranceMethod',
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=method",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '金额',
@@ -396,7 +496,7 @@ export default {
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           },
         }, {
           label: '杂费',
@@ -409,11 +509,10 @@ export default {
           prop: 'sundryFeesMethod',
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=method",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '金额',
@@ -430,7 +529,7 @@ export default {
           dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           },
         }, {
           label: '件数',
@@ -443,11 +542,10 @@ export default {
           prop: 'packing',
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=packing",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '毛重(kg)',
@@ -460,7 +558,7 @@ export default {
           prop: 'netWeight'
         }, {
           label: '贸易国别(地区)',
-          prop: 'tradeCountry',
+          prop: 'tradeCountryId',
           labelWidth:100
         }, {
           label: '集装箱数',
@@ -473,23 +571,22 @@ export default {
           prop: 'documentsAttached'
         }, {
           label: '入境口岸',
-          prop: 'portEntry'
+          prop: 'portEntryId'
         }, {
           label: '货物存放地点',
           prop: 'storagePlaceGoods'
         }, {
           label: '启运港',
-          prop: 'portDeparture'
+          prop: 'portDepartureId'
         }, {
           label: '报关单类型',
           prop: 'customsDeclarationType',
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=declaration_type",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '备注',
@@ -560,11 +657,10 @@ export default {
           width: 100,
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=deal_unit",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '单价',
@@ -583,11 +679,10 @@ export default {
           width: 100,
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '法定第一数量',
@@ -597,16 +692,15 @@ export default {
         }, {
           label: '法定第一计量单位',
           prop: 'statutoryFirstMeasurement',
-          labelWidth:120,
+          labelWidth: 120,
           overHidden: true,
           width: 120,
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=deal_unit",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '加工成品单耗版本号',
@@ -621,7 +715,7 @@ export default {
           width: 100
         }, {
           label: '最终目的国',
-          prop: 'finalDestinationCountry',
+          prop: 'finalDestinationCountryId',
           overHidden: true,
           width: 100
         }, {
@@ -632,20 +726,19 @@ export default {
         }, {
           label: '法定第二计量单位',
           prop: 'legalSecondMeasurement',
-          labelWidth:120,
+          labelWidth: 120,
           overHidden: true,
           width: 120,
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=deal_unit",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }, {
           label: '原产国',
-          prop: 'originatedCountries',
+          prop: 'originatedCountriesId',
           overHidden: true,
           width: 100
         }, {
@@ -665,14 +758,93 @@ export default {
           width: 100,
           filterable: true,
           type: 'select',
-          dataType: 'number',
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=expropriation_type",
           props: {
             label: "dictValue",
-            value: "dictKey"
+            value: "dictValue"
           }
         }]
       },
+      optionTwo:{},
+      optionTwoBack: {
+        align: 'center',
+        index: true,
+        addBtnText: "录入明细",
+        refreshBtn: false,
+        addBtn: true,
+        span: 8,
+        addRowBtn: false,
+        cellBtn: false,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: 140,
+        dialogTop: 25,
+        dialogWidth: "80%",
+        showSummary: true,
+        sumColumnList: [{
+          name: 'amount',
+          type: 'sum',
+          decimals: 2
+        }],
+        column: [{
+          label: '箱号',
+          prop: 'caseNo',
+          overHidden: true,
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        }, {
+          label: '箱类型',
+          prop: 'boxType',
+          overHidden: true
+        }, {
+          label: '拼箱标识',
+          prop: 'lclSign',
+          overHidden: true,
+          filterable: true,
+          type: 'select',
+          dicData:[{
+            label:'是',
+            value:1
+          },{
+            label:'否',
+            value:0
+          }]
+        }]
+      },
+      optionThree:{},
+      optionThreeBack: {
+        align: 'center',
+        index: true,
+        addBtnText: "录入明细",
+        refreshBtn: false,
+        addBtn: true,
+        span: 8,
+        addRowBtn: false,
+        cellBtn: false,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: 140,
+        dialogTop: 25,
+        dialogWidth: "80%",
+        showSummary: true,
+        sumColumnList: [{
+          name: 'amount',
+          type: 'sum',
+          decimals: 2
+        }],
+        column: [{
+          label: '单证代码',
+          prop: 'documentCode',
+          overHidden: true
+        },{
+          label: '单证编码',
+          prop: 'documentNo',
+          overHidden: true
+        }]
+      },
       dataList: [],
       dataListTwo: [],
       tradingBoxFilesList: [],
@@ -682,6 +854,8 @@ export default {
   },
   async created() {
     this.option = await this.getColumnData(this.getColumnName(246.1), this.optionBack);
+    this.optionTwo = await this.getColumnData(this.getColumnName(246.2), this.optionTwoBack);
+    this.optionThree = await this.getColumnData(this.getColumnName(246.21), this.optionThreeBack);
     selectByName("买箱费").then(res => {
       this.costData = res.data.data
     })
@@ -723,6 +897,14 @@ export default {
         this.$set(this.$refs.boxCost.option, "disabled", true)
         this.$set(this.$refs.boxCost.option, "addBtn", false)
         this.$set(this.$refs.boxCost.option, "menu", false)
+        //集装箱
+        this.$set(this.optionTwo, "disabled", true)
+        this.$set(this.optionTwo, "addBtn", false)
+        this.$set(this.optionTwo, "menu", false)
+        //单证
+        this.$set(this.optionThree, "disabled", true)
+        this.$set(this.optionThree, "addBtn", false)
+        this.$set(this.optionThree, "menu", false)
         //附件和顶部按钮
         this.disabled = true
       } else {
@@ -732,6 +914,14 @@ export default {
         this.$set(this.option, "disabled", false)
         this.$set(this.option, "addBtn", true)
         this.$set(this.option, "menu", true)
+        //集装箱
+        this.$set(this.optionTwo, "disabled", false)
+        this.$set(this.optionTwo, "addBtn", true)
+        this.$set(this.optionTwo, "menu", true)
+        //单证
+        this.$set(this.optionThree, "disabled", false)
+        this.$set(this.optionThree, "addBtn", true)
+        this.$set(this.optionThree, "menu", true)
         //费用信息
         this.$set(this.$refs.boxCost.option, "disabled", false)
         this.$set(this.$refs.boxCost.option, "addBtn", true)
@@ -748,52 +938,48 @@ export default {
         type: "warning"
       }).then(() => {
             if (row.id) {
-              tradingBoxItem(row.id).then(res => {
-                if (res.data.success) {
-                  this.$message.success("操作成功!");
-                  this.dataList.splice(index, 1);
-                  if (this.dataListTwo.length > 0) {
-                    for (let item in this.dataListTwo) {
-                      if (this.dataListTwo[item].code == row.code) {
-                        if (this.dataListTwo[item].autoGenerate == 1) {
-                          if (this.dataListTwo[item].id) {
-                            tradingBoxFees(this.dataListTwo[item].id).then(res => {
-                              if (res.data.success) {
-                                this.dataListTwo.splice(index, 1);
-                              }
-                            });
-                          } else {
-                            this.dataListTwo.splice(Number(item), 1);
-                          }
-                        }
-                      }
-                    }
+              if (type == "SP"){
+                tradingBoxItem(row.id).then(res => {
+                  if (res.data.success) {
+                    this.$message.success("操作成功!");
+                    this.dataList.splice(index, 1);
                   }
-                }
-              });
-            } else {
-              this.dataList.splice(index, 1);
-              this.$message.success("操作成功!");
-              if (this.dataListTwo.length > 0) {
-                for (let item in this.dataListTwo) {
-                  if (this.dataListTwo[item].code == row.code) {
-                    if (this.dataListTwo[item].autoGenerate == 1) {
-                      this.dataListTwo.splice(Number(item), 1);
-                    }
+                });
+              }
+              if (type == "JZX"){
+                containerItem(row.id).then(res => {
+                  if (res.data.success) {
+                    this.$message.success("操作成功!");
+                    this.containerList.splice(index, 1);
                   }
-                }
+                });
+              }
+              if (type == "DZ"){
+                documentsItem(row.id).then(res => {
+                  if (res.data.success) {
+                    this.$message.success("操作成功!");
+                    this.documentsList.splice(index, 1);
+                  }
+                });
+              }
+            } else {
+              if (type == "DZ"){
+                this.dataList.splice(index, 1);
+              }
+              if (type == "JZX"){
+                this.containerList.splice(index, 1);
+              }
+              if (type == "DZ"){
+                this.documentsList.splice(index, 1);
               }
+              this.$message.success("操作成功!");
             }
           }
       )
       ;
     },
-    balabala(val) {
-      if (val === null) {
-        this.formTwo.address = ''
-      } else {
-        this.formTwo.address = val.name
-      }
+    balabala(row,type) {
+      this[type[0]][type[1]] = row.cname
     },
     //选择费用名称
     selectValue(value) {
@@ -853,6 +1039,8 @@ export default {
               itemList: this.dataList,
               feesList: this.dataListTwo,
               fileList: this.tradingBoxFilesList,
+              containerList:this.containerList,
+              documentsList:this.documentsList,
               importExportSigns: "BGJK",
             }
             const loading = this.$loading({
@@ -864,7 +1052,7 @@ export default {
             submit(data).then(res => {
               const data = {
                 id: res.data.data.id,
-                url: '/boxManagement/buyContainer/index',
+                url: '/purchase/importDeclaration/index',
                 pageStatus: "this.$store.getters.domSaleStatus",
                 pageLabel: "进口报关",
                 checkFlag: 1,
@@ -902,6 +1090,10 @@ export default {
         this.dataList = res.data.data.itemList
         this.dataListTwo = res.data.data.feesList
         this.tradingBoxFilesList = res.data.data.fileList
+        this.containerList = res.data.data.containerList
+        this.documentsList = res.data.data.documentsList
+        delete this.form.containerList
+        delete this.form.documentsList
         delete this.form.itemList
         delete this.form.feesList
         delete this.form.fileList
@@ -913,6 +1105,14 @@ export default {
           this.$set(this.option, "disabled", true)
           this.$set(this.option, "addBtn", false)
           this.$set(this.option, "menu", false)
+          //集装箱
+          this.$set(this.optionTwo, "disabled", true)
+          this.$set(this.optionTwo, "addBtn", false)
+          this.$set(this.optionTwo, "menu", false)
+          //单证
+          this.$set(this.optionThree, "disabled", true)
+          this.$set(this.optionThree, "addBtn", false)
+          this.$set(this.optionThree, "menu", false)
           //费用信息
           this.$set(this.$refs.boxCost.option, "disabled", true)
           this.$set(this.$refs.boxCost.option, "addBtn", false)
@@ -927,6 +1127,14 @@ export default {
             this.$set(this.option, "disabled", true)
             this.$set(this.option, "addBtn", false)
             this.$set(this.option, "menu", false)
+            //集装箱
+            this.$set(this.optionTwo, "disabled", true)
+            this.$set(this.optionTwo, "addBtn", false)
+            this.$set(this.optionTwo, "menu", false)
+            //单证
+            this.$set(this.optionThree, "disabled", true)
+            this.$set(this.optionThree, "addBtn", false)
+            this.$set(this.optionThree, "menu", false)
             //费用信息
             this.$set(this.$refs.boxCost.option, "disabled", true)
             this.$set(this.$refs.boxCost.option, "addBtn", false)
@@ -940,6 +1148,14 @@ export default {
             this.$set(this.option, "disabled", false)
             this.$set(this.option, "addBtn", true)
             this.$set(this.option, "menu", true)
+            //集装箱
+            this.$set(this.optionTwo, "disabled", false)
+            this.$set(this.optionTwo, "addBtn", true)
+            this.$set(this.optionTwo, "menu", true)
+            //单证
+            this.$set(this.optionThree, "disabled", false)
+            this.$set(this.optionThree, "addBtn", true)
+            this.$set(this.optionThree, "menu", true)
             //费用信息
             this.$set(this.$refs.boxCost.option, "disabled", false)
             this.$set(this.$refs.boxCost.option, "addBtn", true)
@@ -960,6 +1176,8 @@ export default {
             itemList: this.dataList,
             feesList: this.dataListTwo,
             fileList: this.tradingBoxFilesList,
+            containerList:this.containerList,
+            documentsList:this.documentsList,
             importExportSigns: "BGJK"
           }
           const loading = this.$loading({
@@ -983,75 +1201,21 @@ export default {
       });
     },
     rowSave(form, done, loading) {
-      let result = this.dataList.some((item) => {
-        if (item.code == form.code) {
-          return true
-        }
-      })
-      if (result === true) {
-        this.$message.error("已存在此箱号");
-        return loading();
-      }
       done(form)
-
-      this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data) {
-          if (item.dictValue == form.currency) {
-            form.exchangeRate = item.remark
-          }
-        }
-        this.dataListTwo.push({
-          corpId: this.form.purchaseCompanyId,
-          corpName: this.form.purchaseCompanyName,
-          code: form.code,
-          itemId: this.costData.id,
-          itemName: this.costData.cname,
-          currency: form.currency,
-          price: form.amount,
-          quantity: 1,
-          autoGenerate: 1,
-          exchangeRate: form.exchangeRate || 1,
-          feesType: 2,
-          amount: form.amount,
-        })
-      });
     },
     rowUpdate(form, index, done, loading) {
-      form.boxType = form.$boxTypeId
       done(form)
-      this.getWorkDicts("currency").then(res => {
-        for (let item of res.data.data) {
-          if (item.dictValue == form.currency) {
-            form.exchangeRate = item.remark
-          }
-        }
-        if (this.dataListTwo.length > 0) {
-          for (let item in this.dataListTwo) {
-            if (this.dataListTwo[item].code == form.code) {
-              if (this.dataListTwo[item].autoGenerate == 1) {
-                this.dataListTwo.splice(Number(item), 1, {
-                  ...this.dataListTwo[item],
-                  corpId: this.form.purchaseCompanyId,
-                  corpName: this.form.purchaseCompanyName,
-                  code: form.code,
-                  currency: form.currency,
-                  price: form.amount,
-                  exchangeRate: form.exchangeRate || 1,
-                  amount: form.amount
-                })
-                this.key++
-              }
-            }
-          }
-        }
-      });
     },
     //打开表单前
     beforeOpen(done, type) {
       done();
     },
     getGSData(row, type) {
-      this[type[0]][type[1]] = row.cname
+      // this[type[0]][type[1]] = row.cname
+      if (type[1] === "domesticName" || type[1] === "abroadName" || type[1] === "consumptionUnitName" || type[1] === "applicantName"){
+        this[type[0]][type[1]] = row.cname
+        this[type[0]][type[2]] = row.customsNo
+      }
     },
     backToList(type) {
       if (type == 0) {
@@ -1091,6 +1255,14 @@ export default {
           this.$set(this.option, "disabled", true)
           this.$set(this.option, "addBtn", false)
           this.$set(this.option, "menu", false)
+          //集装箱
+          this.$set(this.optionTwo, "disabled", true)
+          this.$set(this.optionTwo, "addBtn", false)
+          this.$set(this.optionTwo, "menu", false)
+          //单证
+          this.$set(this.optionThree, "disabled", true)
+          this.$set(this.optionThree, "addBtn", false)
+          this.$set(this.optionThree, "menu", false)
           //费用信息
           this.$set(this.$refs.boxCost.option, "disabled", true)
           this.$set(this.$refs.boxCost.option, "addBtn", false)
@@ -1104,6 +1276,14 @@ export default {
           this.$set(this.option, "disabled", false)
           this.$set(this.option, "addBtn", true)
           this.$set(this.option, "menu", true)
+          //集装箱
+          this.$set(this.optionTwo, "disabled", false)
+          this.$set(this.optionTwo, "addBtn", true)
+          this.$set(this.optionTwo, "menu", true)
+          //单证
+          this.$set(this.optionThree, "disabled", false)
+          this.$set(this.optionThree, "addBtn", true)
+          this.$set(this.optionThree, "menu", true)
           //费用信息
           this.$set(this.$refs.boxCost.option, "disabled", false)
           this.$set(this.$refs.boxCost.option, "addBtn", true)
@@ -1118,6 +1298,14 @@ export default {
         this.$set(this.option, "disabled", false)
         this.$set(this.option, "addBtn", true)
         this.$set(this.option, "menu", true)
+        //集装箱
+        this.$set(this.optionTwo, "disabled", false)
+        this.$set(this.optionTwo, "addBtn", true)
+        this.$set(this.optionTwo, "menu", true)
+        //单证
+        this.$set(this.optionThree, "disabled", false)
+        this.$set(this.optionThree, "addBtn", true)
+        this.$set(this.optionThree, "menu", true)
         //费用信息
         this.$set(this.$refs.boxCost.option, "disabled", false)
         this.$set(this.$refs.boxCost.option, "addBtn", true)

+ 7 - 0
src/views/purchase/importDeclaration/index.vue

@@ -114,6 +114,13 @@ export default {
           label: '申报地海关',
           prop: 'customsDeclarationPlace',
           width: 120,
+          filterable: true,
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
+          props: {
+            label: "dictValue",
+            value: "dictValue"
+          },
           overHidden: true,
           search: true,
         }, {