Procházet zdrojové kódy

Merge branch 'master' of http://139.196.39.194:9021/chenc/sen-yu-new-web

zengtx před 3 roky
rodič
revize
931b4a9225

+ 1 - 1
src/api/document/advance-packingList.js

@@ -2,7 +2,7 @@
 import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
 
 // 分页列表查询
-const getadPaList = params => getAction('/spapl/syPreAssembledPackingList/list', params)
+const getadPaList = params => getAction('/spapl/syPreAssembledPackingList/list2', params)
 
 // 新增
 const addAdvPac = params => postAction('/spapl/syPreAssembledPackingList/add', params)

+ 25 - 0
src/api/document/pre-book.js

@@ -1 +1,26 @@
+import { getAction, postAction, deleteAction } from '@/api/manage'
+
 /** 单证 -- 预托书列表 **/
+
+// 分页列表查询
+const preBookList = params => getAction('/letterDeposit/syLetterDeposit/list', params)
+
+// 新增
+const addPreBook = params => postAction('/letterDeposit/syLetterDeposit/add', params)
+
+// 详情
+const preBookById = params => getAction('/letterDeposit/syLetterDeposit/queryById', params)
+
+// 编辑
+const editById = params => postAction('/letterDeposit/syLetterDeposit/edit', params)
+
+//  删除
+const deletePreBook = params => deleteAction('//letterDeposit/syLetterDeposit/delete', params)
+
+// 提交
+const submit = params => postAction('/letterDeposit/syLetterDeposit/syShippingDetailsSubmit', params)
+
+// 取消提交
+const cancelSubmit = params => postAction('/letterDeposit/syLetterDeposit/syShippingDetailsSubmit', params)
+
+export { preBookList, addPreBook, preBookById, editById, deletePreBook, submit, cancelSubmit }

+ 1 - 1
src/api/document/shipmentList.js

@@ -12,7 +12,7 @@ const addShipmentList = params => postAction('/shippingDetails/syShippingDetails
 const shipmentQueryById = params => getAction('/shippingDetails/syShippingDetails/queryById', params)
 
 // 编辑
-const editById = params => postAction('shippingDetails/syShippingDetails/edit', params)
+const editById = params => postAction('/shippingDetails/syShippingDetails/edit', params)
 
 //  删除
 const deleteShipment = params => deleteAction('/shippingDetails/syShippingDetails/delete', params)

+ 1 - 1
src/components/layouts/TabLayout.vue

@@ -212,7 +212,7 @@
           this.$message.warning('这是最后一页,不能再关闭了啦')
           return
         }
-        console.log("this.pageList ",this.pageList );
+        // console.log("this.pageList ",this.pageList );
         let removeRoute = this.pageList.filter(item => item.fullPath == key)
         this.pageList = this.pageList.filter(item => item.fullPath !== key)
         let index = this.linkList.indexOf(key)

+ 128 - 0
src/field/document/preBook.md

@@ -0,0 +1,128 @@
+## 预托书 子表
+
+<!-- latestDateOfShipment 装运期限 -->
+集装箱号 containerNumber
+
+latestDateOfShipment 进仓/装柜日期
+
+
+    @ApiModelProperty(value = "主键id")
+    private java.lang.String id;
+
+    @ApiModelProperty(value = "预托书主表id")
+    private java.lang.String syLetterDepositId;
+
+    @ApiModelProperty(value = "预装箱单主表id")
+    private java.lang.String syPreAssembledPackingListId;
+
+    @ApiModelProperty(value = "预装箱单子表id")
+    private java.lang.String syPreAssembledPackingListItemId;
+
+    @ApiModelProperty(value = "账套")
+    private java.lang.String acSetNo;
+
+    @ApiModelProperty(value = "成衣工厂")
+    private java.lang.String garmentFactory;
+
+    @ApiModelProperty(value = "HOD")
+    private java.lang.String hod;
+
+    @ApiModelProperty(value = "STYLE NO")
+    private java.lang.String styleNo;
+
+    @ApiModelProperty(value = "PO NO")
+    private java.lang.String poNo;
+
+    @ApiModelProperty(value = "ITEM NO./SKU NO./UPC NO./PACKS CODE")
+    private java.lang.String itemCode;
+
+    @ApiModelProperty(value = "分销点")
+    private java.lang.String distributionPoint;
+
+    @ApiModelProperty(value = "PREPACK SKU")
+    private java.lang.String prepackSku;
+
+    @ApiModelProperty(value = "尺码")
+    private java.lang.String size;
+
+    @ApiModelProperty(value = "起始箱号")
+    private java.lang.String startingBoxNumber;
+
+    @ApiModelProperty(value = "结束箱号")
+    private java.lang.String endCaseNumber;
+
+    @ApiModelProperty(value = "颜色")
+    private java.lang.String colour;
+
+    @ApiModelProperty(value = "件数/箱")
+    private java.lang.String piecesBox;
+
+    @ApiModelProperty(value = "箱数")
+    private java.math.BigDecimal boxNumber;
+
+    @ApiModelProperty(value = "总件数")
+    private java.math.BigDecimal total;
+
+    @ApiModelProperty(value = "净重/箱")
+    private java.math.BigDecimal netWeight;
+
+    @ApiModelProperty(value = "总净重")
+    private java.math.BigDecimal totalNetWeight;
+
+    @ApiModelProperty(value = "毛重")
+    private java.math.BigDecimal grossWeight;
+
+    @ApiModelProperty(value = "总毛重")
+    private java.math.BigDecimal totalGrossWeight;
+
+    @ApiModelProperty(value = "外箱长度")
+    private java.math.BigDecimal outerBoxLength;
+
+    @ApiModelProperty(value = "外箱宽度")
+    private java.math.BigDecimal outerBoxWidth;
+
+    @ApiModelProperty(value = "外箱高度")
+    private java.math.BigDecimal outerBoxHeight;
+
+    @ApiModelProperty(value = "总体积")
+    private java.math.BigDecimal totalVolume;
+
+    @ApiModelProperty(value = "净净重")
+    private java.math.BigDecimal netWeightToo;
+
+    @ApiModelProperty(value = "单价")
+    private java.math.BigDecimal unitPrice;
+
+    @ApiModelProperty(value = "总价")
+    private java.math.BigDecimal totalPrice;
+
+    @ApiModelProperty(value = "排序")
+    private java.lang.Integer sort;
+
+    @ApiModelProperty(value = "创建人")
+    private java.lang.String createBy;
+
+    @ApiModelProperty(value = "创建日期")
+    private java.util.Date createTime;
+
+    @ApiModelProperty(value = "更新人")
+    private java.lang.String updateBy;
+
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "更新日期")
+    private java.util.Date updateTime;
+
+    @ApiModelProperty(value = "组织")
+    private java.lang.String pkOrg;
+
+    @ApiModelProperty(value = "删除状态")
+    private java.lang.String delFlag;
+
+    @ApiModelProperty(value = "备注")
+    private java.lang.Object memo;
+
+    @ApiModelProperty(value = "集装箱代号")
+    private String containerCode;
+
+    @ApiModelProperty(value = "集装箱号")
+    private String containerNumber;

+ 2 - 2
src/views/advance-packingList/adPaList-clothes.vue

