Browse Source

提交箱管

caojunjie 2 years ago
parent
commit
707892275e

+ 81 - 14
src/components/boxCost/index.vue

@@ -17,9 +17,21 @@
         @resetColumn="resetColumn('crud','option','optionBack',codeValue)"
         @saveColumn="saveColumn('crud','option','optionBack',codeValue)">
       <template slot-scope="{type,size,row,index}" slot="menu">
-        <el-button icon="el-icon-edit" :size="size" :type="type" :disabled="row.settlementAmount > 0" @click="$refs.crud.rowEdit(row,index)">编辑
+        <el-button icon="el-icon-edit" :size="size" :type="type" :disabled="row.settlementAmount > 0"
+                   @click="$refs.crud.rowEdit(row,index)">编辑
+        </el-button>
+        <el-button icon="el-icon-delete" :size="size" :type="type" :disabled="row.settlementAmount > 0"
+                   @click="rowDel(row,index)">删除
+        </el-button>
+      </template>
+      <template slot="menuLeft">
+        <el-button
+            class="el-icon-download"
+            type="info"
+            size="small"
+            :disabled="!id || listData.length === 0"
+            @click="openReport">打印
         </el-button>
-        <el-button icon="el-icon-delete" :size="size" :type="type" :disabled="row.settlementAmount > 0" @click="rowDel(row,index)">删除</el-button>
       </template>
       <template slot="itemNameForm">
         <breakdown-select v-model="form.itemId" @selectValue="selectValue"
@@ -29,25 +41,33 @@
         <crop-select v-model="form.corpId" @getCorpData="getGSDataTwo" corpType="KH"/>
       </template>
     </avue-crud>
+    <report-dialog
+        :switchDialog="switchDialog"
+        :reportId="id"
+        :reportName="reportName"
+        @onClose="onClose()"
+    />
   </trade-card>
 </template>
 
 <script>
 
 import {tradingBoxFees} from "@/api/boxManagement";
