Selaa lähdekoodia

单证 - 预装箱单 新增 || 报表 - 订单数据统计 chart无数据时显示 || 单证 - 发运明细 新增主表部门字段删除

liangy 2 vuotta sitten
vanhempi
commit
58d49686ef

+ 5 - 2
src/api/document/advance-packingList.js

@@ -5,7 +5,10 @@ import { getAction, postAction, deleteAction, putAction } from '@/api/manage'
 const getadPaList = params => getAction('/spapl/syPreAssembledPackingList/list', params)
 
 // 新增
-// const addShipmentList = params => postAction('/spapl/syPreAssembledPackingList/add', params)
+const addAdvPac = params => postAction('/spapl/syPreAssembledPackingList/add', params)
+
+//参照发运明细
+const shipList = params => getAction('/spapl/syPreAssembledPackingList/list3', params)
 
 // 详情
 const itemByMainId = params => getAction('/spapl/syPreAssembledPackingList/queryById', params)
@@ -16,4 +19,4 @@ const editById = params => postAction('/spapl/syPreAssembledPackingList/edit', p
 //  删除
 const deleteAdPaList = params => deleteAction('/spapl/syPreAssembledPackingList/delete', params)
 
-export { getadPaList, deleteAdPaList, itemByMainId, editById }
+export { getadPaList, deleteAdPaList, itemByMainId, editById, addAdvPac, shipList }

+ 13 - 11
src/views/advance-packingList/adPaList-clothes.vue

@@ -171,15 +171,19 @@
 
     <!-- 抽屉 -->
     <div>
-      <!--     :fatherList="getadPaListClothes" -->
-      <detailsAdpacking-drawer ref="detailsAdpackingDrawer" @ok="modalFormOk"></detailsAdpacking-drawer>
-
-      <!--  :fatherList="getadPaListClothes" -->
+      <addAdpacking-drawer
+        ref="addAdpackingDrawer"
+        :fatherList="getadPaListClothes"
+        @ok="modalFormOk"
+      ></addAdpacking-drawer>
+
+      <editAdpacking-drawer
+        ref="editAdpackingDrawer"
+        :fatherList="getadPaListClothes"
+        @ok="modalFormOk"
+      ></editAdpacking-drawer>
 
-      <addAdpacking-drawer ref="addAdpackingDrawer" @ok="modalFormOk"></addAdpacking-drawer>
-
-      <!--       :fatherList="getadPaListClothes" -->
-      <editAdpacking-drawer ref="editAdpackingDrawer" @ok="modalFormOk"></editAdpacking-drawer>
+      <detailsAdpacking-drawer ref="detailsAdpackingDrawer" @ok="modalFormOk"></detailsAdpacking-drawer>
     </div>
   </div>
 </template>
@@ -419,9 +423,7 @@ export default {
       this.$refs.editAdpackingDrawer.visible = true
       // this.$refs.detailsAdpackingDrawer.visible = true
       this.$refs.editAdpackingDrawer.record = record //接口参数
-      console.log('bbbbb')
       this.$refs.editAdpackingDrawer.getEditInfo()
-      console.log('cc')
     },
     //  详情
     details(record) {
@@ -433,7 +435,7 @@ export default {
 
     // 新增
     addAdpacking() {
-      console.log('新增预装箱单')
+      // console.log('新增预装箱单')
       this.$refs.addAdpackingDrawer.visible = true
     },
 

+ 133 - 53
src/views/advance-packingList/addAdpackingDrawer.vue

@@ -28,18 +28,14 @@
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="品名" prop="name">
-                  <a-input placeholder="请输入品名" v-model="addAdpacking.name"></a-input>
+                <a-form-model-item label="品名" prop="productName">
+                  <a-input placeholder="请输入品名" v-model="addAdpacking.productName"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="尺码范围" prop="sizeRange">
                   <a-input placeholder="请输入尺码范围" v-model="addAdpacking.sizeRange"></a-input>
-                  <!-- <a-select placeholder="请选择尺码范围">
-                <a-select-option value="">请选择</a-select-option>
-                <a-select-option value="0">客户1</a-select-option>
-              </a-select> -->
                 </a-form-model-item>
               </a-col>
 
@@ -98,68 +94,75 @@
               @change="handleTableChange"
             >
               <!-- 结束箱号 输入框-->
-              <template slot="endBoxNo" slot-scope="text, record, index">
-                <a-form-model-item prop="endBoxNo">
-                  <a-input style="width:100%" type="text" v-model="record.endBoxNo" />
+              <template slot="endCaseNumberSlot" slot-scope="text, record, index">
+                <a-form-model-item prop="endCaseNumber">
+                  <a-input style="width:100%" type="text" v-model="record.endCaseNumber" />
                 </a-form-model-item>
               </template>
 
               <!-- 颜色(中英文) -->
-              <template slot="color" slot-scope="text, record, index">
-                <a-form-model-item prop="color">
-                  <a-input style="width:100%" type="text" v-model="record.color" />
+              <template slot="colourSlot" slot-scope="text, record, index">
+                <a-form-model-item prop="colour">
+                  <a-input style="width:100%" type="text" v-model="record.colour" />
                 </a-form-model-item>
               </template>
 
               <!-- 箱数  -->
-              <template slot="boxNumber" slot-scope="text, record, index">
+              <template slot="boxNumberSlot" slot-scope="text, record, index">
                 <a-form-model-item prop="boxNumber">
                   <a-input style="width:100%" type="text" v-model="record.boxNumber" />
                 </a-form-model-item>
               </template>
 
               <!-- 总件数 -->
-              <template slot="totalPackagesNum" slot-scope="text, record, index">
-                <a-form-model-item prop="totalPackagesNum">
-                  <a-input style="width:100%" type="text" v-model="record.totalPackagesNum" />
+              <template slot="totalSlot" slot-scope="text, record, index">
+                <a-form-model-item prop="total">
+                  <a-input style="width:100%" type="text" v-model="record.total" />
                 </a-form-model-item>
               </template>
 
               <!-- 总净重 -->
-              <template slot="totalNetWeight" slot-scope="text, record, index">
+              <template slot="totalNetWeightSlot" slot-scope="text, record, index">
                 <a-form-model-item prop="totalNetWeight">
                   <a-input style="width:100%" type="text" v-model="record.totalNetWeight" />
                 </a-form-model-item>
               </template>
 
               <!-- 总毛重 -->
-              <template slot="totalGrossWeight" slot-scope="text, record, index">
+              <template slot="totalGrossWeightSlot" slot-scope="text, record, index">
                 <a-form-model-item prop="totalGrossWeight">
                   <a-input style="width:100%" type="text" v-model="record.totalGrossWeight" />
                 </a-form-model-item>
               </template>
 
               <!-- 外箱宽度 -->
-              <template slot="boxWidth" slot-scope="text, record, index">
-                <a-form-model-item prop="boxWidth">
-                  <a-input style="width:100%" type="text" v-model="record.boxWidth" />
+              <template slot="outerBoxWidthSlot" slot-scope="text, record, index">
+                <a-form-model-item prop="outerBoxWidth">
+                  <a-input style="width:100%" type="text" v-model="record.outerBoxWidth" />
                 </a-form-model-item>
               </template>
 
               <!-- 外箱高度 -->
-              <template slot="boxHeight" slot-scope="text, record, index">
-                <a-form-model-item prop="boxHeight">
-                  <a-input style="width:100%" type="text" v-model="record.boxHeight" />
+              <template slot="outerBoxHeightSlot" slot-scope="text, record, index">
+                <a-form-model-item prop="outerBoxHeight">
+                  <a-input style="width:100%" type="text" v-model="record.outerBoxHeight" />
                 </a-form-model-item>
               </template>
 
               <!-- 总体积 -->
-              <template slot="totalVolume" slot-scope="text, record, index">
+              <template slot="totalVolumeSlot" slot-scope="text, record, index">
                 <a-form-model-item prop="totalVolume">
                   <a-input style="width:100%" type="text" v-model="record.totalVolume" />
                 </a-form-model-item>
               </template>
 
+              <!-- 总价 -->
+              <template slot="totalPriceSlot" slot-scope="text, record, index">
+                <a-form-model-item prop="totalPrice">
+                  <a-input style="width:100%" type="text" v-model="record.totalPrice" />
+                </a-form-model-item>
+              </template>
+
               <!-- 操作 -->
               <span slot="operationSlot" slot-scope="text, record">
                 <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record.id)">
@@ -199,7 +202,7 @@
     <!-- 参照发运明细弹框 -->
     <referShipmentDetails-modal
       ref="referShipmentDetailsModal"
-      :father="aa"
+      @bao="getSon"
       @ok="modalFormOk"
     ></referShipmentDetails-modal>
   </div>
@@ -212,7 +215,7 @@ import moment from 'moment'
 
 import ReferShipmentDetailsModal from '@views/advance-packingList/referShipmentDetailsModal.vue'
 
-// import {} from '@api/reportForms/advance-packingList.js'
+import { addAdvPac } from '@api/document/advance-packingList.js'
 
 export default {
   name: 'AddAdvancePacking', // 新增预装箱单
@@ -323,7 +326,8 @@ export default {
 
         {
           title: '结束箱号',
-          dataIndex: 'endCaseNumber.',
+          dataIndex: 'endCaseNumber',
+          scopedSlots: { customRender: 'endCaseNumberSlot' },
           width: 140,
           className: 'replacecolor'
         },
@@ -331,14 +335,15 @@ export default {
         {
           title: '颜色(中英文)',
           dataIndex: 'colour',
+          scopedSlots: { customRender: 'colourSlot' },
           width: 140,
-          customRender: t => ellipsis(t),
+          // customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
         {
           title: '配码--根据U8订单来显示',
           dataIndex: 'withCode',
-          width: 140,
+          width: 240,
           className: 'replacecolor'
         },
         {
@@ -350,6 +355,7 @@ export default {
         {
           title: '箱数',
           dataIndex: 'boxNumber',
+          scopedSlots: { customRender: 'boxNumberSlot' },
           width: 140,
           className: 'replacecolor'
         },
@@ -357,6 +363,7 @@ export default {
         {
           title: '总件数',
           dataIndex: 'total',
+          scopedSlots: { customRender: 'totalSlot' },
           width: 140,
           className: 'replacecolor'
         },
@@ -369,6 +376,7 @@ export default {
         {
           title: '总净重',
           dataIndex: 'totalNetWeight',
+          scopedSlots: { customRender: 'totalNetWeightSlot' },
           width: 140,
           className: 'replacecolor'
         },
@@ -382,6 +390,7 @@ export default {
         {
           title: '总毛重',
           dataIndex: 'totalGrossWeight',
+          scopedSlots: { customRender: 'totalGrossWeightSlot' },
           width: 140,
           className: 'replacecolor'
         },
@@ -395,12 +404,14 @@ export default {
         {
           title: '外箱宽度',
           dataIndex: 'outerBoxWidth',
+          scopedSlots: { customRender: 'outerBoxWidthSlot' },
           width: 140,
           className: 'replacecolor'
         },
         {
           title: '外箱高度',
           dataIndex: 'outerBoxHeight',
+          scopedSlots: { customRender: 'outerBoxHeightSlot' },
           width: 140,
           className: 'replacecolor'
         },
@@ -408,6 +419,7 @@ export default {
         {
           title: '总体积',
           dataIndex: 'totalVolume',
+          scopedSlots: { customRender: 'totalVolumeSlot' },
           width: 140,
           className: 'replacecolor'
         },
@@ -426,6 +438,7 @@ export default {
         {
           title: '总价',
           dataIndex: 'totalPrice',
+          scopedSlots: { customRender: 'totalPriceSlot' },
           width: 120,
           className: 'replacecolor'
         },
@@ -436,27 +449,98 @@ export default {
           fixed: 'right',
           customRender: t => ellipsis(t),
           className: 'replacecolor'
+        },
+        {
+          title: '操作',
+          dataIndex: 'operation',
+          scopedSlots: { customRender: 'operationSlot' },
+          width: 160,
+          fixed: 'right',
+          className: 'replacecolor'
         }
       ],
 
-      data: [{}, {}, {}, {}, {}],
+      data: [], //子表数据
       loading: false, // 表格加载
       visible: false,
-      // 待确定还有哪些必填信息
+      dateFormat: 'YYYY-MM-DD',
+
+      addAdpacking: {}, //主表信息
+      confirmLoading: false
+      // state: '0', // 单据状态初始未【仅保存】
+      // pushState: '0' // 推送状态初始未【仅保存】
+
+      // 待确定还有哪些必填信息 ----------------------------
       // validatorRules: {
       //   orderNumber: [{ required: true, message: '订单号不能为空', trigger: 'blur' }],
       //   styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
       //   name: [{ required: true, message: '品名不能为空', trigger: 'blur' }]
       // },
-      addAdpacking: {},
-      confirmLoading: false
     }
   },
-  created() {},
+  // 接收父组件查询方法
+  props: {
+    fatherList: {
+      type: Function,
+      default: null
+    }
+  },
+
   methods: {
+    getSon(val) {
+      // console.log('勾选发运明细数据', val)
+      // for (var i in val) {
+      //   val[i]['orderQuantity'] = val[i].quantity
+      //   val[i]['orderRemainingQuantity'] = val[i].surplusNum
+      //   val[i]['salesUnitPrice'] = val[i].unitPriceIncludingTax
+      //   val[i]['customerOrder'] = val[i].customerOrderNumber
+      //   val[i]['shipmentQuantity'] = val[i].surplusNum //订单剩余数量 赋值给发货数量
+      // }
+      this.msgFormSon = val
+      this.data = this.msgFormSon
+      console.log('新增页 子表信息', this.data)
+    },
+
+    // 参照发运明细
+    referShipmentDetails() {
+      // console.log('打开参照发运明细')
+      this.$refs.referShipmentDetailsModal.referShipDetModVis = true
+    },
+
     //  保存
     saveAdd() {
-      console.log('保存新增、刷新预装箱单-成衣')
+      var newObj = {} // 新增对象
+      newObj.orderNumber = this.addAdpacking.orderNumber
+      newObj.styleNum = this.addAdpacking.styleNum
+      newObj.productName = this.addAdpacking.productName
+      newObj.sizeRange = this.addAdpacking.sizeRange
+      newObj.customer = this.addAdpacking.customer
+
+      newObj.containerCode = this.addAdpacking.containerCode
+      newObj.containerNumber = this.addAdpacking.containerNumber
+      newObj.memo = this.addAdpacking.memo
+      newObj.garmentFactory = this.addAdpacking.garmentFactory
+
+      newObj.data = this.data // 子表信息赋值
+
+      // 必须选择子表 --- 参照订单数据
+      if (newObj.data.length == 0) {
+        this.$message.error('请选择参照发运明细')
+      } else {
+        addAdvPac(newObj).then(res => {
+          if (res.success) {
+            this.$message.success('新增成功')
+            console.log('新增的对象', newObj)
+            this.close()
+            //清空信息
+            newObj = {}
+            newObj.data = []
+            this.fatherList() // 调用父组件 查询方法
+            // this.msgFormSon = {}  清空子表信息
+          }
+        })
+      }
+
       // const that = this
       // // 触发表单验证
       // this.$refs.form.validate(valid => {
@@ -464,13 +548,6 @@ export default {
       //     that.confirmLoading = true
       //   }
       // })
-      this.close()
-      // this.getShipmentList() // 刷新 预装箱单-成衣列表
-    },
-    // 参照发运明细
-    referShipmentDetails() {
-      console.log('打开参照订单数据')
-      this.$refs.referShipmentDetailsModal.referShipmentDetailsModVis = true
     },
 
     // 増行
@@ -500,7 +577,6 @@ export default {
         total: '',
         netWeight: '',
         totalNetWeight: '',
-
         roughWeight: '',
         totalGrossWeight: '',
         outerBoxLength: '',
@@ -515,27 +591,31 @@ export default {
       }
       this.data.push(addrow)
     },
-    // ----------------------------------------
+
     //  操作按钮 删除
-    handleDelete(record) {},
-    // 操作按钮
-    copy(record) {},
-    // ----------------------------------------
+    handleDelete(index) {
+      return this.data.splice(index, 1)
+    },
+    // 复制
+    copy(record) {
+      this.data.push(record)
+    },
 
     // 抽屉 取消
     handleCancel() {
-      console.log('点击抽屉取消')
       this.close()
     },
 
-    // -------------------------------------
     close() {
       this.$emit('close')
       this.visible = false
-      this.$refs.form.resetFields()
+      this.addAdpacking = {}
+      this.data = []
     },
     aa() {},
-    modalFormOk() {}
+    modalFormOk() {
+      this.$refs.referShipmentDetailsModal.referShipmentDetailsModVis = true
+    }
   },
   computed: {},
   mounted() {}

+ 1 - 2
src/views/advance-packingList/detailsAdpackingDrawer.vue

@@ -19,7 +19,7 @@
             </a-col>
 
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="品名" prop="name">
+              <a-form-model-item label="品名" prop="productName">
                 {{ detailsAdpacking.productName }}
               </a-form-model-item>
             </a-col>
@@ -332,7 +332,6 @@ export default {
   methods: {
     // 回显数据
     getDetailsById() {
-      console.log('详情', this.record.id)
       this.$nextTick(() => {
         itemByMainId({ id: this.record.id }).then(res => {
           if (res.code == 0) {

+ 110 - 49
src/views/advance-packingList/referShipmentDetailsModal.vue

@@ -1,14 +1,13 @@
 <template>
   <a-modal
     title="参照发运明细"
-    v-model="referShipmentDetailsModVis"
+    v-model="referShipDetModVis"
     :confirmLoading="confirmLoading"
     @ok="onSubmit"
     @cancel="handleCancel"
     width="86%"
     style="top:330px;left:100px;"
   >
-
     <a-spin :spinning="confirmLoading">
       <!-- 查询  -->
       <div class="table-page-search-wrapper">
@@ -16,7 +15,7 @@
           <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.documentNo"></a-input>
               </a-form-item>
             </a-col>
 
@@ -42,14 +41,16 @@
 
       <!-- table -->
       <a-table
-        :columns="referShipmentDetailsColumns"
-        :data-source="referShipmentDetailsData"
+        bordered
+        size="small"
+        rowKey="id"
+        v-if="data"
+        :columns="columns"
+        :data-source="data"
         :loading="loading"
-        :pagination="ipagination"
-        :row-key="record => record.id"
+        :pagination="pagination"
         :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
         @change="handleTableChange"
-        bordered
         :scroll="{ x: 1500 }"
       >
       </a-table>
@@ -61,6 +62,9 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
+
+import { shipList } from '@api/document/advance-packingList.js'
+
 export default {
   name: 'ReferShipmentDetailsModal',
   mixins: [JeecgListMixin],
@@ -69,20 +73,21 @@ export default {
   data() {
     let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
     return {
-      selectedRowKeys: [], // 勾选航
+      selectedRowKeys: [], // 勾选行
+      selectedRows: {}, // 勾选项
       loading: false, // 表格加载
       // 表头
-      referShipmentDetailsColumns: [
+      columns: [
         {
           title: '单据号',
-          dataIndex: 'documentNum',
+          dataIndex: 'documentNo',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
         },
         {
           title: '销售订单号',
-          dataIndex: 'saleOrderNo',
+          dataIndex: 'orderNumber',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
@@ -90,13 +95,13 @@ export default {
 
         {
           title: '客户简称',
-          dataIndex: 'customerShortName',
+          dataIndex: 'customerAbbreviation',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '部门',
-          dataIndex: 'department',
+          dataIndex: 'salesDepartment',
           width: 120,
           className: 'replacecolor'
         },
@@ -127,7 +132,7 @@ export default {
         },
         {
           title: '款号',
-          dataIndex: 'styleNum',
+          dataIndex: 'itemNumber',
           width: 120,
           className: 'replacecolor'
         },
@@ -142,7 +147,7 @@ export default {
         // },
         {
           title: '预发货日期',
-          dataIndex: 'scheduledShipDate',
+          dataIndex: 'preDeliveryDate',
           width: 120,
           className: 'replacecolor'
         },
@@ -161,20 +166,20 @@ export default {
         },
         {
           title: '数量(合计)',
-          dataIndex: 'quantity',
+          dataIndex: 'bb',
           width: 120,
           className: 'replacecolor'
         },
 
         {
           title: '单价(销售)',
-          dataIndex: 'price',
+          dataIndex: 'salesUnitPrice',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '采购/委外订单号',
-          dataIndex: 'purchaseAboardOrderNum',
+          dataIndex: 'purOrSubOrder',
           width: 120,
           className: 'replacecolor'
         },
@@ -186,13 +191,13 @@ export default {
         },
         {
           title: '工厂单价(采购/委外单价)',
-          dataIndex: 'factoryPrice',
+          dataIndex: 'factoryUnitPrice',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '申报要素(单证维护)',
-          dataIndex: 'declareElements',
+          dataIndex: 'declarationElements',
           width: 140,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
@@ -200,81 +205,131 @@ export default {
 
         {
           title: '套装件数(存货自定义项)',
-          dataIndex: 'suitQuantity',
+          dataIndex: 'numberOfSets',
           width: 120,
-
           className: 'replacecolor'
         },
         {
           title: '是否TC功能',
           dataIndex: 'isTC',
+          // 0 否 、 1 是
           width: 90,
           className: 'replacecolor'
         },
         {
           title: 'HScode',
-          dataIndex: 'HScode',
+          dataIndex: 'hsCode',
           width: 120,
           className: 'replacecolor'
         },
 
         {
           title: '中文品名',
-          dataIndex: 'chineseProName',
+          dataIndex: 'chineseName',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '英文品名',
-          dataIndex: 'englishProName',
+          dataIndex: 'englishProductName',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '成衣工厂',
-          dataIndex: 'clothesFactory',
+          dataIndex: 'garmentFactory',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '报关单价',
-          dataIndex: 'declarationPrice',
+          dataIndex: 'customsDeclarationUnitPrice',
           width: 120,
           className: 'replacecolor'
         }
       ],
-      referShipmentDetailsData: [{}, {}, {}],
+      data: [],
       confirmLoading: false,
-      referShipmentDetailsModVis: false,
+      referShipDetModVis: false,
 
       // 查询条件
       queryParam: {
-        orderNum: '',
-        customer: ''
+        documentNo: '',
+        customer: '',
+        pageNo: ''
+      },
+      // 分页
+      pagination: {
+        // total: 0,
+        // current: 0,
+        // pageSize: 0
       }
     }
   },
   // 接收父组件 方法
-  props: {
-    father: {
-      type: Function,
-      default: null
-    }
+  // props: {
+  //   father: {
+  //     type: Function,
+  //     default: null
+  //   }
+  // },
+  created() {
+    this.getShipData()
   },
-  created() {},
   methods: {
+    //参照发运明细数据
+    getShipData() {
+      this.$nextTick(() => {
+        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,
+              pageSize: res.result.size
+            }
+          }
+        })
+      })
+    },
+
+    // 弹框确定
+    onSubmit() {
+      if (this.selectedRowKeys.length == 0) {
+        this.$message.error('请勾选参照发运明细')
+      }
+      if ((this.selectedRowKeys.length = 2 || this.selectedRowKeys.length > 1)) {
+        alert('error')
+      } else {
+        // console.log('需要传给父组件的数据', this.selectedRows)
+        // bao父组件指定的传数据绑定的函数 || this.selectedRows子组件给父组件传递的数据
+        this.$emit('bao', this.selectedRows)
+        this.referShipDetModVis = false
+        this.selectedRowKeys = []
+        this.selectedRows = []
+      }
+    },
     // 弹框查询按钮
-    searchQuery() {},
+    searchQuery() {
+      this.queryParam.pageNo = ''
+      this.getShipData()
+    },
     // 重置
     searchReset() {
-      this.queryParam = {}
-      // this.getShipmentList()
+      this.queryParam.documentNo = ''
+      this.queryParam.customer = ''
+      this.getShipData()
     },
-    // 弹框确定
-    onSubmit() {},
+
     close() {
       this.$emit('close')
-      this.visible = false
+      this.referShipDetModVis = false
+      this.selectedRowKeys = []
+      this.data = []
+      this.getShipData()
     },
     handleCancel() {
       this.close()
@@ -283,12 +338,18 @@ export default {
     onSelectChange(keys, rows) {
       this.selectedRowKeys = keys
       this.selectedRows = rows
+      if (this.selectedRows.length > 1) {
+        // alert('error')
+        // var newOne = keys.shift()
+        // this.selectedRows = newOne
+        // console.log('最新选择', this.selectedRows)
+        // this.$error.message('只能参照一条发运明细')
+      }
+    },
+    handleTableChange(pagination, filters, sorter) {
+      this.queryParam.pageNo = pagination.current
+      this.getShipData()
     }
-    // handleTableChange(pagination, filters, sorter) {
-    //   // console.log('当前页信息>>>>',pagination)
-    //   this.queryParam.pageNo = pagination.current
-    //   this.getAnnList()
-    // }
   },
   computed: {
     // 选中项

+ 8 - 8
src/views/reportForms/cost-allocation-table.vue

@@ -361,14 +361,14 @@ export default {
         halfInfo.billstatus = '1'
         console.log(halfInfo.planNum, halfInfo.remarks, halfInfo.billstatus)
 
-        addHalfInfo(halfInfo).then(res => {
-          if (res.success) {
-            console.log('保存的部分信息', halfInfo)
-            this.$message.success('保存成功')
-
-            halfInfo = {}
-          }
-        })
+        // addHalfInfo(halfInfo).then(res => {
+        //   if (res.success) {
+        //     console.log('保存的部分信息', halfInfo)
+        //     this.$message.success('保存成功')
+
+        //     halfInfo = {}
+        //   }
+        // })
       } else {
         this.$message.error('订单号不能为空')
       }

+ 12 - 5
src/views/reportForms/order-statistics/chart/external/customerChart.vue

@@ -15,8 +15,7 @@ export default {
         department: '',
         endYearMonth: '',
         startYearMonth: '',
-        vendorType: ''
-
+        vendorType: '外部'
         // cvenAbbName: ''供应商
       },
       // newData: {
@@ -35,8 +34,6 @@ export default {
     // 1、先获取 chart 数据
     getCusChartData() {
       cusChart(this.queryParam).then(res => {
-        // this.queryParam.vendorType = ''
-        // console.log('kkk', this.queryParam)
         if (res.success) {
           // console.log('客户统计图数据', res.result)
           res.result.forEach(item => {
@@ -60,7 +57,7 @@ export default {
       const option = {
         title: {
           bpttom: '20',
-          text: '供应商统计表',
+          text: '客户统计表',
           textStyle: {
             fontSize: 18,
             color: '#5470c6'
@@ -171,6 +168,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'
+      })
+
       window.addEventListener('resize', () => {
         if (myChart) {
           myChart.resize()

+ 12 - 2
src/views/reportForms/order-statistics/chart/external/departmentChart.vue

@@ -16,7 +16,7 @@ export default {
         // customer: '', //客户
         // endYearMonth: '',
         // startYearMonth: '',
-        vendorType: ''
+        vendorType: '外部'
         // cdepName: ''
       },
 
@@ -34,7 +34,6 @@ export default {
   methods: {
     // 1、先获取 chart 数据
     getDepChartData() {
-      this.prop.vendorType = ''
       depChart(this.prop).then(res => {
         if (res.result) {
           // console.log('部门统计图数据', res.result)
@@ -164,6 +163,17 @@ 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'
+      })
+
       window.addEventListener('resize', () => {
         if (myChart) {
           myChart.resize()

+ 12 - 3
src/views/reportForms/order-statistics/chart/interior/customerChart.vue

@@ -15,7 +15,7 @@ export default {
         department: '',
         endYearMonth: '',
         startYearMonth: '',
-        vendorType: ''
+        vendorType: '内部'
 
         // cvenAbbName: ''供应商
       },
@@ -35,7 +35,6 @@ export default {
     // 1、先获取 chart 数据
     getCusChartData() {
       cusChart(this.queryParam).then(res => {
-        this.queryParam.vendorType = ''
         if (res.success) {
           // console.log('客户统计图数据', res.result)
           res.result.forEach(item => {
@@ -59,7 +58,7 @@ export default {
       const option = {
         title: {
           bpttom: '20',
-          text: '供应商统计表',
+          text: '客户统计表',
           textStyle: {
             fontSize: 18,
             color: '#5470c6'
@@ -170,6 +169,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'
+      })
+
       window.addEventListener('resize', () => {
         if (myChart) {
           myChart.resize()

+ 12 - 2
src/views/reportForms/order-statistics/chart/interior/departmentChart.vue

@@ -16,7 +16,7 @@ export default {
         customer: '', //客户
         endYearMonth: '',
         startYearMonth: '',
-        vendorType: ''
+        vendorType: '内部'
         // cdepName: ''部门
       },
 
@@ -35,7 +35,6 @@ export default {
     // 1、先获取 chart 数据
     getDepChartData() {
       depChart(this.queryParam).then(res => {
-        this.queryParam.vendorType=''
         if (res.result) {
           // console.log('部门统计图数据', res.result)
           res.result.forEach(item => {
@@ -164,6 +163,17 @@ 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'
+      })
+
       window.addEventListener('resize', () => {
         if (myChart) {
           myChart.resize()

+ 1 - 5
src/views/reportForms/order-statistics/external-statistics.vue

@@ -215,7 +215,6 @@ export default {
     // 查询订单统计
     getExternalData() {
       this.$nextTick(() => {
-        this.queryParam.vendorType = '外部'
         externalList(this.queryParam).then(res => {
           if (res.success) {
             this.extStadata = res.result.records
@@ -247,13 +246,10 @@ export default {
 
         //查询条件 传给 部门chart + 渲染
         this.$refs.departmentChart.prop = this.queryParam
-        // console.log('prop', this.$refs.departmentChart.prop)
-        // this.$refs.departmentChart.prop.vendorType = ''
         this.$refs.departmentChart.getDepChartData()
 
         //查询条件 传给 客户chart + 渲染
         this.$refs.customerChart.queryParam = this.queryParam
-        // this.$refs.customerChart.queryParam.vendorType = ''
         this.$refs.customerChart.getCusChartData()
       }
 
@@ -334,7 +330,7 @@ export default {
 .depChartStyle,
 .cusChartStyle {
   // width: 100%;
-  height: 600px;
+  // height: 600px;
   text-align: center;
   padding-top: 10px;
 }

+ 1 - 6
src/views/reportForms/order-statistics/interior-statistics.vue

@@ -196,9 +196,8 @@ export default {
     }
   },
 
-  // html渲染出来后,操作dom
   mounted() {
-    // this.cancelLoading()
+    // this.cancelLoading()     html渲染出来后,操作dom
   },
   created() {
     this.getExternalData()
@@ -246,14 +245,10 @@ export default {
 
         //查询条件 传给 部门chart + 渲染
         this.$refs.departmentChart.queryParam = this.queryParam
-        // this.$refs.departmentChart.queryParam.vendorType = ''
         this.$refs.departmentChart.getDepChartData()
 
-        // console.log('部门chart是否外部', this.$refs.departmentChart.queryParam.vendorType)
-
         //查询条件 传给 客户chart + 渲染
         this.$refs.customerChart.queryParam = this.queryParam
-        // this.$refs.customerChart.queryParam.vendorType = ''
         this.$refs.customerChart.getCusChartData()
       }
 

+ 7 - 37
src/views/shipment-details/addShipDetDrawer.vue

@@ -67,30 +67,6 @@
                 </a-form-model-item>
               </a-col>
 
-              <a-col :md="6" :sm="8">
-                <a-form-model-item label="HScode" prop="hsCode">
-                  <a-input placeholder="HScode" v-model="addShipDet.hsCode"></a-input>
-                </a-form-model-item>
-              </a-col>
-
-              <a-col :md="6" :sm="8">
-                <a-form-model-item label="中文品名" prop="chineseName">
-                  <a-input placeholder="请输入中文品名" v-model="addShipDet.chineseName"></a-input>
-                </a-form-model-item>
-              </a-col>
-
-              <a-col :md="6" :sm="8">
-                <a-form-model-item label="英文品名" prop="englishProductName">
-                  <a-input placeholder="请输入英文品名" v-model="addShipDet.englishProductName"></a-input>
-                </a-form-model-item>
-              </a-col>
-
-              <a-col :md="6" :sm="8">
-                <a-form-model-item label="报关品名" prop="declarationName">
-                  <a-input placeholder="请输入报关品名" v-model="addShipDet.declarationName"></a-input>
-                </a-form-model-item>
-              </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="成衣工厂" prop="garmentFactory">
                   <a-input placeholder="请输入成衣工厂" v-model="addShipDet.garmentFactory"></a-input>
@@ -313,6 +289,7 @@ export default {
           scopedSlots: { customRender: 'itemNumber' },
           fixed: 'left',
           width: 180,
+          // align: middle,
           className: 'replacecolor'
         },
 
@@ -600,9 +577,11 @@ export default {
           className: 'replacecolor'
         }
       ],
-      msgFormSon: 'test', // 子组件传来数据的变量
+
       syShippingDetailsItemList: [], // 子表数据
-      addShipDet: {}, // 新增发运明细
+      msgFormSon: 'test', // 子组件传来数据的变量
+
+      addShipDet: {}, // 主表信息
       visible: false,
       confirmLoading: false,
       dateFormat: 'YYYY-MM-DD',
@@ -619,7 +598,6 @@ export default {
       default: null
     }
   },
-  created() {},
 
   methods: {
     getSon(val) {
@@ -650,11 +628,8 @@ export default {
       newObj.preDeliveryDate = this.addShipDet.preDeliveryDate.format('YYYY-MM-DD') // 预发货日期
       newObj.preCompletionDate = this.addShipDet.preCompletionDate.format('YYYY-MM-DD') // 预完工日期
       newObj.orderType = this.addShipDet.orderType
-      newObj.chineseName = this.addShipDet.chineseName
-      newObj.englishProductName = this.addShipDet.englishProductName
+
       newObj.garmentFactory = this.addShipDet.garmentFactory
-      newObj.hsCode = this.addShipDet.hsCode
-      newObj.declarationName = this.addShipDet.declarationName
       newObj.wholeOrderTotal = this.addShipDet.wholeOrderTotal
       newObj.memo = this.addShipDet.memo // U8系统适用
       newObj.syShippingDetailsItemList = this.syShippingDetailsItemList // 子表信息赋值
@@ -720,22 +695,17 @@ export default {
     // --------------------------------------
     // 操作 删除
     handleDelete(index) {
-      // console.log('index', index)
-      // console.log('删除该项订单数据', index)
       return this.syShippingDetailsItemList.splice(index, 1)
     },
     // 操作 复制 复制一行已有的数据
     copy(record) {
-      // console.log('复制的数据', record)
       this.syShippingDetailsItemList.push(record)
     },
-    // --------------------------------------
-    // 抽屉 取消
+
     handleCancel() {
       this.close()
     },
 
-    // --------------------------------------
     close() {
       this.$emit('close')
       this.visible = false

+ 2 - 5
src/views/shipment-details/referOrderDataModal.vue

@@ -25,8 +25,6 @@
                 <!-- <a-select placeholder="请选择账套" v-model="queryParam.account">
                   <a-select-option value="">请选择</a-select-option>
                   <a-select-option :value="0">香港森语(101)</a-select-option>
-                  <a-select-option :value="1">宁波森语(102)</a-select-option>
-                  <a-select-option :value="2">宁波马菲羊(103)</a-select-option>
                 </a-select> -->
               </a-form-item>
             </a-col>
@@ -68,6 +66,7 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
+
 import { queryOrderData } from '@api/document/shipmentList'
 
 export default {
@@ -361,7 +360,7 @@ export default {
     }
   },
   // 接收父组件 方法
-  props: {},
+  // props: {},
 
   created() {
     this.getOrderList()
@@ -411,8 +410,6 @@ export default {
     onSelectChange(keys, rows) {
       this.selectedRowKeys = keys
       this.selectedRows = rows
-      // console.log('this.selectedRows:', this.selectedRows)
-      // console.log('this.selectedRowKeys:', this.selectedRowKeys)
     },
     // 弹框确定
     onSubmit() {

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

@@ -197,8 +197,10 @@
     <!-- 抽屉  :fatherObj="detailsByIdObj"-->
     <div>
       <addShipDet-drawer ref="addShipDetDrawer" :fatherList="getShipmentList" @ok="modalFormOk"></addShipDet-drawer>
-      <detailsShipDet-drawer ref="detailsShipDetDrawer" @ok="modalFormOk"></detailsShipDet-drawer>
+
       <editShipDet-drawer ref="editShipDetDrawer" :fatherList="getShipmentList" @ok="modalFormOk"></editShipDet-drawer>
+
+      <detailsShipDet-drawer ref="detailsShipDetDrawer" @ok="modalFormOk"></detailsShipDet-drawer>
       <!-- 申报要素 弹框 -->
       <declareElements-modal ref="declareElementsModal"></declareElements-modal>
     </div>
@@ -661,4 +663,7 @@ export default {
 // /deep/ th.replacecolor {
 //   background-color: #ccc;
 // }
+/deep/ .ant-form-item {
+  margin-bottom: 0 !important;
+}
 </style>

+ 167 - 148
src/views/user/Login.vue

@@ -1,9 +1,18 @@
 <template>
   <div class="main">
     <a-form-model class="user-layout-login" @keyup.enter.native="handleSubmit">
-      <a-tabs :activeKey="customActiveKey" :tabBarStyle="{ textAlign: 'center', borderBottom: 'unset' }"  @change="handleTabClick">
+      <a-tabs
+        :activeKey="customActiveKey"
+        :tabBarStyle="{ textAlign: 'center', borderBottom: 'unset' }"
+        @change="handleTabClick"
+      >
         <a-tab-pane key="tab1" tab="账号密码登录">
-          <login-account ref="alogin" @validateFail="validateFail" @success="requestSuccess" @fail="requestFailed"></login-account>
+          <login-account
+            ref="alogin"
+            @validateFail="validateFail"
+            @success="requestSuccess"
+            @fail="requestFailed"
+          ></login-account>
         </a-tab-pane>
 
         <!-- <a-tab-pane key="tab2" tab="手机号登录">
@@ -13,25 +22,37 @@
 
       <a-form-model-item>
         <a-checkbox @change="handleRememberMeChange" default-checked>自动登录</a-checkbox>
-        <router-link :to="{ name: 'alteration'}" class="forge-password" style="float: right;">
+        <router-link :to="{ name: 'alteration' }" class="forge-password" style="float: right;">
           忘记密码
         </router-link>
-        <router-link :to="{ name: 'register'}" class="forge-password" style="float: right;margin-right: 10px" >
+        <router-link :to="{ name: 'register' }" class="forge-password" style="float: right;margin-right: 10px">
           注册账户
         </router-link>
       </a-form-model-item>
 
       <a-form-item style="margin-top:24px">
-        <a-button size="large"  type="primary"  htmlType="submit"  class="login-button"  :loading="loginBtn"  @click.stop.prevent="handleSubmit" :disabled="loginBtn">确定
+        <a-button
+          size="large"
+          type="primary"
+          htmlType="submit"
+          class="login-button"
+          :loading="loginBtn"
+          @click.stop.prevent="handleSubmit"
+          :disabled="loginBtn"
+          >确定
         </a-button>
       </a-form-item>
-
     </a-form-model>
 
-    <two-step-captcha v-if="requiredTwoStepCaptcha" :visible="stepCaptchaVisible" @success="stepCaptchaSuccess" @cancel="stepCaptchaCancel"></two-step-captcha>
-    
-    <!-- <login-select-tenant ref="loginSelect" @success="loginSelectOk"></login-select-tenant>
-    <third-login ref="thirdLogin"></third-login> -->
+    <two-step-captcha
+      v-if="requiredTwoStepCaptcha"
+      :visible="stepCaptchaVisible"
+      @success="stepCaptchaSuccess"
+      @cancel="stepCaptchaCancel"
+    ></two-step-captcha>
+
+    <login-select-tenant ref="loginSelect" @success="loginSelectOk"></login-select-tenant>
+    <!-- <third-login ref="thirdLogin"></third-login>  -->
   </div>
 </template>
 
@@ -48,168 +69,166 @@ import LoginAccount from './LoginAccount'
 import LoginPhone from './LoginPhone'
 
 export default {
-    components: {
-      LoginSelectTenant,
-      TwoStepCaptcha,
-      ThirdLogin,
-      LoginAccount,
-      LoginPhone
-    },
-    data () {
-      return {
-        customActiveKey: 'tab1',
-        rememberMe: true,
-        loginBtn: false,
-        requiredTwoStepCaptcha: false,
-        stepCaptchaVisible: false,
-        encryptedString:{
-          key:"",
-          iv:"",
-        },
+  components: {
+    LoginSelectTenant,
+    TwoStepCaptcha,
+    ThirdLogin,
+    LoginAccount,
+    LoginPhone
+  },
+  data() {
+    return {
+      customActiveKey: 'tab1',
+      rememberMe: true,
+      loginBtn: false,
+      requiredTwoStepCaptcha: false,
+      stepCaptchaVisible: false,
+      encryptedString: {
+        key: '',
+        iv: ''
       }
+    }
+  },
+  created() {
+    Vue.ls.remove(ACCESS_TOKEN)
+    this.getRouterData()
+    this.rememberMe = true
+  },
+  methods: {
+    handleTabClick(key) {
+      this.customActiveKey = key
     },
-    created() {
-      Vue.ls.remove(ACCESS_TOKEN)
-      this.getRouterData();
-      this.rememberMe = true
+    handleRememberMeChange(e) {
+      this.rememberMe = e.target.checked
     },
-    methods:{
-      handleTabClick(key){
-        this.customActiveKey = key
-      },
-      handleRememberMeChange(e){
-        this.rememberMe = e.target.checked
-      },
-      /**跳转到登录页面的参数-账号获取*/
-      getRouterData(){
-        this.$nextTick(() => {
-          let temp = this.$route.params.username || this.$route.query.username || ''
-          if (temp) {
-            this.$refs.alogin.acceptUsername(temp)
-          }
-        })
-      },
-
-      //登录
-      handleSubmit () {
-        this.loginBtn = true;
-        if (this.customActiveKey === 'tab1') {
-          // 使用账户密码登录
-          this.$refs.alogin.handleLogin(this.rememberMe)
-        } else {
-          //手机号码登录
-          this.$refs.plogin.handleLogin(this.rememberMe)
-        }
-      },
-      // 校验失败
-      validateFail(){
-        this.loginBtn = false;
-      },
-      // 登录后台成功
-      requestSuccess(loginResult){
-        this.$refs.loginSelect.show(loginResult)
-      },
-      //登录后台失败
-      requestFailed (err) {
-        let description = ((err.response || {}).data || {}).message || err.message || "请求出现错误,请稍后再试"
-        this.$notification[ 'error' ]({
-          message: '登录失败',
-          description: description,
-          duration: 4,
-        });
-        //账户密码登录错误后更新验证码
-        if(this.customActiveKey === 'tab1' && description.indexOf('密码错误')>0){
-          this.$refs.alogin.handleChangeCheckCode()
-        }
-        this.loginBtn = false;
-      },
-      loginSelectOk(){
-        this.loginSuccess()
-      },
-      //登录成功
-      loginSuccess () {
-        this.$router.push({ path: "/dashboard/analysis" }).catch(()=>{
-          console.log('登录跳转首页出错,这个错误从哪里来的')
-        })
-        this.$notification.success({
-          message: '欢迎',
-          description: `${timeFix()},欢迎回来`,
-        });
-      },
-
-      stepCaptchaSuccess () {
-        this.loginSuccess()
-      },
-      stepCaptchaCancel () {
-        this.Logout().then(() => {
-          this.loginBtn = false
-          this.stepCaptchaVisible = false
-        })
-      },
-      //获取密码加密规则
-      getEncrypte(){
-        var encryptedString = Vue.ls.get(ENCRYPTED_STRING);
-        if(encryptedString == null){
-          getEncryptedString().then((data) => {
-            this.encryptedString = data
-          });
-        }else{
-          this.encryptedString = encryptedString;
+    /**跳转到登录页面的参数-账号获取*/
+    getRouterData() {
+      this.$nextTick(() => {
+        let temp = this.$route.params.username || this.$route.query.username || ''
+        if (temp) {
+          this.$refs.alogin.acceptUsername(temp)
         }
+      })
+    },
+
+    //登录
+    handleSubmit() {
+      this.loginBtn = true
+      if (this.customActiveKey === 'tab1') {
+        // 使用账户密码登录
+        this.$refs.alogin.handleLogin(this.rememberMe)
+      } else {
+        //手机号码登录
+        this.$refs.plogin.handleLogin(this.rememberMe)
       }
+    },
+    // 校验失败
+    validateFail() {
+      this.loginBtn = false
+    },
+    // 登录后台成功
+    requestSuccess(loginResult) {
+      this.$refs.loginSelect.show(loginResult)
+    },
+    //登录后台失败
+    requestFailed(err) {
+      let description = ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试'
+      this.$notification['error']({
+        message: '登录失败',
+        description: description,
+        duration: 4
+      })
+      //账户密码登录错误后更新验证码
+      if (this.customActiveKey === 'tab1' && description.indexOf('密码错误') > 0) {
+        this.$refs.alogin.handleChangeCheckCode()
+      }
+      this.loginBtn = false
+    },
+    loginSelectOk() {
+      this.loginSuccess()
+    },
+    //登录成功
+    loginSuccess() {
+      this.$router.push({ path: '/dashboard/analysis' }).catch(() => {
+        console.log('登录跳转首页出错,这个错误从哪里来的')
+      })
+      this.$notification.success({
+        message: '欢迎',
+        description: `${timeFix()},欢迎回来`
+      })
+    },
 
+    stepCaptchaSuccess() {
+      this.loginSuccess()
+    },
+    stepCaptchaCancel() {
+      this.Logout().then(() => {
+        this.loginBtn = false
+        this.stepCaptchaVisible = false
+      })
+    },
+    //获取密码加密规则
+    getEncrypte() {
+      var encryptedString = Vue.ls.get(ENCRYPTED_STRING)
+      if (encryptedString == null) {
+        getEncryptedString().then(data => {
+          this.encryptedString = data
+        })
+      } else {
+        this.encryptedString = encryptedString
+      }
     }
-
   }
+}
 </script>
 <style lang="less" scoped>
-  .user-layout-login {
-    label {
-      font-size: 14px;
-    }
+.user-layout-login {
+  label {
+    font-size: 14px;
+  }
   .getCaptcha {
-      display: block;
-      width: 100%;
-      height: 40px;
-    }
+    display: block;
+    width: 100%;
+    height: 40px;
+  }
 
   .forge-password {
-      font-size: 14px;
-    }
+    font-size: 14px;
+  }
 
-    button.login-button {
-      padding: 0 15px;
-      font-size: 16px;
-      height: 40px;
-      width: 100%;
-    }
+  button.login-button {
+    padding: 0 15px;
+    font-size: 16px;
+    height: 40px;
+    width: 100%;
+  }
 
   .user-login-other {
-      text-align: left;
-      margin-top: 24px;
-      line-height: 22px;
+    text-align: left;
+    margin-top: 24px;
+    line-height: 22px;
 
     .item-icon {
-        font-size: 24px;
-        color: rgba(0,0,0,.2);
-        margin-left: 16px;
-        vertical-align: middle;
-        cursor: pointer;
-        transition: color .3s;
+      font-size: 24px;
+      color: rgba(0, 0, 0, 0.2);
+      margin-left: 16px;
+      vertical-align: middle;
+      cursor: pointer;
+      transition: color 0.3s;
 
       &:hover {
-          color: #1890ff;
-        }
+        color: #1890ff;
       }
+    }
 
     .register {
-        float: right;
-      }
+      float: right;
     }
   }
+}
 </style>
 <style>
-  .valid-error .ant-select-selection__placeholder{
-    color: #f5222d;
-  }
-</style>
+.valid-error .ant-select-selection__placeholder {
+  color: #f5222d;
+}
+</style>