@@ -199,7 +199,7 @@ import editAdpackingDrawer from '@views/advance-packingList/editAdpackingDrawer.
 import { getadPaList } from '@api/document/advance-packingList.js'
 
 export default {
-  productName: 'AdPaListClothes', // 预装线单-成衣
+  productName: 'AdPaListClothes', // 预装单-成衣
   mixins: [JeecgListMixin],
   components: { JEllipsis, moment, addAdpackingDrawer, detailsAdpackingDrawer, editAdpackingDrawer },
 
@@ -435,7 +435,7 @@ export default {
 
     // 新增
     addAdpacking() {
-      // console.log('新增预装箱单')
+      console.log('新增预装箱单')
       this.$refs.addAdpackingDrawer.visible = true
     },
 

+ 4 - 2
src/views/advance-packingList/addAdpackingDrawer.vue

@@ -466,7 +466,8 @@ export default {
       dateFormat: 'YYYY-MM-DD',
 
       addAdpacking: {}, //主表信息
-      confirmLoading: false
+      confirmLoading: false,
+      msgFormSon: 'test' // 子组件传来数据的变量
       // state: '0', // 单据状态初始未【仅保存】
       // pushState: '0' // 推送状态初始未【仅保存】
 
@@ -521,7 +522,8 @@ export default {
       newObj.memo = this.addAdpacking.memo
       newObj.garmentFactory = this.addAdpacking.garmentFactory
 
-      newObj.data = this.data // 子表信息赋值
+      newObj.data = this.data // 子表信息赋值F
+       newObj.outerBoxWidth = this.data.outerBoxWidth
 
       // 必须选择子表 --- 参照订单数据
       if (newObj.data.length == 0) {

+ 19 - 21
src/views/advance-packingList/referShipmentDetailsModal.vue

@@ -81,7 +81,7 @@ export default {
         {
           title: '单据号',
           dataIndex: 'documentNo',
-          width: 120,
+          width: 160,
           fixed: 'left',
           className: 'replacecolor'
         },
@@ -108,7 +108,7 @@ export default {
         {
           title: '业务员',
           dataIndex: 'salesman',
-          width: 120,
+          width: 100,
           className: 'replacecolor'
         },
 
@@ -161,13 +161,13 @@ export default {
         {
           title: '存货名称',
           dataIndex: 'inventoryName',
-          width: 120,
+          width: 220,
           className: 'replacecolor'
         },
         {
           title: '数量(合计)',
-          dataIndex: 'bb',
-          width: 120,
+          dataIndex: 'shipmentQuantity',
+          width: 100,
           className: 'replacecolor'
         },
 
@@ -180,7 +180,7 @@ export default {
         {
           title: '采购/委外订单号',
           dataIndex: 'purOrSubOrder',
-          width: 120,
+          width: 140,
           className: 'replacecolor'
         },
         {
@@ -190,23 +190,26 @@ export default {
           className: 'replacecolor'
         },
         {
-          title: '工厂单价(采购/委外单价)',
+          // (采购/委外单价)
+          title: '工厂单价',
           dataIndex: 'factoryUnitPrice',
-          width: 120,
+          width: 100,
           className: 'replacecolor'
         },
         {
-          title: '申报要素(单证维护)',
+          // (单证维护)
+          title: '申报要素',
           dataIndex: 'declarationElements',
-          width: 140,
+          width: 120,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
 
         {
-          title: '套装件数(存货自定义项)',
+          // (存货自定义项)
+          title: '套装件数',
           dataIndex: 'numberOfSets',
-          width: 120,
+          width: 100,
           className: 'replacecolor'
         },
         {
@@ -283,9 +286,7 @@ export default {
         shipList(this.queryParam).then(res => {
           // console.log('参照订单数据res', res)
           if (res.success) {
-            // 后台数据赋值给参照订单数据
             this.data = res.result.records
-            // console.log('新增参照订单数据', this.data)
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
@@ -299,10 +300,7 @@ export default {
     // 弹框确定
     onSubmit() {
       if (this.selectedRowKeys.length == 0) {
-        this.$message.error('请勾选参照发运明细')
-      }
-      if ((this.selectedRowKeys.length = 2 || this.selectedRowKeys.length > 1)) {
-        alert('error')
+        this.$message.error('请勾选发运明细')
       } else {
         // console.log('需要传给父组件的数据', this.selectedRows)
         // bao父组件指定的传数据绑定的函数 || this.selectedRows子组件给父组件传递的数据
@@ -382,7 +380,7 @@ export default {
   text-align: center;
 }
 
-// /deep/ th.replacecolor {
-//   background-color: #ccc;
-// }
+/deep/ th.replacecolor {
+  background-color: #ccc !important;
+}
 </style>

+ 15 - 3
src/views/order/orderList.vue

@@ -46,6 +46,17 @@
                   </a-select>
                 </a-form-item>
               </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="成品/面辅料">
+                  <!-- 成品传0 面辅料传1 -->
+                  <a-select placeholder="请选择" v-model="queryParam.isProduct">
+                    <a-select-option value="">请选择</a-select-option>
+                    <a-select-option value="0">成品</a-select-option>
+                    <a-select-option value="1">面辅料</a-select-option>
+                  </a-select>
+                </a-form-item>
+              </a-col>
             </template>
 
             <a-col :md="6" :sm="8">
@@ -88,7 +99,7 @@
         </a-table>
       </div>
     </a-card>
-    
+
     <!-- 订单数据明细 抽屉 -->
     <orderDetail-drawer ref="orderDetailDrawer" :fatherList="getOrderList" @ok="modalFormOk"></orderDetail-drawer>
   </div>
@@ -192,6 +203,7 @@ export default {
         customerAbbreviation: '',
         account: '',
         dilivery: '',
+        isProduct: '', // 客户需求新增
         pageNo: '' // 初始页
       },
 
@@ -230,9 +242,9 @@ export default {
         on: {
           click: event => {
             this.$refs.orderDetailDrawer.visible = true
-            this.$refs.orderDetailDrawer.record = record //接口参数
+            this.$refs.orderDetailDrawer.record = record // 接口参数
             this.$refs.orderDetailDrawer.getOrderChild()
-            this.$refs.orderDetailDrawer.orderDetail = record //详情页主表赋值
+            this.$refs.orderDetailDrawer.orderDetail = record // 详情页主表赋值
           }
         }
       }

+ 80 - 80
src/views/pre-book/addPreBookDrawer.vue

@@ -12,40 +12,41 @@
       <!-- 主表信息 -->
       <a-card :bordered="true">
         <div class="table-page-search-wrapper">
-          <a-form-model layout="inline" ref="form" :model="preBook" :rules="validatorRules">
+          <!-- :rules="validatorRules" -->
+          <a-form-model layout="inline" ref="form" :model="addPreBook">
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="托书日期" prop="bookDate">
+                <a-form-model-item label="托书日期" prop="shippingOrderDate">
                   <a-date-picker
                     placeholder="请选择托书日期"
                     style="width:100%;"
                     :format="dateFormat"
-                    v-model="preBook.bookDate"
+                    v-model="addPreBook.shippingOrderDate"
                   />
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="托书号" prop="bookNum">
-                  <a-input placeholder="请输入托书号" v-model="preBook.bookNum"></a-input>
+                <a-form-model-item label="托书号" prop="shippingOrderNumber">
+                  <a-input placeholder="请输入托书号" v-model="addPreBook.shippingOrderNumber"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="12" :sm="12">
                 <a-form-model-item label="外销发票号码" prop="exportInvoiceNo">
-                  <a-input placeholder="请输入外销发票号码" v-model="preBook.exportInvoiceNo"></a-input>
+                  <a-input placeholder="请输入外销发票号码" v-model="addPreBook.exportInvoiceNo"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="经营单位" prop="businessUnit">
-                  <a-input placeholder="请输入经营单位" v-model="preBook.businessUnit"></a-input>
+                <a-form-model-item label="经营单位" prop="unitInOperation">
+                  <a-input placeholder="请输入经营单位" v-model="addPreBook.unitInOperation"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="经营单位地址" prop="businessUnitAdd">
-                  <a-select placeholder="请选择经营单位地址" v-model="preBook.businessUnitAdd">
+                <a-form-model-item label="经营单位地址" prop="unitInOperationAddress">
+                  <a-select placeholder="请选择经营单位地址" v-model="addPreBook.unitInOperationAddress">
                     <a-select-option value="">请选择</a-select-option>
                     <a-select-option :value="0">客户1</a-select-option>
                     <a-select-option :value="1">客户2</a-select-option>
@@ -55,31 +56,31 @@
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="进仓/装柜日期" prop="inLoadDate">
+                <a-form-model-item label="进仓/装柜日期" prop="latestDateOfShipment">
                   <a-date-picker
                     placeholder="请选择进仓/装柜日期"
                     style="width:100%;"
                     :format="dateFormat"
-                    v-model="preBook.inLoadDate"
+                    v-model="addPreBook.latestDateOfShipment"
                   />
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="最终船期" prop="finalShipDate">
-                  <a-input placeholder="请输入最终船期" v-model="preBook.finalShipDate"></a-input>
+                <a-form-model-item label="最终船期" prop="theFinalShippingDate">
+                  <a-input placeholder="请输入最终船期" v-model="addPreBook.theFinalShippingDate"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="收货人" prop="consignee">
-                  <a-input placeholder="请输入收货人" v-model="preBook.consignee"></a-input>
+                <a-form-model-item label="收货人" prop="theFinalShippingDate">
+                  <a-input placeholder="请输入收货人" v-model="addPreBook.theFinalShippingDate"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="收货人地址" prop="consigneeAdd">
-                  <a-select placeholder="请选择收货人地址" v-model="preBook.consigneeAdd">
+                <a-form-model-item label="收货人地址" prop="consigneeAddress">
+                  <a-select placeholder="请选择收货人地址" v-model="addPreBook.consigneeAddress">
                     <a-select-option value="">请选择</a-select-option>
                     <a-select-option value="0">收货人1</a-select-option>
                     <a-select-option value="1">收货人2</a-select-option>
@@ -89,67 +90,67 @@
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="通知方" prop="notifying">
-                  <a-input placeholder="请输入通知方" v-model="preBook.notifying"></a-input>
+                <a-form-model-item label="通知方" prop="notifyParty">
+                  <a-input placeholder="请输入通知方" v-model="addPreBook.notifyParty"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="通知方地址" prop="notifyingAdd">
-                  <a-input placeholder="请输入通知方地址" v-model="preBook.notifyingAdd"></a-input>
+                <a-form-model-item label="通知方地址" prop="notifyPartyAddress">
+                  <a-input placeholder="请输入通知方地址" v-model="addPreBook.notifyPartyAddress"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="贸易国别" prop="tradeCountry">
-                  <a-input placeholder="请输入贸易国别" v-model="preBook.tradeCountry"></a-input>
+                  <a-input placeholder="请输入贸易国别" v-model="addPreBook.tradeCountry"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="运抵国别" prop="arriveCountry">
-                  <a-input placeholder="请输入运抵国别" v-model="preBook.arriveCountry"></a-input>
+                <a-form-model-item label="运抵国别" prop="arriveInCountry">
+                  <a-input placeholder="请输入运抵国别" v-model="addPreBook.arriveInCountry"></a-input>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="出口口岸" prop="exportPort">
-                  <a-input placeholder="请输入出口口岸" v-model="preBook.exportPort"></a-input>
+                  <a-input placeholder="请输入出口口岸" v-model="addPreBook.exportPort"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="目的港" prop="destinationport">
-                  <a-input placeholder="请输入目的港" v-model="preBook.destinationport"></a-input>
+                <a-form-model-item label="目的港" prop="destinationPort">
+                  <a-input placeholder="请输入目的港" v-model="addPreBook.destinationPort"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="收汇方式" prop="collectionMethod">
-                  <a-input placeholder="请输入收汇方式" v-model="preBook.collectionMethod"></a-input>
+                <a-form-model-item label="收汇方式" prop="exchangeEarningsValue">
+                  <a-input placeholder="请输入收汇方式" v-model="addPreBook.exchangeEarningsValue"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="成交方式" prop="soldType">
-                  <a-input placeholder="请输入成交方式" v-model="preBook.soldType"></a-input>
+                <a-form-model-item label="成交方式" prop="termsOfDeliveryvalue">
+                  <a-input placeholder="请输入成交方式" v-model="addPreBook.termsOfDeliveryvalue"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="金额" prop="money">
-                  <a-input placeholder="请输入金额" v-model="preBook.money"></a-input>
+                  <a-input placeholder="请输入金额" v-model="addPreBook.money"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="人民币" prop="RMB">
-                  <a-input placeholder="请输入人民币" v-model="preBook.RMB"></a-input>
+                <a-form-model-item label="人民币" prop="cny">
+                  <a-input placeholder="请输入人民币" v-model="addPreBook.cny"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="美元" prop="dollar">
-                  <a-input placeholder="请输入美元" v-model="preBook.dollar"></a-input>
+                <a-form-model-item label="美元" prop="usd">
+                  <a-input placeholder="请输入美元" v-model="addPreBook.usd"></a-input>
                 </a-form-model-item>
               </a-col>
             </a-row>
@@ -166,9 +167,11 @@
 
         <!-- table-->
         <a-spin :spinning="confirmLoading">
-          <a-form-model ref="formRef" :rules="validatorRules">
+          <!-- :rules="validatorRules" -->
+          <a-form-model ref="formRef">
             <a-table
               bordered
+              v-if="addPerBookData"
               :row-key="record => record.id"
               :columns="addPerBookColumns"
               :data-source="addPerBookData"
@@ -185,9 +188,9 @@
               </template>
 
               <!-- 集装箱号 输入框-->
-              <template slot="containerNo" slot-scope="text, record, index">
-                <a-form-model-item prop="containerNo" :rules="rules.containerNo">
-                  <a-input style="width:100%" type="text" v-model="record.containerNo" />
+              <template slot="containerNumber" slot-scope="text, record, index">
+                <a-form-model-item prop="containerNumber" :rules="rules.containerNumber">
+                  <a-input style="width:100%" type="text" v-model="record.containerNumber" />
                 </a-form-model-item>
               </template>
 
@@ -214,9 +217,9 @@
               :pagination="false"
             >
               <!-- CNY项目列 -->
-              <template slot="CNYProjectList" slot-scope="text, record, index">
-                <a-form-model-item prop="CNYProjectList" :rules="rules.CNYProjectList">
-                  <a-select v-model="record.CNYProjectList" style="width:100%">
+              <template slot="itemColumn" slot-scope="text, record, index">
+                <a-form-model-item prop="itemColumn" :rules="rules.itemColumn">
+                  <a-select v-model="record.itemColumn" style="width:100%">
                     <a-select-option :value="1">项目列1</a-select-option>
                     <a-select-option :value="2">项目列2</a-select-option>
                   </a-select>
@@ -247,7 +250,6 @@
             </a-table>
           </div>
         </a-row>
-
       </a-card>
 
       <!-- 页面底部保存取消 -->
@@ -296,35 +298,31 @@ export default {
           title: '英文名称',
           dataIndex: 'englishName',
           width: 120,
-
           fixed: 'left',
           className: 'replacecolor'
         },
         {
           title: '款号',
-          dataIndex: 'styleNum',
+          dataIndex: 'sort',
           width: 120,
-
           fixed: 'left',
           className: 'replacecolor'
         },
         {
-          title: '小po',
-          dataIndex: 'smallPoNum',
+          title: '小po',
+          dataIndex: 'smallPo',
           width: 120,
-
           className: 'replacecolor'
         },
         {
           title: '数量',
-          dataIndex: 'quantity',
+          dataIndex: '01',
           width: 120,
-
           className: 'replacecolor'
         },
         {
           title: '箱数',
-          dataIndex: 'boxedNum',
+          dataIndex: 'boxNumber',
           width: 90,
 
           className: 'replacecolor'
@@ -332,21 +330,21 @@ export default {
 
         {
           title: '毛重',
-          dataIndex: 'roughWeigh',
+          dataIndex: 'grossWeight',
           width: 120,
 
           className: 'replacecolor'
         },
         {
           title: '净重',
-          dataIndex: 'suttle',
+          dataIndex: 'netWeight',
           width: 120,
 
           className: 'replacecolor'
         },
         {
           title: '体积',
-          dataIndex: 'volume',
+          dataIndex: '02',
           width: 160,
 
           className: 'replacecolor'
@@ -368,14 +366,14 @@ export default {
 
         {
           title: '集装箱号',
-          dataIndex: 'containerNo',
+          dataIndex: 'containerNumber',
           width: 120,
-          scopedSlots: { customRender: 'containerNo' },
+          scopedSlots: { customRender: 'containerNumber' },
           className: 'replacecolor'
         },
         {
           title: '单价',
-          dataIndex: 'price',
+          dataIndex: 'unitPrice',
           width: 120,
 
           className: 'replacecolor'
@@ -437,29 +435,30 @@ export default {
           className: 'replacecolor'
         }
       ],
-      addPerBookData: [{}, {}],
+      addPerBookData: [],
+
       CNYColumns: [
         {
           title: '货代',
-          dataIndex: 'CNYfreighForward',
+          dataIndex: 'freightForwarder',
           width: 60,
           className: 'replacecolor'
         },
         {
           title: '金额',
-          dataIndex: 'CNYmoney',
+          dataIndex: 'amount',
           width: 60,
           className: 'replacecolor'
         },
         {
           title: '项目列',
-          dataIndex: 'CNYProjectList',
+          dataIndex: 'itemColumn',
           width: 60,
-          scopedSlots: { customRender: 'CNYProjectList' },
+          scopedSlots: { customRender: 'itemColumn' },
           className: 'replacecolor'
         }
       ],
-      CNYData: [{ CNYmoney: '487576,87' }],
+      CNYData: [],
 
       USDColumns: [
         {
@@ -482,17 +481,18 @@ export default {
           className: 'replacecolor'
         }
       ],
-      USDData: [{}],
+      USDData: [],
 
+      msgFormSon: 'test', // 子组件传来数据的变量
       loading: false, // 表格加载
-      preBook: {},
+      addPreBook: {}, //主表信息
       confirmLoading: false,
       visible: false,
-      dateFormat: 'YYYY-MM-DD',
-      validatorRules: {
-        bookDate: [{ required: true, message: '托书日期不能为空', trigger: 'blur' }]
-        // 确定必填项
-      }
+      dateFormat: 'YYYY-MM-DD'
+      // validatorRules: {
+      //   shippingOrderDate: [{ required: true, message: '托书日期不能为空', trigger: 'blur' }]
+      //   // 确定必填项
+      // }
     }
   },
   created() {},
@@ -508,17 +508,17 @@ export default {
 
       const addrow = {
         englishName: '',
-        styleNum: '',
-        smallPoNum: '',
+        sort: '',
+        smallPo: '',
         quantity: '',
-        boxedNum: '',
-        roughWeigh: '',
-        suttle: '',
+        boxNumber: '',
+        grossWeight: '',
+        netWeight: '',
         volume: '',
         distributionPoint: '',
         containerCode: '',
-        containerNo: '',
-        price: '',
+        containerNumber: '',
+        unitPrice: '',
         scheduledShipDate: '',
         salesman: '',
         operatingDepartment: '',

+ 44 - 78
src/views/pre-book/detailsPreBookDrawer.vue

@@ -1,155 +1,128 @@
 <template>
   <!-- 详情预托书  回显所有信息-->
-  <div id="editPreBookDrawer">
-    <a-drawer
-      title="详情"
-      width="89%"
-      placement="right"
-      :closable="true"
-      :visible="visible"
-      @close="handleCancel">
+  <div id="detailPreBookDrawer">
+    <a-drawer title="详情" width="89%" placement="right" :closable="true" :visible="visible" @close="onClose">
       <!-- 主表信息 展示-->
       <a-card :bordered="true">
         <div class="table-page-search-wrapper">
           <a-form-model layout="inline" ref="form" :model="preBook">
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="托书日期" prop="bookDate">
-                  2022-03-15
-                  <!-- <a-date-picker
-                    placeholder="请选择托书日期"
-                    style="width:100%;"
-                    :format="dateFormat"
-                    v-model="preBook.bookDate"
-                  /> -->
+                <a-form-model-item label="托书日期" prop="shippingOrderDate">
+                  {{ preBookDetails.shippingOrderDate }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="托书号" prop="bookNum">
-                  <!-- <a-input placeholder="请输入托书号" v-model="preBook.bookNum"></a-input> -->
+                <a-form-model-item label="托书号" prop="shippingOrderNumber">
+                  {{ preBookDetails.shippingOrderNumber }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="12" :sm="12">
                 <a-form-model-item label="外销发票号码" prop="exportInvoiceNo">
-                  <!-- <a-input placeholder="请输入外销发票号码" v-model="preBook.exportInvoiceNo"></a-input> -->
+                  {{ preBookDetails.exportInvoiceNo }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="经营单位" prop="businessUnit">
-                  <!-- <a-input placeholder="请输入经营单位" v-model="preBook.businessUnit"></a-input> -->
+                <a-form-model-item label="经营单位" prop="unitInOperation">
+                  {{ preBookDetails.unitInOperation }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="经营单位地址" prop="businessUnitAdd">
-                  <!-- <a-select placeholder="请选择经营单位地址" v-model="preBook.businessUnitAdd">
-                    <a-select-option value="">请选择</a-select-option>
-                    <a-select-option :value="0">客户1</a-select-option>
-                    <a-select-option :value="1">客户2</a-select-option>
-                    <a-select-option :value="2">客户3</a-select-option>
-                  </a-select> -->
+                <a-form-model-item label="经营单位地址" prop="unitInOperationAddress">
+                  {{ preBookDetails.unitInOperationAddress }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="进仓/装柜日期" prop="inLoadDate">
-                  <!-- <a-date-picker
-                    placeholder="请选择进仓/装柜日期"
-                    style="width:100%;"
-                    :format="dateFormat"
-                    v-model="preBook.inLoadDate"
-                  /> -->
+                <a-form-model-item label="进仓/装柜日期" prop="latestDateOfShipment">
+                  {{ preBookDetails.latestDateOfShipment }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="最终船期" prop="finalShipDate">
-                  <!-- <a-input placeholder="请输入最终船期" v-model="preBook.finalShipDate"></a-input> -->
+                <a-form-model-item label="最终船期" prop="theFinalShippingDate">
+                  {{ preBookDetails.theFinalShippingDate }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="收货人" prop="consignee">
-                  <!-- <a-input placeholder="请输入收货人" v-model="preBook.consignee"></a-input> -->
+                  {{ preBookDetails.consignee }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="收货人地址" prop="consigneeAdd">
-                  <!-- <a-select placeholder="请选择收货人地址" v-model="preBook.consigneeAdd">
-                    <a-select-option value="">请选择</a-select-option>
-                    <a-select-option value="0">收货人1</a-select-option>
-                    <a-select-option value="1">收货人2</a-select-option>
-                    <a-select-option value="2">收货人3</a-select-option>
-                  </a-select> -->
+                <a-form-model-item label="收货人地址" prop="consigneeAddress">
+                  {{ preBookDetails.consigneeAddress }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="通知方" prop="notifying">
-                  <!-- <a-input placeholder="请输入通知方" v-model="preBook.notifying"></a-input> -->
+                <a-form-model-item label="通知方" prop="notifyParty">
+                  {{ preBookDetails.notifyParty }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="通知方地址" prop="notifyingAdd">
-                  <!-- <a-input placeholder="请输入通知方地址" v-model="preBook.notifyingAdd"></a-input> -->
+                <a-form-model-item label="通知方地址" prop="notifyPartyAddress">
+                  {{ preBookDetails.notifyPartyAddress }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="贸易国别" prop="tradeCountry">
-                  <!-- <a-input placeholder="请输入贸易国别" v-model="preBook.tradeCountry"></a-input> -->
+                  {{ preBookDetails.tradeCountry }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="运抵国别" prop="arriveCountry">
-                  <!-- <a-input placeholder="请输入运抵国别" v-model="preBook.arriveCountry"></a-input> -->
+                <a-form-model-item label="运抵国别" prop="billOfLadingOrCarriageReceipt">
+                  {{ preBookDetails.billOfLadingOrCarriageReceipt }}
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="出口口岸" prop="exportPort">
-                  <!-- <a-input placeholder="请输入出口口岸" v-model="preBook.exportPort"></a-input> -->
+                  {{ preBookDetails.exportPort }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="目的港" prop="destinationport">
-                  <!-- <a-input placeholder="请输入目的港" v-model="preBook.destinationport"></a-input> -->
+                <a-form-model-item label="目的港" prop="destinationPort">
+                  {{ preBookDetails.destinationPort }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="收汇方式" prop="collectionMethod">
-                  <!-- <a-input placeholder="请输入收汇方式" v-model="preBook.collectionMethod"></a-input> -->
+                <a-form-model-item label="收汇方式" prop="exchangeEarningsValue">
+                  {{ preBookDetails.exchangeEarningsValue }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="成交方式" prop="soldType">
-                  <!-- <a-input placeholder="请输入成交方式" v-model="preBook.soldType"></a-input> -->
+                <a-form-model-item label="成交方式" prop="termsOfDeliveryvalue">
+                  {{ preBookDetails.termsOfDeliveryvalue }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="金额" prop="money">
-                  <!-- <a-input placeholder="请输入金额" v-model="preBook.money"></a-input> -->
+                  {{ preBookDetails.money }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="人民币" prop="RMB">
-                  <!-- <a-input placeholder="请输入人民币" v-model="preBook.RMB"></a-input> -->
+                <a-form-model-item label="人民币" prop="cny">
+                  {{ preBookDetails.cny }}
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="美元" prop="dollar">
-                  <!-- <a-input placeholder="请输入美元" v-model="preBook.dollar"></a-input> -->
+                <a-form-model-item label="美元" prop="usd">
+                  {{ preBookDetails.usd }}
                 </a-form-model-item>
               </a-col>
             </a-row>
@@ -357,7 +330,7 @@ export default {
           className: 'replacecolor'
         }
       ],
-      data: [{}, {}],
+      data: [],
       CNYColumns: [
         {
           title: '货代',
@@ -379,7 +352,7 @@ export default {
           className: 'replacecolor'
         }
       ],
-      CNYData: [{ CNYmoney: '487576,87', CNYProjectList: '项目列test1' }],
+      CNYData: [],
 
       USDColumns: [
         {
@@ -402,32 +375,25 @@ export default {
           className: 'replacecolor'
         }
       ],
-      USDData: [{ USDmoney: '7576,17', CNYProjectList: '项目列test2' }],
+      USDData: [],
 
       loading: false, // 表格加载
       preBook: {},
       confirmLoading: false,
       visible: false,
-      dateFormat: 'YYYY-MM-DD'
+      dateFormat: 'YYYY-MM-DD',
+      preBookDetails: {} //主表信息
     }
   },
   created() {},
   methods: {
     // 抽屉 取消
-    handleCancel() {
-      console.log('点击抽屉取消')
-      this.close()
-    },
-
-    close() {
+    onClose() {
       this.$emit('close')
       this.visible = false
-      this.$refs.form.resetFields()
     },
 
-    // ------------------------------------------
-    modalFormOk() {},
-    aa() {}
+    modalFormOk() {}
   },
 
   mounted() {}

+ 32 - 32
src/views/pre-book/editPreBookDrawer.vue

@@ -8,10 +8,10 @@
       :closable="true"
       :visible="visible"
       @close="handleCancel">
-      <!-- 主表信息 -->
+      <!-- 主表信息 :rules="validatorRules"-->
       <a-card :bordered="true">
         <div class="table-page-search-wrapper">
-          <a-form-model layout="inline" ref="form" :model="preBook" :rules="validatorRules">
+          <a-form-model layout="inline" ref="form" :model="editPreBook" >
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="托书日期" prop="bookDate">
@@ -19,32 +19,32 @@
                     placeholder="请选择托书日期"
                     style="width:100%;"
                     :format="dateFormat"
-                    v-model="preBook.bookDate"
+                    v-model="editPreBook.bookDate"
                   />
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="托书号" prop="bookNum">
-                  <a-input placeholder="请输入托书号" v-model="preBook.bookNum"></a-input>
+                  <a-input placeholder="请输入托书号" v-model="editPreBook.bookNum"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="12" :sm="12">
                 <a-form-model-item label="外销发票号码" prop="exportInvoiceNo">
-                  <a-input placeholder="请输入外销发票号码" v-model="preBook.exportInvoiceNo"></a-input>
+                  <a-input placeholder="请输入外销发票号码" v-model="editPreBook.exportInvoiceNo"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="经营单位" prop="businessUnit">
-                  <a-input placeholder="请输入经营单位" v-model="preBook.businessUnit"></a-input>
+                  <a-input placeholder="请输入经营单位" v-model="editPreBook.businessUnit"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="经营单位地址" prop="businessUnitAdd">
-                  <a-select placeholder="请选择经营单位地址" v-model="preBook.businessUnitAdd">
+                  <a-select placeholder="请选择经营单位地址" v-model="editPreBook.businessUnitAdd">
                     <a-select-option value="">请选择</a-select-option>
                     <a-select-option :value="0">客户1</a-select-option>
                     <a-select-option :value="1">客户2</a-select-option>
@@ -59,26 +59,26 @@
                     placeholder="请选择进仓/装柜日期"
                     style="width:100%;"
                     :format="dateFormat"
-                    v-model="preBook.inLoadDate"
+                    v-model="editPreBook.inLoadDate"
                   />
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="最终船期" prop="finalShipDate">
-                  <a-input placeholder="请输入最终船期" v-model="preBook.finalShipDate"></a-input>
+                  <a-input placeholder="请输入最终船期" v-model="editPreBook.finalShipDate"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="收货人" prop="consignee">
-                  <a-input placeholder="请输入收货人" v-model="preBook.consignee"></a-input>
+                  <a-input placeholder="请输入收货人" v-model="editPreBook.consignee"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="收货人地址" prop="consigneeAdd">
-                  <a-select placeholder="请选择收货人地址" v-model="preBook.consigneeAdd">
+                  <a-select placeholder="请选择收货人地址" v-model="editPreBook.consigneeAdd">
                     <a-select-option value="">请选择</a-select-option>
                     <a-select-option value="0">收货人1</a-select-option>
                     <a-select-option value="1">收货人2</a-select-option>
@@ -89,66 +89,66 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="通知方" prop="notifying">
-                  <a-input placeholder="请输入通知方" v-model="preBook.notifying"></a-input>
+                  <a-input placeholder="请输入通知方" v-model="editPreBook.notifying"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="通知方地址" prop="notifyingAdd">
-                  <a-input placeholder="请输入通知方地址" v-model="preBook.notifyingAdd"></a-input>
+                  <a-input placeholder="请输入通知方地址" v-model="editPreBook.notifyingAdd"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="贸易国别" prop="tradeCountry">
-                  <a-input placeholder="请输入贸易国别" v-model="preBook.tradeCountry"></a-input>
+                  <a-input placeholder="请输入贸易国别" v-model="editPreBook.tradeCountry"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="运抵国别" prop="arriveCountry">
-                  <a-input placeholder="请输入运抵国别" v-model="preBook.arriveCountry"></a-input>
+                  <a-input placeholder="请输入运抵国别" v-model="editPreBook.arriveCountry"></a-input>
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="出口口岸" prop="exportPort">
-                  <a-input placeholder="请输入出口口岸" v-model="preBook.exportPort"></a-input>
+                  <a-input placeholder="请输入出口口岸" v-model="editPreBook.exportPort"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="目的港" prop="destinationport">
-                  <a-input placeholder="请输入目的港" v-model="preBook.destinationport"></a-input>
+                  <a-input placeholder="请输入目的港" v-model="editPreBook.destinationport"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="收汇方式" prop="collectionMethod">
-                  <a-input placeholder="请输入收汇方式" v-model="preBook.collectionMethod"></a-input>
+                  <a-input placeholder="请输入收汇方式" v-model="editPreBook.collectionMethod"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="成交方式" prop="soldType">
-                  <a-input placeholder="请输入成交方式" v-model="preBook.soldType"></a-input>
+                  <a-input placeholder="请输入成交方式" v-model="editPreBook.soldType"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="金额" prop="money">
-                  <a-input placeholder="请输入金额" v-model="preBook.money"></a-input>
+                  <a-input placeholder="请输入金额" v-model="editPreBook.money"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="人民币" prop="RMB">
-                  <a-input placeholder="请输入人民币" v-model="preBook.RMB"></a-input>
+                  <a-input placeholder="请输入人民币" v-model="editPreBook.RMB"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="美元" prop="dollar">
-                  <a-input placeholder="请输入美元" v-model="preBook.dollar"></a-input>
+                  <a-input placeholder="请输入美元" v-model="editPreBook.dollar"></a-input>
                 </a-form-model-item>
               </a-col>
             </a-row>
@@ -163,9 +163,9 @@
           <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button>
         </div>
 
-        <!-- table -->
+        <!-- table :rules="validatorRules"-->
         <a-spin :spinning="confirmLoading">
-          <a-form-model ref="formRef" :rules="validatorRules">
+          <a-form-model ref="formRef" >
             <a-table
               bordered
               rowKey="id"
@@ -435,7 +435,7 @@ export default {
           className: 'replacecolor'
         }
       ],
-      data: [{}, {}],
+      data: [],
       CNYColumns: [
         {
           title: '货代',
@@ -457,7 +457,7 @@ export default {
           className: 'replacecolor'
         }
       ],
-      CNYData: [{ CNYmoney: '487576,87' }],
+      CNYData: [],
 
       USDColumns: [
         {
@@ -480,17 +480,17 @@ export default {
           className: 'replacecolor'
         }
       ],
-      USDData: [{}],
+      USDData: [],
 
       loading: false, // 表格加载
-      preBook: {},
+      editPreBook: {},
       confirmLoading: false,
       visible: false,
       dateFormat: 'YYYY-MM-DD',
-      validatorRules: {
-        bookDate: [{ required: true, message: '托书日期不能为空', trigger: 'blur' }]
-        // 确定必填项
-      }
+      // validatorRules: {
+      //   bookDate: [{ required: true, message: '托书日期不能为空', trigger: 'blur' }]
+      //   // 确定必填项
+      // }
     }
   },
   created() {},

+ 165 - 69
src/views/pre-book/preBookList.vue

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

+ 62 - 26
src/views/reportForms/order-statistics/chart/external/customerChart.vue

@@ -1,10 +1,11 @@
 <template>
   <!-- 客户统计图 外部  报表 订单统计  -->
-  <div id="customerChart" :style="{ width: '100%', height: '600px' }"></div>
+  <div id="customerChart" :style="{ width: '100%', height: '500px' }"></div>
 </template>
 
 <script>
 import * as echarts from 'echarts'
+
 import { cusChart } from '@api/reportForms/order-statistics.js'
 
 export default {
@@ -12,15 +13,14 @@ export default {
   data() {
     return {
       queryParam: {
-        department: '',
-        endYearMonth: '',
-        startYearMonth: '',
         vendorType: '外部'
+        // department: '',
+        // endYearMonth: '',
+        // startYearMonth: '',
         // cvenAbbName: ''供应商
       },
       // newData: {
-      cvenAbbNameArr: [],
-      // departmentArr:[],
+      ccusNameArr: [], //客户 数组
       iquantityArr: [],
       inatMoneyArr: []
       // }
@@ -28,20 +28,60 @@ export default {
   },
 
   mounted() {
-    this.getCusChartData()
+    // this.getCusChartData()
+  },
+  created() {
+    // 初次加载当月
+    this.firstCusData()
   },
+  
   methods: {
-    // 1、先获取 chart 数据
+    // 初次加载
+    firstCusData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        var time = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = time
+        this.queryParam.endYearMonth = time
+        cusChart(this.queryParam).then(res => {
+          if (res.result) {
+            // console.log('部门统计图数据', res.result)
+            res.result.forEach(item => {
+              this.ccusNameArr.push(item.ccusName)
+              this.iquantityArr.push(item.iquantity)
+              this.inatMoneyArr.push(item.inatMoney)
+            })
+            // console.log('部门三数组', this.ccusNameArr, this.iquantityArr, this.inatMoneyArr)
+          }
+
+          //2、后图
+          this.$nextTick(() => {
+            this.initEcharts()
+          })
+        })
+      })
+    },
+
+    // 1、查询 重置方法 先获取 chart 数据
     getCusChartData() {
+      this.queryParam.vendorType = '外部'
       cusChart(this.queryParam).then(res => {
         if (res.success) {
           // console.log('客户统计图数据', res.result)
           res.result.forEach(item => {
-            this.cvenAbbNameArr.push(item.cvenAbbName)
+            this.ccusNameArr.push(item.ccusName)
             this.iquantityArr.push(item.iquantity)
             this.inatMoneyArr.push(item.inatMoney)
           })
-          // console.log('三数组', this.cvenAbbNameArr, this.iquantityArr, this.inatMoneyArr)
+          // console.log('三数组', this.ccusNameArr, this.iquantityArr, this.inatMoneyArr)
         }
 
         //2、后图
@@ -83,10 +123,6 @@ export default {
           data: [
             '实际数量',
             '本币金额'
-            // {
-            //   name: '染损(%)',
-            //   icon: 'circle' // 图例的图标样式
-            // }
           ]
         },
         grid: {
@@ -107,7 +143,7 @@ export default {
           axisPointer: {
             type: 'shadow'
           },
-          data: this.cvenAbbNameArr
+          data: this.ccusNameArr
         },
         yAxis: [
           {
@@ -168,15 +204,15 @@ export default {
       }
       // 渲染
       myChart.setOption(option)
-      myChart.showLoading({
-        text: '暂无数据',
-        showSpinner: false, // 隐藏加载中的转圈动图
-        textColor: '#9d9d9d',
-        maskColor: 'rgba(255, 255, 255, 0.8)',
-        fontSize: '25px',
-        fontWeight: 'bold',
-        fontFamily: 'Microsoft YaHei'
-      })
+      // myChart.showLoading({
+      //   text: '暂无数据',
+      //   showSpinner: false, // 隐藏加载中的转圈动图
+      //   textColor: '#9d9d9d',
+      //   maskColor: 'rgba(255, 255, 255, 0.8)',
+      //   fontSize: '25px',
+      //   fontWeight: 'bold',
+      //   fontFamily: 'Microsoft YaHei'
+      // })
 
       window.addEventListener('resize', () => {
         if (myChart) {
@@ -191,8 +227,8 @@ export default {
     //     deep: true,
     //     handler() {
     //       //  数据变化,执行
-    //       const { cvenAbbNameArr, iquantityArr, inatMoneyArr } = this.newData
-    //       this.initEcharts(cvenAbbNameArr, iquantityArr, inatMoneyArr)
+    //       const { ccusNameArr, iquantityArr, inatMoneyArr } = this.newData
+    //       this.initEcharts(ccusNameArr, iquantityArr, inatMoneyArr)
     //       console.log('监听 外部客户 数据变化')
     //     }
     //   }

+ 56 - 17
src/views/reportForms/order-statistics/chart/external/departmentChart.vue

@@ -1,6 +1,6 @@
 <template>
   <!--  部门统计图  外部 报表 订单统计   -->
-  <div id="departmentChart" :style="{ width: '100%', height: '600px' }"></div>
+  <div id="departmentChart" :style="{ width: '100%', height: '500px' }"></div>
 </template>
 
 <script>
@@ -12,14 +12,13 @@ export default {
   name: 'DepartmentChart', // 部门统计图
   data() {
     return {
-      prop: {
+      queryParam: {
+        vendorType: '外部'
         // customer: '', //客户
         // endYearMonth: '',
         // startYearMonth: '',
-        vendorType: '外部'
         // cdepName: ''
       },
-
       // newData: {
       cdepNameArr: [], //部门 数组
       iquantityArr: [], //实际数量
@@ -29,12 +28,52 @@ export default {
   },
 
   mounted() {
-    this.getDepChartData()
+    // this.getDepChartData()
+  },
+  created() {
+    // 初次加载当月
+    this.firstDepData()
   },
   methods: {
-    // 1、先获取 chart 数据
+    // 初次加载
+    firstDepData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        var time = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = time
+        this.queryParam.endYearMonth = time
+        // this.queryParam.vendorType = '内部'
+        depChart(this.queryParam).then(res => {
+          if (res.result) {
+            // console.log('部门统计图数据', res.result)
+            res.result.forEach(item => {
+              this.cdepNameArr.push(item.cdepName)
+              this.iquantityArr.push(item.iquantity)
+              this.inatMoneyArr.push(item.inatMoney)
+            })
+            // console.log('部门三数组', this.cdepNameArr, this.iquantityArr, this.inatMoneyArr)
+          }
+
+          //2、后图
+          this.$nextTick(() => {
+            this.initEcharts()
+          })
+        })
+      })
+    },
+
+    // 1、查询 重置方法 先获取 chart 数据
     getDepChartData() {
-      depChart(this.prop).then(res => {
+      this.queryParam.vendorType = '外部'
+      depChart(this.queryParam).then(res => {
         if (res.result) {
           // console.log('部门统计图数据', res.result)
           res.result.forEach(item => {
@@ -163,16 +202,16 @@ export default {
       }
       // 渲染
       myChart.setOption(option)
-      myChart.showLoading({
-        text: '暂无数据',
-        showSpinner: false, // 隐藏加载中的转圈动图
-        textColor: '#9d9d9d',
-        maskColor: 'rgba(255, 255, 255, 0.8)',
-        fontSize: '25px',
-        fontWeight: 'bold',
-        height: '100px',
-        fontFamily: 'Microsoft YaHei'
-      })
+      // myChart.showLoading({
+      //   text: '暂无数据',
+      //   showSpinner: false, // 隐藏加载中的转圈动图
+      //   textColor: '#9d9d9d',
+      //   maskColor: 'rgba(255, 255, 255, 0.8)',
+      //   fontSize: '25px',
+      //   fontWeight: 'bold',
+      //   height: '100px',
+      //   fontFamily: 'Microsoft YaHei'
+      // })
 
       window.addEventListener('resize', () => {
         if (myChart) {

+ 62 - 27
src/views/reportForms/order-statistics/chart/interior/customerChart.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 客户统计图 内部  报表 订单统计  -->
-  <div id="customerChart" :style="{ width: '100%', height: '600px' }"></div>
+  <div id="customerChart" :style="{ width: '100%', height: '500px' }"></div>
 </template>
 
 <script>
@@ -12,16 +12,14 @@ export default {
   data() {
     return {
       queryParam: {
-        department: '',
-        endYearMonth: '',
-        startYearMonth: '',
         vendorType: '内部'
-
+        // department: '',
+        // endYearMonth: '',
+        // startYearMonth: ''
         // cvenAbbName: ''供应商
       },
       // newData: {
-      cvenAbbNameArr: [],
-      // departmentArr:[],
+      ccusNameArr: [],
       iquantityArr: [],
       inatMoneyArr: []
       // }
@@ -29,20 +27,61 @@ export default {
   },
 
   mounted() {
-    this.getCusChartData()
+    // this.getCusChartData()
+  },
+  created() {
+    // 初次加载当月
+    this.firstCusData()
   },
+
   methods: {
-    // 1、先获取 chart 数据
+    // 初次加载
+    firstCusData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        var time = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = time
+        this.queryParam.endYearMonth = time
+        // this.queryParam.vendorType = '内部'
+        cusChart(this.queryParam).then(res => {
+          if (res.result) {
+            // console.log('部门统计图数据', res.result)
+            res.result.forEach(item => {
+              this.ccusNameArr.push(item.ccusName)
+              this.iquantityArr.push(item.iquantity)
+              this.inatMoneyArr.push(item.inatMoney)
+            })
+            // console.log('部门三数组', this.ccusNameArr, this.iquantityArr, this.inatMoneyArr)
+          }
+
+          //2、后图
+          this.$nextTick(() => {
+            this.initEcharts()
+          })
+        })
+      })
+    },
+
+    // 1、查询 重置方法  先获取 chart 数据
     getCusChartData() {
+      this.queryParam.vendorType = '内部'
       cusChart(this.queryParam).then(res => {
         if (res.success) {
           // console.log('客户统计图数据', res.result)
           res.result.forEach(item => {
-            this.cvenAbbNameArr.push(item.cvenAbbName)
+            this.ccusNameArr.push(item.ccusName)
             this.iquantityArr.push(item.iquantity)
             this.inatMoneyArr.push(item.inatMoney)
           })
-          // console.log('三数组', this.cvenAbbNameArr, this.iquantityArr, this.inatMoneyArr)
+          // console.log('三数组', this.ccusNameArr, this.iquantityArr, this.inatMoneyArr)
         }
 
         //2、后图
@@ -84,10 +123,6 @@ export default {
           data: [
             '实际数量',
             '本币金额'
-            // {
-            //   name: '染损(%)',
-            //   icon: 'circle' // 图例的图标样式
-            // }
           ]
         },
         grid: {
@@ -108,7 +143,7 @@ export default {
           axisPointer: {
             type: 'shadow'
           },
-          data: this.cvenAbbNameArr
+          data: this.ccusNameArr
         },
         yAxis: [
           {
@@ -169,15 +204,15 @@ export default {
       }
       // 渲染
       myChart.setOption(option)
-      myChart.showLoading({
-        text: '暂无数据',
-        showSpinner: false, // 隐藏加载中的转圈动图
-        textColor: '#9d9d9d',
-        maskColor: 'rgba(255, 255, 255, 0.8)',
-        fontSize: '25px',
-        fontWeight: 'bold',
-        fontFamily: 'Microsoft YaHei'
-      })
+      // myChart.showLoading({
+      //   text: '暂无数据',
+      //   showSpinner: false, // 隐藏加载中的转圈动图
+      //   textColor: '#9d9d9d',
+      //   maskColor: 'rgba(255, 255, 255, 0.8)',
+      //   fontSize: '25px',
+      //   fontWeight: 'bold',
+      //   fontFamily: 'Microsoft YaHei'
+      // })
 
       window.addEventListener('resize', () => {
         if (myChart) {
@@ -192,8 +227,8 @@ export default {
     //     deep: true,
     //     handler() {
     //       //  数据变化,执行
-    //       const { cvenAbbNameArr, iquantityArr, inatMoneyArr } = this.newData
-    //       this.initEcharts(cvenAbbNameArr, iquantityArr, inatMoneyArr)
+    //       const { ccusNameArr, iquantityArr, inatMoneyArr } = this.newData
+    //       this.initEcharts(ccusNameArr, iquantityArr, inatMoneyArr)
     //       console.log('监听 外部客户 数据变化')
     //     }
     //   }

+ 58 - 16
src/views/reportForms/order-statistics/chart/interior/departmentChart.vue

@@ -1,6 +1,6 @@
 <template>
   <!--  部门统计图  内部 报表 订单统计   -->
-  <div id="departmentChart" :style="{ width: '100%', height: '600px' }"></div>
+  <div id="departmentChart" :style="{ width: '100%', height: '500px' }"></div>
 </template>
 
 <script>
@@ -13,10 +13,10 @@ export default {
   data() {
     return {
       queryParam: {
-        customer: '', //客户
-        endYearMonth: '',
-        startYearMonth: '',
         vendorType: '内部'
+        // customer: '', //客户
+        // endYearMonth: '',
+        // startYearMonth: '',
         // cdepName: ''部门
       },
 
@@ -29,11 +29,53 @@ export default {
   },
 
   mounted() {
-    this.getDepChartData()
+    // this.getDepChartData()
+  },
+  created() {
+    // 初次加载当月
+    this.firstDepData()
+    console.log('内 部门chart');
   },
   methods: {
-    // 1、先获取 chart 数据
+    // 初次加载
+    firstDepData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        var time = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = time
+        this.queryParam.endYearMonth = time
+        this.queryParam.vendorType = '内部'
+        depChart(this.queryParam).then(res => {
+          // console.log('2', this.queryParam)
+          if (res.result) {
+            // console.log('部门统计图数据', res.result)
+            res.result.forEach(item => {
+              this.cdepNameArr.push(item.cdepName)
+              this.iquantityArr.push(item.iquantity)
+              this.inatMoneyArr.push(item.inatMoney)
+            })
+            // console.log('部门三数组', this.cdepNameArr, this.iquantityArr, this.inatMoneyArr)
+          }
+
+          //2、后图
+          this.$nextTick(() => {
+            this.initEcharts()
+          })
+        })
+      })
+    },
+
+    // 1、查询 重置方法  先获取 chart 数据
     getDepChartData() {
+      this.queryParam.vendorType = '内部'
       depChart(this.queryParam).then(res => {
         if (res.result) {
           // console.log('部门统计图数据', res.result)
@@ -163,16 +205,16 @@ export default {
       }
       // 渲染
       myChart.setOption(option)
-      myChart.showLoading({
-        text: '暂无数据',
-        showSpinner: false, // 隐藏加载中的转圈动图
-        textColor: '#9d9d9d',
-        maskColor: 'rgba(255, 255, 255, 0.8)',
-        fontSize: '25px',
-       
-        fontWeight: 'bold',
-        fontFamily: 'Microsoft YaHei'
-      })
+      // myChart.showLoading({
+      //   text: '暂无数据',
+      //   showSpinner: false, // 隐藏加载中的转圈动图
+      //   textColor: '#9d9d9d',
+      //   maskColor: 'rgba(255, 255, 255, 0.8)',
+      //   fontSize: '25px',
+
+      //   fontWeight: 'bold',
+      //   fontFamily: 'Microsoft YaHei'
+      // })
 
       window.addEventListener('resize', () => {
         if (myChart) {

+ 54 - 23
src/views/reportForms/order-statistics/external-statistics.vue

@@ -8,6 +8,7 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="起始年月">
+                <!-- defaultPickerValue="[moment(defaultMonth),moment(defaultMonth)]" -->
                 <a-range-picker
                   style="width: 100%"
                   :placeholder="['开始年月', '结束年月']"
@@ -31,15 +32,12 @@
                 </a-select> -->
               </a-form-item>
             </a-col>
-
             <a-col :md="6" :sm="8">
               <a-form-item label="客户">
                 <a-input placeholder="请输入客户" v-model="queryParam.customer"></a-input>
               </a-form-item>
             </a-col>
-
             <template v-if="toggleSearchStatus"></template>
-
             <a-col :md="6" :sm="8">
               <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
                 <a-button type="primary" @click="searchQuery" :disabled="isDisabled" icon="search">查询</a-button>
@@ -173,7 +171,6 @@ export default {
       ],
       extStadata: [],
       loading: false, // 表格加载
-
       // 查询条件
       queryParam: {
         vendorType: '外部'
@@ -191,31 +188,64 @@ export default {
       },
       mode2: ['month', 'month'],
       value: [], //起始月份
-      isDisabled: false //按钮禁止
-      // dateFormat: 'YYYY-MM-DD'
+      isDisabled: false, //按钮禁止
+      monthFormat: 'YYYY-MM'
+      // defaultMonth: [] //默认当前月
     }
   },
 
-  // html渲染出来后,操作dom
-  mounted() {
-    this.cancelLoading()
-  },
+  mounted() {},
   created() {
-    this.getExternalData()
+    // 初次加载当月数据
+    this.getThisMonthData()
   },
-
+  computed: {},
   methods: {
-    cancelLoading() {
-      let that = this
-      setTimeout(() => {
-        that.loading = false
-      }, 500)
+    // 初次加载当月数据(列表、图)
+    getThisMonthData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        this.defaultMonth = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = this.defaultMonth
+        this.queryParam.endYearMonth = this.defaultMonth
+        this.queryParam.vendorType = '外部'
+
+        externalList(this.queryParam).then(res => {
+          // 参数给 chart
+          this.$refs.departmentChart.queryParam = this.queryParam
+          this.$refs.customerChart.queryParam = this.queryParam
+          console.log(this.$refs.departmentChart.queryParam)
+
+          if (res.success) {
+            this.extStadata = res.result.records
+            console.log('图、列表当月数据', this.extStadata)
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+          }
+        })
+      })
     },
 
     // 查询订单统计
     getExternalData() {
       this.$nextTick(() => {
+        this.queryParam.vendorType = '外部'
         externalList(this.queryParam).then(res => {
+          // 参数给 chart
+          this.$refs.departmentChart.queryParam = this.queryParam
+          this.$refs.customerChart.queryParam = this.queryParam
+
           if (res.success) {
             this.extStadata = res.result.records
             console.log('订单外部列表', this.extStadata)
@@ -230,6 +260,7 @@ export default {
       })
     },
 
+    // 查询
     searchQuery() {
       this.queryParam.pageNo = ''
       if (this.queryParam) {
@@ -238,14 +269,14 @@ export default {
         this.$refs.departmentChart.iquantityArr = []
         this.$refs.departmentChart.inatMoneyArr = []
         // 清空客户chart数据
-        this.$refs.customerChart.cvenAbbNameArr = []
+        this.$refs.customerChart.ccusNameArr = []
         this.$refs.customerChart.iquantityArr = []
         this.$refs.customerChart.inatMoneyArr = []
 
         this.getExternalData()
 
         //查询条件 传给 部门chart + 渲染
-        this.$refs.departmentChart.prop = this.queryParam
+        this.$refs.departmentChart.queryParam = this.queryParam
         this.$refs.departmentChart.getDepChartData()
 
         //查询条件 传给 客户chart + 渲染
@@ -259,22 +290,22 @@ export default {
         that.isDisabled = false
       }, 3000)
     },
-
+    // 重置
     searchReset() {
       this.queryParam = {}
       this.value = [] //起始年月重置
       this.queryParam.startYearMonth = []
       this.queryParam.endYearMonth = []
 
-      // 清空部门chart数据 + 查询条件 + 重新渲染
+      // 清空部门 chart 数据 + 查询条件 + 重新渲染
       this.$refs.departmentChart.cdepNameArr = []
       this.$refs.departmentChart.iquantityArr = []
       this.$refs.departmentChart.inatMoneyArr = []
       this.$refs.departmentChart.queryParam = {}
       this.$refs.departmentChart.getDepChartData()
 
-      // 清空客户chart数据 + 查询条件 + 重新渲染
-      this.$refs.customerChart.cvenAbbNameArr = []
+      // 清空客户 chart 数据 + 查询条件 + 重新渲染
+      this.$refs.customerChart.ccusNameArr = []
       this.$refs.customerChart.iquantityArr = []
       this.$refs.customerChart.inatMoneyArr = []
       this.$refs.customerChart.queryParam = {}

+ 58 - 23
src/views/reportForms/order-statistics/interior-statistics.vue

@@ -98,8 +98,8 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
-import departmentChart from '@views/reportForms/order-statistics/chart/external/departmentChart'
-import customerChart from '@views/reportForms/order-statistics/chart/external/customerChart.vue'
+import departmentChart from '@views/reportForms/order-statistics/chart/interior/departmentChart'
+import customerChart from '@views/reportForms/order-statistics/chart/interior/customerChart.vue'
 
 import { externalList } from '@api/reportForms/order-statistics.js'
 
@@ -176,12 +176,12 @@ export default {
 
       // 查询条件
       queryParam: {
-        vendorType: '内部',
-        pageNo: '',
-        startYearMonth: '',
-        endYearMonth: '',
-        department: '',
-        customer: ''
+        vendorType: '内部'
+        // pageNo: '',
+        // startYearMonth: '',
+        // endYearMonth: '',
+        // department: '',
+        // customer: ''
       },
 
       pagination: {
@@ -191,31 +191,66 @@ export default {
       },
       mode2: ['month', 'month'],
       value: [], //起始月份
-      isDisabled: false //按钮禁止
+      isDisabled: false, //按钮禁止
+      monthFormat: 'YYYY-MM'
       // dateFormat: 'YYYY-MM-DD'
     }
   },
 
-  mounted() {
-    // this.cancelLoading()     html渲染出来后,操作dom
-  },
+  mounted() {},
   created() {
-    this.getExternalData()
+    // 初次加载当月数据
+    this.getThisMonthData()
   },
 
   methods: {
-    // cancelLoading() {
-    //   setTimeout(() => {
-    // let that = this
-    //     that.loading = false
-    //   }, 500)
-    // },
+    // 初次加载当月数据(列表、图)
+    getThisMonthData() {
+      this.$nextTick(() => {
+        let nowDate = new Date()
+        let date = {
+          year: nowDate.getFullYear(),
+          month: nowDate.getMonth() + 1
+        }
+        if (date.month >= 1 && date.month <= 9) {
+          date.month = '0' + date.month
+        }
+        var time = date.year + '-' + date.month
+
+        this.queryParam.startYearMonth = time
+        this.queryParam.endYearMonth = time
+
+        this.queryParam.vendorType = '内部'
+        externalList(this.queryParam).then(res => {
+          // 参数给 chart
+          this.$refs.departmentChart.queryParam = this.queryParam
+          this.$refs.customerChart.queryParam = this.queryParam
+          // console.log('????', this.$refs.departmentChart.queryParam)
+
+          if (res.success) {
+            this.data = res.result.records
+            console.log('订单内部列表', this.data)
+
+            this.pagination = {
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+          }
+        })
+      })
+    },
 
     // 查询订单统计
     getExternalData() {
       this.$nextTick(() => {
-        // this.queryParam.vendorType = '内部'
+        this.queryParam.vendorType = '内部'
         externalList(this.queryParam).then(res => {
+          // 参数给 chart
+          this.$refs.departmentChart.queryParam = this.queryParam
+
+          this.$refs.customerChart.queryParam = this.queryParam
+
           if (res.success) {
             this.data = res.result.records
             console.log('订单内部列表', this.data)
@@ -238,7 +273,7 @@ export default {
         this.$refs.departmentChart.iquantityArr = []
         this.$refs.departmentChart.inatMoneyArr = []
         // 清空客户chart数据
-        this.$refs.customerChart.cvenAbbNameArr = []
+        this.$refs.customerChart.ccusNameArr = []
         this.$refs.customerChart.iquantityArr = []
         this.$refs.customerChart.inatMoneyArr = []
         this.getExternalData()
@@ -273,7 +308,7 @@ export default {
       this.$refs.departmentChart.getDepChartData()
 
       // 清空客户chart数据 + 查询条件 + 重新渲染
-      this.$refs.customerChart.cvenAbbNameArr = []
+      this.$refs.customerChart.ccusNameArr = []
       this.$refs.customerChart.iquantityArr = []
       this.$refs.customerChart.inatMoneyArr = []
       this.$refs.customerChart.queryParam = {}
@@ -330,7 +365,7 @@ export default {
 .depChartStyle,
 .cusChartStyle {
   // width: 100%;
-  height: 600px;
+  // height: 600px;
   text-align: center;
   padding-top: 10px;
 }

+ 16 - 6
src/views/shipment-details/addShipDetDrawer.vue

@@ -26,7 +26,7 @@
                 <a-form-model-item label="单据日期" prop="documentDate">
                   <a-date-picker
                     placeholder="请选择单据日期"
-                    :format="dateFormat"
+                    format="YYYY-MM-DD"
                     style="width:100%;"
                     v-model="addShipDet.documentDate"
                   />
@@ -43,7 +43,7 @@
                 <a-form-model-item label="预发货日期" prop="preDeliveryDate">
                   <a-date-picker
                     placeholder="请选择预发货时间"
-                    :format="dateFormat"
+                    format="YYYY-MM-DD"
                     style="width:100%;"
                     v-model="addShipDet.preDeliveryDate"
                   />
@@ -54,7 +54,7 @@
                 <a-form-model-item label="预完工日期" prop="preCompletionDate">
                   <a-date-picker
                     placeholder="请选择预完工日期"
-                    :format="dateFormat"
+                    format="YYYY-MM-DD"
                     style="width:100%;"
                     v-model="addShipDet.preCompletionDate"
                   />
@@ -108,7 +108,7 @@
               :columns="columns"
               :data-source="syShippingDetailsItemList"
               :pagination="false"
-              :scroll="{ x: 1500 }"
+              :scroll="{ x: 1500,y:500 }"
               size="small"
             >
               <!-- 款号 输入框 :rules="rules.itemNumber" -->
@@ -306,7 +306,10 @@ export default {
           title: '订单日期',
           dataIndex: 'orderDate',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: text => {
+            return moment(text).format('YYYY-MM-DD')
+          }
         },
         {
           title: '业务类型',
@@ -601,7 +604,7 @@ export default {
 
   methods: {
     getSon(val) {
-      // console.log('勾选订单数据', val)
+      console.log('勾选订单数据', val)
       for (var i in val) {
         val[i]['orderQuantity'] = val[i].quantity
         val[i]['orderRemainingQuantity'] = val[i].surplusNum
@@ -651,6 +654,13 @@ export default {
           }
         })
       }
+      // const that = this
+      // // 触发表单验证
+      // this.$refs.form.validate(valid => {
+      //   if (valid) {
+      //     that.confirmLoading = true
+      //   }
+      // })
     },
 
     // 増行

+ 19 - 24
src/views/shipment-details/referOrderDataModal.vue

@@ -172,7 +172,7 @@ export default {
         {
           title: '订单剩余数量',
           dataIndex: 'surplusNum',
-          width: 100,
+          width: 120,
           className: 'replacecolor'
         },
 
@@ -341,8 +341,7 @@ export default {
         {
           title: '订单子表ID',
           dataIndex: 'syOrderDataItemId',
-          width: 120,
-
+          width: 220,
           className: 'replacecolor'
         }
       ],
@@ -378,9 +377,7 @@ export default {
         queryOrderData(this.queryParam).then(res => {
           // console.log('参照订单数据res', res)
           if (res.success) {
-            // 后台数据赋值给参照订单数据
             this.orderListData = res.result.records
-            // console.log('新增参照订单数据', this.orderListData)
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
@@ -390,13 +387,23 @@ export default {
         })
       })
     },
-    // 分页变化时触发
-    handleTableChange(pagination, filters, sorter) {
-      console.log('分页器信息', pagination)
-      if (Object.keys(sorter).length > 0) {
-        this.isorter.column = sorter.field
-        this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
+
+    // 弹框确定
+    onSubmit() {
+      if (this.selectedRowKeys.length == 0) {
+        this.$message.error('请勾选订单数据')
+      } else {
+        // console.log('需要传给父组件的数据', this.selectedRows)
+        // bao父组件指定的传数据绑定的函数 || this.selectedRows子组件给父组件传递的数据
+        console.log('all?', this.selectedRows)
+
+        this.$emit('bao', this.selectedRows)
+        this.referOrderDataModVis = false
+        this.selectedRowKeys = []
+        this.selectedRows = []
       }
+    },
+    handleTableChange(pagination, filters, sorter) {
       this.queryParam.pageNo = pagination.current
       this.getOrderList()
     },
@@ -417,19 +424,6 @@ export default {
       this.selectedRowKeys = keys
       this.selectedRows = rows
     },
-    // 弹框确定
-    onSubmit() {
-      if (this.selectedRowKeys.length == 0) {
-        this.$message.error('请勾选参照订单数据')
-      } else {
-        // console.log('需要传给父组件的数据', this.selectedRows)
-        // bao父组件指定的传数据绑定的函数 || this.selectedRows子组件给父组件传递的数据
-        this.$emit('bao', this.selectedRows)
-        this.referOrderDataModVis = false
-        this.selectedRowKeys = []
-        this.selectedRows = []
-      }
-    },
 
     close() {
       this.$emit('close')
@@ -448,6 +442,7 @@ export default {
       return {
         onChange: (selectedRowKeys, selectedRows) => {
           console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows)
+          
         },
         getCheckboxProps: record => ({
           props: {

+ 1 - 1
src/views/shipment-details/shipmentList.vue

@@ -194,7 +194,7 @@
       </a-table>
     </a-card>
 
-    <!-- 抽屉  :fatherObj="detailsByIdObj"-->
+    <!-- 抽屉  -->
     <div>
       <addShipDet-drawer ref="addShipDetDrawer" :fatherList="getShipmentList" @ok="modalFormOk"></addShipDet-drawer>