-import {mapStates} from "element-ui/packages/table/src/store/helper";
-
+import reportDialog from "@/components/report-dialog/main.vue";
 export default {
   name: "index",
+  components: {reportDialog},
   data() {
     return {
-      code:'',
+      code: '',
+      switchDialog: false,
+      reportName:'',
       option: {},
       optionBack: {},
-      leaseIn:{
+      leaseIn: {
         align: 'center',
         index: true,
-        height:500,
+        height: 500,
         addBtnText: "录入明细",
         refreshBtn: false,
         addBtn: true,
@@ -440,13 +460,13 @@ export default {
           //   width: 100
           // },
           {
-          label: '备注',
-          prop: 'remark',
-          type: 'textarea',
-          overHidden: true,
-          minRows: 3,
-          span: 24
-        }]
+            label: '备注',
+            prop: 'remark',
+            type: 'textarea',
+            overHidden: true,
+            minRows: 3,
+            span: 24
+          }]
       },
       dataList: [],
       form: {},
@@ -530,6 +550,9 @@ export default {
     activeName: {
       type: String,
       default: 'first'
+    },
+    id: {
+      type: String
     }
   },
   async created() {
@@ -580,6 +603,50 @@ export default {
     this.key++
   },
   methods: {
+    openReport() {
+      for (let item of this.listData) {
+        if (!item.id) {
+          this.$confirm("有未保存的费用,是否继续打印?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            if (this.type === "CK" || this.type === "JK"){
+              if (this.activeNameTwo === "first"){
+                this.reportName = "收款费用详情(进出口)"
+              }else {
+                this.reportName = "付款费用详情(进出口)"
+              }
+            }else {
+              if (this.activeNameTwo === "first"){
+                this.reportName = "收款费用详情(箱管)"
+              }else {
+                this.reportName = "付款费用详情(箱管)"
+              }
+            }
+            this.switchDialog = true
+          })
+        }
+      }
+      if (this.type === "CK" || this.type === "JK"){
+        if (this.activeNameTwo === "first"){
+          this.reportName = "收款费用详情(进出口)"
+        }else {
+          this.reportName = "付款费用详情(进出口)"
+        }
+      }else {
+        if (this.activeNameTwo === "first"){
+          this.reportName = "收款费用详情(箱管)"
+        }else {
+          this.reportName = "付款费用详情(箱管)"
+        }
+      }
+      this.switchDialog = true
+    },
+    // 报表关闭
+    onClose(val) {
+      this.switchDialog = val;
+    },
     handleClick(tab, event) {
       this.activeNameTwo = tab.name
       if (tab.name === "first") {

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

@@ -101,7 +101,7 @@
         @onClose="onClose()"
     />
     <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" :codeValue="242.2" :tabShow="3" activeName="second" ref="boxCost"
+    <box-cost v-model="dataListTwo" :id="form.id" :codeValue="242.2" :tabShow="3" activeName="second" ref="boxCost"
               url="/api/blade-box-tube/files/remove" @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload

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

@@ -101,7 +101,7 @@
         @onClose="onClose()"
     />
     <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" :codeValue="243.2" :tabShow="3" activeName="second" ref="boxCost"
+    <box-cost v-model="dataListTwo" :id="form.id" :codeValue="243.2" :tabShow="3" activeName="second" ref="boxCost"
               url="/api/blade-box-tube/files/remove" @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload

+ 1 - 1
src/views/boxManagement/buyContainer/detailsPage.vue

@@ -83,7 +83,7 @@
         @onClose="onClose()"
     />
 <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" activeName="second" ref="boxCost" @resetTrigger="resetTrigger"></box-cost>
+    <box-cost v-model="dataListTwo" :id="form.id" activeName="second" ref="boxCost" @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload
           basic

+ 3 - 3
src/views/boxManagement/exportShipment/detailsPage.vue

@@ -124,7 +124,7 @@
         @onClose="onClose()"
     />
     <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" :codeValue="237.2" activeName="first" ref="boxCost"
+    <box-cost v-model="dataListTwo" :id="form.id" :codeValue="237.2" type="CK" activeName="first" ref="boxCost"
               url="/api/blade-box-tube/transportItemFees/remove" @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload
@@ -993,8 +993,8 @@ export default {
               type: "DCF",
               source: "CKZY",
               ...this.formState,
-              purchaseCompanyId: this.form.corpId,
-              purchaseCompanyName: this.form.corpName,
+              purchaseCompanyId: this.formState.corpId,
+              purchaseCompanyName: this.formState.corpName,
               // tradingBoxItemsList: this.dataList,
               tradingBoxItemsList: this.selectionList,
             }

+ 3 - 3
src/views/boxManagement/importReturnTrip/detailsPage.vue

@@ -123,7 +123,7 @@
         @onClose="onClose()"
     />
     <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" :codeValue="237.92" activeName="second" ref="boxCost"
+    <box-cost v-model="dataListTwo" :id="form.id" :codeValue="237.92" type="JK" activeName="second" ref="boxCost"
               url="/api/blade-box-tube/transportItemFees/remove" @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload
@@ -998,8 +998,8 @@ export default {
               type: "DCF",
               source: "JKFC",
               ...this.formState,
-              purchaseCompanyId: this.form.corpId,
-              purchaseCompanyName: this.form.corpName,
+              purchaseCompanyId: this.formState.corpId,
+              purchaseCompanyName: this.formState.corpName,
               // tradingBoxItemsList: this.dataList,
               tradingBoxItemsList: this.selectionList,
             }

+ 1 - 1
src/views/boxManagement/leaseIn/detailsPage.vue

@@ -114,7 +114,7 @@
         @onClose="onClose()"
     />
 <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" type="ZR" activeName="second" :codeValue="245.2" ref="boxCost"
+    <box-cost v-model="dataListTwo" :id="form.id" type="ZR" activeName="second" :codeValue="245.2" ref="boxCost"
               @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload

+ 1 - 1
src/views/boxManagement/leaseOut/detailsPage.vue

@@ -110,7 +110,7 @@
         @onClose="onClose()"
     />
 <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" type="ZC" activeName="first" :codeValue="248.2" ref="boxCost"
+    <box-cost v-model="dataListTwo" :id="form.id" type="ZC" activeName="first" :codeValue="248.2" ref="boxCost"
               @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload

+ 1 - 1
src/views/boxManagement/sellingContainers/detailsPage.vue

@@ -85,7 +85,7 @@
         @onClose="onClose()"
     />
     <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" ref="boxCost" @resetTrigger="resetTrigger"></box-cost>
+    <box-cost v-model="dataListTwo" :id="form.id" ref="boxCost" @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload
           basic

+ 1 - 1
src/views/boxManagement/stockpilingManage/detailsPage.vue

@@ -102,7 +102,7 @@
         @onClose="onClose()"
     />
 <!--    费用信息组件-->
-    <box-cost v-model="dataListTwo" type="ZC" activeName="second" :codeValue="252.2" ref="boxCost"
+    <box-cost v-model="dataListTwo" :id="form.id" type="ZC" activeName="second" :codeValue="252.2" ref="boxCost"
               @resetTrigger="resetTrigger"></box-cost>
     <trade-card title="附件明细">
       <c-upload

+ 18 - 2
src/views/boxManagement/stockpilingManage/index.vue

@@ -93,6 +93,23 @@ export default {
           width: 220,
           search: true,
           searchOrder:2
+        },{
+          label: '箱号',
+          prop: 'code',
+          width: 100,
+          searchOrder:1,
+          overHidden: true,
+          filterable: true,
+          remote: true,
+          type: "select",
+          search: true,
+          allowCreate: true,
+          dicUrl: "/api/blade-box-tube/archives/list?size=10&current=1&code={{key}}",
+          props: {
+            label: "code",
+            value: "code",
+            res:"data.records"
+          }
         }, {
           label: '合同号',
           prop: 'contractNo',
@@ -308,10 +325,9 @@ export default {
         }
       }
       const routeData = this.$router.resolve({
-        path: '/api/blade-box-tube/tradingBox/exportTradingBoxOut',      //跳转目标窗口的地址
+        path: '/api/blade-box-tube/transfer/exportTradingBoxOut',      //跳转目标窗口的地址
         query: {
           ...config.params,    //括号内是要传递给新窗口的参数
-          type:"ZC"
         }
       })
       window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);

+ 12 - 1
src/views/businessManagement/inventoryAccount/index.vue

@@ -18,6 +18,9 @@
 <!--          <span v-if="Number(scope.row.lockingQuantity) > 0" style="color: #409EFF;cursor: pointer" @click.stop="viewCell(scope.row,scope.index)">{{ scope.row.lockingQuantity }}</span>-->
 <!--          <span v-else>{{ scope.row.lockingQuantity }}</span>-->
         </template>
+        <template slot="stockNameSearch">
+          <warehouse-select v-model="search.storageId" :configuration="configurationWarehouse" />
+        </template>
         <template slot-scope="{row,index}" slot="menu">
           <el-button
             type="text"
@@ -90,6 +93,14 @@ export default {
     return {
       data: [],
       search:{},
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: []
+      },
       loading: false,
       exportLoading:false,
       switchDialog:false,
@@ -206,7 +217,7 @@ export default {
       this.onLoad(this.page, params);
       done()
     },
-    onLoad(page, params = {}) {
+    onLoad(page, params = this.search) {
       if (this.search.createTime && this.search.createTime.length > 0) {
         params = {
           ...params,