Qukatie 11 ay önce
ebeveyn
işleme
d8026439e1

+ 9 - 0
src/api/tradeAgency/tradeAgency.js

@@ -68,6 +68,15 @@ export const remove = (data) => {
         params: data
     })
 }
+
+//贸易代理删除
+export const removeItem = (data) => {
+    return request({
+        url: '/api/blade-los/agentitems/remove',
+        method: 'post',
+        params: data
+    })
+}
 //单据请核
 export const checkAgent = (data) => {
     return request({

+ 26 - 0
src/components/tradeAgency/fee-info.vue

@@ -37,6 +37,10 @@
                     dataName="cnName" @selectChange="rowDicChange('corpCnName', $event, row)"></dic-select>
                 <span v-else>{{ row.corpCnName }}</span>
             </template>
+            <template slot="cntrNoForm" slot-scope="{ row }">
+                <el-input v-if="row.$cellEdit&&!row.feeType" v-model="row.cntrNo" placeholder="请输入 箱号" size="small"></el-input>
+                <span v-else>{{ row.cntrNo }}</span>
+            </template>
             <template slot="feeCnNameForm" slot-scope="{ row }">
                 <dic-select v-if="row.$cellEdit" v-model="row.feeCnName" placeholder="费用名称" key="id" label="cnName"
                     res="records" url="/blade-los/bfees/list" :filterable="true" :remote="true" dataName="cnName"
@@ -114,6 +118,10 @@
                     dataName="cnName" @selectChange="rowDicChange('corpCnName', $event, row)"></dic-select>
                 <span v-else>{{ row.corpCnName }}</span>
             </template>
+            <template slot="cntrNoForm" slot-scope="{ row }">
+                <el-input v-if="row.$cellEdit&&!row.feeType" v-model="row.cntrNo" placeholder="请输入 箱号" size="small"></el-input>
+                <span v-else>{{ row.cntrNo }}</span>
+            </template>
             <template slot="feeCnNameForm" slot-scope="{ row }">
                 <dic-select v-if="row.$cellEdit" v-model="row.feeCnName" placeholder="费用名称" key="id" label="cnName"
                     res="records" url="/blade-los/bfees/list" :filterable="true" :remote="true" dataName="cnName"
@@ -333,6 +341,15 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "箱号",
+                        prop: "cntrNo",
+                        width: '100',
+                        cell: true,
+                        slot: true,
+                        formslot: true,
+                        overHidden: true,
+                    },
+                    {
                         label: "费用名称",
                         prop: "feeCnName",
                         width: '120',
@@ -496,6 +513,15 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "箱号",
+                        prop: "cntrNo",
+                        width: '100',
+                        cell: true,
+                        slot: true,
+                        formslot: true,
+                        overHidden: true,
+                    },
+                    {
                         label: "费用名称",
                         prop: "feeCnName",
                         width: '120',

+ 19 - 0
src/components/tradeAgency/fee-infosimple.vue

@@ -95,6 +95,10 @@
                     @selectChange="rowDicChange('corpCnName', $event, row)"></dic-select>
                 <span v-else>{{ row.corpCnName }}</span>
             </template>
+            <template slot="cntrNoForm" slot-scope="{ row }">
+                <el-input v-if="row.$cellEdit&&!row.feeType" v-model="row.cntrNo" placeholder="请输入 箱号" size="small"></el-input>
+                <span v-else>{{ row.cntrNo }}</span>
+            </template>
             <template slot="feeCnNameForm" slot-scope="{ row }">
                 <dic-select v-if="row.$cellEdit" v-model="row.feeCnName" placeholder="费用名称" key="id" label="cnName"
                     res="records" url="/blade-los/bfees/list" :filterable="true" :remote="true" dataName="cnName"
@@ -219,6 +223,12 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "箱号",
+                        prop: "cntrNo",
+                        width: '100',
+                        overHidden: true,
+                    },
+                    {
                         label: '合同号',
                         prop: "billNo",
                         width: '160',
@@ -361,6 +371,15 @@ export default {
                         overHidden: true,
                     },
                     {
+                        label: "箱号",
+                        prop: "cntrNo",
+                        width: '100',
+                        cell: true,
+                        slot: true,
+                        formslot: true,
+                        overHidden: true,
+                    },
+                    {
                         label: '合同号',
                         prop: "billNo",
                         width: '160',

+ 12 - 6
src/components/tradeAgency/fee-oceanFreight.vue

@@ -22,7 +22,7 @@
                 <el-button type="success" plain size="small" :disabled="disabled"
                     @click="allClick('应收模板', 'D')">应收模板</el-button>
                 <el-button type="primary" plain size="small" :disabled="disabled || selectionDList.length == 0"
-                    @click="allClick('生成应付', 'D')">生成应</el-button>
+                    @click="allClick('生成应付', 'D')">生成应</el-button>
             </template>
             <template slot="indexHeader" slot-scope="{row,index}">
                 <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="disabled" circle @click="addRow('D')">
@@ -102,7 +102,7 @@
                 <el-button type="success" plain size="small" :disabled="disabled"
                     @click="allClick('应付模板', 'C')">应付模板</el-button>
                 <el-button type="primary" plain size="small" :disabled="disabled || selectionCList.length == 0"
-                    @click="allClick('生成应收', 'C')">生成应</el-button>
+                    @click="allClick('生成应收', 'C')">生成应</el-button>
             </template>
             <template slot="indexHeader" slot-scope="{row,index}">
                 <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="disabled" circle @click="addRow('C')">
@@ -124,7 +124,7 @@
                 <span v-else>{{ row.feeCnName }}</span>
             </template>
             <template slot="unitNo" slot-scope="{ row }">
-                <dic-select v-if="row.$cellEdit" v-model="row.unitNo" placeholder="费标准" key="id" label="code"
+                <dic-select v-if="row.$cellEdit" v-model="row.unitNo" placeholder="费标准" key="id" label="code"
                     url="/blade-los/bunits/selectList" :filterable="true"
                     @selectChange="rowDicChange('unitNo', $event, row)"></dic-select>
                 <span v-else>{{ row.unitNo }}</span>
@@ -459,7 +459,7 @@ export default {
             },
             optionC: {},
             optionCBack: {
-                maxHeight:400,
+                maxHeight: 400,
                 calcHeight: 30,
                 menuWidth: 140,
                 tip: false,
@@ -531,7 +531,7 @@ export default {
                         ]
                     },
                     {
-                        label: "费标准",
+                        label: "费标准",
                         prop: "unitNo",
                         width: '120',
                         overHidden: true,
@@ -709,6 +709,8 @@ export default {
                         pid: this.form.id,
                         dc: type,
                         accStatus: 0,
+                        corpCnName: this.form.corpCnName,
+                        corpId: this.form.corpId,
                         businessType: this.form.businessType,
                         billNo: this.form.businessNo,
                         billDate: this.form.businessDate,
@@ -737,6 +739,8 @@ export default {
                         pid: this.form.id,
                         dc: type,
                         accStatus: 0,
+                        corpCnName: this.form.corpCnName,
+                        corpId: this.form.corpId,
                         businessType: this.form.businessType,
                         billNo: this.form.businessNo,
                         billDate: this.form.businessDate,
@@ -1265,7 +1269,9 @@ export default {
     text-align: center;
     padding: 4px 0;
 }
-::v-deep .el-table--small td, .el-table--small th {
+
+::v-deep .el-table--small td,
+.el-table--small th {
     padding: 2px !important;
 }
 </style>

+ 65 - 57
src/views/iosBasicData/bcommodity/index.vue

@@ -18,20 +18,20 @@
         <el-button type="success" size="small" @click="handleExport" icon="el-icon-printer">导出</el-button>
       </template>
       <template slot-scope="scope" slot="menu">
-          <el-button v-if="scope.row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
-                     @click.stop="statusfun(scope.row.id,0)">
-              启用
-          </el-button>
-          <el-button v-if="scope.row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
-                     @click.stop="statusfun(scope.row.id,1)">
-              停用
-          </el-button>
+        <el-button v-if="scope.row.status == 1" type="text" icon="el-icon-turn-off" style="color: #85e967" size="small"
+          @click.stop="statusfun(scope.row.id, 0)">
+          启用
+        </el-button>
+        <el-button v-if="scope.row.status == 0" type="text" icon="el-icon-turn-off" style="color: #e83c3a" size="small"
+          @click.stop="statusfun(scope.row.id, 1)">
+          停用
+        </el-button>
       </template>
 
       <template slot="unitNoForm">
-        <search-query ref="SearchQuery" :disabled="searchDisabled" :datalist="unitNoData" title="计量单位" :filterable="true" :clearable="true"
-          :remote="true" :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }" @remoteMethod="getBunitsListfun"
-          @corpChange="corpChange">
+        <search-query ref="SearchQuery" :disabled="searchDisabled" :datalist="unitNoData" title="计量单位" :filterable="true"
+          :clearable="true" :remote="true" :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
+          @remoteMethod="getBunitsListfun" @corpChange="corpChange">
           <bunits @selectionChange="selectionBunits"></bunits>
         </search-query>
       </template>
@@ -68,8 +68,8 @@ import { getToken } from "@/util/auth";
 export default {
   data() {
     return {
-        // 判断组件是否禁用
-        searchDisabled:false,
+      // 判断组件是否禁用
+      searchDisabled: false,
       // 计算单位请求到的数据
       unitNoData: [],
       form: {},
@@ -134,7 +134,7 @@ export default {
         viewBtn: false,
         selection: true,
         dialogClickModal: false,
-          menuWidth:220,
+        menuWidth: 220,
         column: [
           {
             label: "HS CODE",
@@ -146,7 +146,7 @@ export default {
               message: "请输入HS CODE(The Harmonization System Code)",
               trigger: "blur"
             }],
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "中文名称",
@@ -158,7 +158,7 @@ export default {
               message: "请输入中文名称",
               trigger: "blur"
             }],
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "英文名称",
@@ -170,7 +170,7 @@ export default {
               message: "请输入英文名称",
               trigger: "blur"
             }],
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "计量单位",
@@ -179,7 +179,7 @@ export default {
             type: 'select',
             clearable: false,
             dicData: [],
-              overHidden:true,
+            overHidden: true,
             // rules: [{
             //   required: true,
             //   message: "请输入计量单位",
@@ -190,7 +190,15 @@ export default {
             label: "NCM CODE",
             prop: "ncmCode",
             width: "100",
-              overHidden:true,
+            overHidden: true,
+          },
+          {
+            label: "税率(%)",
+            prop: "taxRate",
+            width: "100",
+            type: 'number',
+            controls: false,
+            overHidden: true,
           },
           {
             label: "状态",
@@ -204,46 +212,46 @@ export default {
               label: '停用',
               value: 1
             }],
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "是否已删除(0 否 1是)",
             prop: "isDeleted",
             hide: true,
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "创建人",
             prop: "createUserName",
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "创建部门",
             prop: "createDeptName",
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "创建时间",
             prop: "createTime",
             width: "160",
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "修改人",
             prop: "updateUserName",
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "修改时间",
             prop: "updateTime",
-              width: "160",
+            width: "160",
             display: false,
-              overHidden:true,
+            overHidden: true,
           },
           {
             label: "备注",
@@ -253,7 +261,7 @@ export default {
             slot: true,
             span: 24,
             minRows: 3,
-              overHidden:true,
+            overHidden: true,
           },
         ]
       },
@@ -288,31 +296,31 @@ export default {
     this.getBunitsListfun()
   },
   methods: {
-      // 禁用启用按钮
-      statusfun(id,status){
-          this.$confirm("确定将选择数据更改状态?", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              type: "warning"
-          }).then(()=>{
-              bcommodityDetail(id).then(res=>{
-                  let obj = res.data.data;
-                  obj.status = status
-                  bcommoditySubmit(obj).then(()=>{
-                      this.onLoad(this.page);
-                      this.$message({
-                          type: "success",
-                          message: "操作成功!"
-                      });
-                  })
-              })
+    // 禁用启用按钮
+    statusfun(id, status) {
+      this.$confirm("确定将选择数据更改状态?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        bcommodityDetail(id).then(res => {
+          let obj = res.data.data;
+          obj.status = status
+          bcommoditySubmit(obj).then(() => {
+            this.onLoad(this.page);
+            this.$message({
+              type: "success",
+              message: "操作成功!"
+            });
           })
-      },
-      // 查看
-      rowViewfun(row, index) {
-          this.searchDisabled = true
-          this.$refs.crud.rowView(row, index)
-      },
+        })
+      })
+    },
+    // 查看
+    rowViewfun(row, index) {
+      this.searchDisabled = true
+      this.$refs.crud.rowView(row, index)
+    },
     // 导出
     handleExport() {
       var condition = ''
@@ -462,11 +470,11 @@ export default {
         });
     },
     beforeOpen(done, type) {
-          if (["edit", "add"].includes(type)) {
-              this.searchDisabled = false
-          } else {
-              this.searchDisabled = true
-          }
+      if (["edit", "add"].includes(type)) {
+        this.searchDisabled = false
+      } else {
+        this.searchDisabled = true
+      }
       if (["edit", "view"].includes(type)) {
         bcommodityDetail(this.form.id).then(res => {
           this.form = res.data.data;

+ 4 - 0
src/views/tradeAgency/exchangePurchasing/index.vue

@@ -84,6 +84,7 @@ export default {
                         label: "业务号",
                         prop: "businessNo",
                         overHidden: true,
+                        width: "140",
                         search: true,
                         searchOrder: 2,
                     },
@@ -91,12 +92,14 @@ export default {
                         label: '合同号',
                         prop: "contractNo",
                         overHidden: true,
+                        width: "140",
                         search: true,
                         searchOrder: 3,
                     },
                     {
                         label: '提单号',
                         prop: "billNoJoin",
+                        width: "140",
                         search: true,
                         searchOrder: 4,
                         overHidden: true,
@@ -128,6 +131,7 @@ export default {
                         label: "业务日期",
                         prop: "businessDate",
                         type: "date",
+                        width: "100",
                         search: true,
                         searchOrder: 5,
                         searchProp: "businessDateList",

+ 2 - 2
src/views/tradeAgency/firstSettlement/detailsPage.vue

@@ -88,7 +88,7 @@ export default {
                         prop: "businessDate",
                         type: "date",
                         format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd 00:00:00",
+                        valueFormat: "yyyy-MM-dd HH:mm:ss",
                         disabled: false,
                         rules: [{
                             required: true,
@@ -109,7 +109,7 @@ export default {
                     {
                         label: '当天汇率',
                         prop: "exchangeRate",
-                        disabled: false,
+                        disabled: true,
                     },
                     {
                         label: '实付金额',

+ 4 - 0
src/views/tradeAgency/firstSettlement/index.vue

@@ -85,6 +85,7 @@ export default {
                         prop: "businessNo",
                         overHidden: true,
                         search: true,
+                        width: "140",
                         searchOrder: 2,
                     },
                     {
@@ -92,6 +93,7 @@ export default {
                         prop: "contractNo",
                         search: true,
                         searchOrder: 3,
+                        width: "140",
                         overHidden: true,
                     },
                     {
@@ -99,6 +101,7 @@ export default {
                         prop: "billNoJoin",
                         search: true,
                         searchOrder: 4,
+                        width: "140",
                         overHidden: true,
                     },
                     {
@@ -107,6 +110,7 @@ export default {
                         type: "date",
                         search: true,
                         searchOrder: 5,
+                        width: "100",
                         searchProp: "businessDateList",
                         unlinkPanels: true,
                         searchRange: true,

+ 30 - 22
src/views/tradeAgency/oceanFreightImport/detailsPage.vue

@@ -90,11 +90,14 @@
                 <avue-crud :option="option" :data="form.preContainersList" id="out-table" ref="crud"
                     @selection-change="selectionChange" @resetColumn="resetColumn('crud', 'option', 'optionBack', 388)"
                     @saveColumn="saveColumn('crud', 'option', 'optionBack', 388)">
-                    <template slot="menuLeft">
-                        <el-button type="primary" size="small" icon="el-icon-plus" :disabled="editDisabled"
-                            @click="addRow">新 增
+                    <template slot="indexHeader" slot-scope="{row,index}">
+                        <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
+                            @click="addRow()">
                         </el-button>
                     </template>
+                    <template slot="index" slot-scope="{row,index}">
+                        <span>{{ index + 1 }}</span>
+                    </template>
                     <template slot="cntrTypeCode" slot-scope="{ row }">
                         <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.cntrTypeCode" placeholder="箱型" key="id"
                             res="records" label="cnName" url="/blade-los/bcntrtypes/list" :filterable="true" :remote="true"
@@ -113,8 +116,8 @@
                         <span v-else>{{ row.goodsName }}</span>
                     </template>
                     <tempalte slot="goodsType" slot-scope="{ row }">
-                        <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsType" placeholder="类型" key="dictKey"
-                            label="dictValue" url="/blade-system/dict-biz/dictionary?code=goods-type"
+                        <dic-select v-if="row.$cellEdit && !row.srcId" v-model="row.goodsType" placeholder="类型"
+                            key="dictKey" label="dictValue" url="/blade-system/dict-biz/dictionary?code=goods-type"
                             :filterable="true"></dic-select>
                         <span v-else>{{ row.goodsType }}</span>
                     </tempalte>
@@ -123,10 +126,10 @@
                             placeholder="请输入 件数" size="small" style="width: 100%;"></el-input-number>
                         <span v-else>{{ row.quantity }}</span>
                     </tempalte>
-                    <tempalte slot="grossWeight" slot-scope="{ row }">
-                        <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.grossWeight" :controls="false"
+                    <tempalte slot="netWeight" slot-scope="{ row }">
+                        <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.netWeight" :controls="false"
                             placeholder="请输入 重量" size="small" style="width: 100%;"></el-input-number>
-                        <span v-else>{{ row.grossWeight }}</span>
+                        <span v-else>{{ row.netWeight }}</span>
                     </tempalte>
                     <tempalte slot="price" slot-scope="{ row }">
                         <el-input-number v-if="row.$cellEdit && !row.srcId" v-model="row.price" :controls="false"
@@ -543,7 +546,6 @@ export default {
                 menuWidth: 160,
                 tip: false,
                 border: true,
-                index: true,
                 addBtn: false,
                 viewBtn: false,
                 editBtn: false,
@@ -553,45 +555,51 @@ export default {
                 align: 'center',
                 column: [
                     {
+                        label: "index",
+                        prop: "index",
+                        width: "55",
+                        headerslot: true,
+                    },
+                    {
                         label: "箱型",
                         prop: "cntrTypeCode",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                     },
                     {
                         label: "箱号",
                         prop: "boxNo",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
                         label: "品名",
                         prop: "goodsName",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
                         label: "类型",
                         prop: "goodsType",
-                        width: "120",
+                        width: "80",
                         overHidden: true
                     },
                     {
                         label: "件数",
                         prop: "quantity",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
                         label: "重量",
-                        prop: "grossWeight",
-                        width: "120",
+                        prop: "netWeight",
+                        width: "100",
                         overHidden: true
                     },
                     {
                         label: "单价",
                         prop: "price",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
@@ -611,7 +619,7 @@ export default {
                     {
                         label: "查验时间",
                         prop: "inspectionDate",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         type: "date",
                         format: "yyyy-MM-dd",
@@ -630,7 +638,7 @@ export default {
                             label: '否',
                             value: 0
                         }],
-                        width: "120",
+                        width: "90",
                         overHidden: true
                     },
                     {
@@ -645,7 +653,7 @@ export default {
                             label: '否',
                             value: 0
                         }],
-                        width: "120",
+                        width: "90",
                         overHidden: true
                     },
                     {
@@ -660,7 +668,7 @@ export default {
                             label: '否',
                             value: 0
                         }],
-                        width: "120",
+                        width: "90",
                         overHidden: true
                     },
                     {
@@ -675,7 +683,7 @@ export default {
                             label: '否',
                             value: 0
                         }],
-                        width: "120",
+                        width: "90",
                         overHidden: true
                     },
                     {

+ 11 - 11
src/views/tradeAgency/oceanFreightImport/index.vue

@@ -118,17 +118,9 @@ export default {
                         searchOrder: 1,
                     },
                     {
-                        label: "委托编号",
-                        prop: "billNo",
-                        width: "80",
-                        overHidden: true,
-                        search: true,
-                        searchOrder: 9,
-                    },
-                    {
                         label: "合同号",
                         prop: "bookingNo",
-                        width: "80",
+                        width: "140",
                         overHidden: true,
                         search: true,
                         searchOrder: 2,
@@ -136,15 +128,23 @@ export default {
                     {
                         label: "提单号",
                         prop: "mblno",
-                        width: "80",
+                        width: "120",
                         overHidden: true,
                         search: true,
                         searchOrder: 3,
                     },
                     {
+                        label: "委托编号",
+                        prop: "billNo",
+                        width: "120",
+                        overHidden: true,
+                        search: true,
+                        searchOrder: 9,
+                    },
+                    {
                         label: "放单方式",
                         prop: "mconsigneeCntyCode",
-                        width: "120",
+                        width: "90",
                         overHidden: true,
                     },
                     {

+ 111 - 117
src/views/tradeAgency/tradeAgency/detailsPage.vue

@@ -43,6 +43,19 @@
                             dataName="cnName" @selectChange="dicChange('corpName', $event)"
                             :disabled="editDisabled"></dic-select>
                     </tempalte>
+                    <tempalte slot="contractNo" slot-scope="{ row }">
+                        <el-input v-model="form.contractNo" placeholder="请输入 合同号"
+                            :disabled="editDisabled || form.agentItemsList.length"></el-input>
+                    </tempalte>
+                    <tempalte slot="contractDate" slot-scope="{ row }">
+                        <el-date-picker v-model="form.contractDate" type="date" placeholder="请选择 合同日期" format="yyyy-MM-dd"
+                            valueFormat="yyyy-MM-dd 00:00:00" :disabled="editDisabled || form.agentItemsList.length">
+                        </el-date-picker>
+                    </tempalte>
+                    <tempalte slot="prepaidAmount" slot-scope="{ row }">
+                        <el-input v-model="form.prepaidAmount" placeholder="请输入 预付金额"
+                            :disabled="editDisabled || form.agentItemsList.length"></el-input>
+                    </tempalte>
                     <tempalte slot="countryOfOrigin" slot-scope="{ row }">
                         <dic-select v-model="form.countryOfOrigin" placeholder="原产地" key="id" label="cnName" res="records"
                             url="/blade-los/bcountrys/list" :filterable="true" :remote="true" dataName="cnName"
@@ -123,15 +136,10 @@
                     @resetColumn="resetColumn('crud', 'option', 'optionBack', 376)"
                     @saveColumn="saveColumn('crud', 'option', 'optionBack', 376)">
                     <template slot="menuLeft">
-                        <el-button type="primary" size="small" icon="el-icon-plus" :disabled="editDisabled"
-                            @click="addRow">新 增
-                        </el-button>
                         <el-button type="info" plain size="small" :disabled="editDisabled"
                             @click="allClick('一键保存')">一键保存</el-button>
                         <el-button type="info" plain size="small" :disabled="editDisabled"
                             @click="allClick('一键编辑')">一键编辑</el-button>
-                        <el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
-                            @click="allClick('批量删除')">批量删除</el-button>
                         <el-button type="success" size="small" :disabled="editDisabled || !form.id"
                             @click="allClick('首款账单')">首款账单
                         </el-button>
@@ -173,6 +181,14 @@
                             </el-dropdown-menu>
                         </el-dropdown>
                     </template>
+                    <template slot="indexHeader" slot-scope="{row,index}">
+                        <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
+                            @click="addRow()">
+                        </el-button>
+                    </template>
+                    <template slot="index" slot-scope="{row,index}">
+                        <span>{{ index + 1 }}</span>
+                    </template>
                     <template slot="billNo" slot-scope="{ row }">
                         <!-- <el-input v-if="row.$cellEdit" v-model="row.billNo" placeholder="请输入 提单号"></el-input> -->
                         <span v-if="!row.$cellEdit" style="color: #1e9fff" @click="rowJump(row)">{{ row.billNo }}</span>
@@ -217,9 +233,9 @@
                         <span v-else>{{ row.amount }}</span>
                     </tempalte>
                     <template slot="menu" slot-scope="{ row, index }">
-                        <el-button size="small" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" type="text"
+                        <!-- <el-button size="small" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" type="text"
                             :disabled="editDisabled" @click="rowCell(row, index)">{{ row.$cellEdit ? '保 存' : '编 辑'
-                            }}</el-button>
+                            }}</el-button> -->
                         <el-button size="small" icon="el-icon-delete" type="text" :disabled="editDisabled"
                             @click="rowDel(row, index)">删 除</el-button>
                     </template>
@@ -293,7 +309,7 @@
 </template>
 
 <script>
-import { submit, getDetail, remove, checkAgent, revokeCheckAgent, copyAgent, generateDownPaymentBill, generateBalancePaymentBill, generatePayment, revokeApplyForPayment, confirmationNotification, generateFreightForwarder, balancePayment } from "@/api/tradeAgency/tradeAgency";
+import { submit, getDetail, removeItem, checkAgent, revokeCheckAgent, copyAgent, generateDownPaymentBill, generateBalancePaymentBill, generatePayment, revokeApplyForPayment, confirmationNotification, generateFreightForwarder, balancePayment } from "@/api/tradeAgency/tradeAgency";
 import { bcurrencyGetExrate } from "@/api/iosBasicData/rateManagement";
 import feeInfo from "@/components/tradeAgency/fee-info";
 import dicSelect from "@/components/dicSelect/main";
@@ -419,10 +435,6 @@ export default {
                     {
                         label: '合同日期',
                         prop: "contractDate",
-                        type: "date",
-                        format: "yyyy-MM-dd",
-                        valueFormat: "yyyy-MM-dd 00:00:00",
-                        disabled: false,
                         rules: [{
                             required: true,
                             message: " ",
@@ -594,10 +606,9 @@ export default {
             optionBack: {
                 height: 'auto',
                 calcHeight: 30,
-                menuWidth: 140,
+                menuWidth: 60,
                 tip: false,
                 border: true,
-                index: true,
                 addBtn: false,
                 viewBtn: false,
                 editBtn: false,
@@ -607,9 +618,15 @@ export default {
                 align: 'center',
                 column: [
                     {
+                        label: "index",
+                        prop: "index",
+                        width: "55",
+                        headerslot: true,
+                    },
+                    {
                         label: "提单号",
                         prop: "billNo",
-                        width: "160",
+                        width: "140",
                         cell: true,
                         overHidden: true,
                         rules: [
@@ -639,7 +656,7 @@ export default {
                     {
                         label: "箱号",
                         prop: "boxNo",
-                        width: "160",
+                        width: "140",
                         cell: true,
                         overHidden: true,
                         rules: [
@@ -651,57 +668,23 @@ export default {
                         ]
                     },
                     {
-                        label: "铅封号",
-                        prop: "leadSealNo",
-                        width: "120",
-                        cell: true,
-                        overHidden: true
-                    },
-                    {
-                        label: "放单方式",
-                        prop: "orderReleaseMethod",
-                        width: "160",
-                        cell: true,
-                        slot: true,
-                        formslot: true,
-                        overHidden: true
-                    },
-                    {
                         label: "PI发票号",
                         prop: "invoiceNo",
-                        width: "160",
+                        width: "100",
                         cell: true,
                         overHidden: true
                     },
                     {
                         label: "订单号",
                         prop: "orderNo",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         overHidden: true
                     },
                     {
-                        label: "开船日期",
-                        prop: "etd",
-                        width: "120",
-                        overHidden: true
-                    },
-                    {
-                        label: "预计到港",
-                        prop: "estimateReachHarbor",
-                        width: "120",
-                        overHidden: true
-                    },
-                    {
-                        label: "实际到港",
-                        prop: "actualReachHarbor",
-                        width: "120",
-                        overHidden: true
-                    },
-                    {
                         label: "HSCODE",
                         prop: "hsCode",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         cell: true,
                         slot: true,
@@ -717,20 +700,20 @@ export default {
                     {
                         label: "厂号",
                         prop: "factoryNumber",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         overHidden: true
                     },
                     {
                         label: "标签品名",
                         prop: "labelProductName",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
                         label: "商品类别",
                         prop: "goodsType",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         slot: true,
                         formslot: true,
@@ -746,7 +729,7 @@ export default {
                     {
                         label: "件数",
                         prop: "quantity",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         type: 'number',
                         controls: false,
@@ -762,7 +745,7 @@ export default {
                     {
                         label: "净重(kg)",
                         prop: "netWeight",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         slot: true,
                         formslot: true,
@@ -778,7 +761,7 @@ export default {
                     {
                         label: "单价",
                         prop: "price",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         slot: true,
                         formslot: true,
@@ -794,7 +777,7 @@ export default {
                     {
                         label: "毛重(kg)",
                         prop: "grossWeight",
-                        width: "120",
+                        width: "100",
                         cell: true,
                         type: 'number',
                         controls: false,
@@ -810,16 +793,50 @@ export default {
                     {
                         label: "金额",
                         prop: "amount",
+                        width: "100",
+                        cell: true,
+                        slot: true,
+                        formslot: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "铅封号",
+                        prop: "leadSealNo",
                         width: "120",
                         cell: true,
+                        overHidden: true
+                    },
+                    {
+                        label: "放单方式",
+                        prop: "orderReleaseMethod",
+                        width: "100",
+                        cell: true,
                         slot: true,
                         formslot: true,
                         overHidden: true
                     },
                     {
+                        label: "开船日期",
+                        prop: "etd",
+                        width: "120",
+                        overHidden: true
+                    },
+                    {
+                        label: "预计到港",
+                        prop: "estimateReachHarbor",
+                        width: "120",
+                        overHidden: true
+                    },
+                    {
+                        label: "实际到港",
+                        prop: "actualReachHarbor",
+                        width: "120",
+                        overHidden: true
+                    },
+                    {
                         label: "税率",
                         prop: "taxRate",
-                        width: "120",
+                        width: "80",
                         overHidden: true
                     },
                     {
@@ -849,13 +866,13 @@ export default {
                     {
                         label: "库存件数",
                         prop: "inventoryQuantity",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
                         label: "货代",
                         prop: "freightForwarder",
-                        width: "120",
+                        width: "80",
                         type: 'select',
                         dicData: [{
                             label: '是',
@@ -941,6 +958,10 @@ export default {
                 align: 'center',
                 column: [
                     {
+                        label: '合同号',
+                        prop: "contractNo",
+                    },
+                    {
                         label: '提单号',
                         prop: 'billNo'
                     },
@@ -1037,8 +1058,14 @@ export default {
             if (name == 'corpName') {
                 if (row) {
                     this.form.corpId = row.id
+                    if (row.sourceType == 'SALES') {
+                        this.form.srcCnName = row.srcCnName
+                        this.form.srcId = row.srcId
+                    }
                 } else {
                     this.form.corpId = null
+                    this.form.srcCnName = null
+                    this.form.srcId = null
                 }
             }
             if (name == 'polCnName') {
@@ -1130,8 +1157,10 @@ export default {
             if (name == 'hsCode') {
                 if (row) {
                     el.labelProductName = row.cnName
+                    el.taxRate = row.taxRate
                 } else {
                     el.labelProductName = null
+                    el.taxRate = null
                 }
             }
         },
@@ -1213,7 +1242,7 @@ export default {
         addRow() {
             if (!this.form.corpId) return this.$message.error("请选择客户名称");
             if (this.form.agentItemsList.length == 0) {
-                this.form.agentItemsList.push({ $cellEdit: true })
+                this.form.agentItemsList.push({ orderReleaseMethod: '正本', freightForwarder: '0', $cellEdit: true })
             } else {
                 let obj = {}
                 obj = this.deepClone(this.form.agentItemsList[this.form.agentItemsList.length - 1])
@@ -1221,7 +1250,7 @@ export default {
                     billNo: obj.billNo,
                     boxType: obj.boxType,
                     leadSealNo: obj.leadSealNo,
-                    orderReleaseMethod: obj.orderReleaseMethod,
+                    orderReleaseMethod: '正本',
                     orderNo: obj.orderNo,
                     hsCode: obj.hsCode,
                     factoryNumber: obj.factoryNumber,
@@ -1232,22 +1261,23 @@ export default {
                     price: obj.price,
                     grossWeight: obj.grossWeight,
                     amount: obj.amount,
+                    freightForwarder: '0',
                     $cellEdit: true
                 })
             }
 
         },
-        rowCell(row, index) {
-            if (!row.billNo || !row.boxType || !row.boxNo || !row.hsCode || !row.goodsType || !row.quantity || !row.netWeight || !row.price || !row.grossWeight) {
-                this.$refs.crud.rowCell(row, index)
-                return this.$message.error("请完善明细信息");
-            }
-            if (row.$cellEdit == true) {
-                this.$set(row, "$cellEdit", false);
-            } else {
-                this.$set(row, "$cellEdit", true);
-            }
-        },
+        // rowCell(row, index) {
+        //     if (!row.billNo || !row.boxType || !row.boxNo || !row.hsCode || !row.goodsType || !row.quantity || !row.netWeight || !row.price || !row.grossWeight) {
+        //         this.$refs.crud.rowCell(row, index)
+        //         return this.$message.error("请完善明细信息");
+        //     }
+        //     if (row.$cellEdit == true) {
+        //         this.$set(row, "$cellEdit", false);
+        //     } else {
+        //         this.$set(row, "$cellEdit", true);
+        //     }
+        // },
         rowDel(row, index) {
             this.$confirm("确定删除数据?", {
                 confirmButtonText: "确定",
@@ -1255,7 +1285,7 @@ export default {
                 type: "warning"
             }).then(() => {
                 if (row.id) {
-                    remove({ ids: row.id }).then(res => {
+                    removeItem({ ids: row.id }).then(res => {
                         this.form.agentItemsList.splice(index, 1);
                         this.$message.success("成功删除");
                     })
@@ -1381,7 +1411,6 @@ export default {
                         return this.$message.error("请完善明细信息");
                     }
                     this.$set(row, "$cellEdit", false);
-             
                 }
                 this.submit()
             }
@@ -1390,51 +1419,17 @@ export default {
                     this.$set(row, "$cellEdit", true);
                 }
             }
-            if (name == '批量删除') {
-                let multiList = []
-                let arr = []
-                this.$confirm("确定将选择数据删除?", {
-                    confirmButtonText: "确定",
-                    cancelButtonText: "取消",
-                    type: "warning"
-                }).then(() => {
-                    multiList = this.selectionList
-                    arr = this.form.agentItemsList
-                    // 获取有id 的数据
-                    const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
-                    let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
-                    // 把选中的删除掉
-                    multiList.forEach((item) => {
-                        for (let index in arr) {
-                            if (JSON.stringify(item) == JSON.stringify(arr[index])) {
-                                arr.splice(Number(index), 1)
-                            }
-                        }
-                    })
-                    if (itemsWithId.length != 0) {
-                        const loading = this.$loading({
-                            lock: true,
-                            text: '加载中',
-                            spinner: 'el-icon-loading',
-                            background: 'rgba(255,255,255,0.7)'
-                        });
-                        remove({ ids: arrIds.join(',') }).then(res => {
-                            this.$message.success("删除成功");
-                        }).finally(() => {
-                            loading.close();
-                        })
-                    }
-                })
-            }
             if (name == '首款账单') {
                 if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
                 bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
                     res.data.data.forEach(e => {
                         if (this.form.currency == e.code) {
-                            this.$prompt('请输入汇率', '首款账单', {
+                            this.$prompt('账单金额(' + this.form.currency + '):' + this.form.prepaidAmount + '<br/>请输入汇率', '首款账单', {
                                 confirmButtonText: '确定',
                                 cancelButtonText: '取消',
-                                inputValue: e.exrate
+                                inputValue: e.exrate,
+                                dangerouslyUseHTMLString: true,
+                                closeOnClickModal: false,
                             }).then(({ value }) => {
                                 let obj = {}
                                 obj = {
@@ -1451,7 +1446,6 @@ export default {
                 })
             }
             if (name == '尾款账单') {
-
                 if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
                 let obj = {}
                 obj = {

+ 11 - 26
src/views/tradeAgency/tradeAgency/index.vue

@@ -205,7 +205,7 @@ export default {
                     {
                         label: "合同号",
                         prop: "contractNo",
-                        width: "100",
+                        width: "140",
                         overHidden: true,
                         search: true,
                         searchOrder: 2,
@@ -213,7 +213,7 @@ export default {
                     {
                         label: "提单号",
                         prop: "billNo",
-                        width: "80",
+                        width: "100",
                         overHidden: true,
                         search: true,
                         searchOrder: 3,
@@ -249,13 +249,13 @@ export default {
                     {
                         label: "审核状态",
                         prop: "businessStatus",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                     },
                     {
                         label: "审单状态",
                         prop: "reviewStatus",
-                        width: "120",
+                        width: "100",
                         overHidden: true,
                         search: true,
                         searchOrder: 5,
@@ -274,7 +274,7 @@ export default {
                         type: "date",
                         format: "yyyy-MM-dd",
                         valueFormat: "yyyy-MM-dd 00:00:00",
-                        width: "120",
+                        width: "100",
                         overHidden: true
                     },
                     {
@@ -618,34 +618,20 @@ export default {
                 this.selectionList.forEach(item => {
                     ids.push(item.itemId)
                 })
-                this.$confirm('是否生成申请付款?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    applyForPaymentList({ ids: ids.join(','), dc: 'C' }).then(res => {
-                        this.applyDialog = true
-                        this.applyData = res.data.data
-                    })
+                applyForPaymentList({ ids: ids.join(','), dc: 'C' }).then(res => {
+                    this.applyDialog = true
+                    this.applyData = res.data.data
                 })
-
             }
             if (name == '生成申请收款') {
                 let ids = []
                 this.selectionList.forEach(item => {
                     ids.push(item.itemId)
                 })
-                this.$confirm('是否生成申请收款?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    applyForPaymentList({ ids: ids.join(','), dc: 'D' }).then(res => {
-                        this.applyDialog = true
-                        this.applyData = res.data.data
-                    })
+                applyForPaymentList({ ids: ids.join(','), dc: 'D' }).then(res => {
+                    this.applyDialog = true
+                    this.applyData = res.data.data
                 })
-
             }
         },
         rowEdit(row) {
@@ -709,7 +695,6 @@ export default {
             }).finally(() => {
                 this.loading = false;
             })
-
         },
         // 详情的返回列表
         goBack() {