Browse Source

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

ccjgmwz 3 years ago
parent
commit
eb00cf5e1a
38 changed files with 30581 additions and 146 deletions
  1. 8 8
      public/static/weightCheckInOut.html
  2. 7 5
      public/static/weightCheckOut.html
  3. 1 2
      src/api/V2/statisticalReport/index.js
  4. 2 3
      src/model/statisticalReport/index.js
  5. 46 46
      src/views/contractManagement/salesContractAdd.vue
  6. 27 26
      src/views/contractManagement/salesContractEdit.vue
  7. 926 0
      src/views/platformaudit/driverAudit.vue
  8. 1617 0
      src/views/platformaudit/purchaseContractAdd.vue
  9. 1560 0
      src/views/platformaudit/purchaseContractEdit.vue
  10. 558 0
      src/views/platformaudit/purchaseContractExamine.vue
  11. 978 0
      src/views/platformaudit/salesContract.vue
  12. 1653 0
      src/views/platformaudit/salesContractAdd.vue
  13. 1602 0
      src/views/platformaudit/salesContractEdit.vue
  14. 733 0
      src/views/platformaudit/salesContractExamine.vue
  15. 19 41
      src/views/statisticalReport/stockPurchaseReceiptReportList.vue
  16. 2 2
      src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue
  17. 2 4
      src/views/warehouse/warehouseManagementNoWeightIn.vue
  18. 3 4
      src/views/warehouse/warehouseManagementNoWeightOut.vue
  19. 3 1
      src/views/warehouse/warehouseManagementRecord.vue
  20. 3 4
      src/views/warehouse/warehouseManagementTare.vue
  21. 467 0
      src/views/warehousenew/costmanagement.vue
  22. 704 0
      src/views/warehousenew/tranManagementWarehouseInOutTask.vue
  23. 397 0
      src/views/warehousenew/transformation.vue
  24. 1947 0
      src/views/warehousenew/warehouseManagementDelivery.vue
  25. 1099 0
      src/views/warehousenew/warehouseManagementEdit.vue
  26. 544 0
      src/views/warehousenew/warehouseManagementNoComplete.vue
  27. 652 0
      src/views/warehousenew/warehouseManagementNoWeight.vue
  28. 1935 0
      src/views/warehousenew/warehouseManagementNoWeightIn.vue
  29. 1657 0
      src/views/warehousenew/warehouseManagementNoWeightOut.vue
  30. 1556 0
      src/views/warehousenew/warehouseManagementPerfectDelivery.vue
  31. 1926 0
      src/views/warehousenew/warehouseManagementPerfectput.vue
  32. 2173 0
      src/views/warehousenew/warehouseManagementPut.vue
  33. 654 0
      src/views/warehousenew/warehouseManagementPutOut.vue
  34. 672 0
      src/views/warehousenew/warehouseManagementPutOutLook.vue
  35. 1167 0
      src/views/warehousenew/warehouseManagementRecord.vue
  36. 1936 0
      src/views/warehousenew/warehouseManagementTare.vue
  37. 775 0
      src/views/warehousenew/warehouselocation.vue
  38. 570 0
      src/views/warehousenew/weightedsubsidiary.vue

+ 8 - 8
public/static/weightCheckInOut.html

@@ -171,9 +171,7 @@
     new Vue({
       el: '#app',
       data: {
-        tableData: {
-          // qualityInspectionManagement:{}
-        },
+        tableData: {},
         name: "",
         bigContent: false,
         smallContent: false
@@ -205,10 +203,12 @@
         printSmall() {},
         printBig() {},
       },
-      mounted() {
-        console.log(this.getQueryVariable("tableData"))
-        let _data = decodeURIComponent(this.getQueryVariable("tableData"))
-        let _type = decodeURIComponent(this.getQueryVariable("type"))
+      mounted() {debugger
+        // console.log("sssss",this.getQueryVariable("tableData"))
+        // let _data = decodeURIComponent(this.getQueryVariable("tableData"))
+        // console.log("dfddd",_data)
+        let _data= JSON.parse(localStorage.getItem('ck_bd_printData'))            
+        let _type = this.getQueryVariable("type")
         if (_type == 2) {
           this.bigContent = true
           this.smallContent = false
@@ -217,7 +217,7 @@
           this.bigContent = false
         }
         console.log(_data,"sddsd")
-        this.tableData = JSON.parse(_data)
+        this.tableData = _data
         console.log(this.tableData)
         document.title = "粮食检斤单"
         window.print()

+ 7 - 5
public/static/weightCheckOut.html

@@ -219,9 +219,11 @@
         printBig() {},
       },
       mounted() {
-        console.log(decodeURIComponent(this.getQueryVariable("tableData")))
-        let _data = decodeURIComponent(this.getQueryVariable("tableData"))
-        let _type = decodeURIComponent(this.getQueryVariable("type"))
+        debugger
+        // console.log(decodeURIComponent(this.getQueryVariable("tableData")))
+        // let _data = decodeURIComponent(this.getQueryVariable("tableData"))
+        let _data= JSON.parse(localStorage.getItem('ck_bd_printData1'))            
+        let _type = this.getQueryVariable("type")
         if (_type == 2) {
           this.bigContent = true
           this.smallContent = false
@@ -230,10 +232,10 @@
           this.bigContent = false
         }
         console.log(_data, "sddsd")
-        this.tableData = JSON.parse(_data)
+        this.tableData = _data
         console.log(this.tableData)
         document.title = "粮食检斤单"
-        //window.print()
+        window.print()
         window.onafterprint = function(event) {
           window.history.back(-1)
         };

+ 1 - 2
src/api/V2/statisticalReport/index.js

@@ -81,8 +81,7 @@ export const API_POST_ADDDISORREMARKS = '/stockPurchaseReceiptReport/api/disAndR
 export const API_POST_EDITSETTLEMENTWEIGHT = '/stockPurchaseReceiptReport/api/edit'
 //现货采购入库合同
 export const API_GET_STOCK_PURCHASE_CONTRACTNO = '/stockPurchaseReceiptReport/selectContractNoList'
-//现货采购入库导出
-export const API_GET_STOCK_PURCHASE_EXPORT ='/stockPurchaseReceiptReport/export'
+
 
 //现货销售出库报表
 export const API_GET_STOCKSALECEIPT = '/stockSaleReceiptReport/selectSaleOrder'

+ 2 - 3
src/model/statisticalReport/index.js

@@ -48,8 +48,7 @@ import {
     API_GET_YUNSHUNUMBER,
     API_POST_YUNSHUSETPRICE,
     API_POST_EDIT_SETTLEMENTWEIGHT,
-    API_POST_INVOICELIST,
-    API_GET_STOCK_PURCHASE_EXPORT
+    API_POST_INVOICELIST
 } from '@/api/V2/statisticalReport'
 //期货采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -95,7 +94,7 @@ export const postopeninvoice = appRx.post(API_POST_OPENINVOICE, errorCatcher, er
 export const postbatchopeninvoice = appRx.post(API_POST_BATCHOPENINVOICE, errorCatcher, errorHandle, filter)
 
 
-export const export1 = appRx.post(API_GET_STOCK_PURCHASE_EXPORT)
+
 //期货销售出库报表
 export const salelist = appRx.get(API_GET_SALELIST, errorCatcher, errorHandle, filter)
 //期货销售出库出纳收款

+ 46 - 46
src/views/contractManagement/salesContractAdd.vue

@@ -15,7 +15,7 @@
         <div class="remark">
           <h3>基本信息</h3>
           <p style="color: #8890b1">
-            &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>”
+            &nbsp;&nbsp;注:基本信息均为必填项,“<span style="color:red">*</span>”
             标记的条目提交后不可修改。
           </p>
         </div>
@@ -1064,13 +1064,13 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
-          this.$message({
-            message: '请输入水分',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+        //   this.$message({
+        //     message: '请输入水分',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
           (this.deptBudgetList.contractGoodsInfo.waterContent &&
             String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf(
@@ -1098,13 +1098,13 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.impurity) {
-          this.$message({
-            message: '请输入杂质',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.impurity) {
+        //   this.$message({
+        //     message: '请输入杂质',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
           (this.deptBudgetList.contractGoodsInfo.impurity &&
             String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
@@ -1124,13 +1124,13 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
-          this.$message({
-            message: '请输入容重',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.bulkDensity) {
+        //   this.$message({
+        //     message: '请输入容重',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
           (this.deptBudgetList.contractGoodsInfo.bulkDensity &&
             String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
@@ -1151,15 +1151,15 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
-          this.$message({
-            message: '请输入霉变粒',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
+        //   this.$message({
+        //     message: '请输入霉变粒',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
-          !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+          this.deptBudgetList.contractGoodsInfo.mildewGrain ||
           (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
               '.'
             ) != -1 &&
@@ -1178,15 +1178,15 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
-          this.$message({
-            message: '请输入热损伤',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
+        //   this.$message({
+        //     message: '请输入热损伤',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
-          !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+          this.deptBudgetList.contractGoodsInfo.jiaorenli ||
           (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
             -1 &&
             String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
@@ -1204,15 +1204,15 @@
           })
           return
         }
-        if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
-          this.$message({
-            message: '请输入不完善粒',
-            type: 'warning',
-          })
-          return
-        }
+        // if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
+        //   this.$message({
+        //     message: '请输入不完善粒',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
         if (
-          !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+          this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
           (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
               '.'
             ) != -1 &&

+ 27 - 26
src/views/contractManagement/salesContractEdit.vue

@@ -560,32 +560,33 @@
           })
           .toPromise()
           .then((response) => {
-            var tmp = []
-            tmp[0] = TextToCode[response.sourceProvince].code
-            tmp[1] = TextToCode[response.sourceProvince][response.sourceCity].code
-            if (tmp[0] == 810000 || tmp[0] == 820000) {
-              tmp[2] = null
-            } else {
-              tmp[2] =
-                TextToCode[response.sourceProvince][response.sourceCity][
-                  response.sourceArea
-                ].code
-            }
-            this.selectedOptions = tmp
-            var tmp1 = []
-            tmp1[0] = TextToCode[response.deliveryProvince].code
-            tmp1[1] =
-              TextToCode[response.deliveryProvince][response.deliveryCity].code
-            if (tmp1[0] == 810000 || tmp1[0] == 820000) {
-              tmp1[2] = null
-            } else {
-              tmp1[2] =
-                TextToCode[response.deliveryProvince][response.deliveryCity][
-                  response.deliveryArea
-                ].code
-            }
-
-            this.selectedOptions1 = tmp1
+            this.newSelectedOptions = response.sourceProvince + "/" + response.sourceCity + "/" + response.sourceArea
+            this.newSelectedOptions1 = response.deliveryProvince + "/" + response.deliveryCity + "/" + response.deliveryArea
+             // var tmp = []
+            // tmp[0] = TextToCode[response.sourceProvince].code
+            // tmp[1] = TextToCode[response.sourceProvince][response.sourceCity].code
+            // if (tmp[0] == 810000 || tmp[0] == 820000) {
+            //   tmp[2] = null
+            // } else {
+            //   tmp[2] =
+            //     TextToCode[response.sourceProvince][response.sourceCity][
+            //       response.sourceArea
+            //     ].code
+            // }
+            // this.selectedOptions = tmp
+            // var tmp1 = []
+            // tmp1[0] = TextToCode[response.deliveryProvince].code
+            // tmp1[1] =
+            //   TextToCode[response.deliveryProvince][response.deliveryCity].code
+            // if (tmp1[0] == 810000 || tmp1[0] == 820000) {
+            //   tmp1[2] = null
+            // } else {
+            //   tmp1[2] =
+            //     TextToCode[response.deliveryProvince][response.deliveryCity][
+            //       response.deliveryArea
+            //     ].code
+            // }
+            // this.selectedOptions1 = tmp1
             this.deptBudgetList = response
             if (this.deptBudgetList.deliverType == 1) {
               this.deptBudgetList.deliverType1 = '我方送货'

+ 926 - 0
src/views/platformaudit/driverAudit.vue

@@ -0,0 +1,926 @@
+<!--采购合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="8">
+      <template slot="left">
+        <ws-button type="primary" @click="handleAdd()"
+        v-hasPermission="
+            `contractManagement.buyContract.buyContractInfo.add`
+          "
+          ><img
+            width="13"
+            height="13"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 2px;
+              left: -4px;
+            "
+            src="../../../public/img/header-add.png"
+            alt=""
+          />添加</ws-button
+        >
+        <ws-button
+          @click="exportlist()"
+          v-hasPermission="
+           `contractManagement.buyContract.buyContractInfo.view`
+          "
+          >导出</ws-button
+        >
+      </template>
+      <template slot="right">
+          <span style="width: 142px; display: inline-block;color: #8890B1;">状态:</span>
+        <ws-select
+          v-model="searchTypeText"
+          placeholder=""
+          class="typeselect"
+          @change="selecttaskType"
+          :value="searchType"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890B1;"
+          />
+        </ws-select>
+
+        <el-date-picker
+          v-model="value2"
+          type="daterange"
+          align="right"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions"
+        >
+        </el-date-picker>
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按照合同编号、买方名称、卖方名称进行查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class="findValue"
+        ></ws-input>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button
+          class="find"
+          type="primary"
+          @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table
+      class="wenzi"
+      :data="contractList.records"
+      style="width: 100%; margin-top: 10px"
+      height="780"
+    >
+      <el-table-column type="index" label="序号">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="contractNo" label="合同编号" width="80">
+      </el-table-column>
+      <el-table-column prop="goodsName" label="货名" width="80">
+      </el-table-column>
+      <el-table-column prop="grade" label="品级">
+        <template slot-scope="scope">
+          <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '等外'" class="substandard">{{
+            scope.row.grade
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="weight" label="重量(吨)"> </el-table-column>
+      <el-table-column prop="unitContractPrice" label="合同单价(元)">
+      </el-table-column>
+      <el-table-column prop="packingMethod" label="包装方式"> </el-table-column>
+      <el-table-column prop="buyer" label="买方"> </el-table-column>
+      <el-table-column prop="seller" label="卖方"> </el-table-column>
+      <el-table-column prop="imperfectGrain" label="已完成(吨)">
+        <template slot-scope="scope">
+          <span style="color: #5473e8; font-weight: 600">{{
+            scope.row.imperfectGrain
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="status" label="状态">
+        <template slot-scope="scope">
+          <el-popover
+            placement="left"
+            :width="285"
+            trigger="click"
+            visible-arrow="false"
+            @show="history(scope.row)"
+          >
+            <template>
+              <span slot="reference">
+                <span
+                  v-if="scope.row.status == '待执行'"
+                  class="executory"
+                ></span>
+                <span
+                  v-if="scope.row.status == '执行中'"
+                  class="inExecution"
+                ></span>
+                <span v-if="scope.row.status == '已完成'" class="done"></span
+                >{{ scope.row.status }}
+              </span>
+            </template>
+            <div>
+              <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+              <div v-for="(item, index) in historyList" :key='index' class="flex">
+                <div class="vertical-text vertical-text-left">
+                  {{ item.updateDate }}
+                </div>
+                <div>
+                  <div class="vertical-circle"></div>
+                  <div
+                    v-if="index != historyList.length - 1"
+                    class="vertical-line"
+                  ></div>
+                </div>
+                <div class="vertical-text">
+                  {{ item.operateUser }}<br />{{ item.dealMsg }}
+                </div>
+              </div>
+            </div>
+          </el-popover>
+          <img
+            width="17"
+            height="18"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/edit.png"
+            @click="editClick(scope.row)"
+            alt=""
+          />
+          <!-- <i class="el-icon-edit" @click="editClick(scope.row)"></i> -->
+        </template>
+      </el-table-column>
+      <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
+      <el-table-column prop="mildewGrain" label="已付款(元)">
+      </el-table-column>
+      <el-table-column prop="addressUrl" label="附件">
+        <template slot-scope="scope">
+          <img
+            width="18"
+            height="20"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png"
+            @click="fujian(scope.row)"
+            alt=""
+          />
+          <span v-if="scope.row.addressUrlArray.length > 0">{{
+            scope.row.addressUrlArray.length
+          }}</span>
+          <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
+        </template>
+      </el-table-column>
+      <el-table-column prop="address" label="操作" width="200">
+        <template slot-scope="scope">
+          <img
+            width="16"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/chakan.png"
+            @click="handleExamine(scope.row)"
+            v-hasPermission="
+           `contractManagement.buyContract.buyContractInfo.view`
+          "
+            alt=""
+          />
+          <img
+            width="17"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/bianji.png"
+            @click="handleEdit(scope.row)"
+            v-hasPermission="
+           `contractManagement.buyContract.buyContractInfo.edit`
+          "
+            alt=""
+          />
+          <img
+            width="16"
+            height="17"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: -1px;
+              margin: 0 6px;
+            "
+            src="../../../public/img/shanchu.png"
+            v-hasPermission="
+           `contractManagement.buyContract.buyContractInfo.delete`
+          "
+            @click="handleDelete(scope.row)"
+            alt=""
+          />
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="deptCircularPage.pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    >
+    </el-pagination>
+    <!-- 附件弹框 -->
+    <WinseaContentModal
+      v-model="accessoryTFs"
+      :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose"
+    >
+      <p>查看附件</p>
+      <ws-upload
+        ref="upload"
+        table-name="maintain_work_order"
+        oss-key="mainPlan"
+        :comp-id="compId"
+        :appendix-ids="appendixIdsAdd"
+        :vesselId="deptBudgetList.addressUrl"
+        :size-limit="size"
+        @uploadSuccess="uploadSuccess"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+      />
+    </WinseaContentModal>
+  </div>
+</template>
+<script>
+import {
+  getList,
+  export1,
+  editstatus,
+  billoperatehis,
+  deletecontract,
+} from '@/model/contarct/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs,  EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      size: 10,
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      deliver_type: 1,
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      appendixIdsAdd: '',
+      searchType: 1,
+      searchTypeText: '未完成',
+      searchKeyWord: '',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      // 提交类型
+      submitType: true,
+      deptCircularPage: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {},
+      historyList: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+      taskTypeList: [
+        { value: '未完成', type: 1 },
+        { value: '已完成', type: 2 },
+        { value: '全部合同', type: '' },
+      ],
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: '本周',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              var thisDay = start.getDay()
+              var thisDate = start.getDate()
+              if (thisDay != 0) {
+                start.setDate(thisDate - thisDay)
+              }
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本月',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setDate(1)
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本季度',
+            onClick(picker) {
+              var oDate = new Date()
+
+              var thisYear = oDate.getFullYear()
+              var thisMonth = oDate.getMonth() + 1
+
+              var n = Math.ceil(thisMonth / 3) // 季度
+
+              var Month = n * 3 - 1
+
+              var start = new Date(thisYear, Month - 2, 1)
+              var end = new Date()
+
+              picker.$emit('pick', [start, end])
+            },
+          },
+        ],
+      },
+      value1: '',
+      value2: '',
+    }
+  },
+  activated() {
+    console.log(this.$permission('PERMISSIONS.BUYCONTRACTINFO_ADD'))
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'Y+': date.getFullYear().toString(), // 年
+        'm+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        // "M+": date.getMinutes().toString(),         // 分
+        // "S+": date.getSeconds().toString()          // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
+
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      getList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        contractType: this.contractType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        startDate: this.startDate,
+        endDate: this.endDate,
+        contrPage: this.contrPage,
+      })
+        .toPromise()
+        .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            if (response.records[i].addressUrl != null) {
+              response.records[i].addressUrlArray =
+                response.records[i].addressUrl.split(',')
+            } else {
+              response.records[i].addressUrlArray = []
+            }
+          }
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
+          this.contractList = response
+        })
+    },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
+    },
+    editClick(row) {
+      var status = ''
+      if (row.status == '待执行' || row.status == '已完成') {
+        status = '执行中'
+      } else if (row.status == '执行中') {
+        status = '已完成'
+      }
+      this.$confirm(`是否将状态改为${status}`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editstatus({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.addressUrl === null ||
+        row.addressUrl === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.addressUrlArray
+    },
+    handleExamine(row) {
+      console.log(row)
+      this.$router.push({
+        name: 'purchaseContractExamine',
+        query: { id: row.id, status: row.status },
+      })
+    },
+    handleAdd() {
+      this.$router.push({ path: 'purchaseContractAdd' })
+    },
+    handleEdit(row) {
+      this.$router.push({
+        name: 'purchaseContractEdit',
+        query: { id: row.id },
+      })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      if (this.value2) {
+        this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
+        this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
+      } else {
+        this.startDate = ''
+        this.endDate = ''
+      }
+      this.currentPage = 1
+      this.getList()
+    },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
+    // deletecontract(){},
+    //删除
+    handleDelete(row) {
+      var text = ''
+      if (row.deliverType == 1) {
+        text =
+          '删除该合同将同时永久删除合同对应的临时仓库相关数据,是否确定删除?'
+      } else {
+        text = '合同删除后不可恢复,是否继续删除?'
+      }
+      this.$confirm(text, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          deletecontract({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {})
+        })
+        .catch(() => {
+          return false
+        })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.flex {
+  display: flex;
+}
+.el-range-editor.el-input__inner {
+  margin-left: 10px;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: -10px;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  border: 1px solid #5473e8;
+  color: #5473e8;
+}
+.warning {
+  width: 100%;
+  height: 2px;
+  background: red;
+}
+.executory,
+.inExecution,
+.done {
+  width: 6px;
+  height: 6px;
+  display: inline-block;
+  border-radius: 50%;
+  position: relative;
+  top: -1px;
+}
+.executory {
+  background: #ff9f24;
+}
+.inExecution {
+  background: #5878e8;
+}
+.done {
+  background: #50cad4;
+}
+.top-grade {
+  background: linear-gradient(90deg, #5678e9, #7993f6);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.second-class {
+  background: linear-gradient(90deg, #50cdd9, #82e2ea);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.third-class {
+  background: linear-gradient(90deg, #ffa735, #ffbf70);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.substandard {
+  background: linear-gradient(90deg, #b2b4bb, #ced0d5);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.wrap {
+  width: 400px;
+  position: absolute;
+  top: 131px;
+  left: 794px;
+  transform-origin: right center;
+  z-index: 2005;
+}
+.vertical-line {
+  height: 100px;
+  border-left: 2px solid #e9ecf7;
+  margin-left: 4px;
+  padding: 0 3px;
+  // border-image: -webkit-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: -moz-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: linear-gradient(#00eba7, #08b8e6) 30 30;
+}
+.el-pagination {
+  padding: 10px 15px;
+  margin-bottom: 0;
+  text-align: center;
+}
+/deep/.el-pager li.active {
+  color: #5878e8;
+  cursor: default;
+}
+/deep/.el-pager li:hover {
+  color: #5878e8;
+  cursor: default;
+}
+.vertical-circle {
+  width: 10px;
+  height: 10px;
+  border: 2px solid #5878e8;
+  background-color: #ffffff;
+  -webkit-border-radius: 100px;
+}
+.vertical-circle:first-child {
+  color: red;
+}
+.vertical-text {
+  margin: 0 10px;
+  color: #8890b1;
+  font-size: 12px;
+  margin-top: -4px;
+}
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  text-align: center;
+}
+.typeselect {
+  width: 500px;
+}
+.padding-xs {
+  padding: 15px;
+  text-align: right;
+}
+.clearfix:after {
+  content: '';
+  display: block;
+  clear: both;
+}
+.el-table {
+  font-size: 16px;
+}
+.taskType {
+  width: 100%;
+  background-color: #fff;
+  margin-top: 2px;
+  margin-bottom: 10px;
+  list-style: none;
+  // padding-bottom: 20px;
+  li {
+    float: left;
+    border: 1px solid #6ea0f3;
+    border-radius: 5px;
+    max-width: 190px;
+    padding: 0 5px;
+    text-align: center;
+    margin: 10px 20px;
+    cursor: pointer;
+    font-size: 14px;
+    p {
+      margin: 8px 0px;
+      span {
+        color: #e74c3c;
+      }
+    }
+  }
+  li:hover {
+    background-color: #e4eeff;
+    color: #1d6ced;
+  }
+}
+.el-date-editor--date {
+  margin: 0 10px;
+}
+.findValue {
+  margin: 0 10px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+/deep/.typeselect .el-input__inner{
+   color: #8890B1;
+}
+</style>

+ 1617 - 0
src/views/platformaudit/purchaseContractAdd.vue

@@ -0,0 +1,1617 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">创建采购合同</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <ws-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList">
+      <div class="remark">
+        <h3>基本信息</h3>
+        <p style="color: #8890b1">
+          注:基本信息和货物信息均为必填项,“*” 标记的条目提交后不可修改。
+        </p>
+      </div>
+      <ws-info-table>
+        <!--合同编号-->
+        <ws-form-item
+          label="合同编号"
+          span="1"
+          prop="contractNo"
+          class="readonly"
+          required
+        >
+          <ws-input
+            v-model="deptBudgetList.contractNo"
+            placeholder="请输入合同编号"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--运输方式-->
+        <ws-form-item label="运输方式" span="1" prop="shippingType">
+          <ws-input
+            v-model="deptBudgetList.shippingType"
+            placeholder="请输入运输方式"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--买方-->
+        <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
+          <ws-input
+            v-model="deptBudgetList.buyer"
+            placeholder="请输入买方名称"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--结算方式-->
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod">
+          <ws-input
+            v-model="deptBudgetList.settlementMethod"
+            placeholder="请输入结算方式"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--卖方-->
+        <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
+          <ws-input
+            v-model="deptBudgetList.seller"
+            placeholder="请输入卖方名称"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="交货方式" span="1" prop="seller" class="readonly">
+          <el-radio v-model="deptBudgetList.deliverType" label="1"
+            >我方自提</el-radio
+          >
+          <el-radio v-model="deptBudgetList.deliverType" label="2"
+            >对方送货</el-radio
+          >
+        </ws-form-item>
+        <!--买方电话-->
+        <ws-form-item label="买方电话" span="1" prop="contractNo">
+          <ws-input
+            v-model.number="deptBudgetList.buyerPhone"
+            placeholder="请输入买方电话"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--包装方式-->
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
+          <ws-select
+            v-model="deptBudgetList.packingMethod"
+            placeholder=""
+            class="typeselect"
+            :value="value1"
+            @change="selectpackingMethod"
+          >
+            <ws-option
+              v-for="item in packtypeList"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
+            />
+          </ws-select>
+        </ws-form-item>
+        <!--卖方电话-->
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          <ws-input
+            v-model="deptBudgetList.sellerPhone"
+            placeholder="请输入卖方电话"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--验收方式-->
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          <el-select
+            v-model="deptBudgetList.acceptanceMethod"
+            placeholder="请选择验收方式"
+            style="width: 100%"
+            filterable
+            @change="selectunitList"
+          >
+            <el-option
+              v-for="(item, index) in unitList"
+              :key="item.constValue"
+              :label="item.constValue"
+              :value="item.constValue"
+            >
+              <span class="unit-left" style="float: left">
+                <span v-if="item.flag == 'delete'"> {{ item.constValue }}</span>
+                <!-- 新增文本框 -->
+                <div
+                  style="width: 160px"
+                  v-if="item.flag !== 'delete'"
+                  @click.stop
+                >
+                  <ws-input
+                    v-model="item.constValue"
+                    clearable
+                    maxlength="10"
+                    style="width: 100%"
+                  ></ws-input>
+                </div>
+              </span>
+              <span style="float: right; color: #8492a6; font-size: 13px">
+                <!-- 对号 -->
+                <i
+                  class="el-icon-check"
+                  style="line-height: 29px; margin-left: 10px"
+                  v-if="item.flag !== 'delete'"
+                  @click.stop="saveClick(item, index)"
+                ></i>
+                <!-- 编辑 -->
+                <i
+                  class="el-icon-edit"
+                  style="line-height: 29px; margin-left: 10px"
+                  v-if="item.flag == 'delete'"
+                  @click.stop="editClick(item, index)"
+                ></i>
+                <!-- 删除 -->
+                <i
+                  class="el-icon-delete"
+                  style="line-height: 29px"
+                  @click.stop="deleteClick(item, index)"
+                ></i>
+              </span>
+            </el-option>
+            <!-- 新增按钮 -->
+            <el-option value="" label="">
+              <div
+                style="
+                  text-align: right;
+                  border-top: 1px solid #dcdfe6;
+                  padding: 5px;
+                "
+              >
+                <ws-button type="primary" @click.stop="addClick">{{
+                  $t('button.add')
+                }}</ws-button>
+              </div>
+            </el-option>
+          </el-select>
+        </ws-form-item>
+        <!--重量(吨)-->
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          <ws-input
+            @input="weightchange"
+            v-model="deptBudgetList.weight"
+            placeholder="请输入重量(吨)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--交货日期(起)-->
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          <ws-date-picker
+            v-model="deptBudgetList.deliveryDateStart"
+            type="date"
+            placeholder="请选择交货日期(起)"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
+        <!--溢短装(%)-->
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          <ws-input
+            v-model="deptBudgetList.overShort"
+            placeholder="请输入溢短装比例(%)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--交货日期(止)-->
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          <ws-date-picker
+            v-model="deptBudgetList.deliveryDateEnd"
+            type="date"
+            placeholder="请选择交货日期(止)"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
+        <!--合同单价(元/吨)-->
+        <ws-form-item
+          class="readonly"
+          label="合同单价(元/吨)"
+          span="1"
+          prop="unitContractPrice"
+        >
+          <ws-input
+            v-model="deptBudgetList.unitContractPrice"
+            placeholder="请输入合同单价"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--合同总价-->
+        <ws-form-item label="合同总价" span="1" prop="totalContractPrice">
+          <ws-input
+            v-model="deptBudgetList.totalContractPrice"
+            placeholder="请输入合同总价"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="货源所在地区" span="1" prop="sourceGoods">
+          <el-cascader
+            :options="options_"
+            v-model="selectedOptions"
+            clearable
+            size="large"
+            placeholder="请选择货源所在地区"
+            style="width: 200%"
+            @change="handleChange"
+          />
+        </ws-form-item>
+        <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+          <ws-input
+            v-model="deptBudgetList.sourceGoods"
+            placeholder="请输入货源详细地址"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item label="交货所在地区" span="1" prop="sourceGoods">
+          <el-cascader
+            :options="options_"
+            v-model="selectedOptions1"
+            clearable
+            size="large"
+            placeholder="请选择交货所在地区"
+            style="width: 200%"
+            @change="handleChange1"
+          />
+        </ws-form-item>
+        <ws-form-item label="交货详细地址" span="1" prop="placeDelivery">
+          <ws-input
+            v-model="deptBudgetList.placeDelivery"
+            placeholder="请输入交货详细地址"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--签订日期-->
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          <ws-date-picker
+            v-model="deptBudgetList.signingDate"
+            type="date"
+            placeholder="请选择合同签订日期"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
+        <ws-form-item
+          label="最终实际成交量(吨)"
+          span="1"
+          prop="finalTradingVolume"
+        >
+          <ws-input
+            v-model="deptBudgetList.finalTradingVolume"
+            placeholder="请输入最终实际成交量"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <ws-form-item
+          v-show="deptBudgetList.deliverType == 1"
+          label="临时仓库负责人"
+          span="1"
+          prop="packingMethod"
+        >
+          <el-select
+            v-model="deptBudgetList.personCharge"
+            placeholder="请选择临时仓库负责人"
+            filterable
+            :filter-method="dataFilter"
+            @change="selectstaff"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
+            />
+          </el-select>
+        </ws-form-item>
+      </ws-info-table>
+      <div class="wenzi">
+        <h3>货物信息</h3>
+      </div>
+      <!--货物信息-->
+
+      <ws-info-table>
+        <!--货名-->
+        <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
+          <ws-select
+            v-model="deptBudgetList.contractGoodsInfo.goodsName"
+            placeholder=""
+            class="typeselect"
+            @change="selectgoodsName"
+          >
+            <ws-option
+              v-for="item in goodnameList"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
+            />
+          </ws-select>
+        </ws-form-item>
+
+        <!--水分(%)<=-->
+        <ws-form-item label="水分(%)" span="1" prop="waterContent">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.waterContent"
+            placeholder="请输入水分占比"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--品级-->
+        <ws-form-item label="品级" span="1" prop="grade">
+          <ws-select
+            v-model="deptBudgetList.contractGoodsInfo.grade"
+            placeholder=""
+            class="typeselect"
+            @change="selectgrade"
+          >
+            <ws-option
+              v-for="item in gradeList"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
+            />
+          </ws-select>
+        </ws-form-item>
+
+        <!--杂质(%)<=-->
+        <ws-form-item label="杂质(%)" span="1" prop="impurity">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.impurity"
+            placeholder="请输入杂质占比(%)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--容量(克/升)>=-->
+        <ws-form-item label="容量(克/升)" span="1" prop="bulkDensity">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
+            placeholder="请输入容重"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--霉变粒(%)<=-->
+        <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
+            placeholder="请输入霉变粒占比(%)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--热损伤(%)<=-->
+        <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
+            placeholder="请输入输入热损伤占比(%)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--不完整粒(%)<=-->
+        <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
+          <ws-input
+            v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
+            placeholder="请输入不完整粒占比(%)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+      </ws-info-table>
+
+      <div class="wenzi">
+        <h3>流程信息</h3>
+      </div>
+      <!--流程信息-->
+
+      <ws-info-table>
+        <!--已付款(元)-->
+        <ws-form-item label="已付款(元)" span="1" prop="goodsNameKey">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
+            placeholder="请输入已付款(元)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--已开发票(元)-->
+        <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.goodsName"
+            placeholder="请输入已开发票(元)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--费用支出(元)-->
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.waterContent"
+            placeholder="请输入费用支出(元)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--未开发票(元)-->
+        <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.impurity"
+            placeholder="请输入未开发票(元)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--双章原件回收情况-->
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+          <ws-select
+            v-model="deptBudgetList.contractProcessInfo.grade"
+            placeholder=""
+            class="typeselect"
+            @change="selectChapterTwo"
+          >
+            <ws-option
+              v-for="item in ChapterTwoList"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
+            />
+          </ws-select>
+        </ws-form-item>
+        <!--已完成发货量(吨)-->
+        <ws-form-item label="已完成发货量(吨)" span="1" prop="imperfectGrain">
+          <ws-input
+            v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
+            placeholder="请输入已完成发货量(吨)"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+      </ws-info-table>
+
+      <div class="wenzi">
+        <h3>备注信息</h3>
+      </div>
+      <!--备注信息-->
+      <ws-input
+        v-model="deptBudgetList.remarks"
+        type="textarea"
+        row="3"
+        placeholder="请输入备注信息,不超过200字"
+        maxlength="200"
+      />
+      <ws-upload
+        ref="upload"
+        table-name="maintain_work_order"
+        oss-key="mainPlan"
+        :comp-id="compId"
+        :appendix-ids="appendixIdsAdd"
+        :vesselId="deptBudgetList.addressUrl"
+        :size-limit="size"
+        @uploadSuccess="uploadSuccess"
+        @onChange="onChange"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+      />
+    </ws-form>
+    <div style="text-align: right; padding: 10px" class="center">
+      <el-button
+        class="bg-bottom"
+        type="primary"
+        size="small"
+        @click="submit(deptBudgetList)"
+        >提交</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+//  import { getVesselOne } from '@/model/procurement/basic'
+//  import { dayjs } from 'base-core-lib'
+import {
+  packList,
+  addList,
+  xiala,
+  addxiala,
+  editxiala,
+  delxiala,
+  getstaff,
+} from '@/model/contarct/index'
+import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import WsUpload from '@/components/WsUpload'
+
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+  },
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      options_: regionData,
+      selectedOptions: [],
+      selectedOptions1: [],
+      // 提交类型
+      submitType: true,
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+
+      packtypeList: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      rules: {
+        // contractNo: [
+        //   { required: true, message: '请输入合同编号', trigger: 'blur' },
+        //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' },
+        // ],
+      },
+      options: [],
+      staffList: [],
+      appendixIdsAdd: '',
+      size: 10,
+      // uploadSuccess: {},
+      // onChange:{},
+      unitList: [],
+      goodnameList: [],
+      value1: '袋装',
+      value2: '未回收',
+      gradeList: [],
+      ChapterTwoList: [],
+
+      deptBudgetList: {
+        deliverType: '1',
+        finalTradingVolume: 0,
+        contractGoodsInfo: {
+          goodsName: '',
+        },
+        contractProcessInfo: {},
+      },
+      acceptanceCheck: {},
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      // selectpackingMethod: {},
+      // selectgrade: {},
+      // selectunitList: {},
+      // selectDuty: {},
+      // isEdited: false,
+      // registered: {},
+      // selectCrtDuty: {},
+      // dutyList: {},
+      // sexList: {},
+      ruleDeptBudget: {
+        contractNo: [
+          { required: true, message: '请输入活动名称', trigger: 'blur' },
+          {
+            min: 6,
+            max: 20,
+            message: '长度在 6 到 20 个字符',
+            trigger: 'blur',
+          },
+        ],
+      },
+      selectIntendedShip: {},
+      interviewTypeList: {},
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.deptBudgetList.packingMethod = '散装'
+    this.deptBudgetList.packingMethodKey = 1
+    this.deptBudgetList.contractGoodsInfo.goodsName = '玉米'
+    this.deptBudgetList.contractGoodsInfo.goodsNameKey = 1
+    this.deptBudgetList.contractProcessInfo.grade = '未回收'
+    this.deptBudgetList.contractProcessInfo.gradeKey = 1
+    this.deptBudgetList.contractGoodsInfo.grade = '一等品'
+    this.deptBudgetList.contractGoodsInfo.gradeKey = 1
+    getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
+      .toPromise()
+      .then((response) => {
+        this.options = response
+        this.staffList = response
+      })
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  methods: {
+    dataFilter(val) {
+      this.deptBudgetList.personCharge = val
+      if (val) {
+        //val存在
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options = this.staffList
+      }
+    },
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
+          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+        }
+      }
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    handleChange(value) {
+      this.selectedOptions = value
+    },
+    handleChange1(value) {
+      this.selectedOptions1 = value
+    },
+    weightchange(e) {
+      this.deptBudgetList.finalTradingVolume = e
+    },
+    returnsales() {
+      this.$router.push({ path: 'buyContract' })
+    },
+    loaddata() {
+      // 包装方式
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 双章
+      packList({ constId: 'CON4' })
+        .toPromise()
+        .then((response) => {
+          this.ChapterTwoList = response
+        })
+    },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
+    },
+    onChange(files) {
+      this.fileNum = files
+      this.$refs.upload.handleSaveBill().then((res) => {
+        console.log(files)
+      })
+    },
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
+
+    submit() {
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
+          message: '请输入合同编号',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.shippingType) {
+        this.$message({
+          message: '请输入运输方式!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.shippingType.length < 1 ||
+        this.deptBudgetList.shippingType.length > 20
+      ) {
+        this.$message({
+          message: '运输方式长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyer) {
+        this.$message({
+          message: '请输入买方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.buyer.length > 30) {
+        this.$message({
+          message: '买方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.seller) {
+        this.$message({
+          message: '请输入卖方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.seller.length > 30) {
+        this.$message({
+          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyerPhone) {
+        this.$message({
+          message: '请输入买方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.buyerPhone)) {
+        this.$message({
+          message: '输入买方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '买方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.sellerPhone) {
+        this.$message({
+          message: '请输入卖方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.sellerPhone)) {
+        this.$message({
+          message: '输入卖方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.settlementMethod) {
+        this.$message({
+          message: '请输入结算方式!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (!this.deptBudgetList.sourceGoods) {
+        this.$message({
+          message: '请输入货源详细地址!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货详细地址!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.selectedOptions.length == 0) {
+        this.$message({
+          message: '请选择货源所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.selectedOptions1.length == 0) {
+        this.$message({
+          message: '请选择交货所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.weight) {
+        this.$message({
+          message: '请输入重量!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (
+        isNaN(this.deptBudgetList.weight) ||
+        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.weight < 0 ||
+        this.deptBudgetList.weight > 200000
+      ) {
+        this.$message({
+          message: '输入重量有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.overShort &&
+        isNaN(this.deptBudgetList.overShort)
+      ) {
+        this.$message({
+          message: '溢短装输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.unitContractPrice &&
+        isNaN(this.deptBudgetList.unitContractPrice)
+      ) {
+        this.$message({
+          message: '合同单价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.totalContractPrice &&
+        isNaN(this.deptBudgetList.totalContractPrice)
+      ) {
+        this.$message({
+          message: '合同总价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateStart) {
+        this.$message({
+          message: '请选择交货日期(起)',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateEnd) {
+        this.$message({
+          message: '请选择交货日期(止)',
+          type: 'warning',
+        })
+        return
+      }
+      //时间
+      if (
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+      ) {
+        this.$message({
+          message: '交货日期(止)选择错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.signingDate) {
+        this.$message({
+          message: '请选择签订日期',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+        this.$message({
+          message: '请选择货名',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+        this.$message({
+          message: '请选择水分',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.grade) {
+        this.$message({
+          message: '请选择品级',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.impurity ||
+        (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
+          -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '杂质输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
+        (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '容重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+        (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
+            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '霉变粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+        (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
+          -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
+            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '热损伤输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+        (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
+            (String(
+              this.deptBudgetList.contractGoodsInfo.imperfectGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '不完整粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000 ||
+        this.deptBudgetList.contractProcessInfo.goodsNameKey < 0 ||
+        (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.goodsNameKey
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '合同收入金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractProcessInfo.waterContent > 10000000 ||
+        this.deptBudgetList.contractProcessInfo.waterContent < 0 ||
+        (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.waterContent).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.waterContent
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '费用金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractProcessInfo.goodsName > 1000000000 ||
+        this.deptBudgetList.contractProcessInfo.goodsName < 0 ||
+        (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.goodsName).length -
+            (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '已开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractProcessInfo.impurity > 1000000000 ||
+        this.deptBudgetList.contractProcessInfo.impurity < 0 ||
+        (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.impurity).length -
+            (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '未开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000 ||
+        this.deptBudgetList.contractProcessInfo.imperfectGrain < 0 ||
+        (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
+            .length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.imperfectGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '已完成发运量输入错误',
+          type: 'warning',
+        })
+        return
+      }
+
+      var that = this
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          this.deptBudgetList.sourceProvince = CodeToText[this.selectedOptions[0]]
+          this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]     
+          this.deptBudgetList.deliveryProvince = CodeToText[this.selectedOptions1[0]]
+          this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions1[1]]
+          this.deptBudgetList.compId = this.compId
+          this.deptBudgetList.contractType = 2
+            if(this.deptBudgetList.deliveryProvince =="澳门特别行政区" || this.deptBudgetList.deliveryProvince == "澳门特别行政区"){
+            this.deptBudgetList.deliveryArea = "特别行政区"
+          }else{ 
+             this.deptBudgetList.deliveryArea = CodeToText[this.selectedOptions1[2]]
+          }
+             if(this.deptBudgetList.sourceProvince =="澳门特别行政区" || this.deptBudgetList.sourceProvince == "澳门特别行政区"){
+            this.deptBudgetList.sourceArea = "特别行政区"
+          }else{
+             this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
+          }
+
+          addList(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('添加成功')
+              this.deptBudgetList = {
+                deliverType: '1',
+                finalTradingVolume: 0,
+                contractGoodsInfo: {
+                  goodsName: '',
+                },
+                contractProcessInfo: {},
+              }
+              this.$router.push({ path: 'buyContract' })
+            })
+            .catch((req) => {
+              EventBus.$emit('error', req.message)
+            })
+        } else {
+          // for (let key in that.rules) {
+          //   EventBus.$emit('error', that.rules[key][0].message)
+          //   return false
+          // }
+          return false
+        }
+      })
+    },
+    resetForm(deptBudgetList) {
+      this.$refs[deptBudgetList].resetFields()
+    },
+    addClick() {
+      // let [flag, constValue, constKey] = ['check', '', '']
+      // let obj = { flag, constValue, constKey }
+      // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
+      // let result = this.unitList.filter((item, val, arr) => {
+      //   return item.id != '1'
+      // })
+      // result.push(obj)
+      // result.push(objAdd)
+      // this.unitList = result
+      this.unitList.push({
+        flag: 'add',
+        constValue: '',
+        constKey: '',
+      })
+    },
+    saveClick(item, index) {
+      console.log(item)
+
+      if (Object.is(item.id, 1)) {
+        return
+      }
+      if (Object.is(this.unitList[index].flag, 'delete')) {
+        this.$set(this.unitList, index, { flag: 'check' })
+      } else {
+        this.$set(this.unitList, index, { flag: 'delete' })
+      }
+      if (!item.constValue) {
+        this.unitList.splice(index, 1)
+        return
+      }
+      if (item.flag == 'add') {
+        item.constKey = Math.random() * 20
+        this.acceptanceCheck.compId = this.compId
+        this.acceptanceCheck.constKey = item.constKey
+        this.acceptanceCheck.constCode = 'TYPEYAN'
+        this.acceptanceCheck.constValue = item.constValue
+        this.acceptanceCheck.id = item.id
+        addxiala(this.acceptanceCheck)
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+          })
+      } else if (item.flag == 'check') {
+        this.acceptanceCheck.compId = this.compId
+        this.acceptanceCheck.constKey = item.constKey
+        this.acceptanceCheck.constCode = 'TYPEYAN'
+        this.acceptanceCheck.constValue = item.constValue
+        this.acceptanceCheck.id = item.id
+        editxiala(this.acceptanceCheck)
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+          })
+      }
+    },
+    // selectContract(val) {
+    //   let key = this.unitList.find((item) => item.constValue === val).constKey
+    //   this.pleaseChoose = val
+    // },
+
+    handleExamine() {},
+    approve() {},
+    // returnsales() {
+    //   this.$router.push({ path: 'purchaseContract' })
+    // },
+    selectChapterTwo(e) {
+      for (var i = 0; i < this.ChapterTwoList.length; i++) {
+        if (this.ChapterTwoList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+        }
+      }
+    },
+    selectunitList(e) {
+      for (var i = 0; i < this.unitList.length; i++) {
+        if (this.unitList[i].constValue == e) {
+          this.deptBudgetList.acceptanceMethodKey = this.unitList[i].constKey
+        }
+      }
+    },
+    selectgrade(e) {
+      for (var i = 0; i < this.gradeList.length; i++) {
+        if (this.gradeList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.gradeList[i].constKey
+        }
+      }
+    },
+    selectgoodsName(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    // 编辑
+    editClick(item, index) {
+      const map = JSON.parse(JSON.stringify(item))
+      if (Object.is(item.id, 1)) {
+        return
+      }
+      if (Object.is(this.unitList[index].flag, 'delete')) {
+        map.flag = 'check'
+        this.$set(this.unitList, index, map)
+      } else {
+        map.flag = 'delete'
+        this.$set(this.unitList, index, map)
+      }
+    },
+    // 删除
+    deleteClick(item, index) {
+      if (Object.is(item.constKey, 1)) {
+        return
+      }
+      if (!item.constValue) {
+        this.unitList.splice(index, 1)
+        return
+      }
+      delxiala({ id: this.unitList[index].id })
+        .toPromise()
+        .then((response) => {
+          this.getUnitList()
+          this.pleaseChoose = ''
+        })
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.el-form {
+  padding: 0 15%;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.readonly {
+  position: relative;
+}
+.readonly:after {
+  content: '*';
+  color: #ff2727;
+  position: absolute;
+  right: 8px;
+  z-index: 10;
+  top: 21%;
+  font-size: 20px;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid #cdd2dc;
+  background: #fafbfc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+  background: #f0f2f6;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 15px 0px;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 10px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 70%;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+.ce {
+  width: 900px;
+  margin: 0 auto;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+/deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+  width: 130px;
+}
+.el-textarea{
+  width: 101%;
+}
+</style>

+ 1560 - 0
src/views/platformaudit/purchaseContractEdit.vue

@@ -0,0 +1,1560 @@
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">修改合同信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />
+          返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div class="remark">
+        <h3>基本信息</h3>
+        <p style="color: #8890b1">
+          &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
+          标记的条目提交后不可修改。
+        </p>
+      </div>
+      <ws-info-table>
+        <!-- 合同编号 -->
+        <ws-form-item
+          class="readonly"
+          label="合同编号"
+          span="1"
+          prop="contractNo"
+        >
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+
+        <!-- 运输方式 -->
+        <ws-form-item label="运输方式" span="1" prop="shippingType">
+          <ws-input
+            v-model="deptBudgetList.shippingType"
+            maxlength="100"
+            placeholder="请输入运输方式"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!-- 买方 -->
+        <ws-form-item class="readonly" label="买方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        <!-- 交货方式 -->
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod">
+          <ws-input
+            v-model="deptBudgetList.settlementMethod"
+            maxlength="100"
+            placeholder="请输入结算方式"
+            size="small"
+          />
+        </ws-form-item>
+        <!-- 卖方 -->
+        <ws-form-item class="readonly" label="卖方" span="1" prop="seller"
+          >{{ deptBudgetList.seller }}
+        </ws-form-item>
+
+        <ws-form-item
+          class="readonly"
+          label="交货方式"
+          span="1"
+          prop="sourceGoods"
+        >
+          {{ deptBudgetList.deliverType1 }}
+        </ws-form-item>
+        <!-- 买方电话 -->
+        <ws-form-item label="买方电话" span="1" prop="buyerPhone">
+          <ws-input
+            v-model="deptBudgetList.buyerPhone"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!-- 包装方式 -->
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
+          <ws-select
+            v-model="deptBudgetList.packingMethod"
+            placeholder=""
+            class="typeselect"
+            @change="selectpackingMethod"
+          >
+            <ws-option
+              v-for="item in packtypeList"
+              :key="item.constKey"
+              :label="item.constValue"
+              :value="item.constValue"
+            />
+          </ws-select>
+        </ws-form-item>
+        <!-- 卖方电话 -->
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          <ws-input
+            v-model="deptBudgetList.sellerPhone"
+            maxlength="100"
+            size="small"
+            placeholder="请输入卖方电话"
+          />
+        </ws-form-item>
+        <!-- 验收方式 -->
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          <el-select
+            v-model="deptBudgetList.acceptanceMethod"
+            placeholder="请选择验收方式"
+            style="width: 100%"
+            filterable
+            @change="selectunitList"
+          >
+            <el-option
+              v-for="(item, index) in unitList"
+              :key="item.constValue"
+              :label="item.constValue"
+              :value="item.constValue"
+            >
+              <span class="unit-left" style="float: left">
+                <span v-if="item.flag == 'delete'"> {{ item.constValue }}</span>
+                <!-- 新增文本框 -->
+                <div v-if="item.flag !== 'delete'" @click.stop>
+                  <ws-input
+                    v-model="item.constValue"
+                    clearable
+                    maxlength="10"
+                    style="width: 200px"
+                  ></ws-input>
+                </div>
+              </span>
+              <span style="float: right; color: #8492a6; font-size: 13px">
+                <!-- 对号 -->
+                <i
+                  class="el-icon-check"
+                  style="line-height: 29px; margin-left: 10px"
+                  v-if="item.flag !== 'delete'"
+                  @click.stop="saveClick(item, index)"
+                ></i>
+                <!-- 编辑 -->
+                <i
+                  class="el-icon-edit"
+                  style="line-height: 29px; margin-left: 10px"
+                  v-if="item.flag == 'delete'"
+                  @click.stop="editClick(item, index)"
+                ></i>
+                <!-- 删除 -->
+                <i
+                  class="el-icon-delete"
+                  style="line-height: 29px"
+                  @click.stop="deleteClick(item, index)"
+                ></i>
+              </span>
+            </el-option>
+            <!-- 新增按钮 -->
+            <el-option value="" label="">
+              <div
+                style="
+                  text-align: right;
+                  border-top: 1px solid #dcdfe6;
+                  padding: 5px;
+                "
+              >
+                <ws-button type="primary" @click.stop="addClick">{{
+                  $t('button.add')
+                }}</ws-button>
+              </div>
+            </el-option>
+          </el-select>
+        </ws-form-item>
+        <!-- 重量(吨) -->
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          <ws-input
+            v-model="deptBudgetList.weight"
+            maxlength="100"
+            size="small"
+            placeholder="请输入重量(吨)"
+          />
+        </ws-form-item>
+        <!-- 交货日期(起) -->
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          <ws-date-picker
+            v-model="deptBudgetList.deliveryDateStart"
+            type="date"
+            placeholder="请选择交货日期(起)"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
+        <!-- 溢短装(%) -->
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          <ws-input
+            v-model="deptBudgetList.overShort"
+            maxlength="100"
+            size="small"
+            placeholder="请输入溢短装比例(%)"
+          />
+        </ws-form-item>
+        <!-- 交货日期(止) -->
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          <ws-date-picker
+            v-model="deptBudgetList.deliveryDateEnd"
+            type="date"
+            placeholder="请选择交货日期(止)"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
+        <!-- 合同单价(元/吨) -->
+        <ws-form-item
+          class="readonly"
+          label="合同单价(元/吨)"
+          span="1"
+          prop="unitContractPrice"
+        >
+          <span v-if="deptBudgetList.unitContractPrice != 'null'">{{
+            deptBudgetList.unitContractPrice
+          }}</span>
+        </ws-form-item>
+        <!-- 合同总价(元) -->
+        <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice">
+          <ws-input
+            v-model="deptBudgetList.totalContractPrice"
+            maxlength="100"
+            placeholder="请输入合同单价"
+            size="small"
+          />
+        </ws-form-item>
+        <!-- 货源所在地区 -->
+        <ws-form-item label="货源所在地区" span="1" prop="packingMethod">
+          <el-cascader
+            :options="options_"
+            v-model="selectedOptions"
+            clearable
+            size="large"
+            placeholder="请选择货源所在地区"
+            style="width: 200%"
+            @change="handleChange"
+          />
+        </ws-form-item>
+        <!-- 货源详细地址 -->
+        <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+          <ws-input
+            v-model="deptBudgetList.sourceGoods"
+            maxlength="100"
+            placeholder="请输入货源详细地址"
+            size="small"
+          />
+        </ws-form-item>
+        <!-- 交货地所在地区 -->
+        <ws-form-item label="交货地所在地区" span="1" prop="packingMethod">
+          <el-cascader
+            :options="options_"
+            v-model="selectedOptions1"
+            clearable
+            size="large"
+            placeholder="请选择交货地所在地区"
+            style="width: 200%"
+            @change="handleChange1"
+          />
+        </ws-form-item>
+        <!-- 交货地详细地址 -->
+        <ws-form-item label="交货地详细地址" span="1" prop="placeDelivery">
+          <ws-input
+            v-model="deptBudgetList.placeDelivery"
+            maxlength="100"
+            placeholder="请输入交货地详细地址"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!-- 签订日期 -->
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          <ws-date-picker
+            v-model="deptBudgetList.signingDate"
+            type="date"
+            placeholder="请选择合同签订日期"
+            value-format="yyyy-MM-dd"
+          />
+        </ws-form-item>
+
+        <!-- 最终实际交易量(吨) -->
+        <ws-form-item
+          label="最终实际交易量(吨)"
+          span="1"
+          prop="totalContractPrice"
+        >
+          <ws-input
+            v-model="deptBudgetList.finalTradingVolume"
+            maxlength="100"
+            placeholder="请输入最终实际交易量"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!-- 临时仓库负责人 -->
+        <ws-form-item
+          label="临时仓库负责人"
+          span="1"
+          prop="packingMethod"
+          v-show="deptBudgetList.deliverType == 1"
+        >
+          <el-select
+            v-model="deptBudgetList.personCharge"
+            placeholder="请选择临时仓库负责人"
+            filterable
+            :filter-method="dataFilter"
+            @change="selectstaff"
+          >
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
+            />
+          </el-select>
+        </ws-form-item>
+      </ws-info-table>
+      <base-card>
+        <!--面试信息-->
+        <div class="remark">
+          <h3>货物信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item
+            class="readonly"
+            label="货名"
+            span="1"
+            prop="waterContent"
+          >
+            {{ deptBudgetList.contractGoodsInfo.goodsName }}
+          </ws-form-item>
+          <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.waterContent"
+              placeholder="请输入水分占比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item label="品级" span="1" prop="grade">
+            <ws-select
+              v-model="deptBudgetList.contractGoodsInfo.grade"
+              placeholder=""
+              class="typeselect"
+              @change="selectgrade"
+            >
+              <ws-option
+                v-for="item in gradeList"
+                :key="item.constValue"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.impurity"
+              placeholder="请输入杂质占比(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item label="容重(克/升)<=" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
+              placeholder="请输入容重"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="霉变粒(%)<="
+            span="1"
+            prop="mildewGrain"
+            class="result"
+          >
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
+              placeholder="请输入霉变粒占比(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
+              placeholder="请输入输入热损伤占比(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="不完善粒(%)<="
+            span="1"
+            prop="imperfectGrain"
+            class="result"
+          >
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
+              placeholder="请输入不完整粒占比(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>流程信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="已付款(元)" span="1" prop="mildewGrain">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.mildewGrain"
+              placeholder="请输入已付款(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsName"
+              placeholder="请输入已开发票(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.waterContent"
+              placeholder="请输入费用支出(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item label="未开发票(元)" span="1" prop="impurity"
+            ><ws-input
+              v-model="deptBudgetList.contractProcessInfo.impurity"
+              placeholder="请输入未开发票(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <ws-form-item
+            label="已完成发运量(吨)"
+            span="1"
+            prop="imperfectGrain"
+            class="result"
+          >
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade"
+            ><ws-select
+              v-model="deptBudgetList.contractProcessInfo.grade"
+              placeholder=""
+              class="typeselect"
+              @change="selectChapterTwo"
+            >
+              <ws-option
+                v-for="item in ChapterTwoList"
+                :key="item.constValue"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>备注信息</h3>
+        </div>
+        <ws-input
+          v-model="deptBudgetList.remarks"
+          type="textarea"
+          row="3"
+          placeholder="请输入备注信息,不超过200字"
+          maxlength="200"
+        />
+        <ws-upload
+          ref="upload"
+          table-name="maintain_work_order"
+          oss-key="mainPlan"
+          :comp-id="compId"
+          :appendix-ids="appendixIdsAdd"
+          :vesselId="deptBudgetList.addressUrl"
+          :size-limit="size"
+          @uploadSuccess="uploadSuccess"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+        />
+      </base-card>
+    </ws-form>
+    <div style="text-align: right; padding: 10px">
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
+        >提交</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
+import {
+  packList,
+  addList,
+  xiala,
+  addxiala,
+  editxiala,
+  delxiala,
+  examineList,
+  editInfo,
+  getstaff,
+} from '@/model/contarct/index'
+import WsUpload from '@/components/WsUpload'
+import { EventBus, dayjs } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  components: {
+    WsUpload,
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      size: 10,
+      // 提交类型
+      submitType: true,
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+      ruleDeptBudget: [],
+      deptBudgetList: {
+        contractProcessInfo: {},
+        contractGoodsInfo: {},
+      },
+      options_: regionData,
+      selectedOptions: [],
+      selectedOptions1: [],
+      mainReportAdd: {},
+      list: {},
+      unitList: [],
+      options: [],
+      staffList: [],
+      packtypeList: [],
+      goodnameList: [],
+      gradeList: [],
+      ChapterTwoList: [],
+      appendixIdsAdd: '',
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      acceptanceCheck: {},
+      compId: sessionStorage.getItem('ws-pf_compId'),
+    }
+  },
+
+  activated() {
+    getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
+      .toPromise()
+      .then((response) => {
+        this.options = response
+        this.staffList = response
+      })
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  methods: {
+    dataFilter(val) {
+      this.deptBudgetList.personCharge = val
+      if (val) {
+        //val存在
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options = this.staffList
+      }
+    },
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
+          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+        }
+      }
+    },
+    handleChange(value) {
+      this.selectedOptions = value
+    },
+    handleChange1(value) {
+      this.selectedOptions1 = value
+    },
+    loaddata() {
+      // 数据
+      examineList({ id: this.$route.query.id })
+        .toPromise()
+        .then((response) => {
+          if (response.weight) {
+            response.weight = String(response.weight)
+          }
+          if (response.overShort) {
+            response.overShort = String(response.overShort)
+          }
+          if (response.totalContractPrice) {
+            response.totalContractPrice = String(response.totalContractPrice)
+          }
+          if (response.unitContractPrice) {
+            response.unitContractPrice = String(response.unitContractPrice)
+          }
+          var tmp = []
+          tmp[0] = TextToCode[response.sourceProvince].code
+
+          tmp[1] = TextToCode[response.sourceProvince][response.sourceCity].code
+
+          if (tmp[0] == 810000 || tmp[0] == 820000) {
+            tmp[2] = null
+          } else {
+            tmp[2] =
+              TextToCode[response.sourceProvince][response.sourceCity][
+                response.sourceArea
+              ].code
+          }
+          this.selectedOptions = tmp
+          var tmp1 = []
+          tmp1[0] = TextToCode[response.deliveryProvince].code
+          tmp1[1] =
+            TextToCode[response.deliveryProvince][response.deliveryCity].code
+
+          if (tmp1[0] == 810000 || tmp1[0] == 820000) {
+            tmp1[2] = null
+          } else {
+            tmp1[2] =
+              TextToCode[response.deliveryProvince][response.deliveryCity][
+                response.deliveryArea
+              ].code
+          }
+          this.selectedOptions1 = tmp1
+          this.deptBudgetList = response
+          if (this.deptBudgetList.deliverType == 1) {
+            this.deptBudgetList.deliverType1 = '我方自提'
+          } else if (this.deptBudgetList.deliverType == 2) {
+            this.deptBudgetList.deliverType1 = '对方送货'
+          }
+        })
+      // 包装方式
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 双章
+      packList({ constId: 'CON4' })
+        .toPromise()
+        .then((response) => {
+          this.ChapterTwoList = response
+        })
+    },
+    addClick() {
+      // let [flag, constValue, constKey] = ['check', '', '']
+      // let obj = { flag, constValue, constKey }
+      // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
+      // let result = this.unitList.filter((item, val, arr) => {
+      //   return item.id != '1'
+      // })
+      // result.push(obj)
+      // result.push(objAdd)
+      // this.unitList = result
+      this.unitList.push({
+        flag: 'add',
+        constValue: '',
+        constKey: '',
+      })
+    },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
+    },
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    handleExamine() {},
+    approve() {},
+    returnsales() {
+      this.$router.push({ path: 'buyContract' })
+    },
+    selectChapterTwo(e) {
+      for (var i = 0; i < this.ChapterTwoList.length; i++) {
+        if (this.ChapterTwoList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+        }
+      }
+    },
+    selectunitList(e) {
+      for (var i = 0; i < this.unitList.length; i++) {
+        if (this.unitList[i].constValue == e) {
+          this.deptBudgetList.packingMethodKey = this.unitList[i].constKey
+        }
+      }
+    },
+    selectgrade(e) {
+      for (var i = 0; i < this.gradeList.length; i++) {
+        if (this.gradeList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.gradeList[i].constKey
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.deptBudgetList.acceptanceMethodKey =
+            this.packtypeList[i].constKey
+        }
+      }
+    },
+    saveClick(item, index) {
+      console.log(item)
+
+      if (Object.is(item.id, 1)) {
+        return
+      }
+      if (Object.is(this.unitList[index].flag, 'delete')) {
+        this.$set(this.unitList, index, { flag: 'check' })
+      } else {
+        this.$set(this.unitList, index, { flag: 'delete' })
+      }
+      if (!item.constValue) {
+        this.unitList.splice(index, 1)
+        return
+      }
+      if (item.flag == 'add') {
+        item.constKey = Math.random() * 20
+        this.acceptanceCheck.compId = this.compId
+        this.acceptanceCheck.constKey = item.constKey
+        this.acceptanceCheck.constCode = 'TYPEYAN'
+        this.acceptanceCheck.constValue = item.constValue
+        this.acceptanceCheck.id = item.id
+        addxiala(this.acceptanceCheck)
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+          })
+      } else if (item.flag == 'check') {
+        this.acceptanceCheck.compId = this.compId
+        this.acceptanceCheck.constKey = item.constKey
+        this.acceptanceCheck.constCode = 'TYPEYAN'
+        this.acceptanceCheck.constValue = item.constValue
+        this.acceptanceCheck.id = item.id
+        editxiala(this.acceptanceCheck)
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+          })
+      }
+    },
+    // 编辑
+    editClick(item, index) {
+      const map = JSON.parse(JSON.stringify(item))
+      if (Object.is(item.id, 1)) {
+        return
+      }
+      if (Object.is(this.unitList[index].flag, 'delete')) {
+        map.flag = 'check'
+        this.$set(this.unitList, index, map)
+      } else {
+        map.flag = 'delete'
+        this.$set(this.unitList, index, map)
+      }
+    },
+    // 删除
+    deleteClick(item, index) {
+      if (Object.is(item.constKey, 1)) {
+        return
+      }
+      if (!item.constValue) {
+        this.unitList.splice(index, 1)
+        return
+      }
+      delxiala({ id: this.unitList[index].id })
+        .toPromise()
+        .then((response) => {
+          this.getUnitList()
+          this.pleaseChoose = ''
+        })
+    },
+    submit() {
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
+          message: '请输入合同编号',
+          type: 'warning',
+        })
+        return
+      }
+      console.log(this.deptBudgetList.contractNo.length)
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.shippingType) {
+        this.$message({
+          message: '请输入运输方式!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.shippingType.length < 1 ||
+        this.deptBudgetList.shippingType.length > 20
+      ) {
+        this.$message({
+          message: '运输方式长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyer) {
+        this.$message({
+          message: '请输入买方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.buyer.length > 30) {
+        this.$message({
+          message: '买方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.seller) {
+        this.$message({
+          message: '请输入卖方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.seller.length > 30) {
+        this.$message({
+          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyerPhone) {
+        this.$message({
+          message: '请输入买方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.buyerPhone)) {
+        this.$message({
+          message: '输入买方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '买方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.sellerPhone) {
+        this.$message({
+          message: '请输入卖方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.sellerPhone)) {
+        this.$message({
+          message: '输入卖方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.settlementMethod) {
+        this.$message({
+          message: '请输入结算方式!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (!this.deptBudgetList.sourceGoods) {
+        this.$message({
+          message: '请输入货源详细地址!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货详细地址!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.selectedOptions.length == 0) {
+        this.$message({
+          message: '请选择货源所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.selectedOptions1.length == 0) {
+        this.$message({
+          message: '请选择交货所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.weight) {
+        this.$message({
+          message: '请输入重量!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (
+        isNaN(this.deptBudgetList.weight) ||
+        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.weight < 0 ||
+        this.deptBudgetList.weight > 200000
+      ) {
+        this.$message({
+          message: '输入重量有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.overShort &&
+        isNaN(this.deptBudgetList.overShort)
+      ) {
+        this.$message({
+          message: '溢短装输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.unitContractPrice &&
+        isNaN(this.deptBudgetList.unitContractPrice)
+      ) {
+        this.$message({
+          message: '合同单价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.totalContractPrice &&
+        isNaN(this.deptBudgetList.totalContractPrice)
+      ) {
+        this.$message({
+          message: '合同总价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateStart) {
+        this.$message({
+          message: '请选择交货日期(起)',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateEnd) {
+        this.$message({
+          message: '请选择交货日期(止)',
+          type: 'warning',
+        })
+        return
+      }
+      //时间
+      if (
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+      ) {
+        this.$message({
+          message: '交货日期(止)选择错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.signingDate) {
+        this.$message({
+          message: '请选择签订日期',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+        this.$message({
+          message: '请选择货名',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+        this.$message({
+          message: '请选择水分',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.grade) {
+        this.$message({
+          message: '请选择品级',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.impurity ||
+        (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
+          -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '杂质输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
+        (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '容重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+        (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
+            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '霉变粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+        (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
+          -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
+            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '热损伤输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+        (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
+            (String(
+              this.deptBudgetList.contractGoodsInfo.imperfectGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '不完整粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.goodsNameKey
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '合同收入金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+          (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.waterContent).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.waterContent
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '费用金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.goodsName).length -
+            (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '已开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.impurity).length -
+            (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '未开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
+            .length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.imperfectGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '已完成发运量输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          this.deptBudgetList.sourceProvince = CodeToText[this.selectedOptions[0]]
+          this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]
+         
+          this.deptBudgetList.deliveryProvince = CodeToText[this.selectedOptions1[0]]
+          this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions1[1]]
+        
+          this.deptBudgetList.compId = this.compId
+          this.deptBudgetList.contractType = 2
+           if(this.deptBudgetList.deliveryProvince =="澳门特别行政区" || this.deptBudgetList.deliveryProvince == "澳门特别行政区"){
+            this.deptBudgetList.deliveryArea = "特别行政区"
+          }else{ 
+                 this.deptBudgetList.deliveryArea =  CodeToText[this.selectedOptions1[2]]
+          }
+             if(this.deptBudgetList.sourceProvince =="澳门特别行政区" || this.deptBudgetList.sourceProvince == "澳门特别行政区"){
+            this.deptBudgetList.sourceArea = "特别行政区"
+          }else{
+               this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
+          }
+          editInfo(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('编辑成功')
+              this.$router.push({ path: 'buyContract' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.el-form {
+  padding: 0 15%;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.readonly {
+  position: relative;
+}
+.readonly:after {
+  content: '*';
+  color: #ff2727;
+  position: absolute;
+  right: 8px;
+  z-index: 10;
+  top: 21%;
+  font-size: 20px;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid #cdd2dc;
+  background: #fafbfc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+  background: #f0f2f6;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 15px 0px;
+}
+.wenzi {
+  width: 900px;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 10px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 900px;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+.ce {
+  width: 900px;
+  margin: 0 auto;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+/deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+  width: 130px;
+}
+.el-textarea{
+  width: 101%;
+}
+/deep/.iconclose:before {
+    display: none;
+}
+/deep/.winsea-card .card__header {
+    font-size: 14px;
+    color: #409eff;
+    padding: 0 0 20px 10px;
+    position: relative;
+    display: none;
+}
+</style>

+ 558 - 0
src/views/platformaudit/purchaseContractExamine.vue

@@ -0,0 +1,558 @@
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">查看合同详情</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <ws-form ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList"
+      ><div style="margin-top: 20px; font-size: 24px">
+        采购合同<span style="font-size: 16px"
+          >【编号:{{ deptBudgetList.contractNo }}】</span
+        ><span v-if="status == '待执行'" class="status-orange">{{
+          status
+        }}</span>
+        <span v-if="status == '执行中'" class="status-bule">{{ status }}</span>
+        <span v-if="status == '已完成'" class="status-green">{{ status }}</span>
+      </div>
+      <div class="remark">
+        <h3>基本信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+        <ws-form-item label="运输方式" span="1" prop="shippingType">
+          {{ deptBudgetList.shippingType }}
+        </ws-form-item>
+        <ws-form-item label="买方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        <ws-form-item label="结算方式" span="1" prop="settlementMethod"
+          >{{ deptBudgetList.settlementMethod }}
+        </ws-form-item>
+        <ws-form-item label="卖方" span="1" prop="seller"
+          >{{ deptBudgetList.seller }}
+        </ws-form-item>
+        <ws-form-item label="交货方式" span="1" prop="deliverType1"
+          >{{ deptBudgetList.deliverType1 }}
+        </ws-form-item>
+        <ws-form-item label="买方电话" span="1" prop="buyerPhone"
+          >{{ deptBudgetList.buyerPhone }}
+        </ws-form-item>
+        <ws-form-item label="包装方式" span="1" prop="packingMethod">
+          {{ deptBudgetList.packingMethod }}
+        </ws-form-item>
+        <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+          {{ deptBudgetList.sellerPhone }}
+        </ws-form-item>
+        <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+          {{ deptBudgetList.acceptanceMethod }}
+        </ws-form-item>
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          {{ deptBudgetList.weight }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          {{ deptBudgetList.deliveryDateStart }}
+        </ws-form-item>
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          {{ deptBudgetList.overShort }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          {{ deptBudgetList.deliveryDateEnd }}
+        </ws-form-item>
+        <ws-form-item
+          label="合同单价(元/吨)"
+          span="1"
+          prop="unitContractPrice"
+        >
+          {{ deptBudgetList.unitContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice">
+          {{ deptBudgetList.totalContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="货源所在地区" span="1">
+          {{ deptBudgetList.sourceProvince }}
+          {{ deptBudgetList.sourceCity }}
+          {{ deptBudgetList.sourceArea }}
+        </ws-form-item>
+        <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+          {{ deptBudgetList.sourceGoods }}
+        </ws-form-item>
+        <ws-form-item label="交货地所在地区" span="1">
+          {{ deptBudgetList.deliveryProvince }}
+          {{ deptBudgetList.deliveryCity }}
+          {{ deptBudgetList.deliveryArea }}
+        </ws-form-item>
+        <ws-form-item label="交货地详细地址" span="1" prop=" placeDelivery">
+          {{ deptBudgetList.placeDelivery }}
+        </ws-form-item>
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          {{ deptBudgetList.signingDate }}
+        </ws-form-item>
+        <ws-form-item label="最终实际交易量(吨)" span="1" prop="finalTradingVolume">
+          {{ deptBudgetList.finalTradingVolume }}
+        </ws-form-item>
+        <ws-form-item label="临时仓库负责人" span="1" prop="personCharge">
+          {{ deptBudgetList.personCharge }}
+        </ws-form-item>
+      </ws-info-table>
+      <!--面试信息-->
+      <div class="remark">
+        <h3>货物信息</h3>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="货名" span="1" prop="waterContent">
+          {{ deptBudgetList.contractGoodsInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+          {{ deptBudgetList.contractGoodsInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="品级" span="1" prop="grade">
+          {{ deptBudgetList.contractGoodsInfo.grade }}
+        </ws-form-item>
+        <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+          {{ deptBudgetList.contractGoodsInfo.impurity }}
+        </ws-form-item>
+        <ws-form-item label="容重(克/升)<=" span="1" prop="bulkDensity">
+          {{ deptBudgetList.contractGoodsInfo.bulkDensity }}
+        </ws-form-item>
+        <ws-form-item
+          label="霉变粒(%)<="
+          span="1"
+          prop="mildewGrain"
+          class="result"
+        >
+          {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
+        </ws-form-item>
+        <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+          {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
+        </ws-form-item>
+        <ws-form-item
+          label="不完善粒(%)<="
+          span="1"
+          prop="imperfectGrain"
+          class="result"
+        >
+          {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>流程信息</h3>
+      </div>
+      <ws-info-table>
+         <!--已付款(元)-->
+        <ws-form-item label="已付款(元)" span="1" prop="goodsNameKey">
+          {{deptBudgetList.contractProcessInfo.goodsNameKey}}
+        </ws-form-item>
+        <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+          {{ deptBudgetList.contractProcessInfo.goodsName }}
+        </ws-form-item>
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent"
+          >{{ deptBudgetList.contractProcessInfo.waterContent }}
+        </ws-form-item>
+        <ws-form-item label="未开发票(元)" span="1" prop="impurity"
+          >{{ deptBudgetList.contractProcessInfo.impurity }}
+        </ws-form-item>
+        <ws-form-item
+          label="已完成发运量(吨)"
+          span="1"
+          prop="imperfectGrain"
+          class="result"
+          >{{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+        </ws-form-item>
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade"
+          >{{ deptBudgetList.contractProcessInfo.grade }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>备注信息</h3>
+      </div>
+      {{ deptBudgetList.remarks }}
+      <img :src="deptBudgetList.addressUrl" alt="" />
+    </ws-form>
+    <div style="text-align: right; padding: 10px">
+      <el-button
+        class="bg-bottom"
+        type="primary"
+        size="small"
+        @click="returnsales()"
+        >关闭</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+import {
+  packList,
+  xiala,
+  examineList,
+} from '@/model/contarct/index'
+export default {
+  name: 'viewSpareMoney',
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      status: '',
+      // 提交类型
+      submitType: true,
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+      ruleDeptBudget: [],
+      deptBudgetList: {
+        contractProcessInfo: {},
+        contractGoodsInfo: {},
+      },
+      mainReportAdd: {},
+      list: {},
+    }
+  },
+
+  activated() {
+    this.status = this.$route.query.status
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  methods: {
+    loaddata() {
+      // 数据
+      examineList({ id: this.$route.query.id })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList = response
+          if (this.deptBudgetList.deliverType == 1) {
+            this.deptBudgetList.deliverType1 = '我方自提'
+          } else if (this.deptBudgetList.deliverType == 2) {
+            this.deptBudgetList.deliverType1 = '对方送货'
+          }
+        })
+      // 包装方式
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 双章
+      packList({ constId: 'CON4' })
+        .toPromise()
+        .then((response) => {
+          this.ChapterTwoList = response
+        })
+    },
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    handleExamine() {},
+    approve() {},
+    returnsales() {
+      this.$router.push({ path: 'buyContract' })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.status-orange,
+.status-bule,
+.status-green {
+  border: 1px solid;
+  border-radius: 30px;
+  padding: 3px 10px;
+  font-size: 16px;
+}
+.status-orange {
+  border-color: #ff9f24;
+  color: #ff9f24;
+  background: #ffedd5;
+}
+.status-bule {
+  border-color: #5473e8;
+  color: #5473e8;
+  background: #f0f3fe;
+}
+.status-green {
+  border-color: #50cad4;
+  color: #50cad4;
+  background: #ecfeff;
+}
+.el-form {
+  padding: 0 15%;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.readonly {
+  position: relative;
+}
+.readonly:after {
+  content: '*';
+  color: #ff2727;
+  position: absolute;
+  right: 8px;
+  z-index: 10;
+  top: 21%;
+  font-size: 20px;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid #cdd2dc;
+  background: #fafbfc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+  background: #f0f2f6;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 15px 0px;
+}
+.wenzi {
+  width: 900px;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 10px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 900px;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+.ce {
+  width: 900px;
+  margin: 0 auto;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+/deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+  width: 130px;
+}
+</style>

+ 978 - 0
src/views/platformaudit/salesContract.vue

@@ -0,0 +1,978 @@
+
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="8">
+      <template slot="left">
+        <ws-button
+          type="primary"
+          @click="handleAdd()"
+          v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.add`
+          "
+          ><img
+            width="13"
+            height="13"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 2px;
+              left: -4px;
+            "
+            src="../../../public/img/header-add.png"
+            alt=""
+          />添加</ws-button
+        >
+        <ws-button
+          @click="exportlist()"
+          v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.view`
+          "
+          >导出</ws-button
+        >
+      </template>
+      <template slot="right">
+        <span style="width: 142px; display: inline-block;color: #8890B1;">状态:</span>
+        <ws-select
+          v-model="searchTypeText"
+          placeholder=""
+          class="typeselect"
+          @change="selecttaskType"
+          :value="searchType"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890B1;"
+          />
+        </ws-select>
+
+        <el-date-picker
+          v-model="value2"
+          type="daterange"
+          align="right"
+          unlink-panels
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          :picker-options="pickerOptions"
+        >
+        </el-date-picker>
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按照合同编号、买方名称、卖方名称进行查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class="findValue"
+        ></ws-input>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button
+          class="find"
+          type="primary"
+          @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <el-table
+      class="wenzi"
+      :data="contractList.records"
+      style="width: 100%; margin-top: 10px"
+      height="780"
+    >
+      <el-table-column type="index" label="序号">
+        <template scope="scope">
+          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+          <span v-else>{{ scope.$index + 1 }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="contractNo" label="合同编号" width="80">
+      </el-table-column>
+      <el-table-column prop="goodsName" label="货名" width="80">
+      </el-table-column>
+      <el-table-column prop="grade" label="品级">
+        <template slot-scope="scope">
+          <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '等外'" class="substandard">{{
+            scope.row.grade
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="weight" label="重量(吨)"> </el-table-column>
+      <el-table-column prop="unitContractPrice" label="合同单价(元)">
+      </el-table-column>
+      <el-table-column prop="packingMethod" label="包装方式"> </el-table-column>
+      <el-table-column prop="buyer" label="买方"> </el-table-column>
+      <el-table-column prop="seller" label="卖方"> </el-table-column>
+      <el-table-column prop="imperfectGrain" label="已完成(吨)">
+        <template slot-scope="scope">
+          <span
+            v-if="scope.row.proportion < 90"
+            style="color: #5473e8; font-weight: 600"
+            >{{ scope.row.imperfectGrain }}</span
+          >
+          <span
+            v-if="scope.row.proportion > 90"
+            style="color: red; font-weight: 600"
+            >{{ scope.row.imperfectGrain }}</span
+          >
+        </template>
+      </el-table-column>
+      <el-table-column prop="status" label="状态">
+        <template slot-scope="scope">
+          <el-popover
+            placement="left"
+            :width="285"
+            trigger="click"
+            visible-arrow="false"
+            @show="history(scope.row)"
+          >
+            <template>
+              <span slot="reference">
+                <span
+                  v-if="scope.row.status == '待执行'"
+                  class="executory"
+                ></span>
+                <span
+                  v-if="scope.row.status == '执行中'"
+                  class="inExecution"
+                ></span>
+                <span v-if="scope.row.status == '已完成'" class="done"></span
+                >{{ scope.row.status }}
+              </span>
+            </template>
+            <div>
+              <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+              <div v-for="(item, index) in historyList" class="flex">
+                <div class="vertical-text vertical-text-left">
+                  {{ item.updateDate }}
+                </div>
+                <div>
+                  <div class="vertical-circle"></div>
+                  <div
+                    v-if="index != historyList.length - 1"
+                    class="vertical-line"
+                  ></div>
+                </div>
+                <div class="vertical-text">
+                  {{ item.operateUser }}<br />{{ item.dealMsg }}
+                </div>
+              </div>
+            </div>
+          </el-popover>
+          <img
+            width="17"
+            height="18"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/edit.png"
+            @click="editClick(scope.row)"
+            alt=""
+          />
+          <!-- <i class="el-icon-edit" @click="editClick(scope.row)"></i> -->
+        </template>
+      </el-table-column>
+      <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
+      <el-table-column prop="mildewGrain" label="未回款(元)">
+      </el-table-column>
+      <el-table-column prop="addressUrl" label="附件">
+        <template slot-scope="scope">
+          <img
+            width="18"
+            height="20"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png"
+            @click="fujian(scope.row)"
+            alt=""
+          />
+          <span v-if="scope.row.addressUrlArray.length > 0">{{
+            scope.row.addressUrlArray.length
+          }}</span>
+          <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
+        </template>
+      </el-table-column>
+      <el-table-column prop="address" label="操作" width="200">
+        <template slot-scope="scope">
+          <img
+            width="16"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/chakan.png"
+            @click="handleExamine(scope.row)"
+            v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.view`
+          "
+            alt=""
+          />
+          <img
+            width="17"
+            height="16"
+            style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/bianji.png"
+            v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.edit`
+          "
+            @click="handleEdit(scope.row)"
+            alt=""
+          />
+          <img
+            width="16"
+            height="17"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: -1px;
+              margin: 0 6px;
+            "
+            src="../../../public/img/shanchu.png"
+            v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.delete`
+          "
+            @click="handleDelete(scope.row)"
+            alt=""
+          />
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="deptCircularPage.pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    >
+    </el-pagination>
+    <!-- 附件弹框 -->
+    <WinseaContentModal
+      v-model="accessoryTFs"
+      :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose"
+    >
+      <p>查看附件</p>
+      <ws-upload
+        ref="upload"
+        table-name="maintain_work_order"
+        oss-key="mainPlan"
+        :comp-id="compId"
+        :appendix-ids="appendixIdsAdd"
+        :vesselId="deptBudgetList.addressUrl"
+        :size-limit="size"
+        @uploadSuccess="uploadSuccess"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+      />
+    </WinseaContentModal>
+  </div>
+</template>
+<script>
+import {
+  getList,
+  export1,
+  editstatus,
+  billoperatehis,
+  deletecontract,
+} from '@/model/contarct/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      size: 10,
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      appendixIdsAdd: '',
+      searchType: 1,
+      searchTypeText: '未完成',
+      searchKeyWord: '',
+      contractType: 1,
+      startDate: null,
+      endDate: null,
+      // 提交类型
+      submitType: true,
+      contractForm: {},
+      categoryIndex: 0,
+      rulesVendor: {},
+      size: 10,
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {},
+      historyList: [],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+      taskTypeList: [
+        { value: '未完成', type: 1 },
+        { value: '已完成', type: 2 },
+        { value: '未回款', type: 3 },
+        { value: '全部合同', type: '' },
+      ],
+      pickerOptions: {
+        shortcuts: [
+          {
+            text: '本周',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              var thisDay = start.getDay()
+              var thisDate = start.getDate()
+              if (thisDay != 0) {
+                start.setDate(thisDate - thisDay)
+              }
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本月',
+            onClick(picker) {
+              const end = new Date()
+              const start = new Date()
+              start.setDate(1)
+              picker.$emit('pick', [start, end])
+            },
+          },
+          {
+            text: '本季度',
+            onClick(picker) {
+              var oDate = new Date()
+
+              var thisYear = oDate.getFullYear()
+              var thisMonth = oDate.getMonth() + 1
+
+              var n = Math.ceil(thisMonth / 3) // 季度
+
+              var Month = n * 3 - 1
+
+              var start = new Date(thisYear, Month - 2, 1)
+              var end = new Date()
+
+              picker.$emit('pick', [start, end])
+            },
+          },
+        ],
+      },
+      value1: '',
+      value2: '',
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'Y+': date.getFullYear().toString(), // 年
+        'm+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        // "M+": date.getMinutes().toString(),         // 分
+        // "S+": date.getSeconds().toString()          // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      getList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        contractType: this.contractType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        startDate: this.startDate,
+        endDate: this.endDate,
+        contrPage: this.contrPage,
+      })
+        .toPromise()
+        .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            if (response.records[i].addressUrl != null) {
+              response.records[i].addressUrlArray =
+                response.records[i].addressUrl.split(',')
+            } else {
+              response.records[i].addressUrlArray = []
+            }
+            if (response.records[i].imperfectGrain != null) {
+              response.records[i].proportion =
+                Math.floor(
+                  (response.records[i].imperfectGrain /
+                    response.records[i].weight) *
+                    10000
+                ) / 100
+            } else {
+              response.records[i].proportion = 0
+            }
+          }
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
+          this.contractList = response
+        })
+    },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
+    },
+    editClick(row) {
+      var status = ''
+      if (row.status == '待执行' || row.status == '已完成') {
+        status = '执行中'
+      } else if (row.status == '执行中') {
+        status = '已完成'
+      }
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`是否将状态改为${status}`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editstatus({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    // receiveAttachmentPath
+    fujian(row) {
+      if (
+        row.addressUrl === null ||
+        row.addressUrl === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.addressUrl
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+    handleAdd() {
+      this.$router.push({ path: 'salesContractAdd' })
+    },
+    handleEdit(row) {
+      this.$router.push({
+        name: 'salesContractEdit',
+        query: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      if (this.value2) {
+        this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
+        this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
+      } else {
+        this.startDate = ''
+        this.endDate = ''
+      }
+      this.currentPage = 1
+      this.getList()
+    },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_销售合同`,
+        type: 'xls',
+      })
+    },
+    // deletecontract(){},
+    //删除
+
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+
+    handleDelete(row) {
+      var handleDelete = ' '
+      if (row.handleDelete == '') {
+      }
+      this.$confirm(`此操作永久删除该仓库全部信息,是否确认删除`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          deletecontract({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.flex {
+  display: flex;
+}
+.el-range-editor.el-input__inner {
+  margin-left: 10px;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: -10px;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  border: 1px solid #5473e8;
+  color: #5473e8;
+}
+.warning {
+  width: 100%;
+  height: 2px;
+  background: red;
+}
+.executory,
+.inExecution,
+.done {
+  width: 6px;
+  height: 6px;
+  display: inline-block;
+  border-radius: 50%;
+  position: relative;
+  top: -1px;
+}
+.executory {
+  background: #ff9f24;
+}
+.inExecution {
+  background: #5878e8;
+}
+.done {
+  background: #50cad4;
+}
+.top-grade {
+  background: linear-gradient(90deg, #5678e9, #7993f6);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.second-class {
+  background: linear-gradient(90deg, #50cdd9, #82e2ea);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.third-class {
+  background: linear-gradient(90deg, #ffa735, #ffbf70);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.substandard {
+  background: linear-gradient(90deg, #b2b4bb, #ced0d5);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.wrap {
+  width: 400px;
+  position: absolute;
+  top: 131px;
+  left: 794px;
+  transform-origin: right center;
+  z-index: 2005;
+}
+.vertical-line {
+  height: 100px;
+  border-left: 2px solid #e9ecf7;
+  margin-left: 4px;
+  padding: 0 3px;
+  // border-image: -webkit-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: -moz-linear-gradient(#00eba7, #08b8e6) 30 30;
+  // border-image: linear-gradient(#00eba7, #08b8e6) 30 30;
+}
+.el-pagination {
+  padding: 10px 15px;
+  margin-bottom: 0;
+  text-align: center;
+}
+/deep/.el-pager li.active {
+  color: #5878e8;
+  cursor: default;
+}
+/deep/.el-pager li:hover {
+  color: #5878e8;
+  cursor: default;
+}
+.vertical-circle {
+  width: 10px;
+  height: 10px;
+  border: 2px solid #5878e8;
+  background-color: #ffffff;
+  -webkit-border-radius: 100px;
+}
+.vertical-circle:first-child {
+  color: red;
+}
+.vertical-text {
+  margin: 0 10px;
+  color: #8890b1;
+  font-size: 12px;
+  margin-top: -4px;
+}
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  text-align: center;
+}
+.typeselect {
+  width: 500px;
+}
+.padding-xs {
+  padding: 15px;
+  text-align: right;
+}
+.clearfix:after {
+  content: '';
+  display: block;
+  clear: both;
+}
+.el-table {
+  font-size: 16px;
+}
+.taskType {
+  width: 100%;
+  background-color: #fff;
+  margin-top: 2px;
+  margin-bottom: 10px;
+  list-style: none;
+  // padding-bottom: 20px;
+  li {
+    float: left;
+    border: 1px solid #6ea0f3;
+    border-radius: 5px;
+    max-width: 190px;
+    padding: 0 5px;
+    text-align: center;
+    margin: 10px 20px;
+    cursor: pointer;
+    font-size: 14px;
+    p {
+      margin: 8px 0px;
+      span {
+        color: #e74c3c;
+      }
+    }
+  }
+  li:hover {
+    background-color: #e4eeff;
+    color: #1d6ced;
+  }
+}
+.el-date-editor--date {
+  margin: 0 10px;
+}
+.findValue {
+  margin: 0 10px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+  .el-message-box {
+    width: 440px;
+    height: 160px;
+    background: #ffffff;
+    box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
+    border-radius: 4px;
+  }
+  /deep/.el-message-box__message p {
+    width: 351px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #191919;
+    line-height: 20px;
+  }
+  .el-message-box__title {
+    width: 440px;
+    height: 160px;
+    background: #ffffff;
+    box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
+    border-radius: 4px;
+  }
+}
+/deep/.typeselect .el-input__inner{
+   color: #8890B1;
+}
+</style>

+ 1653 - 0
src/views/platformaudit/salesContractAdd.vue

@@ -0,0 +1,1653 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">创建销售合同</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertion-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <div class="wenzi">
+      <h3>基本信息</h3>
+      <p>
+        &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
+        标记的条目提交后不可修改。
+      </p>
+    </div>
+    <div class="center">
+      <ws-form ref="deptBudgetList" :model="deptBudgetList">
+        <!--基本信息-->
+
+        <ws-info-table>
+          <!--合同编号-->
+          <ws-form-item
+            label="合同编号"
+            span="1"
+            prop="contractNo"
+            class="readonly"
+          >
+            <ws-input
+              v-model="deptBudgetList.contractNo"
+              placeholder="请输入合同编号"
+              maxlength="20"
+              size="small"
+              :rules="ruleDeptBudget"
+            />
+          </ws-form-item>
+
+          <!--运输方式-->
+          <ws-form-item label="运输方式" span="1" prop="shippingType">
+            <ws-input
+              v-model="deptBudgetList.shippingType"
+              placeholder="请输入运输方式"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--买方-->
+          <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
+            <ws-input
+              v-model="deptBudgetList.buyer"
+              placeholder="请输入买方名称"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--结算方式-->
+          <ws-form-item label="结算方式" span="1" prop="settlementMethod">
+            <ws-input
+              v-model="deptBudgetList.settlementMethod"
+              placeholder="请输入结算方式"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--卖方-->
+          <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
+            <ws-input
+              v-model="deptBudgetList.seller"
+              placeholder="请输入卖方名称"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="交货方式"
+            span="1"
+            prop="seller"
+            class="readonly"
+          >
+            <el-radio v-model="deptBudgetList.deliverType" label="1"
+              >我方自提</el-radio
+            >
+            <el-radio v-model="deptBudgetList.deliverType" label="2"
+              >对方送货</el-radio
+            >
+          </ws-form-item>
+
+          <!--买方电话-->
+          <ws-form-item label="买方电话" span="1" prop="contractNo">
+            <ws-input
+              v-model.number="deptBudgetList.buyerPhone"
+              placeholder="请输入买方电话"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--包装方式-->
+          <ws-form-item label="包装方式" span="1" prop="packingMethod">
+            <ws-select
+              v-model="deptBudgetList.packingMethod"
+              placeholder=""
+              class="typeselect"
+              @change="selectpackingMethod"
+            >
+              <ws-option
+                v-for="item in packtypeList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!--卖方电话-->
+          <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+            <ws-input
+              v-model="deptBudgetList.sellerPhone"
+              placeholder="请输入卖方电话"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--验收方式-->
+          <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+            <el-select
+              v-model="deptBudgetList.acceptanceMethod"
+              placeholder="请选择验收方式"
+              style="width: 100%"
+              filterable
+              @change="selectunitList"
+            >
+              <el-option
+                v-for="(item, index) in unitList"
+                :key="item.constValue"
+                :label="item.constValue"
+                :value="item.constValue"
+              >
+                <span class="unit-left" style="float: left">
+                  <span v-if="item.flag == 'delete'">
+                    {{ item.constValue }}</span
+                  >
+                  <!-- 新增文本框 -->
+                  <div
+                    style="width: 160px"
+                    v-if="item.flag !== 'delete'"
+                    @click.stop
+                  >
+                    <ws-input
+                      v-model="item.constValue"
+                      clearable
+                      maxlength="10"
+                      style="width: 100%"
+                    ></ws-input>
+                  </div>
+                </span>
+                <span style="float: right; color: #8492a6; font-size: 13px">
+                  <!-- 对号 -->
+                  <i
+                    class="el-icon-check"
+                    style="line-height: 29px; margin-left: 10px"
+                    v-if="item.flag !== 'delete'"
+                    @click.stop="saveClick(item, index)"
+                  ></i>
+                  <!-- 编辑 -->
+                  <i
+                    class="el-icon-edit"
+                    style="line-height: 29px; margin-left: 10px"
+                    v-if="item.flag == 'delete'"
+                    @click.stop="editClick(item, index)"
+                  ></i>
+                  <!-- 删除 -->
+                  <i
+                    class="el-icon-delete"
+                    style="line-height: 29px"
+                    @click.stop="deleteClick(item, index)"
+                  ></i>
+                </span>
+              </el-option>
+              <!-- 新增按钮 -->
+              <el-option value="" label="">
+                <div
+                  style="
+                    text-align: right;
+                    border-top: 1px solid #dcdfe6;
+                    padding: 5px;
+                  "
+                >
+                  <ws-button type="primary" @click.stop="addClick">{{
+                    $t('button.add')
+                  }}</ws-button>
+                </div>
+              </el-option>
+            </el-select>
+          </ws-form-item>
+
+          <!--重量(吨)-->
+          <ws-form-item label="重量(吨)" span="1" prop="weight">
+            <ws-input
+              v-model="deptBudgetList.weight"
+              placeholder="请输入重量(吨)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--交货日期(起)-->
+          <ws-form-item
+            label="交货日期(起)"
+            span="1"
+            prop="deliveryDateStart"
+          >
+            <ws-date-picker
+              v-model="deptBudgetList.deliveryDateStart"
+              type="date"
+              placeholder="请选择交货日期(起)"
+              value-format="yyyy-MM-dd"
+            />
+          </ws-form-item>
+          <!--溢短装(%)-->
+          <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+            <ws-input
+              v-model="deptBudgetList.overShort"
+              placeholder="请输入溢短装比例(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--交货日期(止)-->
+          <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+            <ws-date-picker
+              v-model="deptBudgetList.deliveryDateEnd"
+              type="date"
+              placeholder="请选择交货日期(止)"
+              value-format="yyyy-MM-dd"
+            />
+          </ws-form-item>
+
+          <!--合同单价(元/吨)-->
+          <ws-form-item
+            class="readonly"
+            label="合同单价(元/吨)"
+            span="1"
+            prop="unitContractPrice"
+          >
+            <ws-input
+              v-model="deptBudgetList.unitContractPrice"
+              placeholder="请输入合同单价"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--合同总价-->
+          <ws-form-item label="合同总价" span="1" prop="totalContractPrice">
+            <ws-input
+              v-model="deptBudgetList.totalContractPrice"
+              placeholder="请输入合同总价"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item label="货源所在地区" span="1" prop="sourceGoods">
+            <el-cascader
+              :options="options_"
+              v-model="selectedOptions"
+              clearable
+              size="large"
+              placeholder="请选择货源所在地区"
+              style="width: 200%"
+              @change="handleChange"
+            />
+          </ws-form-item>
+          <ws-form-item label="货源详细地址" span="1" prop="sourceGoods">
+            <ws-input
+              v-model="deptBudgetList.sourceGoods"
+              placeholder="请输入货源详细地址"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item label="交货所在地区" span="1" prop="sourceGoods">
+            <el-cascader
+              :options="options_"
+              v-model="selectedOptions1"
+              clearable
+              size="large"
+              placeholder="请选择交货所在地区"
+              style="width: 200%"
+              @change="handleChange1"
+            />
+          </ws-form-item>
+          <ws-form-item label="交货详细地址" span="1" prop="placeDelivery">
+            <ws-input
+              v-model="deptBudgetList.placeDelivery"
+              placeholder="请输入交货详细地址"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--签订日期-->
+          <ws-form-item label="签订日期" span="1" prop="signingDate">
+            <ws-date-picker
+              v-model="deptBudgetList.signingDate"
+              type="date"
+              placeholder="请选择合同签订日期"
+              value-format="yyyy-MM-dd"
+            />
+          </ws-form-item>
+          <ws-form-item
+            label="最终实际成交量(吨)"
+            span="1"
+            prop="finalTradingVolume"
+          >
+            <ws-input
+              v-model="deptBudgetList.finalTradingVolume"
+              placeholder="请输入最终实际成交量"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+    <div class="wenzi">
+      <h3>货物信息</h3>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--货物信息-->
+
+        <ws-info-table>
+          <!--货名-->
+          <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
+            <ws-select
+              v-model="deptBudgetList.contractGoodsInfo.goodsName"
+              placeholder=""
+              class="typeselect"
+              @change="selectpackingMethod"
+            >
+              <ws-option
+                v-for="item in goodnameList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.waterContent"
+              placeholder="请输入水分占比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--品级-->
+          <ws-form-item label="品级" span="1" prop="grade" class="readonly">
+            <ws-select
+              v-model="deptBudgetList.contractGoodsInfo.grade"
+              placeholder=""
+              class="typeselect"
+              @change="selectgrade"
+            >
+              <ws-option
+                v-for="item in gradeList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.impurity"
+              placeholder="请输入杂质占比(%)"
+              maxlength="40"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--容量(克/升)>=-->
+          <ws-form-item label="容量(克/升)" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
+              placeholder="请输入容重"
+              maxlength="40"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
+              placeholder="请输入霉变粒占比(%)"
+              maxlength="40"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
+              placeholder="请输入输入热损伤占比(%)"
+              maxlength="40"
+              size="small"
+            />
+          </ws-form-item>
+          <!--不完整粒(%)<=-->
+          <ws-form-item label="不完整粒(%)" span="1" prop="imperfectGrain">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
+              placeholder="请输入不完整粒占比(%)"
+              maxlength="40"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+
+    <div class="wenzi">
+      <h3>流程信息</h3>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--流程信息-->
+
+        <ws-info-table>
+          <!--合同收入(元)-->
+          <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
+              placeholder="请输入合同收入(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--已开发票(元)-->
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsName"
+              placeholder="请输入已开发票(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--费用支出(元)-->
+          <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.waterContent"
+              placeholder="请输入费用支出(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--未开发票(元)-->
+          <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.impurity"
+              placeholder="请输入未开发票(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--未回款(元)-->
+          <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.mildewGrain"
+              placeholder="请输入未回款(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--已完成发货量(吨)-->
+          <ws-form-item
+            label="已完成发运量(吨)"
+            span="1"
+            prop="imperfectGrain"
+          >
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
+              placeholder="请输入已完成发运量(吨)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--双章原件回收情况-->
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+            <ws-select
+              v-model="deptBudgetList.contractProcessInfo.grade"
+              placeholder=""
+              class="typeselect"
+              @change="selectpackingMethod"
+            >
+              <ws-option
+                v-for="item in ChapterTwoList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+
+    <div class="wenzi">
+      <h3>备注信息</h3>
+    </div>
+    <div class="ce">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--备注信息-->
+        <ws-input
+          v-model="deptBudgetList.remarks"
+          type="textarea"
+          row="3"
+          placeholder="请输入备注信息,不超过200字"
+          maxlength="200"
+        />
+        <ws-upload
+          ref="upload"
+          table-name="maintain_work_order"
+          oss-key="mainPlan"
+          :comp-id="compId"
+          :appendix-ids="appendixIdsAdd"
+          :vesselId="deptBudgetList.addressUrl"
+          :size-limit="size"
+          @uploadSuccess="uploadSuccess"
+          @onChange="onChange"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+        />
+      </ws-form>
+    </div>
+    <div style="text-align: right; padding: 10px" class="center">
+      <el-button
+        class="bg-bottom"
+        type="primary"
+        size="small"
+        @click="submit(deptBudgetList)"
+        >提交</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+//  import { getVesselOne } from '@/model/procurement/basic'
+//  import { dayjs } from 'base-core-lib'
+import {
+  packList,
+  addList,
+  xiala,
+  addxiala,
+  editxiala,
+  delxiala,
+} from '@/model/contarct/index'
+import WsUpload from '@/components/WsUpload'
+import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
+
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+  },
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      options_: regionData,
+      selectedOptions: [],
+      selectedOptions1: [],
+      // 提交类型
+      submitType: true,
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+      trainingMethods: {},
+      packtypeList: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      mainReportAdd: {},
+      appendixIdsAdd: '',
+      size: 10,
+      // uploadSuccess: {},
+      // onChange:{},
+      unitList: [],
+      goodnameList: [],
+      gradeList: [],
+      ChapterTwoList: [],
+      deptBudgetList: {
+        deliverType: '1',
+        finalTradingVolume: 0,
+        contractGoodsInfo: {
+          goodsName: '',
+        },
+        contractProcessInfo: {},
+      },
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      ruleDeptBudget: {
+        contractNo: [
+          { required: true, message: '请输入活动名称', trigger: 'blur' },
+          {
+            min: 6,
+            max: 20,
+            message: '长度在 6 到 20 个字符',
+            trigger: 'blur',
+          },
+        ],
+      },
+      selectIntendedShip: {},
+      interviewTypeList: {},
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.deptBudgetList.packingMethod = '散装'
+    this.deptBudgetList.packingMethodKey = 1
+    this.deptBudgetList.contractGoodsInfo.goodsName = '玉米'
+    this.deptBudgetList.contractGoodsInfo.goodsNameKey = 1
+    this.deptBudgetList.contractProcessInfo.grade = '未回收'
+    this.deptBudgetList.contractProcessInfo.gradeKey = 1
+    this.deptBudgetList.contractGoodsInfo.grade = '一等品'
+    this.deptBudgetList.contractGoodsInfo.gradeKey = 1
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  methods: {
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    handleChange(value) {
+      this.selectedOptions = value
+    },
+    handleChange1(value) {
+      this.selectedOptions1 = value
+    },
+    returnsales() {
+      this.$router.push({ path: 'salesContract' })
+    },
+    loaddata() {
+      // 包装方式
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 双章
+      packList({ constId: 'CON4' })
+        .toPromise()
+        .then((response) => {
+          this.ChapterTwoList = response
+        })
+    },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
+    },
+    onChange(files) {
+      this.fileNum = files
+      this.$refs.upload.handleSaveBill().then((res) => {
+        console.log(files)
+      })
+    },
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
+
+    submit() {
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
+          message: '请输入合同编号',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.shippingType) {
+        this.$message({
+          message: '请输入运输方式!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.shippingType.length < 1 ||
+        this.deptBudgetList.shippingType.length > 20
+      ) {
+        this.$message({
+          message: '运输方式长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyer) {
+        this.$message({
+          message: '请输入买方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.buyer.length > 30) {
+        this.$message({
+          message: '买方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.seller) {
+        this.$message({
+          message: '请输入卖方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.seller.length > 30) {
+        this.$message({
+          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyerPhone) {
+        this.$message({
+          message: '请输入买方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.buyerPhone)) {
+        this.$message({
+          message: '输入买方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '买方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.sellerPhone) {
+        this.$message({
+          message: '请输入卖方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.sellerPhone)) {
+        this.$message({
+          message: '输入卖方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.settlementMethod) {
+        this.$message({
+          message: '请输入结算方式!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (!this.deptBudgetList.sourceGoods) {
+        this.$message({
+          message: '请输入货源详细地址!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货详细地址!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.selectedOptions.length == 0) {
+        this.$message({
+          message: '请选择货源所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.selectedOptions1.length == 0) {
+        this.$message({
+          message: '请选择交货所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.weight) {
+        this.$message({
+          message: '请输入重量!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (
+        isNaN(this.deptBudgetList.weight) ||
+        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.weight < 0 ||
+        this.deptBudgetList.weight > 200000
+      ) {
+        this.$message({
+          message: '输入重量有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.overShort &&
+        isNaN(this.deptBudgetList.overShort)
+      ) {
+        this.$message({
+          message: '溢短装输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.unitContractPrice &&
+        isNaN(this.deptBudgetList.unitContractPrice)
+      ) {
+        this.$message({
+          message: '合同单价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.totalContractPrice &&
+        isNaN(this.deptBudgetList.totalContractPrice)
+      ) {
+        this.$message({
+          message: '合同总价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateStart) {
+        this.$message({
+          message: '请选择交货日期(起)',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateEnd) {
+        this.$message({
+          message: '请选择交货日期(止)',
+          type: 'warning',
+        })
+        return
+      }
+      //时间
+      if (
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+      ) {
+        this.$message({
+          message: '交货日期(止)选择错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.signingDate) {
+        this.$message({
+          message: '请选择签订日期',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+        this.$message({
+          message: '请选择货名',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+        this.$message({
+          message: '请选择水分',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.grade) {
+        this.$message({
+          message: '请选择品级',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.impurity ||
+        (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
+          -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '杂质输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
+        (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '容重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+        (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
+            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '霉变粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+        (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
+          -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
+            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '热损伤输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+        (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
+            (String(
+              this.deptBudgetList.contractGoodsInfo.imperfectGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '不完整粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.goodsNameKey
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '合同收入金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+          (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.waterContent).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.waterContent
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '费用金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.goodsName).length -
+            (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '已开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.impurity).length -
+            (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '未开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
+            .length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.imperfectGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '已完成发运量输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.mildewGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '未回款金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          this.deptBudgetList.sourceProvince = CodeToText[this.selectedOptions[0]]
+          this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]
+      
+          this.deptBudgetList.deliveryProvince = CodeToText[this.selectedOptions1[0]]
+          this.deptBudgetList.deliveryCity = CodeToText[this.selectedOptions1[1]]
+         
+          this.deptBudgetList.compId = this.compId
+          this.deptBudgetList.contractType = 1
+
+           if(this.deptBudgetList.deliveryProvince =="澳门特别行政区" || this.deptBudgetList.deliveryProvince == "澳门特别行政区"){
+            this.deptBudgetList.deliveryArea = "特别行政区"
+          }else{ 
+                
+                this.deptBudgetList.deliveryArea = CodeToText[this.selectedOptions1[2]]
+          }
+             if(this.deptBudgetList.sourceProvince =="澳门特别行政区" || this.deptBudgetList.sourceProvince == "澳门特别行政区"){
+            this.deptBudgetList.sourceArea = "特别行政区"
+          }else{
+              this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
+          }
+
+          addList(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('添加成功')
+              this.deptBudgetList = {
+                deliverType: '1',
+                finalTradingVolume: 0,
+                contractGoodsInfo: {
+                  goodsName: '',
+                },
+                contractProcessInfo: {},
+              }
+
+              this.$router.push({ path: 'salesContract' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    resetForm(deptBudgetList) {
+      this.$refs[deptBudgetList].resetFields()
+    },
+    saveClick(item, index) {
+      console.log(item)
+
+      if (Object.is(item.id, 1)) {
+        return
+      }
+      if (Object.is(this.unitList[index].flag, 'delete')) {
+        this.$set(this.unitList, index, { flag: 'check' })
+      } else {
+        this.$set(this.unitList, index, { flag: 'delete' })
+      }
+      if (!item.constValue) {
+        this.unitList.splice(index, 1)
+        return
+      }
+      if (item.flag == 'add') {
+        item.constKey = Math.random() * 20
+        this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
+        this.trainingMethods.constKey = item.constKey
+        this.trainingMethods.constCode = 'TYPEYAN'
+        this.trainingMethods.constValue = item.constValue
+        this.trainingMethods.id = item.id
+        addxiala(this.trainingMethods)
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+          })
+      } else if (item.flag == 'check') {
+        this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
+        this.trainingMethods.constKey = item.constKey
+        this.trainingMethods.constCode = 'TYPEYAN'
+        this.trainingMethods.constValue = item.constValue
+        this.trainingMethods.id = item.id
+        editxiala(this.trainingMethods)
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+          })
+      }
+    },
+    // selectContract(val) {
+    //   let key = this.unitList.find((item) => item.constValue === val).constKey
+    //   this.pleaseChoose = val
+    // },
+
+    handleExamine() {},
+    approve() {},
+    // returnsales() {
+    //   this.$router.push({ path: 'purchaseContract' })
+    // },
+    addClick() {
+      // let [flag, constValue, constKey] = ['check', '', '']
+      // let obj = { flag, constValue, constKey }
+      // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
+      // let result = this.unitList.filter((item, val, arr) => {
+      //   return item.id != '1'
+      // })
+      // result.push(obj)
+      // result.push(objAdd)
+      // this.unitList = result
+      this.unitList.push({
+        flag: 'add',
+        constValue: '',
+        constKey: '',
+      })
+    },
+    selectChapterTwo(e) {
+      for (var i = 0; i < this.ChapterTwoList.length; i++) {
+        if (this.ChapterTwoList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+        }
+      }
+    },
+    selectunitList(e) {
+      for (var i = 0; i < this.unitList.length; i++) {
+        if (this.unitList[i].constValue == e) {
+          this.deptBudgetList.packingMethodKey = this.unitList[i].constKey
+        }
+      }
+    },
+    selectgrade(e) {
+      for (var i = 0; i < this.gradeList.length; i++) {
+        if (this.gradeList[i].constValue == e) {
+          this.deptBudgetList.gradeKey = this.gradeList[i].constKey
+        }
+      }
+    },
+    selectgoodsName(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.deptBudgetList.acceptanceMethodKey =
+            this.packtypeList[i].constKey
+        }
+      }
+    },
+    // 编辑
+    editClick(item, index) {
+      const map = JSON.parse(JSON.stringify(item))
+      if (Object.is(item.id, 1)) {
+        return
+      }
+      if (Object.is(this.unitList[index].flag, 'delete')) {
+        map.flag = 'check'
+        this.$set(this.unitList, index, map)
+      } else {
+        map.flag = 'delete'
+        this.$set(this.unitList, index, map)
+      }
+    },
+    // 删除
+    deleteClick(item, index) {
+      if (Object.is(item.constKey, 1)) {
+        return
+      }
+      if (!item.constValue) {
+        this.unitList.splice(index, 1)
+        return
+      }
+      delxiala({ id: this.unitList[index].id })
+        .toPromise()
+        .then((response) => {
+          this.getUnitList()
+          this.pleaseChoose = ''
+        })
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.readonly {
+  position: relative;
+}
+.readonly:after {
+  content: '*';
+  color: #ff2727;
+  position: absolute;
+  right: 8px;
+  z-index: 10;
+  top: 21%;
+  font-size: 20px;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid #cdd2dc;
+  background: #fafbfc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+  background: #f0f2f6;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 16px 0px;
+}
+.wenzi {
+  width: 70%;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 10px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 70%;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+.ce {
+  width: 70%;
+  margin: 0 auto;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 130px;
+}
+//*号
+.unchangeable {
+  position: absolute;
+  width: 9px;
+  height: 22px;
+  font-size: 16px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #ff2727;
+  line-height: 22px;
+  display: inline-block;
+  right: 14px;
+}
+/deep/.el-input,
+/deep/.el-date-editor {
+  font-size: 13px;
+}
+/deep/.el-textarea {
+  width: 101%;
+  margin: 0px;
+}
+/deep/el-date-editor--date {
+  width: 200px;
+}
+.unchanged {
+  position: absolute;
+  left: 37px;
+  width: 102px;
+  height: 14px;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #afb5cb;
+  line-height: 14px;
+}
+/deep/.el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+}
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+</style>

+ 1602 - 0
src/views/platformaudit/salesContractEdit.vue

@@ -0,0 +1,1602 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">修改合同信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertion-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <div class="wenzi">
+      <h3>基本信息</h3>
+      <p>
+        &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“*”
+        标记的条目提交后不可修改。
+      </p>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--基本信息-->
+        <ws-info-table>
+          <!--合同编号-->
+          <ws-form-item label="合同编号" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.contractNo }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--运输方式-->
+          <ws-form-item label="运输方式" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.shippingType"
+              placeholder="请输入运输方式"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--买方-->
+          <ws-form-item label="买方" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.buyer }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--结算方式-->
+          <ws-form-item label="结算方式" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.settlementMethod"
+              placeholder="请输入结算方式"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--卖方-->
+          <ws-form-item label="卖方" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.seller }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--交货方式-->
+          <ws-form-item label="交货方式" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.deliverType1 }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--买方电话-->
+          <ws-form-item label="买方电话" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.buyerPhone"
+              placeholder="请输入买方电话"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--包装方式-->
+          <ws-form-item label="包装方式" span="1" prop="packingMethod">
+            <ws-select
+              v-model="deptBudgetList.packingMethod"
+              placeholder=""
+              class="typeselect"
+              @change="selectpackingMethod"
+            >
+              <ws-option
+                v-for="item in packtypeList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+          <!--卖方电话-->
+          <ws-form-item label="卖方电话" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.sellerPhone"
+              placeholder="请输入卖房电话"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--验收方式-->
+          <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+            <el-select
+              v-model="deptBudgetList.acceptanceMethod"
+              placeholder="请选择验收方式"
+              style="width: 100%"
+              filterable
+              @change="selectunitList"
+            >
+              <el-option
+                v-for="(item, index) in unitList"
+                :key="item.constValue"
+                :label="item.constValue"
+                :value="item.constValue"
+              >
+                <span class="unit-left" style="float: left">
+                  <span v-if="item.flag == 'delete'">
+                    {{ item.constValue }}</span
+                  >
+                  <!-- 新增文本框 -->
+                  <div
+                    style="width: 160px"
+                    v-if="item.flag !== 'delete'"
+                    @click.stop
+                  >
+                    <ws-input
+                      v-model="item.constValue"
+                      clearable
+                      maxlength="10"
+                      style="width: 100%"
+                    ></ws-input>
+                  </div>
+                </span>
+                <span style="float: right; color: #8492a6; font-size: 13px">
+                  <!-- 对号 -->
+                  <i
+                    class="el-icon-check"
+                    style="line-height: 29px; margin-left: 10px"
+                    v-if="item.flag !== 'delete'"
+                    @click.stop="saveClick(item, index)"
+                  ></i>
+                  <!-- 编辑 -->
+                  <i
+                    class="el-icon-edit"
+                    style="line-height: 29px; margin-left: 10px"
+                    v-if="item.flag == 'delete'"
+                    @click.stop="editClick(item, index)"
+                  ></i>
+                  <!-- 删除 -->
+                  <i
+                    class="el-icon-delete"
+                    style="line-height: 29px"
+                    @click.stop="deleteClick(item, index)"
+                  ></i>
+                </span>
+              </el-option>
+              <!-- 新增按钮 -->
+              <el-option value="" label="">
+                <div
+                  style="
+                    text-align: right;
+                    border-top: 1px solid #dcdfe6;
+                    padding: 5px;
+                  "
+                >
+                  <ws-button type="primary" @click.stop="addClick">{{
+                    $t('button.add')
+                  }}</ws-button>
+                </div>
+              </el-option>
+            </el-select>
+          </ws-form-item>
+          <!--重量(吨)-->
+          <ws-form-item label="重量(吨)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.weight"
+              placeholder="请输入重量(吨)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--交货日期(起)-->
+          <ws-form-item
+            label="交货日期(起)"
+            span="1"
+            prop="deliveryDateStart"
+          >
+            <ws-date-picker
+              v-model="deptBudgetList.deliveryDateStart"
+              type="date"
+              placeholder="请选择交货日期(起)"
+              value-format="yyyy-MM-dd"
+            />
+          </ws-form-item>
+          <!--溢短装(%)-->
+          <ws-form-item label="溢短装(%)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.overShort"
+              placeholder="请输入溢短装(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--交货日期(止)-->
+          <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+            <ws-date-picker
+              v-model="deptBudgetList.deliveryDateEnd"
+              type="date"
+              placeholder="请选择交货日期(止)"
+              value-format="yyyy-MM-dd"
+            />
+          </ws-form-item>
+
+          <!--合同单价(元/吨)-->
+          <ws-form-item label="合同单价(元/吨)" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.unitContractPrice }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--合同总价-->
+          <ws-form-item label="合同总价" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.totalContractPrice"
+              placeholder="请输入合同总价"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!-- 货源所在地区 -->
+          <ws-form-item label="货源所在地区" span="1" prop="packingMethod">
+            <el-cascader
+              :options="options_"
+              v-model="selectedOptions"
+              clearable
+              size="large"
+              placeholder="请选择货源所在地区"
+              style="width: 200%"
+              @change="handleChange"
+            />
+          </ws-form-item>
+          <!-- 货源详细地址 -->
+          <ws-form-item label="货源详细地址" span="1" prop="totalContractPrice">
+            <ws-input
+              v-model="deptBudgetList.totalContractPrice"
+              maxlength="100"
+              placeholder="请输入货源详细地址"
+              size="small"
+            />
+          </ws-form-item>
+          <!-- 交货地所在地区 -->
+          <ws-form-item label="交货地所在地区" span="1" prop="packingMethod">
+            <el-cascader
+              :options="options_"
+              v-model="selectedOptions1"
+              clearable
+              size="large"
+              placeholder="请选择交货地所在地区"
+              style="width: 200%"
+              @change="handleChange1"
+            />
+          </ws-form-item>
+          <!-- 交货地详细地址 -->
+          <ws-form-item
+            label="交货地详细地址"
+            span="1"
+            prop="totalContractPrice"
+          >
+            <ws-input
+              v-model="deptBudgetList.totalContractPrice"
+              maxlength="100"
+              placeholder="请输入交货地详细地址"
+              size="small"
+            />
+          </ws-form-item>
+          <!--签订日期-->
+          <ws-form-item label="签订日期" span="1" prop="signingDate">
+            <ws-date-picker
+              v-model="deptBudgetList.signingDate"
+              type="date"
+              placeholder="请选择合同签订日期"
+              value-format="yyyy-MM-dd"
+            />
+          </ws-form-item>
+          <!-- 最终实际交易量(吨) -->
+          <ws-form-item
+            label="最终实际交易量(吨)"
+            span="1"
+            prop="totalContractPrice"
+          >
+            <ws-input
+              v-model="deptBudgetList.finalTradingVolume"
+              maxlength="100"
+              placeholder="请输入最终实际交易量"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+    <!-- <base-card> -->
+    <div class="wenzi">
+      <h3>货物信息</h3>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--货物信息-->
+        <ws-info-table>
+          <!--货名-->
+          <ws-form-item label="货名" span="1" prop="goodsName">
+            <!-- <ws-select
+                v-model="deptBudgetList.contractGoodsInfo.goodsName"
+                placeholder=""
+                class="typeselect"
+                @change="selectpackingMethod"
+              >
+                <ws-option
+                  v-for="item in goodnameList"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select> -->
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.goodsName }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.waterContent"
+              placeholder="请输入水分(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--品级-->
+          <ws-form-item label="品级" span="1" prop="grade">
+            <ws-select
+              v-model="deptBudgetList.contractGoodsInfo.grade"
+              placeholder=""
+              class="typeselect"
+              @change="selectgrade"
+            >
+              <ws-option
+                v-for="item in gradeList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.impurity"
+              placeholder="请输入杂质(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--容量(克/升)>=-->
+          <ws-form-item label="容量(克/升)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.bulkDensity"
+              placeholder="请输入容量(克/升)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.mildewGrain"
+              placeholder="请输入霉变粒(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.jiaorenli"
+              placeholder="请输入热损伤(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--不完整粒(%)<=-->
+          <ws-form-item label="不完整粒(%)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractGoodsInfo.imperfectGrain"
+              placeholder="请输入不完整粒(%)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+    <div class="wenzi">
+      <h3>流程信息</h3>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--流程信息-->
+
+        <ws-info-table>
+          <!--合同收入(元)-->
+          <ws-form-item label="合同收入(元)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsNameKey"
+              placeholder="请输入合同收入(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--已开发票(元)-->
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.goodsName"
+              placeholder="请输入已开发票(元))"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--费用支出(元)-->
+          <ws-form-item label="费用支出(元)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.waterContent"
+              placeholder="请输入费用支出(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--未开发票(元)-->
+          <ws-form-item label="未开发票(元)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.impurity"
+              placeholder="请输入未开发票(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--未回款(元)-->
+          <ws-form-item label="未回款(元)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.mildewGrain"
+              placeholder="请输入未回款(元)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--已完成发货量(吨)-->
+          <ws-form-item label="已完成发货量(吨)" span="1" prop="contractNo">
+            <ws-input
+              v-model="deptBudgetList.contractProcessInfo.imperfectGrain"
+              placeholder="请输入已完成发货量(吨)"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <!--双章原件回收情况-->
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+            <ws-select
+              v-model="deptBudgetList.contractProcessInfo.grade"
+              placeholder=""
+              class="typeselect"
+              @change="selectpackingMethod"
+            >
+              <ws-option
+                v-for="item in ChapterTwoList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+      </ws-form>
+    </div>
+
+    <div class="wenzi">
+      <h3>备注信息</h3>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="ruleDeptBudget"
+        :model="deptBudgetList"
+      >
+        <!--备注信息-->
+        <ws-input
+          v-model="deptBudgetList.remarks"
+          type="textarea"
+          row="3"
+          placeholder="请输入备注信息,不超过200字"
+          maxlength="200"
+        />
+        <ws-upload
+          ref="upload"
+          table-name="maintain_work_order"
+          oss-key="mainPlan"
+          :comp-id="compId"
+          :appendix-ids="appendixIdsAdd"
+          :vesselId="deptBudgetList.addressUrl"
+          :size-limit="size"
+          @uploadSuccess="uploadSuccess"
+          @onChange="onChange"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+        />
+      </ws-form>
+    </div>
+    <div style="text-align: right; padding: 10px" class="center">
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()"
+        >提交</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+// import { getVesselOne } from '@/model/procurement/basic'
+// import { dayjs } from 'base-core-lib'
+import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
+import WsUpload from '@/components/WsUpload'
+import {
+  examineList,
+  editInfo,
+  packList,
+  xiala,
+  addxiala,
+  editxiala,
+  delxiala,
+} from '@/model/contarct/index'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+  },
+  watch: {
+    vesselId(val) {
+      this.loaddata()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      // 提交类型
+      submitType: true,
+      options_: regionData,
+      selectedOptions: [],
+      selectedOptions1: [],
+      tableData: [{ date: 1111, name: 'qqqq', address: 'errrtt' }],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      // selectpackingMethod:{},
+      selectunitList: {},
+      //change:{},
+      onChange: {},
+      uploadSuccess: {},
+      selectgrade: {},
+      goodnameList: {},
+      selectpackingMethod: {},
+      unitList: {},
+      packtypeList: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      appendixIdsAdd: '',
+      size: 10,
+      deptBudgetList: {
+        contractGoodsInfo: {
+          goodsName: '',
+        },
+        contractProcessInfo: {},
+      },
+      // selectpackingMethod:{},
+      //  change:{},
+      ruleDeptBudget: {},
+      trainingMethods: {},
+      isEdited: false,
+      registered: {},
+      selectCrtDuty: {},
+      dutyList: {},
+      sexList: {},
+      selectDuty: {},
+      gradeList: {},
+      ChapterTwoList: {},
+      selectIntendedShip: {},
+      interviewTypeList: {},
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.loaddata()
+    this.editInfo()
+    this.showType = this.isShow
+    // console.log(this.$route.params)
+    this.showType = this.isShow
+  },
+  methods: {
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    returnsales() {
+      this.deptBudgetList = {}
+      this.$router.push({ path: 'salesContract' })
+    },
+    handleChange(value) {
+      this.selectedOptions = value
+    },
+    handleChange1(value) {
+      this.selectedOptions1 = value
+    },
+    loaddata() {
+      // 数据
+      examineList({ id: this.$route.query.id })
+        .toPromise()
+        .then((response) => {
+          var tmp = []
+          tmp[0] = TextToCode[response.sourceProvince].code
+          tmp[1] = TextToCode[response.sourceProvince][response.sourceCity].code
+          if (tmp[0] == 810000 || tmp[0] == 820000) {
+            tmp[2] = null
+          } else {
+            tmp[2] =
+              TextToCode[response.sourceProvince][response.sourceCity][
+                response.sourceArea
+              ].code
+          }
+          this.selectedOptions = tmp
+          var tmp1 = []
+          tmp1[0] = TextToCode[response.deliveryProvince].code
+          tmp1[1] =
+            TextToCode[response.deliveryProvince][response.deliveryCity].code
+          if (tmp1[0] == 810000 || tmp1[0] == 820000) {
+            tmp1[2] = null
+          } else {
+            tmp1[2] =
+              TextToCode[response.deliveryProvince][response.deliveryCity][
+                response.deliveryArea
+              ].code
+          }
+
+          this.selectedOptions1 = tmp1
+          this.deptBudgetList = response
+        })
+      // 包装方式
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 双章
+      packList({ constId: 'CON4' })
+        .toPromise()
+        .then((response) => {
+          this.ChapterTwoList = response
+        })
+    },
+
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          if (this.deptBudgetList.deliverType == 1) {
+            this.deptBudgetList.deliverType1 = '我方自提'
+          } else if (this.deptBudgetList.deliverType == 2) {
+            this.deptBudgetList.deliverType1 = '对方送货'
+          }
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
+    // 编辑
+    editClick(item, index) {
+      const map = JSON.parse(JSON.stringify(item))
+      if (Object.is(item.id, 1)) {
+        return
+      }
+      if (Object.is(this.unitList[index].flag, 'delete')) {
+        map.flag = 'check'
+        this.$set(this.unitList, index, map)
+      } else {
+        map.flag = 'delete'
+        this.$set(this.unitList, index, map)
+      }
+    },
+    // 删除
+    deleteClick(item, index) {
+      if (Object.is(item.constKey, 1)) {
+        return
+      }
+      if (!item.constValue) {
+        this.unitList.splice(index, 1)
+        return
+      }
+      delxiala({ id: this.unitList[index].id })
+        .toPromise()
+        .then((response) => {
+          this.getUnitList()
+          this.pleaseChoose = ''
+        })
+    },
+    saveClick(item, index) {
+      //  console.log(item)
+
+      if (Object.is(item.id, 1)) {
+        return
+      }
+      if (Object.is(this.unitList[index].flag, 'delete')) {
+        this.$set(this.unitList, index, { flag: 'check' })
+      } else {
+        this.$set(this.unitList, index, { flag: 'delete' })
+      }
+      if (!item.constValue) {
+        this.unitList.splice(index, 1)
+        return
+      }
+      if (item.flag == 'add') {
+        item.constKey = Math.random() * 20
+        this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
+        this.trainingMethods.constKey = item.constKey
+        this.trainingMethods.constCode = 'TYPEYAN'
+        this.trainingMethods.constValue = item.constValue
+        this.trainingMethods.id = item.id
+        addxiala(this.trainingMethods)
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+          })
+      } else if (item.flag == 'check') {
+        this.trainingMethods.compId = sessionStorage.getItem('ws-pf_compId')
+        this.trainingMethods.constKey = item.constKey
+        this.trainingMethods.constCode = 'TYPEYAN'
+        this.trainingMethods.constValue = item.constValue
+        this.trainingMethods.id = item.id
+        editxiala(this.trainingMethods)
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+          })
+      }
+    },
+    addClick() {
+      // let [flag, constValue, constKey] = ['check', '', '']
+      // let obj = { flag, constValue, constKey }
+      // let objAdd = { flag: 'add', constValue: '新增项目', constKey: '' }
+      // let result = this.unitList.filter((item, val, arr) => {
+      //   return item.id != '1'
+      // })
+      // result.push(obj)
+      // result.push(objAdd)
+      // this.unitList = result
+      this.unitList.push({
+        flag: 'add',
+        constValue: '',
+        constKey: '',
+      })
+    },
+    submit() {
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
+          message: '请输入合同编号',
+          type: 'warning',
+        })
+        return
+      }
+      console.log(this.deptBudgetList.contractNo.length)
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.shippingType) {
+        this.$message({
+          message: '请输入运输方式!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.shippingType.length < 1 ||
+        this.deptBudgetList.shippingType.length > 20
+      ) {
+        this.$message({
+          message: '运输方式长度不符合要求,请输入1到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyer) {
+        this.$message({
+          message: '请输入买方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.buyer.length > 30) {
+        this.$message({
+          message: '买方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.seller) {
+        this.$message({
+          message: '请输入卖方名称!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.seller.length > 30) {
+        this.$message({
+          message: '卖方名称长度不符合要求,请输入30个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.buyerPhone) {
+        this.$message({
+          message: '请输入买方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.buyerPhone)) {
+        this.$message({
+          message: '输入买方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '买方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.sellerPhone) {
+        this.$message({
+          message: '请输入卖方电话!',
+          type: 'warning',
+        })
+        return
+      }
+      if (isNaN(this.deptBudgetList.sellerPhone)) {
+        this.$message({
+          message: '输入卖方电话有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.buyerPhone.length < 7 ||
+        this.deptBudgetList.buyerPhone.length > 20
+      ) {
+        this.$message({
+          message: '卖方电话长度不符合要求,请输入7到20个字符之内!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.settlementMethod) {
+        this.$message({
+          message: '请输入结算方式!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (!this.deptBudgetList.sourceGoods) {
+        this.$message({
+          message: '请输入货源详细地址!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.placeDelivery) {
+        this.$message({
+          message: '请输入交货详细地址!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.selectedOptions.length == 0) {
+        this.$message({
+          message: '请选择货源所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.selectedOptions1.length == 0) {
+        this.$message({
+          message: '请选择交货所在地区!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.weight) {
+        this.$message({
+          message: '请输入重量!',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (
+        isNaN(this.deptBudgetList.weight) ||
+        (String(this.deptBudgetList.weight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.weight).length -
+            (String(this.deptBudgetList.weight).indexOf('.') + 1) >
+            3) ||
+        this.deptBudgetList.weight < 0 ||
+        this.deptBudgetList.weight > 200000
+      ) {
+        this.$message({
+          message: '输入重量有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.overShort &&
+        isNaN(this.deptBudgetList.overShort)
+      ) {
+        this.$message({
+          message: '溢短装输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.unitContractPrice &&
+        isNaN(this.deptBudgetList.unitContractPrice)
+      ) {
+        this.$message({
+          message: '合同单价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.totalContractPrice &&
+        isNaN(this.deptBudgetList.totalContractPrice)
+      ) {
+        this.$message({
+          message: '合同总价输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateStart) {
+        this.$message({
+          message: '请选择交货日期(起)',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.deliveryDateEnd) {
+        this.$message({
+          message: '请选择交货日期(止)',
+          type: 'warning',
+        })
+        return
+      }
+      //时间
+      if (
+        new Date(this.deptBudgetList.deliveryDateStart).getTime() >
+        new Date(this.deptBudgetList.deliveryDateEnd).getTime()
+      ) {
+        this.$message({
+          message: '交货日期(止)选择错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.signingDate) {
+        this.$message({
+          message: '请选择签订日期',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.goodsName) {
+        this.$message({
+          message: '请选择货名',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.waterContent) {
+        this.$message({
+          message: '请选择水分',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractGoodsInfo.grade) {
+        this.$message({
+          message: '请选择品级',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.impurity ||
+        (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf('.') !=
+          -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '杂质输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.bulkDensity ||
+        (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '容重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.mildewGrain ||
+        (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.mildewGrain).length -
+            (String(this.deptBudgetList.contractGoodsInfo.mildewGrain).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '霉变粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.jiaorenli ||
+        (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf('.') !=
+          -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.jiaorenli).length -
+            (String(this.deptBudgetList.contractGoodsInfo.jiaorenli).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '热损伤输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        !this.deptBudgetList.contractGoodsInfo.imperfectGrain ||
+        (String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractGoodsInfo.imperfectGrain).length -
+            (String(
+              this.deptBudgetList.contractGoodsInfo.imperfectGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '不完整粒输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsNameKey < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.goodsNameKey).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.goodsNameKey).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.goodsNameKey
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '合同收入金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.waterContent > 10000000) |
+          (this.deptBudgetList.contractProcessInfo.waterContent < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.waterContent).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.waterContent).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.waterContent
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '费用金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.goodsName > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.goodsName < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.goodsName).length -
+            (String(this.deptBudgetList.contractProcessInfo.goodsName).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '已开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.impurity > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.impurity < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.impurity).length -
+            (String(this.deptBudgetList.contractProcessInfo.impurity).indexOf(
+              '.'
+            ) +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '未开发票金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (this.deptBudgetList.contractProcessInfo.imperfectGrain > 200000) |
+          (this.deptBudgetList.contractProcessInfo.imperfectGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.imperfectGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.imperfectGrain)
+            .length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.imperfectGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '已完成发运量输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        (!this.deptBudgetList.contractProcessInfo.mildewGrain > 1000000000) |
+          (this.deptBudgetList.contractProcessInfo.mildewGrain < 0) ||
+        (String(this.deptBudgetList.contractProcessInfo.mildewGrain).indexOf(
+          '.'
+        ) != -1 &&
+          String(this.deptBudgetList.contractProcessInfo.mildewGrain).length -
+            (String(
+              this.deptBudgetList.contractProcessInfo.mildewGrain
+            ).indexOf('.') +
+              1) >
+            2)
+      ) {
+        this.$message({
+          message: '未回款金额输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          this.deptBudgetList.sourceProvince =
+            CodeToText[this.selectedOptions[0]]
+          this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]
+
+          this.deptBudgetList.deliveryProvince =
+            CodeToText[this.selectedOptions1[0]]
+          this.deptBudgetList.deliveryCity =
+            CodeToText[this.selectedOptions1[1]]
+
+          this.deptBudgetList.compId = this.compId
+          this.deptBudgetList.contractType = 1
+
+          if (
+            this.deptBudgetList.deliveryProvince == '澳门特别行政区' ||
+            this.deptBudgetList.deliveryProvince == '澳门特别行政区'
+          ) {
+            this.deptBudgetList.deliveryArea = '特别行政区'
+          } else {
+            this.deptBudgetList.deliveryArea =
+              CodeToText[this.selectedOptions1[2]]
+          }
+          if (
+            this.deptBudgetList.sourceProvince == '澳门特别行政区' ||
+            this.deptBudgetList.sourceProvince == '澳门特别行政区'
+          ) {
+            this.deptBudgetList.sourceArea = '特别行政区'
+          } else {
+            this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
+          }
+          editInfo(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('编辑成功')
+              this.deptBudgetList = {}
+              this.$router.push({ path: 'salesContract' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    editInfo() {
+      editInfo({})
+    },
+    // getList(){}
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.readonly {
+  position: relative;
+}
+.readonly:after {
+  content: '*';
+  color: #ff2727;
+  position: absolute;
+  right: 8px;
+  z-index: 10;
+  top: 21%;
+  font-size: 20px;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid #cdd2dc;
+  background: #fafbfc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+  background: #f0f2f6;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 6px 0px;
+}
+.wenzi {
+  width: 70%;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 30px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 70%;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+
+//*号
+.unchangeable {
+  position: absolute;
+  width: 9px;
+  height: 22px;
+  font-size: 16px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #ff2727;
+  line-height: 22px;
+  display: inline-block;
+  right: 14px;
+}
+/deep/.el-input,
+/deep/.el-date-editor {
+  font-size: 13px;
+}
+/deep/.el-textarea {
+  width: 101%;
+  margin: 0px;
+}
+/deep/el-date-editor--date {
+  width: 200px;
+}
+.unchanged {
+  position: absolute;
+  left: 37px;
+  width: 102px;
+  height: 14px;
+  font-size: 14px;
+  font-weight: 400;
+  color: #afb5cb;
+  line-height: 14px;
+}
+/deep/.el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+}
+
+</style>

+ 733 - 0
src/views/platformaudit/salesContractExamine.vue

@@ -0,0 +1,733 @@
+
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">查看合同详情</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertion-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <div class="state">
+      <h2>销售合同</h2>
+      <p>【编号:{{ deptBudgetList.contractNo }}】</p>
+      <span class="icon">&nbsp;&nbsp;{{ deptBudgetList.status }}</span>
+    </div>
+    <div class="center">
+      <ws-form
+        ref="deptBudgetList"
+        :rules="mainReportAdd"
+        :model="deptBudgetList"
+      >
+        <div class="remark">
+          <h3>基本信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="合同编号" span="1" prop="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.contractNo }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+          <ws-form-item label="运输方式" span="1" prop="shippingType">
+            <div class="unchanged">
+              {{ deptBudgetList.shippingType }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="买方" span="1" prop="buyer">
+            <div class="unchanged">
+              {{ deptBudgetList.buyer }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+          <ws-form-item label="结算方式" span="1" prop="settlementMethod">
+            <div class="unchanged">
+              {{ deptBudgetList.settlementMethod }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="卖方" span="1" prop="seller">
+            <div class="unchanged">
+              {{ deptBudgetList.seller }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+          <ws-form-item label="交货方式" span="1" prop="deliverType">
+            <div class="unchanged">
+              {{ deptBudgetList.deliverType1 }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="买方电话" span="1" prop="buyerPhone">
+            <div class="unchanged">
+              {{ deptBudgetList.buyerPhone }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="包装方式" span="1" prop="packingMethod">
+            <div class="unchanged">
+              {{ deptBudgetList.packingMethod }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
+            <div class="unchanged">
+              {{ deptBudgetList.sellerPhone }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+            <div class="unchanged">
+              {{ deptBudgetList.acceptanceMethod }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="重量(吨)" span="1" prop="weight">
+            <div class="unchanged">
+              {{ deptBudgetList.weight }}
+            </div>
+          </ws-form-item>
+         <ws-form-item
+            label="交货日期(起)"
+            span="1"
+            prop="deliveryDateStart"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.deliveryDateStart }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+            <div class="unchanged">
+              {{ deptBudgetList.overShort }}
+            </div>
+          </ws-form-item>
+         <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+            <div class="unchanged">
+              {{ deptBudgetList.deliveryDateEnd }}
+            </div>
+          </ws-form-item>
+          <ws-form-item
+            label="合同单价(元/吨)"
+            span="1"
+            prop="unitContractPrice"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.unitContractPrice }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+          
+          <ws-form-item
+            label="合同总价(元)"
+            span="1"
+            prop="totalContractPrice"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.totalContractPrice }}
+            </div>
+          </ws-form-item>
+          
+          <ws-form-item label="货源所在地区" span="1" >
+            <div class="unchanged">
+                {{deptBudgetList. sourceProvince}}
+                {{deptBudgetList. sourceCity}}
+                {{deptBudgetList. sourceArea}}
+
+            </div>
+          </ws-form-item>
+          
+          <ws-form-item label="货源详细地址" span ="1" prop = "sourceGoods">
+            <div class = "unchanged">
+                {{deptBudgetList.sourceGoods}}
+            </div>
+          </ws-form-item>
+          
+          <ws-form-item label="交货地所在地区" span="1" >
+              <div class="unchanged">
+                  {{deptBudgetList. deliveryProvince}}
+                  {{deptBudgetList.deliveryCity}}
+                  {{deptBudgetList.deliveryArea}}
+              </div>
+          </ws-form-item>
+          
+          <ws-form-item label="交货地详细地址" span="1" prop="placeDelivery">
+            <div class = "unchanged">
+                {{deptBudgetList.placeDelivery}}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="签订日期" span="1" prop="signingDate">
+            <div class="unchanged">
+              {{ deptBudgetList.signingDate }}
+            </div>
+          </ws-form-item>
+          
+          <ws-form-item label="最终实际交易量 (吨)" span="1" prop="finalTradingVolume">
+            <div class="unchanged">
+              {{deptBudgetList.finalTradingVolume}}
+            </div>
+          </ws-form-item>
+        </ws-info-table>
+
+        <!-- </base-card> -->
+
+        <!--面试信息-->
+        <div class="remark">
+          <h3>货物信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="货名" span="1" prop="waterContent">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.goodsName }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+          <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.waterContent }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="品级" span="1" prop="grade">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.grade }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.impurity }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="容重(克/升)<=" span="1" prop="bulkDensity">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.bulkDensity }}
+            </div>
+          </ws-form-item>
+          <ws-form-item
+            label="霉变粒(%)<="
+            span="1"
+            prop="mildewGrain"
+            class="result"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.mildewGrain }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.jiaorenli }}
+            </div>
+          </ws-form-item>
+          <ws-form-item
+            label="不完善粒(%)<="
+            span="1"
+            prop="imperfectGrain"
+            class="result"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.imperfectGrain }}
+            </div>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>流程信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="合同收入(元)" span="1" prop="goodsNameKey">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.goodsNameKey }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.goodsName }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.waterContent }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.impurity }}
+            </div>
+          </ws-form-item>
+          <ws-form-item label="未回款(元)" span="1" prop="mildewGrain">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.mildewGrain }}
+            </div>
+          </ws-form-item>
+          <ws-form-item
+            label="已完成发运量(吨)"
+            span="1"
+            prop="imperfectGrain"
+            class="result"
+          >
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+            </div>
+          </ws-form-item>
+          <!-- <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+          <div class="unchanged">
+            {{ deptBudgetList.contractProcessInfo.grade }}
+          </div>
+
+          >{{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+        </ws-form-item> -->
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+            <div class="unchanged">
+              {{ deptBudgetList.contractProcessInfo.grade }}
+            </div>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>备注信息</h3>
+          <div class=" beizhu">
+          {{ deptBudgetList.remarks }}
+        </div>
+
+        </div>
+
+        
+        <img :src="deptBudgetList.addressUrl" alt="" />
+
+        <!-- </base-card> -->
+      </ws-form>
+      <div style="text-align: right; padding: 10px">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          >关闭</el-button
+        >
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import {
+  packList,
+  xiala,
+  examineList,
+} from '@/model/contarct/index'
+import { dayjs } from 'base-core-lib'
+import WsUpload from '@/components/WsUpload'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+  },
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      // 提交类型
+      submitType: true,
+      tableData: [],
+      ruleDeptBudget: [],
+      deptBudgetList: {
+        contractProcessInfo: {},
+        contractGoodsInfo: {},
+      },
+      mainReportAdd: {},
+      list: {},
+      
+    }
+  },
+
+  activated() {
+    this.status = this.$route.query.status
+    this.loaddata()
+    this.showType = this.isShow
+    // this.examineList()
+  },
+  methods: {
+    loaddata() {
+      // 数据
+      examineList({ id: this.$route.query.id })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList = response
+          if(this.deptBudgetList.deliverType == 1){
+            this.deptBudgetList.deliverType1 = "我方自提"
+          }else if(this.deptBudgetList.deliverType == 2){
+            this.deptBudgetList.deliverType1 = "对方送货" 
+          }
+        })
+      // 包装方式
+      packList({ constId: 'CON1' })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+      // 验收方式
+      this.getUnitList()
+      // 货名
+      packList({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      packList({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 双章
+      packList({ constId: 'CON4' })
+        .toPromise()
+        .then((response) => {
+          this.ChapterTwoList = response
+        })
+    },
+    getUnitList() {
+      xiala({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        constCode: 'TYPEYAN',
+      })
+        .toPromise()
+        .then((response) => {
+          this.unitList = response
+          let currItem
+          this.unitList.forEach((item, index, arr) => {
+            item.flag = 'delete'
+            if (this.vModel == item.constKey) {
+              currItem = item
+            }
+          })
+          //
+          if (currItem) {
+            this.selectContract(currItem.constValue)
+          }
+        })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    handleExamine() {},
+    approve() {},
+    returnsales() {
+      this.$router.push({ path: 'salesContract' })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.readonly {
+  position: relative;
+}
+.readonly:after {
+  content: '*';
+  color: #ff2727;
+  position: absolute;
+  right: 8px;
+  z-index: 10;
+  top: 21%;
+  font-size: 20px;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid #cdd2dc;
+  background: #fafbfc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+  background: #f0f2f6;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 6px 0px;
+}
+.wenzi {
+  width: 900px;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 30px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 900px;
+  margin: 0 auto;
+}
+.el-form-item {
+  width: 50%;
+}
+.el-form-item__label {
+  text-align: center;
+}
+/*.crt-main .textarea /deep/ .el-form-item__label {*/
+/*  height: 82px;*/
+/*}*/
+// 控制select为只读的时候显示样式
+
+.hide-sel {
+  .el-input__inner {
+    border: 0px;
+  }
+  .el-icon-arrow-up {
+    display: none;
+  }
+  .el-textarea__inner {
+    background-color: #fff !important;
+    border: 0;
+  }
+  .el-date-editor {
+    i {
+      display: none;
+    }
+  }
+  .is-disabled {
+    .el-input__inner:hover {
+      background-color: #fff !important;
+      border: 0;
+    }
+    color: #606266;
+    .el-input__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+      color: #606266;
+    }
+  }
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+/deep/.is-disabled {
+  .el-input__prefix,
+  .el-input__suffix {
+    display: none;
+  }
+  .el-input__inner {
+    background-color: #fff;
+    border-color: #fff !important;
+    color: #000 !important;
+    font-size: 14px;
+    cursor: text;
+    padding: 0 !important;
+  }
+}
+.winseaview-view {
+  padding: 10px 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+.state {
+  width: 900px;
+  margin: 0 auto;
+}
+.state h2,
+.state p {
+  display: inline-block;
+}
+.state p {
+  display: inline-block;
+  margin-left: 10px;
+  width: 170px;
+  height: 20px;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #000000;
+  line-height: 20px;
+}
+.icon {
+  display: inline-block;
+  width: 60px;
+  height: 24px;
+  background: #ecfeff;
+  border-radius: 12px;
+  border: 1px solid #50cad4;
+  position: relative;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-size: 14px;
+  color: #50cad4;
+  line-height: 24px;
+}
+
+//*号
+.unchangeable {
+  position: absolute;
+  width: 9px;
+  height: 22px;
+  font-size: 16px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  font-weight: 500;
+  color: #ff2727;
+  line-height: 22px;
+  display: inline-block;
+  right: 14px;
+}
+/deep/.el-input,
+/deep/.el-date-editor {
+  font-size: 13px;
+  width: 232px;
+  left: 21px;
+}
+/deep/.el-textarea {
+  width: 900px;
+  margin: 0px;
+}
+/deep/el-date-editor--date {
+  width: 200px;
+}
+/deep/.beizhu {
+  margin: 0 auto;
+  font-size: 14px;
+  color: #afb5cb;
+  margin-left: 20px;
+}
+.unchanged {
+  position: absolute;
+  left: 37px;
+  width: 900px;
+  height: 14px;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #afb5cb;
+  line-height: 14px;
+}
+/deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+  width: 130px;
+}
+/deep/.el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+  width: 232px;
+}
+</style>

+ 19 - 41
src/views/statisticalReport/stockPurchaseReceiptReportList.vue

@@ -54,12 +54,6 @@
             @click="dis()"
             >定金</ws-button
           >
-          <ws-button
-            type="primary"
-            v-hasPermission="`report.goodsProcurementInReport.view`"
-            @click="exportlist()"
-            >导出</ws-button
-          >
         </el-col>
         <el-col style="text-align: right; line-height: 60px;  width:300px" :span="8">
         <el-date-picker style="margin: 0 10px 0 0" value-format='yyyy-MM-dd' v-model="value2" @change='datechange'
@@ -166,6 +160,7 @@
         @selection-change="handleSelectionChange"
       >
         <el-table-column
+          :selectable="selectInit"
           type="selection"
           width="55"
         ></el-table-column>
@@ -442,17 +437,13 @@ import {
   editSettlementWeight,
   addDisOrRemarks,
   stockPurchasePayMoney,
-  export1
 } from '@/model/statisticalReport/index'
 import { workflowcontent } from '@/model/houseSelfCollect/index'
 import { downloadFile } from '@/utils/batchDown'
 import { posthandle } from '@/model/purchasingManagement/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
-import {
-    dayjs,
-    EventBus
-  } from 'base-core-lib'
+import { EventBus } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -578,10 +569,6 @@ export default {
       accessoryTFs1: false,
       appendixIdss: [],
       appendixIdss1:'',
-      date: {
-          year: dayjs().format('YYYY'),
-          month: dayjs().format('MM'),
-        },
     }
   },
   activated() {
@@ -697,7 +684,15 @@ export default {
     },
     selectInit(row) {
       //在这里一定要记得类型匹配的上。
-      
+      if (row.approveStatus == null) {
+        return true
+      } else if (row.approveStatus != null) {
+        if (row.taskId == null) {
+          return false
+        } else {
+          return true
+        }
+      }
     },
     //添加定金信息
     dis() {
@@ -897,18 +892,6 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择一条要审核的条目')
       } else {
-        for (let i = 0; i < this.modification.length; i++) {
-          if (this.modification[i].approveStatus == null) {
-              this.$message.warning('请选择一条待审核的条目')
-              return
-          } else if (this.modification[i].approveStatus != null) {
-            if (this.modification[i].taskId == null) {
-              this.$message.warning('请选择一条待审核的条目')
-              return 
-            } else {
-            }
-          }
-        }
         this.$confirm(`审核通过后,任务将发送给下一级,是否确定通过?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
@@ -958,18 +941,6 @@ export default {
       if (this.modification.length == 0) {
         this.$message.warning('请选择要驳回的条目')
       } else {
-         for (let i = 0; i < this.modification.length; i++) {
-          if (this.modification[i].approveStatus == null) {
-              this.$message.warning('请选择一条待审核的条目')
-              return
-          } else if (this.modification[i].approveStatus != null) {
-            if (this.modification[i].taskId == null) {
-              this.$message.warning('请选择一条待审核的条目')
-              return 
-            } else {
-            }
-          }
-        }
         this.$confirm(`是否确定驳回?`, {
           cancelButtonText: '取消',
           confirmButtonText: '确定',
@@ -1235,7 +1206,14 @@ export default {
     async exportlist() {
       const { data } = await export1(
         {
-         stockPurchaseReceiptReportList: this.modification,
+          compId: localStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
         },
         {},
         { responseType: 'blob' }

+ 2 - 2
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -502,7 +502,7 @@
 			},
 			returnsales() {
 				this.dataList = {
-								taskTypeKey: '1'
+								taskTypeKey: 1
 							}
 				this.$router.push({
 					path: 'tranManagementWarehouseInOuttask'
@@ -765,7 +765,7 @@
 						this.$message.success('添加成功')
 						setTimeout(function() {
 							that.dataList = {
-								taskTypeKey: '1'
+								taskTypeKey: 1
 							}
 							that.dataList1 = {}
 							that.$router.push({

+ 2 - 4
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -1422,10 +1422,8 @@
                         })
                         .toPromise()
                         .then((response) => {
-                          window.open(
-                            '../../../../static/weightCheckInOut.html?type=2&tableData=' +
-                            JSON.stringify(response)
-                          )
+                          localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
                         })
                     })
                     this.$router

+ 3 - 4
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -1202,10 +1202,9 @@
                           })
                           .toPromise()
                           .then((response) => {
-                            window.open(
-                              '../../../../static/weightCheckInOut.html?type=2&tableData=' +
-                              JSON.stringify(response)
-                            )
+                                    localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
+                         
                           })
                         this.$router.push({
                           path: 'warehouseManagementList',

+ 3 - 1
src/views/warehouse/warehouseManagementRecord.vue

@@ -532,7 +532,9 @@
                       })
                         .toPromise()
                         .then((response) => {
-                            window.open( '../../../../static/weightCheckInOut.html?type=2&tableData=' +encodeURIComponent(JSON.stringify(response)))
+                                      localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
+                         
                         })
 			},
 			//返回按钮

+ 3 - 4
src/views/warehouse/warehouseManagementTare.vue

@@ -1486,10 +1486,9 @@
 
                     var date = new Date()
                     this.weightbills.updateDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' +
-                      date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date
-                      .getSeconds()
-                    window.open('../../../../static/weightCheckOut.html?type=2&tableData=' +
-                      encodeURIComponent(JSON.stringify(this.weightbills)))
+                      date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()
+                      localStorage.setItem('ck_bd_printData1',JSON.stringify(this.weightbills))
+                      window.open('../../../../static/weightCheckOut.html?type=2')
                   }
                   this.$router.push({
                     path: 'warehouseManagementList',

+ 467 - 0
src/views/warehousenew/costmanagement.vue

@@ -0,0 +1,467 @@
+<!--成本管理-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="15">
+      
+      <template slot="left">
+        <div >
+          <el-radio-group
+            v-model="warehouseType"
+            @change="changeradio"
+            size="small"
+          >
+            <el-radio-button label="1">常用仓库</el-radio-button>
+            <el-radio-button label="2">临时仓库</el-radio-button>
+          </el-radio-group>
+          <ws-button class="find" type="primary" @click="warehouselocation()"
+          v-hasPermission="
+           `warehouseManagement.costControl.add`"
+          >库点费用</ws-button>
+        </div>
+      </template>
+      <template slot="right">
+       <ws-select
+          v-model="warehouseName"
+          placeholder=""
+          @change="warehouseNameChange"
+          :value="searchType"
+          style="margin: 0 10px"
+        >
+          <ws-option
+            v-for="item in warehouseList1"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890b1"
+          />
+        </ws-select>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button type="primary" @click="find()"
+          >查找</ws-button>
+      </template>
+    </BaseHeaderLayout>
+      <el-table
+        class="wenzi"
+        :data="warehouseList"
+        :span-method="arraySpanMethod"
+        style="width: 100%; margin-top: 20px"
+        height="780"
+      >
+      <el-table-column label="序号" type="index" show-overflow-tooltip width="50">
+      </el-table-column>
+        <el-table-column prop="warehouseName" label="仓库" >
+        </el-table-column>
+        <el-table-column prop="goodsName" label="货名" >
+        </el-table-column>
+        <el-table-column prop="storage" label="储量(吨)">
+        </el-table-column>
+        <el-table-column  prop="cost" label="加权成本(元/吨)">
+        </el-table-column>
+        <el-table-column  prop="value" label="价值(元)">
+        </el-table-column>
+        
+        <el-table-column prop="address" label="操作" width="200">
+          <template slot-scope="scope">
+            <div class="record" v-hasPermission="
+           `warehouseManagement.costControl.edit`
+          " @click="edit(scope.row)">修改</div>
+            <div class="adjustment" v-hasPermission="
+           `warehouseManagement.costControl.detail`
+          " @click="weightedsubsidiary(scope.row)">加权明细</div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    ></el-pagination> -->
+      <el-dialog :close-on-click-modal='false' title="修改加权成本价格" :visible.sync="editvisible">
+        <el-form >
+          <el-form-item label="价格(元/吨)" >
+            <el-input placeholder="输入加权成本价格" v-model="price" autocomplete="off"></el-input>
+          </el-form-item>
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+          <el-button @click="editvisible = false">取 消</el-button>
+          <el-button type="primary" @click="editprice">确 定</el-button>
+        </div>
+      </el-dialog>
+  </div>
+</template>
+<script>
+import {
+  getcost,
+  editcost,
+  export1,
+  editstatus,
+  getwarehousebase,
+  billoperatehis,
+  clearancee,
+} from '@/model/warehouse/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+        currectPage:1,
+        pageSize:10,
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      price:'',
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+
+      searchType: 1,
+      searchTypeText: '未完成',
+      searchKeyWord: '',
+      contractType: 2,
+      currentPage:1,
+      warehouseType: '1',
+      // 提交类型
+      submitType: true,
+      size: 10,
+      spanArr: [],
+      id:0,
+      warehouseName: '',
+      warehouseId:'',
+      editvisible:false,
+      compId: localStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      warehouseList: [],
+      warehouseList1: [{
+        value: '全部仓库',
+        id: '',
+        count: '',
+        purchasePriceList: [],
+        No:''
+      }],
+      deptBudgetList: {},
+      historyList: [],
+      deptBudgetTotal: 0,
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    this.selectWarehouse()
+    // this.getList()
+
+    this.showType = this.isShow
+  },
+  methods: {
+    arraySpanMethod(obj){
+			if (obj.columnIndex === 1 ) {
+				// 二维数组存储的数据 取出
+				var _row = this.spanArr[obj.rowIndex]
+				var _col = _row > 0 ? 1 : 0
+				return {
+					rowspan: _row,
+					colspan: _col
+				}
+			} else {
+				return false
+			}
+    },
+    getSpanArr:function(data) {
+			var vm = this;
+			vm.spanArr = [];
+			vm.pos = 0;
+			data.forEach(function(item, index){
+				//判断是否是第一项
+				if (index === 0) {
+					vm.spanArr.push(1);
+					vm.pos = 0;
+				} else {
+					//不是第一项时,就根据标识去存储
+					if (data[index].warehouseName === data[index - 1].warehouseName ) {
+						// 查找到符合条件的数据时每次要把之前存储的数据+1
+						vm.spanArr[vm.pos] += 1;
+						vm.spanArr.push(0);
+					} else {
+						// 没有符合的数据时,要记住当前的index
+						vm.spanArr.push(1);
+						vm.pos = index
+					}
+				}
+			});
+		},
+    changeradio(e) {
+      this.selectWarehouse()
+    },
+    warehouselocation(){
+      this.$router.push({ path: 'warehouselocation',query:{cangId:this.cangid}})
+    },
+     weightedsubsidiary(item){
+      //  console.log(item)
+      this.$router.push({ path: 'weightedsubsidiary',query:{cangId:item.warehouseId}  })
+    },
+    warehouseNameChange(e) {
+      for(let i = 0 ; i < this.warehouseList1.length; i++){
+        if(this.warehouseList1[i].value == e){
+           this.warehouseName = this.warehouseList1[i].value
+          this.warehouseCount = this.warehouseList1[i].count
+          this.warehouseNo = this.warehouseList1[i].No
+          this.cangid = this.warehouseList1[i].id
+          this.WAREHOUSE[1].payname = this.warehouseList1[i].value
+          this.purchasePriceList = this.warehouseList1[i].purchasePriceList
+        }
+      }
+      this.getList()
+    },
+    edit(item){
+      this.price=item.cost
+      this.editvisible=true
+      this.id=item.id
+    },
+    editprice(){
+      if(!this.price){
+            this.$message({
+              message: '价格不能为空!',
+              type: 'warning'
+            })
+            return
+        }
+      if(this.price<0||this.price>20000||(String(this.price).indexOf('.') != -1 &&
+						String(this.price).length -
+						(String(this.price).indexOf('.') +1) >
+						2)){
+            this.$message({
+              message: '价格输入错误!',
+              type: 'warning'
+            })
+            return
+        }
+      this.$confirm(`加权成本价格修改后不可恢复,确认提交`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editcost({id:this.id,cost:this.price}).toPromise()
+        .then((response) => {
+          this.$notify.success({
+                title: '成功',
+                message: '价格修改成功',
+              })
+           this.editvisible=false
+           this.getList()
+        })
+        })
+     
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currectPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    selectWarehouse(){
+       getwarehousebase({
+        compId: localStorage.getItem('ws-pf_compId'),
+        warehouseType:this.warehouseType
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList1 = [{
+        value: '全部仓库',
+        id: '',
+        count: '',
+        purchasePriceList: [],
+        No:''
+      }]
+          for (let i = 0; i < response.length; i++) {
+            this.warehouseList1.push({
+              value: response[i].warehouseName,
+              id: response[i].id,
+              count: response[i].count,
+              purchasePriceList: response[i].purchasePriceList,
+              No:response[i].commonWarehouseNo
+            })
+            if (this.cangid&&this.cangid == response[i].id) {
+              this.warehouseName = response[i].warehouseName
+              this.warehouseCount =  response[i].count
+              this.warehouseNo =  response[i].commonWarehouseNo
+              this.purchasePriceList =  response[i].purchasePriceList
+            } 
+          }
+          if(this.warehouseList1.length > 0 && !this.cangid){
+            this.warehouseName = this.warehouseList1[0].value
+            this.warehouseCount =  this.warehouseList1[0].count
+            this.warehouseNo =  this.warehouseList1[0].No
+            this.cangid =  this.warehouseList1[0].id
+            this.purchasePriceList =  this.warehouseList1[0].purchasePriceList
+            this.WAREHOUSE[1].payname = this.warehouseList1[0].value
+          }
+          this.getList()
+        })
+    },
+    getList() {
+      getcost({
+        compId: localStorage.getItem('ws-pf_compId'),
+        warehouseId: this.cangid,
+        warehouseType: this.warehouseType,
+        currectPage:this.currectPage,
+        pageSize:this.pageSize
+      })
+        .toPromise()
+        .then((response) => {
+          var arr=[]
+          for (let i = 0; i < response.length; i++) {
+            if(response[i].storage!=0){
+              response[i].value=(response[i].cost*response[i].storage).toFixed(1)
+              arr.push(response[i])
+            }else{
+              response[i].value=0
+              arr.push(response[i])
+            }
+            
+          }
+          this.getSpanArr(arr)
+          this.warehouseList = arr
+        })
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+
+    history(row) {
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      this.currentPage = 1
+      this.getList()
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.connert {
+  width: 90%;
+  margin: 0 auto;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  color: #8890b1;
+  border-color: #e8eaf1;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: 0;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.completed.el-button--default {
+  border-color: #5878e8;
+  background-color: #f6f7fc;
+  color: #5878e8;
+}
+.putstorage.el-button--default,
+.deliverystorage.el-button--default {
+  border-color: #8890b1;
+  background-color: #fff;
+  color: #8890b1;
+}
+/deep/.el-table td,
+/deep/.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+}
+/deep/.el-table tr td:first-child,
+/deep/.el-table tr th.is-leaf:first-child {
+  border-left: 1px solid #e9ecf7;
+}
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  -webkit-line-clamp: 10;
+  max-height: 400px;
+}
+.record,
+.adjustment {
+  display: inline-block;
+  color: #5878e8;
+  padding: 0 4px !important;
+  position: relative;
+}
+.record:after {
+  position: absolute;
+  content: '';
+  display: block;
+  top: 5px;
+  right: -2px;
+  width: 1px;
+  height: 12px;
+  background: #e9ecf7;
+}
+/deep/.el-radio-button:first-child .el-radio-button__inner {
+  margin-left: 10px;
+}
+//分页
+.el-pagination {
+  text-align: center;
+    white-space: nowrap;
+    padding: 2px 5px;
+    color: #303133;
+    font-weight: 700;
+    margin-bottom: 20px;
+}
+
+</style>

+ 704 - 0
src/views/warehousenew/tranManagementWarehouseInOutTask.vue

@@ -0,0 +1,704 @@
+<!--出入库任务-->
+<template>
+  <div class="container">
+    <BaseHeaderLayout :leftSpan="12">
+      <template slot="left">
+        <ws-button
+          type="primary"
+          @click="handleAdd()"
+          v-hasPermission="
+            `warehouseManagement.warehouse.warehouseInfoTask.add`
+          "
+        >
+          <img
+            width="13"
+            height="13"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 2px;
+              left: -4px;
+            "
+            src="../../../public/img/header-add.png"
+            alt
+          />添加
+        </ws-button>
+      </template>
+      <template slot="right">
+        <span style="width: 70px; display: inline-block; color: #8890b1"
+          >状态:</span
+        >
+        <ws-select
+          v-model="searchTypeText"
+          placeholder
+          class="typeselect"
+          @change="selecttaskType"
+          :value="searchType"
+        >
+          <ws-option
+            v-for="item in taskTypeList"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890b1"
+          />
+        </ws-select>
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按合同编号或任务编号查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class='findValue'
+          @keyup.enter.native="find()"
+        ></ws-input>
+        <ws-button class="find" type="primary" @click="lookUp()">
+          <img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt
+          />
+        </ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <div class="navv">
+      <el-table
+        class="wenzi"
+        :data="gainList.records"
+        style="width: 100%"
+        height="780"
+      >
+        <el-table-column type="index" label="序号">
+          <template scope="scope">
+            <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+            <span v-else>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="inOutTaskNo" label="任务编号"></el-table-column>
+        <el-table-column prop="contractNo" label="合同编号">
+          <!-- <template scope="scope">
+            <div
+              v-if="
+                scope.row.inOutType == '移库入库' ||
+                scope.row.inOutType == '移库出库'
+              "
+            >
+              {{ scope.row.moveTaskNo }}
+            </div>
+            <div
+              v-if="
+                scope.row.inOutType != '移库入库' ||
+                scope.row.inOutType != '移库出库'
+              "
+            >
+              {{ scope.row.contractNo }}
+            </div>
+          </template> -->
+        </el-table-column>
+        <el-table-column
+          prop="warehouseName"
+          class="table_td"
+          label="仓库名"
+        ></el-table-column>
+        <el-table-column
+          prop="inOutType"
+          class="table_td"
+          label="出入库类型"
+        ></el-table-column>
+        <el-table-column
+          prop="goodsName"
+          class="table_td"
+          label="货名"
+        ></el-table-column>
+        <el-table-column
+          prop="weight"
+          class="table_td"
+          label="重量(吨)"
+        ></el-table-column>
+        <el-table-column
+          prop="predictDate"
+          class="table_td"
+          label="预计日期"
+        ></el-table-column>
+        <el-table-column
+          prop="publisher"
+          class="table_td"
+          label="经办人"
+        >
+          <template slot-scope="scope">
+             <template>
+                <span v-if="!scope.row.editstatus" slot="reference">
+                  {{ scope.row.publisher }}
+                </span>
+                 <el-select
+                 class='staff'
+              v-if="scope.row.editstatus"
+                  v-model="scope.row.publisher"
+              placeholder="请选择经办人"
+              filterable
+              clearable
+              @change="(event)=>{selectstaff(event, scope.row)}"
+            >
+              <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.staffName"
+                :value="item.staffName"
+              />
+            </el-select>
+              </template>
+            <img
+             v-if="!scope.row.editstatus"
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="editClick1(scope.row)"
+              alt
+            />
+            <i v-if="scope.row.editstatus" @click='checkstaff' class="el-icon-check"></i>
+          </template></el-table-column>
+        <el-table-column prop="taskStatus" label="状态">
+          <template slot-scope="scope">
+             <template>
+                <span slot="reference">
+                  <span
+                    v-if="scope.row.taskStatus == '执行中'"
+                    class="inExecution"
+                  ></span>
+                  <span
+                    v-if="scope.row.taskStatus == '已完成'"
+                    class="done"
+                  ></span>
+                  {{ scope.row.taskStatus }}
+                </span>
+              </template>
+            <img
+              v-if="scope.row.taskStatus == '执行中'"
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="editClick(scope.row)"
+              alt
+            />
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="establishDate"
+          class="table_td"
+          label="创建时间"
+        ></el-table-column>
+        <el-table-column prop="seller" label="操作" width="300">
+          <template slot-scope="scope">
+            <span
+              class="corles"
+              @click="nocomplete(scope.row)"
+              >查看</span
+            >
+            
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"
+      ></el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  getwarehousetask,
+  postcheckorupdate,
+  getstaff,
+  getsponsible,
+} from '@/model/warehouse/index'
+import { getoreditoutput, outdelete, movestates } from '@/model/tasksport/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      id:'',
+      staff:'',
+      tableDate: [],
+      options:[],
+      staffList:[],
+      list:[],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      gainList: [],
+      currentPage: 1,
+      primary: '1',
+      pageSize: 10,
+      searchType: 3,
+      searchTypeText: '执行中',
+      searchKeyWord: '',
+      contractType: 2,
+      publisherList:[],
+      taskTypeList: [
+        { value: '执行中', type: 3 },
+        { value: '已完成', type: 4 }
+      ],
+      // 提交类型
+      submitType: true,
+      size: 10,
+      spanArr: [],
+      warehouseName: '',
+      deptBudgetTotal: 0,
+      compId: localStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      historyList: [],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+     dataFilter(val) {
+      // console.log(val,"名")
+      this.deptBudgetList.staffList = val
+      if (val) {
+        //val存在
+        this.options = this.staffList.filter(item => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options = this.staffList
+      }
+    },
+    checkstaff(){
+ postcheckorupdate({id:this.id,publisher:this.staff}).toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '经办人修改成功',
+              })
+              this.getList()
+            })
+    },
+    selectstaff(e,item) {
+      this.id=item.id
+      this.staff=e
+      console.log(e,item)
+     
+    },
+    //添加
+    handleAdd() {
+      this.$router.push({ path: 'tranManagementWarehouseInOuttaskAdd' })
+    },
+    //查找
+    lookUp() {
+      this.currentPage = 1
+      this.getList()
+    },
+    deleteclick(row) {
+      var text = ''
+      if (
+        (row.taskTypeKey == 3 && row.inOutType == '移库出库') ||
+        (row.taskTypeKey == 4 && row.inOutType == '销售出库') ||
+        (row.taskTypeKey == 4 && row.inOutType == '退库')
+      ) {
+        text = '相同任务编号的任务将一并删除且不可恢复,是否确定删除?'
+      } else {
+        text = `任务删除后不可恢复,是否确定删除?`
+      }
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(text, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          outdelete({
+            id: row.id,
+            relevanceId: row.relevanceId,
+            inOutFlag: row.inOutFlag,
+          })
+            .toPromise()
+            .then((response) => {
+              this.getList()
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    getList() {
+      console.log(this.$route)
+      var stringList=''
+        var arr=[]
+         getsponsible({
+            compId: localStorage.getItem('ws-pf_compId')
+          }).toPromise()
+          .then((response) => {
+
+            this.list = response
+            for (let i = 0; i < this.list.length; i++) {
+            arr.push(this.list[i].warehouseName)
+          }
+          console.log(arr)
+           getwarehousetask({
+        compId: localStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+        stringList:arr.toString()
+      })
+        .toPromise()
+        .then((response) => {
+          for (let i = 0; i < response.records.length; i++) {
+            response.records[i].editstatus=false
+          }
+          this.gainList = response
+          this.currentPage = response.current
+          this.pageSize = response.size
+          this.deptBudgetTotal = response.total
+        })
+            // console.log(response)
+          })
+          
+          
+     
+    },
+    //编辑
+    delivery(item) {
+      this.$router.push({
+        path: 'tranManagementWarehouseInOuttaskedit',
+        query: {
+          relevanceId: item.relevanceId,
+          inOutFlag: item.inOutFlag
+        },
+      })
+    },
+    audit(item) {
+      this.$router.push({
+        path: 'tranManagementWarehouseInOuttaskaudit',
+        query: {
+          relevanceId: item.relevanceId,
+          taskId: item.taskId,
+          businessKey: item.id,
+          workflowId: item.workflowId,
+        },
+      })
+    },
+    getSpanArr(data) {
+      let that = this
+
+      //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+      that.spanArr = []
+
+      that.pos = 0
+
+      //遍历数据
+
+      data.forEach((item, index) => {
+        //判断是否是第一项
+
+        // if (index === 0) {
+        //   this.spanArr.push(1)
+        //   this.pos = 0
+        // } else {
+        //不是第一项时,就根据标识去存储
+        if (data[index].warehouseNumViewList.length > 1) {
+          // 查找到符合条件的数据时每次要把之前存储的数据+1
+          this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+          this.spanArr.push(0)
+        } else {
+          // 没有符合的数据时,要记住当前的index
+          this.spanArr.push(1)
+          this.pos = index
+        }
+        // }
+      })
+    },
+    //查看//传参
+    nocomplete(row) {
+      this.$router.push({
+        path: 'warehouseManagementPutOutLook',
+        query: {
+          relevanceId: row.relevanceId,
+          businessKey: row.id,
+          workflowId: row.workflowId,
+        },
+      })
+    },
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'Y+': date.getFullYear().toString(), // 年
+        'm+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        // "M+": date.getMinutes().toString(),         // 分
+        // "S+": date.getSeconds().toString()          // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    editClick(row) {
+      var status = ''
+      if (row.taskStatus == '待审核' || row.taskStatus == '已完成') {
+        status = '执行中'
+      } else if (row.taskStatus == '执行中') {
+        status = '已完成'
+      }
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`是否将状态改为${status}`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          movestates({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    editClick1(row) {
+      console.log(row)
+     row.editstatus=true
+     var arr=this.list
+     for (let i = 0; i < arr.length; i++) {
+       if(arr[i].warehouseName==row.warehouseName){
+console.log(arr[i])
+          getstaff({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseId: arr[i].id
+          })
+            .toPromise()
+            .then(response => {
+              this.options = response
+              this.staffList = response
+              //  this.agent = response
+            })
+       }
+       
+     }
+         
+          
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+      this.currentPage=1,
+      this.getList()
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      this.currentPage = 1
+      this.getList()
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  color: #8890b1;
+  border-color: #e8eaf1;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: 0;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.completed.el-button--default {
+  border-color: #5878e8;
+  background-color: #f6f7fc;
+  color: #5878e8;
+}
+.putstorage.el-button--default,
+.deliverystorage.el-button--default {
+  border-color: #8890b1;
+  background-color: #fff;
+  color: #8890b1;
+}
+/deep/.el-table td,
+/deep/.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+}
+/deep/.el-table tr td:first-child,
+/deep/.el-table tr th.is-leaf:first-child {
+  border-left: 1px solid #e9ecf7;
+}
+
+.el-row {
+  height: 50px;
+}
+.findValue {
+  // width: 0%;
+  margin-left: 10px;
+}
+.search {
+  margin-left: -250px;
+}
+.Value {
+  width: 300px;
+  margin-left: 766px;
+}
+.el-pagination {
+  text-align: center;
+}
+.winseaview-main {
+  background: #e8ecf6;
+  box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.1);
+}
+.spans {
+  display: table-caption;
+  width: 17px;
+  line-height: 19px;
+}
+//执行样式
+.executory,
+.inExecution,
+.done {
+  width: 6px;
+  height: 6px;
+  display: inline-block;
+  border-radius: 50%;
+  position: relative;
+  top: -1px;
+  font-size: 14px;
+}
+.executory {
+  background: #ff9f24;
+}
+.inExecution {
+  background: #5878e8;
+}
+.done {
+  background: #50cad4;
+}
+.el-select {
+  width: 30%;
+  margin-right: 10px;
+}
+.el-select.staff{
+  width:85%;
+  display:inline-block;
+  margin-right:2px;
+}
+/deep/.typeselect .el-input__inner {
+  color: #8890b1;
+}
+.corles {
+  color: #5878e8;
+  font-size: 14px;
+}
+</style>

+ 397 - 0
src/views/warehousenew/transformation.vue

@@ -0,0 +1,397 @@
+// 仓库折转
+<template>
+  <div class="container">
+    <el-row class="toptitle">
+      <el-col :span="12">
+        <h2 class="bg-left title">折转</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button type="primary" size="small" @click="returnsales()">
+          <img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <div class="center">
+      <el-row>
+        <el-col :span="12">
+          <div class="bg-left centertitle">
+            <h1>{{ warehouseName }}</h1>
+            <span class="temporary" v-show="warehouseType == 2">(临)</span>
+          </div>
+        </el-col>
+        <el-col :span="12" class="bg-right">
+          <el-button type="primary" size="small" @click="addTurnAround()">新增折转</el-button>
+        </el-col>
+      </el-row>
+      <el-table
+        class="forData"
+        :data="transformationList"
+        style="width: 100%; margin-top: 20px"
+        height="780">
+        <el-table-column type="index" label="序号" width="80">
+          <template scope="scope">
+            <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+            <span v-else>{{ scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="beforeBinNo" label="折转前仓位"></el-table-column>
+        <el-table-column prop="beforeGoodsName" label="折转前货名"></el-table-column>
+        <el-table-column prop="beforeWeight" label="折转前重量(吨)"></el-table-column>
+        <el-table-column prop="afterBinNo" label="折转后仓位"></el-table-column>
+        <el-table-column prop="afterGoodsName" label="折转后货名"></el-table-column>
+        <el-table-column prop="afterWeight" label="折转后重量(吨)"></el-table-column>
+        <el-table-column prop="backOffice" label="操作人"></el-table-column>
+        <el-table-column prop="updateDate" label="操作时间"></el-table-column>
+      </el-table>
+    </div>
+    <el-dialog
+      title="折转"
+      :visible.sync="dialogShow"
+      width="40%"
+      top="35vh"
+      :before-close="dialogClose"
+    >
+      <div>
+        <span class="eject-warehouse">{{ warehouseName }}</span
+        ><span v-show="warehouseType == 2">(临)</span>
+      </div>
+      <table class="table_css">
+        <tr>
+          <td></td>
+          <td v-show="warehouseType != 2">仓位</td>
+          <td>货名</td>
+          <td>重量(吨)</td>
+        </tr>
+        <tr>
+          <td class="table_item">折转前</td>
+          <td v-show="warehouseType != 2">
+            <el-select
+              v-model="transformationAdd.beforeBinNo"
+              placeholder="请选择仓位号"
+              @change="binNo"
+            >
+              <el-option
+                v-for="(item, index) in binNoList"
+                :key="item.binNumber"
+                :label="item.binNumber"
+                :value="index"
+              >
+              </el-option>
+            </el-select>
+          </td>
+          <td>
+            <el-select
+              v-model="transformationAdd.beforeGoodsName"
+              placeholder="请选择货名"
+              @change="goodsNameChange">
+              <el-option
+                v-for="(item, index) in goodsNameList"
+                :key="item.goodsName"
+                :label="item.goodsName"
+                :value="index">
+              </el-option>
+            </el-select>
+          </td>
+          <td>
+            <el-input v-model="transformationAdd.beforeWeight" placeholder="请输入重量" type="number" :validate-event="true" maxlength="10"></el-input>
+          </td>
+        </tr>
+        <tr>
+          <td class="table_item">折转后</td>
+          <td v-show="warehouseType != 2">
+            <el-select
+              v-model="transformationAdd.afterBinNo"
+              placeholder="请选择仓位号"
+              @change="binNo1">
+              <el-option
+                v-for="(item, index) in binNoList"
+                :key="item.binNumber"
+                :label="item.binNumber"
+                :value="index">
+              </el-option>
+            </el-select>
+          </td>
+          <td>
+            <el-select v-model="transformationAdd.afterGoodsName" placeholder="请选择货名" @change="goodsNameChange1">
+              <el-option
+                v-for="(item, index) in goodsNameAllList"
+                :key="item.constValue"
+                :label="item.constValue"
+                :value="index">
+              </el-option>
+            </el-select>
+          </td>
+          <td>
+            <el-input v-model="transformationAdd.afterWeight"  placeholder="请输入重量" type="number"></el-input>
+          </td>
+        </tr>
+      </table>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogClose">取 消</el-button>
+        <el-button type="primary" @click="submit">确 定 折 转</el-button>
+      </span>
+    </el-dialog>
+    <div style="text-align: center; padding: 10px">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="deptCircularPage.pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"
+      >
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  turnAroundList,
+  turnAroundAdd,
+  turnAroundXiaLa,
+  turnAroundGoodsNameAll,
+  getbinnumber,
+} from '@/model/warehouse/index'
+export default {
+  data() {
+    return {
+      dialogShow: false,
+      transformationList: [],
+      warehouseId: '',
+      warehouseName: '',
+      goodsNameList: [],
+      goodsNameAllList: [],
+      binNoList: [],
+      binNumberId: '', //仓位Id
+      warehouseType: '',
+      compId: '',
+      transformationAdd: {},
+      //分页
+      currentPage: 1,
+      pageSize: 10,
+      deptCircularPage: {},
+      deptBudgetTotal: 0,
+      storage: '',
+    }
+  },
+  activated() {
+    this.compId = localStorage.getItem('ws-pf_compId')
+    this.binNumberId = this.$route.query.binNumberId //仓位Id
+    this.warehouseId = this.$route.query.warehouseId //仓库Id
+    this.warehouseName = this.$route.query.warehouseName //仓库名
+    this.warehouseType = this.$route.query.warehouseType //仓库类型
+    this.getList()
+  },
+  methods: {
+    returnsales() {
+      this.$router.go(-1)
+    },
+    goodsNameChange(e) {
+      this.transformationAdd.beforeGoodsName = this.goodsNameList[e].goodsName
+      this.transformationAdd.beforeGoodsNameKey = this.goodsNameList[e].goodsNameKey
+      this.storage = this.goodsNameList[e].storage
+    },
+    goodsNameChange1(e) {
+      this.transformationAdd.afterGoodsName = this.goodsNameAllList[e].constValue
+      this.transformationAdd.afterGoodsNameKey = this.goodsNameAllList[e].constKey
+    },
+    //新增折转
+    addTurnAround() {
+      turnAroundXiaLa({
+        id: this.warehouseId,
+      })
+        .toPromise()
+        .then((response) => {
+          this.goodsNameList = response
+        })
+      turnAroundGoodsNameAll({
+        constId: 'CON2',
+      })
+        .toPromise()
+        .then((response) => {
+          this.goodsNameAllList = response
+        })
+      getbinnumber({
+        id: this.warehouseId,
+      })
+        .toPromise()
+        .then((response) => {
+          this.binNoList = response.warehousePositionInfoList
+        })
+      this.dialogShow = true
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      // 列表
+      turnAroundList({
+        baseId: this.warehouseId,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+      })
+        .toPromise()
+        .then((response) => {
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
+          this.transformationList = response.records
+        })
+    },
+    binNo(e) {
+      this.transformationAdd.beforeBinNo = this.binNoList[e].binNumber
+      this.transformationAdd.positionId = this.binNoList[e].id
+    },
+    binNo1(e) {
+      this.transformationAdd.afterBinNo = this.binNoList[e].binNumber
+      this.transformationAdd.afterPositionId = this.binNoList[e].id
+    },
+    dialogClose() {
+      this.transformationAdd = {}
+      this.dialogShow = false
+    },
+    submit() {
+      if (!this.transformationAdd.beforeBinNo && this.warehouseType != 2) {
+        this.$message.error('请选择折转前仓位')
+        return
+      }
+      if (!this.transformationAdd.beforeGoodsName) {
+        this.$message.error('请选择折转前货名')
+        return
+      }
+      if (!this.transformationAdd.beforeWeight) {
+        this.$message.error('请选择折转前重量')
+        return
+      }
+      if (Number(this.transformationAdd.beforeWeight) > Number(this.storage)) {
+        this.$message.error('折转前重量不能超过现有储量')
+        return
+      }
+      if (!this.transformationAdd.afterBinNo && this.warehouseType != 2) {
+        this.$message.error('请选择折转后仓位')
+        return
+      }
+      if (!this.transformationAdd.afterGoodsName) {
+        this.$message.error('请选择折转后货名')
+        return
+      }
+      if (!this.transformationAdd.afterWeight) {
+        this.$message.error('请选择折转后重量')
+        return
+      }
+      if (Number(this.transformationAdd.afterWeight) > Number(this.transformationAdd.beforeWeight)) {
+        this.$message.error('折转后重量不可超过折转前重量')
+        return
+      }
+      this.$confirm(`确定提交折转信息?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      }).then(() => {
+        this.transformationAdd.backOffice = localStorage.getItem('ws-pf_staffName')
+        // this.transformationAdd.compId = this.compId
+        this.transformationAdd.baseId = this.warehouseId
+        this.transformationAdd.warehouseName = this.warehouseName
+        turnAroundAdd(this.transformationAdd)
+          .toPromise()
+          .then((response) => {
+            if (response == 'OK') {
+              this.$notify({
+                title: '成功',
+                message: '折转信息提交成功!',
+                type: 'success',
+              })
+              this.transformationAdd = {}
+              this.dialogShow = false
+              this.getList()
+            }
+          })
+      })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.toptitle {
+  background: #f6f7fc;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  text-align: right;
+  padding: 16px 20px;
+}
+.top-title {
+  width: 50%;
+  display: flex;
+}
+.title {
+  position: relative;
+}
+
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+.center {
+  padding: 0 5%;
+  margin: auto;
+}
+.centertitle {
+  display: flex;
+}
+.temporary {
+  line-height: 80px;
+  font-size: 20px;
+  color: #abaaaa;
+}
+/deep/.forData .cell {
+  text-align: center;
+}
+//弹出框
+.eject-warehouse {
+  font-size: 20px;
+  margin-left: 15px;
+  font-weight: 600;
+}
+.table_css {
+  margin: 20px auto;
+  tr {
+    height: 50px;
+  }
+  .table_item {
+    min-width: 70px;
+  }
+  td {
+    text-align: center;
+    font-size: 18px;
+    font-weight: 600;
+  }
+  .el-select {
+    width: 90%;
+  }
+}
+</style>

+ 1947 - 0
src/views/warehousenew/warehouseManagementDelivery.vue

@@ -0,0 +1,1947 @@
+// 出库登记
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">出库登记</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="revert()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
+      <div class="basicInformation">
+        <h2>
+          {{ deptBudgetList.warehouseName }}
+          <span
+            class="position"
+            v-show="this.deptBudgetList.warehouseType == 1"
+          >
+            {{ deptBudgetList.binNumber }}仓位
+          </span>
+          <span v-show="this.deptBudgetList.warehouseType == 2">(临)</span>
+        </h2>
+        <div class="small-title">基本信息</div>
+        <div class="flex">
+          <div class="left" style='width:66.6666%'>
+            <ws-info-table>
+              <!-- 任务编号 -->
+            <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+            <el-select
+              filterable
+              clearable
+              v-model="deptBudgetList.inOutTaskNo"
+              placeholder="请选择任务编号"
+              class="typeselect"
+              @change="contractNoChange"
+            >
+              <el-option
+                v-for="item in deptBudgetList1"
+                :key="item.inOutTaskNo"
+                :label="item.inOutTaskNo"
+                :value="item.inOutTaskNo"
+              />
+            </el-select>
+          </ws-form-item>
+              <ws-form-item label="合同编号" span="1" prop="contractNo">
+                <ws-select
+                  v-model="deptBudgetList.contractNo"
+                  placeholder="请选择合同编号或移库任务编号"
+                  class="typeselect"
+                  @change='contractNoChange'
+                  disabled
+                >
+                  <ws-option
+                    v-for="item in outContractNo"
+                    :key="item.constKey"
+                    :label="item.contractNo"
+                    :value="item.contractNo"
+                  />
+                </ws-select>
+              </ws-form-item>
+              <!--毛重(吨)-->
+              <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
+                <ws-input
+                  @input="grossWeightchange"
+                  v-model="deptBudgetList.grossWeight"
+                  type="number" @mousewheel.native.prevent
+                  placeholder="请输入毛重"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <!-- 货名 -->
+              <ws-form-item label="货名" span="1">
+                <ws-select
+                disabled
+                  v-model="deptBudgetList.goodsName"
+                  placeholder
+                  class="typeselect"
+                  @change="selectgoodsName"
+                >
+                  <ws-option
+                    v-for="item in goodnameList"
+                    :key="item.constKey"
+                    :label="item.constValue"
+                    :value="item.constValue"
+                  />
+                </ws-select>
+              </ws-form-item>
+              <!--皮重(吨)-->
+              <ws-form-item label="皮重(吨)" span="1" prop="tare" class="readonly">
+                <ws-input
+                  @input="tarechange"
+                  v-model="deptBudgetList.tare"
+                  type="number" @mousewheel.native.prevent
+                  placeholder="请输入皮重"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item label="提示" span="1" prop="tips">
+              <ws-input  onmouseover="this.title=this.value" v-model="deptBudgetList.tips"
+                  maxlength="20" size="small" />
+              </ws-form-item>
+              <!--净重(吨)-->
+              <ws-form-item label="净重(吨)" span="1" prop="netWeight">
+                <ws-input
+                  readonly="readonly"
+                  v-model="deptBudgetList.netWeight"
+                  placeholder="不可编辑,自动计算"
+                  maxlength="120"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item label="类型" span="1" prop="type">
+                  <ws-select disabled v-model="deptBudgetList.type"  @change="typeChange">
+                    <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+                  </ws-select>
+                </ws-form-item>
+               <!--出库日期-->
+              <ws-form-item
+                label="出库日期"
+                span="1"
+                prop="inOutDate"
+                class="deliverydate"
+              >
+                <ws-date-picker
+                  v-model="deptBudgetList.inOutDate"
+                  type="date"
+                  placeholder="请选择出库日期"
+                  value-format="yyyy-MM-dd"
+                />
+              </ws-form-item>
+              <!-- <ws-form-item v-if='deptBudgetList.type=="潮粮"' label="扣重比" span="1" prop="buckleWeightRatio" class="readonly">
+                <ws-input
+                  @input='pureweight'
+                  v-model="deptBudgetList.buckleWeightRatio"
+                  type="number" @mousewheel.native.prevent
+                  placeholder="请输入扣重比"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item v-if='deptBudgetList.type=="潮粮"' label="干粮水分占比" span="1" prop="solidGrainWater" class="readonly">
+                <ws-input
+                @input='pureweight'
+                  v-model="deptBudgetList.solidGrainWater"
+                  type="number" @mousewheel.native.prevent
+                  placeholder="请输入干粮水分占比"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item v-if='deptBudgetList.type=="潮粮"' label="潮粮水分占比" span="1" prop="tidalGrainWater" class="readonly">
+                <ws-input
+                @input='pureweight'
+                  v-model="deptBudgetList.tidalGrainWater"
+                  type="number" @mousewheel.native.prevent
+                  placeholder="请输入潮粮水分占比"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item v-if='deptBudgetList.type=="潮粮"' label="纯重" span="1" prop="pureWeight" class="readonly">
+                <ws-input
+                  disabled
+                  v-model="deptBudgetList.pureWeight"
+                  type="number" @mousewheel.native.prevent
+                  placeholder="不可编辑,自动计算"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item> -->
+              <!-- 品级 -->
+              <ws-form-item label="品级" span="1" class="readonly">
+                <ws-select
+                  v-model="deptBudgetList.grade"
+                  placeholder=""
+                  class="typeselect"
+                  @change="selectpackingMethod"
+                >
+                  <ws-option
+                    v-for="item in gradeList"
+                    :key="item.constKey"
+                    :label="item.constValue"
+                    :value="item.constValue"
+                  />
+                </ws-select>
+              </ws-form-item>
+              <!--经办人-->
+              <ws-form-item label="经办人" span="1" prop="agent">
+              <el-select
+                  v-model="deptBudgetList.agent"
+                  placeholder="请选择经办人"
+                  filterable
+                  clearable
+                  @change="selectstaff"
+                >
+                  <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.staffName"
+                    :value="item.staffName"
+                  />
+                </el-select>
+              </ws-form-item>
+              <!-- 出库类型 -->
+              <ws-form-item label="出库类型" span="1">
+                <ws-input v-model='deptBudgetList.inOutType' class="right-bottom" :disabled="isSelectType" placeholder='暂无' />
+                <!-- <ws-select
+                  v-model="deptBudgetList.deliveryType"
+                  placeholder=""
+                  class="typeselect"
+                  @change="selectstorageType"
+                >
+                  <ws-option
+                    v-for="item in deliveryType"
+                    :key="item.constKey"
+                    :label="item.constValue"
+                    :value="item.constValue"
+                  />
+                </ws-select> -->
+              </ws-form-item>
+            </ws-info-table>
+          </div>
+          <div class="right" style='width:33.3333%'>
+            <ws-info-table>
+             <ws-form-item label="运输方式" span="1" prop="outType">
+                <el-select
+                  v-model="deptBudgetList.outType"
+                  placeholder="请选择运输方式"
+                  filterable clearable
+                >
+                  <el-option
+                    v-for="item in multiSelector"
+                    :key="item.value"
+                    :label="item.name"
+                    :value="item.name"
+                  />
+                </el-select>
+              </ws-form-item>
+              <!-- <ws-form-item label="车牌号" span="1" prop="carNo">
+                <ws-input
+                  v-if="!carstatus"
+                  v-model="deptBudgetList.carNo"
+                  placeholder="请输入车牌号"
+                  maxlength="7"
+                  size="small"
+                />
+                <el-select
+                  v-if="carstatus"
+                  filterable
+                  clearable
+                  :filter-method="dataFilter2"
+                  v-model="deptBudgetList.carNo"
+                  placeholder="请选择车牌号"
+                  class="typeselect"
+                  @change="carChange"
+                >
+                  <el-option
+                    v-for="item in options2"
+                    :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'"
+                    :value="item.carNo"
+                  />
+                </el-select>
+              </ws-form-item>
+              <ws-form-item label="箱号-1" span="1" prop="boxNo">
+                <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
+                <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-1" span="1" prop="titleNo">
+                <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther">
+                <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber">
+                <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther">
+                <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
+                  size="small" />
+              </ws-form-item> -->
+              <!--车牌号  -->
+              <ws-form-item
+            label="车牌号"
+            span="1"
+            prop="carNo"
+            v-if="
+              deptBudgetList.outType == '汽运' ||
+              deptBudgetList.outType == '集装箱船'
+            "
+          >
+            <ws-input
+              v-if="!carstatus || carjudge"
+              v-model="deptBudgetList.carNo"
+              placeholder="请输入车牌号"
+              maxlength="7"
+              size="small"
+            />
+            <el-select
+              v-else
+              filterable
+              clearable
+              :filter-method="dataFilter2"
+              v-model="deptBudgetList.carNo"
+              placeholder="请选择车牌号"
+              class="typeselect"
+              @change="carChange"
+            >
+              <el-option
+                v-for="item in options2"
+                :key="item.constKey"
+                :label="item.carNo + '(' + item.tranCarNo + ')'"
+                :value="item.carNo"
+              />
+            </el-select>
+            <el-button type="primary" @click="carNoTypeChange" v-if="carstatus">{{carChange1}}</el-button>
+          </ws-form-item>
+              <!--船名  -->
+              <ws-form-item
+                label="船名"
+                span="1"
+                prop="carNo"
+                v-if="deptBudgetList.outType == '散船'"
+              >
+                <ws-input
+                  v-model="deptBudgetList.carNo"
+                  placeholder="请输入船名"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="航次"
+                span="1"
+                prop="shipNumber"
+                v-if="deptBudgetList.outType == '散船'"
+              >
+                <ws-input
+                  v-model="deptBudgetList.shipNumber"
+                  placeholder="请输入航次"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <!--车号  -->
+              <ws-form-item
+                label="车号"
+                span="1"
+                prop="carNo"
+                v-if="deptBudgetList.outType == '火运'"
+              >
+                <ws-input
+                  v-model="deptBudgetList.carNo"
+                  placeholder="请输入车号"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="箱号-1"
+                span="1"
+                prop="boxNo"
+                v-if="
+                  deptBudgetList.outType == '汽运' ||
+                  deptBudgetList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="deptBudgetList.boxNo"
+                  placeholder="请输入箱号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="箱号-2"
+                span="1"
+                prop="boxNoOther"
+                v-if="
+                  deptBudgetList.outType == '汽运' ||
+                  deptBudgetList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="deptBudgetList.boxNoOther"
+                  placeholder="请输入箱号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="封号-1"
+                span="1"
+                prop="titleNo"
+                v-if="
+                  deptBudgetList.outType == '汽运' ||
+                  deptBudgetList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="deptBudgetList.titleNo"
+                  placeholder="请输入封号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="封号-2"
+                span="1"
+                prop="titleNoOther"
+                v-if="
+                  deptBudgetList.outType == '汽运' ||
+                  deptBudgetList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="deptBudgetList.titleNoOther"
+                  placeholder="请输入封号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="车厢号-1"
+                span="1"
+                prop="wingNumber"
+                v-if="deptBudgetList.outType == '火运'"
+              >
+                <ws-input
+                  v-model="deptBudgetList.wingNumber"
+                  placeholder="请输入车厢号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="车厢号-2"
+                span="1"
+                prop="wingNumberOther"
+                v-if="deptBudgetList.outType == '火运'"
+              >
+                <ws-input
+                  v-model="deptBudgetList.wingNumberOther"
+                  placeholder="请输入车厢号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+            </ws-info-table>
+          </div>
+        </div>
+      </div>
+      <div class="small-title">上传磅单照片</div>
+      <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="
+              (res) => {
+                uploadSuccessHandle1(res)
+              }
+            "
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <div @click='imgBig(deptBudgetList.addressUrl)' v-if='deptBudgetList.addressUrl!=""'>
+            <img style='width:100px;height:100px;' :src="deptBudgetList.addressUrl" alt="">
+          </div>
+      <div class="small-title">化验数据(选填)</div>
+      <div class="inspector">
+        <!--自检员-->
+        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <ws-input
+            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+            placeholder="请输入质检员姓名"
+            maxlength="120"
+            size="small"
+          />
+        </ws-form-item> -->
+             <ws-form-item label="质检员" span="1" prop="qualityInspector">
+            <el-select
+              v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+              placeholder="请选择质检员"
+              filterable
+              clearable
+              @change="qualityInspectorChange"
+            >
+              <el-option
+                v-for="item in qualityInspectorList"
+                :key="item.value"
+                :label="item.staffName"
+                :value="item.staffName"
+              />
+            </el-select>
+          </ws-form-item>
+      </div>
+      <div class="neifor">
+        <ws-info-table>
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
+              placeholder="请输入水分占比"
+              maxlength="120"
+              type="number" @mousewheel.native.prevent
+              size="small"
+            />
+          </ws-form-item>
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.impurity"
+              placeholder="请输入杂质占比"
+              type="number" @mousewheel.native.prevent
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--容重(克/升)>=-->
+          <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              placeholder="请输入容重"
+              type="number" @mousewheel.native.prevent
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
+              placeholder="请输入霉变粒占比"
+              maxlength="120"
+              type="number" @mousewheel.native.prevent
+              size="small"
+            />
+          </ws-form-item>
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
+              placeholder="请输入热损伤占比"
+              type="number" @mousewheel.native.prevent
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--不完善粒(%)<=-->
+          <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
+              placeholder="请输入不完善粒占比"
+              type="number" @mousewheel.native.prevent
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+      <div style="text-align: right; padding: 10px">
+        <el-button class="bg-bottom-up" size="small" @click="temporaryStorage()"
+          >暂存</el-button
+        >
+        <el-button
+          class="bg-bottom-up"
+          type="primary"
+          size="small"
+          @click="submit()"
+          >提交</el-button
+        >
+      </div>
+    </ws-form>
+    <div @click='imgshow=false' style='overflow:scroll;position:fixed;left:0;top:0;background:rgba(0,0,0,0.1);width:100%;height:100%;z-index:1030;' v-if='imgshow'>
+      <img style='position:absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);height:80%;' :src="img" alt="">
+    </div>
+  </div>
+</template>
+<script>
+import {
+  pullDown,
+  addstorageputList,
+  goodsname,
+  xialaNo,
+  getstaff,
+  goodsnameXiala,
+  getReceiptTaskNo,
+} from '@/model/warehouse/index'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+// import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import { dayjs, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      isSelectType:true,
+       carstatus: false,
+       qualityInspectorList:[],
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      readonly: true,
+      // 年
+      year: '',
+      deptBudgetTotal: 0,
+      img:'',
+      imgshow:false,
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchKeyWord: '',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      goodnameList: {},
+      // 提交类型
+      submitType: true,
+      deliveryType: [],
+      typeList:['干粮','潮粮'],
+      outContractNo: [],
+      appendixIdsAdd: '',
+      uploadSuccess: {},
+      gradeList: [],
+      agent: [],
+       staffList: [],
+      options: [],
+      value:'',
+      rules: {
+        netWeight: [
+          {
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          },
+        ],
+      },
+      multiSelector: [
+        {
+          name: '汽运',
+          value: '0',
+        },
+        {
+          name: '火运',
+          value: '1',
+        },
+        {
+          name: '集装箱船',
+          value: '2',
+        },
+        {
+          name: '散船',
+          value: '3',
+        },
+      ],
+      size: 10,
+      compId: localStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      packtypeList: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {
+        type:'干粮',
+        addressUrl:'',
+        warehouseInOutDetail: {},
+         selfLoading:"0",
+      },
+      historyList: [],
+
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+      deptBudgetList1:[],
+      carChange1:"手动填写",
+      carjudge:false
+    }
+  },
+  mounted() {
+    this.deptBudgetList.baseId = this.$route.query.baseId
+    this.deptBudgetList.positionId = this.$route.query.positionId
+    this.deptBudgetList.warehouseName = this.$route.query.warehouseName
+    this.deptBudgetList.binNumber = this.$route.query.binNumber
+    this.deptBudgetList.warehouseType = this.$route.query.warehouseType
+    this.deptBudgetList.warehouseId = this.$route.query.warehouseId
+    this.getList()
+  
+  },
+  methods: {
+    //切换车牌号输入状态
+      carNoTypeChange(){
+         this.carjudge = !this.carjudge
+        if(!this.carjudge){
+            this.deptBudgetList.selfLoading = "0"
+            this.carChange1="手动填写"
+        }else{
+            this.deptBudgetList.selfLoading = "1"
+            this.carChange1="识别下拉"
+        }
+      },
+    imgBig(item){
+      console.log(item)
+      this.img=item
+      this.imgshow=true
+    },
+      qualityInspectorChange(e){
+      console.log(e)
+    },
+    uploadSuccessHandle1(res){
+      this.deptBudgetList.addressUrl=res.url
+    },
+    //返回按钮
+    revert() {
+      this.$router.push({ path: 'warehouseManagementList' })
+    },
+        carChange(e) {
+          console.log(e)
+      for (let i = 0; i < this.tranCarInfoList.length; i++) {
+        if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
+          this.deptBudgetList.tranCarNo=this.tranCarInfoList[i].tranCarNo
+          this.deptBudgetList.carId=this.tranCarInfoList[i].id
+        }
+      }
+    },
+    typeChange(e){
+
+    },
+    contractNoChange(e){
+      for (let i = 0; i < this.deptBudgetList1.length; i++) {
+        if (this.deptBudgetList1[i].inOutTaskNo == e) {
+          var data = this.deptBudgetList1[i]
+          if (this.deptBudgetList1[i].contractNo) {
+            this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
+          } else {
+            this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
+          }
+        }
+      }
+      for (var i = 0; i < this.outContractNo.length; i++) {
+        if (this.outContractNo[i].contractNo == this.deptBudgetList.contractNo) {
+             if (this.outContractNo[i].inOutType == '销售出库') {
+              if(!this.outContractNo[i].unitContractPrice){
+              this.deptBudgetList.tips =
+              '买方' +
+              this.outContractNo[i].buyer
+            }else{
+              this.deptBudgetList.tips =
+              '买方' +
+              this.outContractNo[i].buyer +
+              '( ' +
+              this.outContractNo[i].unitContractPrice +
+              '元/吨)'
+            }
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+               if(this.outContractNo[i].unitContractPrice){
+                   this.deptBudgetList.tips='入货库'+this.outContractNo[i].receiveWarehouse+ '( '+this.outContractNo[i].unitContractPrice+'元/吨)'
+              }
+              else{
+                this.deptBudgetList.tips='入货库'+this.outContractNo[i].receiveWarehouse
+              }
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.detailData.inOutType == '采购出库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+          this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+          this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+          this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+          if(this.outContractNo[i].tranCarInfoList){
+            this.options2=this.outContractNo[i].tranCarInfoList
+            this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
+            this.carstatus=true
+          }
+        }
+      }
+    },
+    dataFilter2(val) {
+      this.deptBudgetList.carNo = val
+      if (val) {
+        //val存在
+        this.options1 = this.outContractNo1.filter((item) => {
+          if (
+            !!~item.carNo.indexOf(val) ||
+            !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options2 = this.tranCarInfoList
+      }
+    },
+    dataFilter(val) {
+      // console.log(val,"名")
+      this.deptBudgetList.staffList = val
+      if (val) {
+        //val存在
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options = this.staffList
+      }
+    },
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+        }
+      }
+    },
+    pureweight(e){
+      console.log(this.deptBudgetList)
+      if(this.deptBudgetList.netWeight&&this.deptBudgetList.tidalGrainWater&&this.deptBudgetList.solidGrainWater&&this.deptBudgetList.buckleWeightRatio){
+        this.deptBudgetList.pureWeight=(this.deptBudgetList.netWeight*(100-(this.deptBudgetList.tidalGrainWater-this.deptBudgetList.solidGrainWater)*this.deptBudgetList.buckleWeightRatio))/100
+      }
+    },
+    temporaryStorage() {
+      if (!this.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.grossWeight <= 0 ||
+        this.deptBudgetList.grossWeight > 10000 ||
+        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.tare) {
+        this.$message({
+          message: '皮重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare > 10000 ||
+        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.agent) {
+        this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.agent.length < 2 ||
+        this.deptBudgetList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.carNo) {
+        this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      // if (
+      //   this.deptBudgetList.contractNo.length < 6 ||
+      //   this.deptBudgetList.contractNo.length > 20
+      // ) {
+      //   this.$message({
+      //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+      //自检员
+      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //霉变
+      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //热损伤
+      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //不完善粒(%)
+      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完善粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+      if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+              (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf('.') + 1) >
+              2) || this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 || this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      console.log(this.deptBudgetList,'出库!!!!!')
+      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.compId =
+                localStorage.getItem('ws-pf_compId')
+              this.deptBudgetList.inOutFlag = 1
+              this.deptBudgetList.pcFlag = 1
+              this.deptBudgetList.statusFlag = 1
+              addstorageputList(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('暂存成功')
+                  this.$router.push({ path: 'warehouseManagementList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    //提交按钮
+    submit() {
+      if (!this.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.grossWeight <= 0 ||
+        this.deptBudgetList.grossWeight > 10000 ||
+        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.tare) {
+        this.$message({
+          message: '皮重不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare > 10000 ||
+        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.netWeight) {
+        this.$message({
+          message: '净重不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.netWeight <= 0 ||
+        this.deptBudgetList.netWeight >= 10000
+      ) {
+        this.$message({
+          message: '净重输入错误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.type=='潮粮'&&!this.deptBudgetList.buckleWeightRatio) {
+        this.$message({
+          message: '扣重比不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.buckleWeightRatio < 0 ||
+        this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.buckleWeightRatio > 3 ||
+        (this.deptBudgetList.type=='潮粮'&&String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
+          String(this.deptBudgetList.buckleWeightRatio).length -
+            (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '扣重比输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.deptBudgetList.type=='潮粮'&&!this.deptBudgetList.tidalGrainWater) {
+        this.$message({
+          message: '潮粮水分不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.tidalGrainWater < 1 ||
+        this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.tidalGrainWater > 40 ||
+        (this.deptBudgetList.type=='潮粮'&&String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tidalGrainWater).length -
+            (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '潮粮水分输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.deptBudgetList.type=='潮粮'&&!this.deptBudgetList.solidGrainWater) {
+        this.$message({
+          message: '干粮水分不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.solidGrainWater < 1 ||
+        this.deptBudgetList.type=='潮粮'&&this.deptBudgetList.solidGrainWater > 40 ||
+        (this.deptBudgetList.type=='潮粮'&&String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
+          String(this.deptBudgetList.solidGrainWater).length -
+            (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
+            1)
+      ) {
+        this.$message({
+          message: '干粮水分输入错误',
+          type: 'warning'
+        })
+        return
+      }
+
+      if (!this.deptBudgetList.agent) {
+        this.$message({
+          message: '经办人不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.agent.length < 2 ||
+        this.deptBudgetList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人姓名输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.inOutDate) {
+        this.$message({
+          message: '出库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.inOutType) {
+        this.$message({
+          message: '出库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.carNo) {
+        this.$message({
+          message: '车牌号不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.carNo.length < 6 &&
+        this.deptBudgetList.carNo.length <= 8
+      ) {
+        this.$message({
+          message: '车牌号输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.boxNo&&this.deptBudgetList.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.boxNoOther&&this.deptBudgetList.boxNoOther.length > 20) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.titleNo&&this.deptBudgetList.titleNo.length > 20) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.titleNoOther&&this.deptBudgetList.titleNoOther.length > 20) {
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
+          message: '合同编号不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+      //自检员
+      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //霉变
+      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //热损伤
+      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //不完善粒(%)
+      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完善粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+      if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+          if (
+          (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+              (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf('.') + 1) >
+              2) || this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 || this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if(!this.carstatus){//若自运的合同该字段置空
+          this.deptBudgetList.selfLoading = ""
+        }
+      this.$confirm(`确定提交出库信息`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      }).then(() => {
+        this.$refs.deptBudgetList.validate((valid) => {
+          if (valid) {
+            this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
+            this.deptBudgetList.inOutFlag = 1
+            this.deptBudgetList.statusFlag = 3
+            addstorageputList(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('添加成功')
+                this.$router.push({ path: 'warehouseManagementList' })
+              })
+          } else {
+            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
+          }
+        })
+      })
+    },
+    tarechange(e) {
+      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+        this.deptBudgetList.netWeight = Number(
+          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+        ).toFixed(2)
+      }
+    },
+    grossWeightchange(e) {
+      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+        this.deptBudgetList.netWeight = Number(
+          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+        ).toFixed(2)
+      }
+    },
+    selectgoodsName(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].goodsName == e) {
+          this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
+          if(e=='玉米(潮粮)'){
+              this.deptBudgetList.type='潮粮'
+            }else{
+              this.deptBudgetList.type='干粮'
+            }
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    selectstorageType(e) {
+      for (var i = 0; i < this.deliveryType.length; i++) {
+        if (this.deliveryType[i].constValue == e) {
+          this.deptBudgetList.inOutTypeKey = this.deliveryType[i].constKey
+        }
+      }
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      // 品级
+      pullDown({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+
+      // 类型
+      if (this.deptBudgetList.warehouseType == 1) {
+        // 货名
+        goodsname({ positionId: this.$route.query.positionId })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        //类型
+        pullDown({ constId: 'CON6' })
+          .toPromise()
+          .then((response) => {
+            this.deliveryType = response
+          })
+      } else if (this.deptBudgetList.warehouseType == 2) {
+        goodsnameXiala({ baseId: this.deptBudgetList.warehouseId })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        pullDown({ constId: 'WARE2' })
+          .toPromise()
+          .then((response) => {
+            this.deliveryType = response
+          })
+      }
+       getReceiptTaskNo({
+      flag: 1,
+      warehouseName: this.deptBudgetList.warehouseName,
+      agentKey: localStorage.getItem('ws-pf_userId'),
+    })
+      .toPromise()
+      .then((response) => {
+        this.deptBudgetList1 = response
+      })
+      //合同编号
+      xialaNo({ compId: localStorage.getItem('ws-pf_compId'),flag:5  })
+        .toPromise()
+        .then((response) => {
+          this.outContractNo = response
+        })
+      //经办人
+      getstaff({ compId: localStorage.getItem('ws-pf_compId'),warehouseId:this.deptBudgetList.baseId })
+        .toPromise()
+        .then((response) => {
+          // this.agent = response
+          this.qualityInspectorList = response
+          this.options = response
+           this.staffList = response
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+    //删除
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+/deep/.basicInformation {
+  .ws-info-table {
+    border: none;
+  }
+  .left{
+  .el-form-item {
+    width: 50%;
+    // width: 33.3333%;
+    border: none;
+
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+.right{
+  .el-form-item {
+    width: 100%;
+    // width: 33.3333%;
+    border: none;
+
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+}
+.el-button--default {
+  color: #5473e8;
+  border-color: #5473e8;
+}
+.title {
+  position: relative;
+  padding-left: 10px;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-form {
+  padding: 0 10%;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.bg-right {
+  text-align: right;
+  padding: 16px 20px;
+}
+.center {
+  position: relative;
+  top: 50px;
+  width: 40%;
+  height: 2000px;
+  margin: 0 auto;
+}
+//选填
+/deep/.el-form-item {
+  width: 50%;
+}
+.container {
+  overflow: scroll;
+  height: 120vh;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: center;
+}
+.deliverydate {
+  display: inline-block;
+  width: 10%;
+}
+.center {
+  margin-top: -60px;
+  width: 80%;
+}
+//仓位
+.position {
+  background: #afb5cb;
+  border-radius: 2px;
+  font-size: 12px;
+  color: #ffffff;
+  line-height: 20px;
+  padding: 2px 4px;
+  position: relative;
+  top: -2px;
+}
+.neifor /deep/.ws-info-table .el-form-item .el-form-item__label {
+  background: #f6f7fc;
+}
+.neifor .ws-info-table {
+  border-left: 1px solid #cdd2dc;
+  border-top: 1px solid #cdd2dc;
+}
+.neifor .ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.inspector /deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 59px;
+}
+//表格文字
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: center;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
+}
+.inspector {
+  width: 50%;
+}
+//质检员
+.inspector .el-form-item__content {
+  text-align: left;
+  margin-left: 0px;
+}
+
+.small-title {
+  position: relative;
+  padding: 10px;
+  font-weight: 600;
+}
+.small-title::before {
+  position: absolute;
+  content: '';
+  display: block;
+  background: #5473e8;
+  width: 4px;
+  height: 14px;
+  left: 0px;
+  top: 13px;
+}
+//下面列表
+.neifor {
+  width: 80%;
+  background-color: #f6f7fc;
+}
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+  width: 35%;
+  text-align: center;
+}
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+  width: 60%;
+  background-color: #f6f7fc;
+}
+/deep/.neifor .el-input--small .el-input__inner {
+  width: 100%;
+}
+</style>

+ 1099 - 0
src/views/warehousenew/warehouseManagementEdit.vue

@@ -0,0 +1,1099 @@
+//编辑仓库
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">修改仓库信息</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnWarehouse()">返回</el-button>
+      </el-col>
+    </el-row>
+    <div>
+      <ws-form ref="deptBudgetList" :model="deptBudgetList">
+        <el-radio-group v-model="warehouseType" @change="warehouseTypechange">
+          <el-radio label="1">常用仓库</el-radio>
+          <el-radio label="2">临时仓库</el-radio>
+        </el-radio-group>
+        <div class="small-title">基本信息</div>
+        <!--基本信息-->
+        <ws-info-table>
+          <!--仓库名称-->
+          <ws-form-item label="仓库名称" span="1" prop="warehouseName" class="readonly">
+            <ws-select v-model="deptBudgetList.warehouseName" placeholder="" class="typeselect"
+              @change="selectpackingMethod">
+              <ws-option v-for="item in packtypeList" :key="item.constKey" :label="item.warehouseName"
+                :value="item.warehouseName" />
+            </ws-select>
+          </ws-form-item>
+            <!--仓库所在地-->
+          <ws-form-item label="仓库所在地" span="1" prop="warehouseCity">
+            <el-cascader :options="options_" v-model="selectedOptions" clearable size="large" placeholder="请输入仓库所在地"
+              style="width: 200%" @change="handleChange" />
+          </ws-form-item>
+          <!--详细地址-->
+          <ws-form-item label="详细地址" span="1" prop="detailedAddress" class="readonly">
+            <ws-input v-model="deptBudgetList.detailedAddress" placeholder="请输入详细地址" maxlength="100" size="small" />
+          </ws-form-item>
+          <!--负责人-->
+          <ws-form-item label="负责人" span="1" prop="personCharge">
+            <el-select v-model="deptBudgetList.personCharge" placeholder="请选择负责人" filterable clearable
+              @change="selectstaff">
+              <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
+            </el-select>
+          </ws-form-item>
+          <!--负责人电话-->
+          <!-- <ws-form-item label="负责人电话" span="1" prop="personPhone" class="readonly">
+            <ws-input :readonly="true" v-model="deptBudgetList.personPhone" placeholder="请输入负责人电话" maxlength="100"
+              size="small" />
+          </ws-form-item> -->
+          <!--其他负责人-->
+          <ws-form-item label="其他驻库人员" v-if="warehouseType == 1" span="1" prop="otherPersonCharge" class="addPerson">
+            <el-select v-model="deptBudgetList.otherPersonPhone" placeholder="请选择其他驻库人员,可选多人" @change="selectstaffOther"
+              :filter-method="dataFilter1" filterable clearable multiple >
+              <el-option v-for="item in optionsOther" :key="item.staffMobilePhone" :label="item.staffName"
+                :value="item.staffMobilePhone " />
+            </el-select>
+          </ws-form-item>
+        
+          <!--总储量(吨)-->
+          <ws-form-item v-if="warehouseType == 1" label="总储量(吨)" span="1" prop="totalStorage">
+            {{ totalStorage }}
+          </ws-form-item>
+          <ws-form-item label="是否自动获取重量" span="1" prop="automaticWeightAcquisition" class="readonly radio " style="180px">
+          <el-radio v-model="deptBudgetList.automaticWeightAcquisition" label="0">否</el-radio>
+          <el-radio v-model="deptBudgetList.automaticWeightAcquisition" label="1">是</el-radio>
+        </ws-form-item>
+        </ws-info-table>
+        <div v-for="(item, index) in deptBudgetList.warehousePositionInfoList" :key="index">
+          <ws-info-table>
+            <!--仓位编号-->
+            <ws-form-item label="仓位编号" span="1" prop="binNumber">
+              <ws-input v-model="item.binNumber" placeholder="请输入仓位编号" maxlength="100" size="small" />
+            </ws-form-item>
+            <!--仓位储量(吨)-->
+            <ws-form-item label="容量(吨)" span="1" prop="maxStorage">
+              <ws-input v-model="item.maxStorage" placeholder="请输入仓位储量(吨)" maxlength="20" size="small" />
+            </ws-form-item>
+            <!--备注(选填)-->
+            <!-- <ws-form-item label="备注(选填)" span="1" prop=" remark">
+              <ws-input v-model="item.remark" placeholder="请输入备注" maxlength="100" size="small" />
+            </ws-form-item> -->
+            <img width="22" height="22" class="add" @click="add" src="../../../public/img/add.png" alt="" />
+            <img width="22" height="22" class="del" @click="del(index, item)" src="../../../public/img/del.png"
+              alt="" />
+          </ws-info-table>
+        </div>
+      </ws-form>
+      <ws-form ref="deptBudgetList" :model="deptBudgetList">
+        <div v-if="warehouseType == 1" class="small-title">上传仓库照片</div>
+        <el-upload action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :on-success="
+            (res, file) => {
+              uploadSuccessHandle(res)
+            }
+          " :on-remove="
+            (value) => {
+              handleRemove(value)
+            }
+          " class="avatar-uploader" accept=".jpg, .jpeg, .png, .gif">
+          <el-button v-if="warehouseType == 1">上传附件</el-button>
+        </el-upload>
+        <div class="addressUrls" v-if="addressUrls != null">
+            <div v-for="(item , index) in addressUrls" class="addressUrl" :key="index">
+              <div @click='close(index)' class="iconfont icon-guanbi"></div>
+              <el-image  v-if="addressUrls != null"
+                style="width: 100px; height: 100px"
+                :src="item" 
+                :preview-src-list="addressUrls">
+              </el-image>
+          </div>
+        </div>
+        <div class="small-title">仓库定位</div>
+        <map-drag @marker="marker" :isShowaddress='false' v-on:addressListen='getAddress'
+          v-on:pickedAddress='searchAddress'></map-drag>
+      </ws-form>
+
+      <!-- <ws-button @click="exportlist()"></ws-button> -->
+    </div>
+    <div style="text-align: right; padding: 10px">
+      <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">修改</el-button>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    getFileList,
+    saveFiles
+  } from '@/model/upload'
+  import {
+    getstafffind,
+  } from '@/model/contarct/index'
+  import {
+    xiala,
+    billoperatehis,
+    getLook,
+    edit,
+    delPosition,
+    getstaff
+  } from '@/model/warehouse/index'
+  import {
+    regionData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import mapDrag from '@/components/mapdrag/mapdrag'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+      mapDrag,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        fileList: [],
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        warehouseType: '1',
+        unitList: [],
+        baseId: '',
+        // 提交类型
+        submitType: true,
+        size: 10,
+        options_: regionData,
+        selectedOptions: [],
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        packtypeList: [],
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        staffList: [],
+        contractList: [],
+        deptBudgetList: {},
+        historyList: [],
+        appendixIdsAdd: '',
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        options: [],
+        staffList1: [],
+        optionsOther: [],
+        value: '',
+        accessoryTFs: false,
+        addressUrls: [],
+      }
+    },
+    activated() {
+      this.loaddata()
+      // getstafffind({
+      //     roles: 'd6a5c8a52da544309259f91f75de1ec6'
+      //   })
+      //   .toPromise()
+      //   .then((response) => {
+      //     this.options = response
+      //     this.optionsOther = response
+      //     this.staffList1 = response
+      //     this.staffList = response
+      //   })
+      getstaff({
+        compId: localStorage.getItem('ws-pf_compId')
+      })
+      .toPromise()
+      .then((response) => {
+        this.options = response
+        this.optionsOther = response
+        this.staffList = response
+        this.staffList1 = response
+        // for(var i=0;i<response.length;i++){
+        //   this.optionsOther.push(response[i].staffName+" "+response[i].staffMobilePhone)
+        // }
+      })
+      this.showType = this.isShow
+    },
+    computed: {
+      totalStorage: function() {
+        var sum = 0
+        if (this.deptBudgetList.warehousePositionInfoList) {
+          for (
+            var i = 0; i < this.deptBudgetList.warehousePositionInfoList.length; i++
+          ) {
+            sum += Number(
+              this.deptBudgetList.warehousePositionInfoList[i].maxStorage
+            )
+          }
+        }
+        return sum
+      },
+    },
+    methods: {
+      getAddress(data) {
+        console.log('getAddress', data)
+        this.deptBudgetList.warehousePrivate = data[0]
+        this.deptBudgetList.warehouseCity = data[1]
+        this.deptBudgetList.warehouseArea = data[2]
+      },
+      searchAddress(e) {
+        this.deptBudgetList.warehousePositioning = e.lat + ',' + e.lng
+      },
+      selectstaffOther(e) {
+        this.deptBudgetList.otherPersonCharge = ''
+        for (var i = 0; i < this.optionsOther.length; i++) {
+          for (var j = 0; j < e.length; j++) {
+            if (this.optionsOther[i].staffMobilePhone == e[j]) {
+              this.deptBudgetList.otherPersonCharge += this.optionsOther[i].staffName + ' ' + this.optionsOther[i]
+                .staffMobilePhone + ','
+            }
+          }
+        }
+      },
+      close(index) {
+        this.addressUrls.splice(index, 1)
+      },
+      dataFilter(val) {
+        this.deptBudgetList.personCharge = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+      dataFilter1(val) {
+        this.deptBudgetList.personCharge = val
+        if (val) {
+          //val存在
+          this.optionsOther = this.staffList1.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.optionsOther = this.staffList1
+        }
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
+            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      //返回按钮
+      returnWarehouse() {
+        this.addressUrls = []
+        this.deptBudgetList = {}
+        this.selectedOptions = []
+        this.$router.push({
+          path: 'warehouseManagementList'
+        })
+      },
+      handleChange(value) {
+        console.log(value)
+        this.selectedOptions = value
+      },
+      warehouseTypechange() {
+        this.addressUrls = []
+        this.deptBudgetList = {}
+        this.selectedOptions = []
+        this.loaddata()
+      },
+      marker: function(item) {
+        this.deptBudgetList.warehousePositioning =
+          item.lnglat.lat + ',' + item.lnglat.lng
+      },
+      selectedAddress(e) {
+        this.deptBudgetList.warehousePositioning =
+          e.center.lat + ',' + e.center.lng
+      },
+      uploadSuccess(data, files, url) {
+        this.fileList = files
+        console.log('uploadSuccess ', data, files, url)
+      },
+      onChange(files) {
+        this.fileNum = files
+        this.$refs.upload.handleSaveBill().then((res) => {
+          console.log(files)
+        })
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].warehouseName == e) {
+            this.baseId = this.packtypeList[i].id
+            this.getLook(this.packtypeList[i].id)
+          }
+        }
+      },
+      add() {
+        this.deptBudgetList.warehousePositionInfoList.push({
+          binNumber: '',
+          maxStorage: '',
+          remark: '',
+        })
+      },
+      del(index, item) {
+        if (item.nowStorage > 0) {
+          this.$message.warning('尚有剩余库存,不可删除')
+        } else {
+          this.$confirm(`此操作将永久删除该仓位的全部信息,是否确定删除`, {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              if (item.id) {
+                delPosition({
+                    id: item.id
+                  })
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('删除成功')
+                  })
+                  .catch((response) => {
+                    EventBus.$emit(
+                      'error',
+                      this.$t('showMessage.asteriskRequired')
+                    )
+                  })
+              }
+              if (this.deptBudgetList.warehousePositionInfoList.length > 1) {
+                this.deptBudgetList.warehousePositionInfoList.splice(index, 1)
+              }
+            })
+            .catch(() => {
+              return false
+            })
+        }
+      },
+      loaddata() {
+        // 仓库名称
+        xiala({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseType: this.warehouseType,
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+      },
+      getUnitList() {
+        xiala({
+            compId: localStorage.getItem('ws-pf_compId'),
+            constCode: 'TYPEYAN',
+          })
+          .toPromise()
+          .then((response) => {
+            this.unitList = response
+            let currItem
+            this.unitList.forEach((item, index, arr) => {
+              item.flag = 'delete'
+              if (this.vModel == item.constKey) {
+                currItem = item
+                this.getLook(currItem.compId)
+              }
+            })
+            //
+            if (currItem) {
+              this.getLook(currItem.compId)
+            }
+          })
+      },
+      getLook(compId1) {
+        getLook({
+            id: compId1,
+          })
+          .toPromise()
+          .then((response) => {
+            var tmp = []
+            if(response.warehousePrivate&&response.warehousePrivate&&response.warehouseCity){
+              tmp[0] = TextToCode[response.warehousePrivate].code
+              if(response.warehouseCity!=''){
+                tmp[1] =
+                TextToCode[response.warehousePrivate][response.warehouseCity].code
+                tmp[2] =
+                TextToCode[response.warehousePrivate][response.warehouseCity][
+                  response.warehouseArea
+                ].code
+              }else{
+                tmp[1]=TextToCode[response.warehousePrivate]['市辖区'].code
+                tmp[2] =
+                TextToCode[response.warehousePrivate]['市辖区'][
+                  response.warehouseArea
+                ].code
+              }
+            }
+            this.selectedOptions = tmp
+            this.deptBudgetList = response
+            // if(this.deptBudgetList.addressUrl){
+            //   this.fileList =  this._getFileList(this.deptBudgetList.addressUrl)
+            // }
+            if(this.deptBudgetList.addressUrl){
+              this.addressUrls = this.deptBudgetList.addressUrl.split(',')
+            }else{
+                this.addressUrls = []
+            }
+            if(this.deptBudgetList.otherPersonPhone!=''){
+              this.deptBudgetList.otherPersonPhone = this.deptBudgetList.otherPersonPhone.split(',')
+            }else{
+               this.deptBudgetList.otherPersonPhone = []
+            }
+            this.addressUrls.pop()
+          })
+      },
+      // 传入appendixIds 从服务器获取文件列表信息
+      _getFileList(appendixIds) {
+        return new Promise(async (next) => {
+          try {
+            next((await getFileList({
+              appendixIds
+            }).toPromise()) || [])
+          } catch (error) {
+            next()
+          }
+        })
+      },
+      uploadSuccessHandle(e) {
+        this.deptBudgetList.addressUrl += e.url + ','
+        this.addressUrls.push(e.url)
+      },
+      //提交
+      submit() {
+        if (!this.deptBudgetList.warehouseName) {
+          this.$message({
+            message: '仓库名称不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseName.length < 2 ||
+          this.deptBudgetList.warehouseName.length > 20
+        ) {
+          this.$message({
+            message: '仓库名长度不符合要求!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.personCharge) {
+          this.$message({
+            message: '负责人不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.personCharge.length < 2 ||
+          this.deptBudgetList.personCharge.length > 10
+        ) {
+          this.$message({
+            message: '负责人长度不符合要求,请控制在2-10字符之内',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.personPhone) {
+          this.$message({
+            message: '负责人电话不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.personPhone.length != 11) {
+          this.$message({
+            message: '手机号输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.detailedAddress) {
+          this.$message({
+            message: '详细地址不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+          if (!this.deptBudgetList.warehousePositioning) {
+          this.$message({
+            message: '仓库定位不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.warehouseType == 1) {
+          if (this.totalStorage <= 0) {
+            this.$message({
+              message: '仓位储量不能为空!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        if (
+          this.deptBudgetList.detailedAddress.length < 2 ||
+          this.deptBudgetList.detailedAddress.length > 20
+        ) {
+          this.$message({
+            message: '详细地址长度不符合要求,请控制在2-20字符之内',
+            type: 'warning',
+          })
+          return
+        }
+        for (
+          var i = 0; i < this.deptBudgetList.warehousePositionInfoList.length; i++
+        ) {
+          for (
+            var j = i + 1; j < this.deptBudgetList.warehousePositionInfoList.length; j++
+          ) {
+            console.log(
+              this.deptBudgetList.warehousePositionInfoList[i].binNumber,
+              this.deptBudgetList.warehousePositionInfoList[j].binNumber
+            )
+            if (
+              this.deptBudgetList.warehousePositionInfoList[i].binNumber ==
+              this.deptBudgetList.warehousePositionInfoList[j].binNumber
+            ) {
+              this.$message({
+                message: '仓位编号重复',
+                type: 'warning',
+              })
+              return
+            }
+          }
+        }
+        this.$refs.deptBudgetList.validate((valid) => {
+          if (valid) {
+            this.deptBudgetList.warehousePrivate =
+              CodeToText[this.selectedOptions[0]]
+            this.deptBudgetList.warehouseCity =
+              CodeToText[this.selectedOptions[1]]
+            this.deptBudgetList.warehouseArea =
+              CodeToText[this.selectedOptions[2]]
+            this.deptBudgetList.warehouseType = this.warehouseType
+            this.deptBudgetList.baseId = this.baseId
+            this.deptBudgetList.compId = this.compId
+            this.deptBudgetList.contractType = 1
+            this.deptBudgetList.otherPersonPhone = this.deptBudgetList.otherPersonPhone.toString()
+            edit(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('编辑成功')
+                this.deptBudgetList = {}
+                this.warehouseType = '1'
+                this.$router.push({
+                  path: 'warehouseManagementList'
+                })
+              })
+          } else {
+            //EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
+          }
+        })
+        new Promise((resolve, reject) => {
+          const newAppendixs = this.fileList
+          const params = {
+            newAppendixs
+          }
+          saveFiles(params)
+            .toPromise()
+            .then((res) => {
+              resolve(res.join())
+            })
+            .catch((err) => {
+              EventBus.$emit('error', this.$t('showMessage.saveFilesError'))
+              reject()
+            })
+        })
+      },
+
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        console.log(row)
+        billoperatehis({
+            id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      //删除
+
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {},
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.totalStorage .el-input__inner {
+    color: #afb5cb;
+    background: #f5f7fa;
+  }
+
+  .small-title {
+    position: relative;
+    padding: 10px;
+    font-weight: 600;
+  }
+
+  .small-title::before {
+    position: absolute;
+    content: '';
+    display: block;
+    background: #5473e8;
+    width: 4px;
+    height: 14px;
+    left: 0px;
+    top: 13px;
+  }
+
+  .position {
+    position: relative;
+  }
+
+  .add,
+  .del {
+    // position: absolute;
+    // right: -38px;
+    // top: 9px;
+    margin: 8px;
+    cursor: pointer;
+  }
+
+  .del {
+    right: -70px;
+  }
+
+  .amap-page-container {
+    width: 300px;
+    height: 300px;
+  }
+
+  .el-form {
+    padding: 0 15%;
+  }
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid transparent;
+    border-bottom: 1px solid transparent;
+  }
+
+  .readonly {
+    position: relative;
+  }
+
+  .readonly:after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .ws-info-table {
+    border-left: 1px solid transparent;
+    border-top: 1px solid transparent;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid transparent;
+    background: #fff;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 130px;
+    text-align: center;
+    background: #fff;
+    // border: 1px solid #cdd2dc;
+  }
+
+  .button-container {
+    display: flex;
+    flex-wrap: nowrap;
+    justify-content: space-between;
+    align-items: center;
+    background-color: #fff;
+    width: 100%;
+    height: 50px;
+    padding: 0 10px;
+
+    &>div {
+      margin-left: 10px;
+      display: flex;
+      flex-wrap: nowrap;
+      flex-direction: row;
+
+      &>span {
+        line-height: 50px;
+      }
+    }
+
+    /deep/.auditFlow-box {
+      position: unset;
+      margin-left: 10px;
+
+      &/deep/.auditFlow-icon {
+        width: auto;
+        padding-right: 30px;
+      }
+
+      &/deep/.auditFlow-main {
+        position: absolute;
+      }
+    }
+  }
+
+  .box-app {
+    display: inline-block;
+    float: left;
+    margin-left: 30px;
+    line-height: 50px;
+  }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .wenzi {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 10px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .center {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  .el-form-item {
+    width: 50%;
+  }
+
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  .ce {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  .hide-sel {
+    .el-input__inner {
+      border: 0px;
+    }
+
+    .el-icon-arrow-up {
+      display: none;
+    }
+
+    .el-textarea__inner {
+      background-color: #fff !important;
+      border: 0;
+    }
+
+    .el-date-editor {
+      i {
+        display: none;
+      }
+    }
+
+    .is-disabled {
+      .el-input__inner:hover {
+        background-color: #fff !important;
+        border: 0;
+      }
+
+      color: #606266;
+
+      .el-input__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+
+      .el-textarea__inner {
+        background-color: #fff !important;
+        border: 0;
+        color: #606266;
+      }
+    }
+  }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 33.3333%;
+  }
+
+  .readonly:after {
+    display: none;
+  }
+
+  .el-textarea__inner {
+    display: none;
+  }
+
+  .el-form {
+    margin-top: 50px;
+  }
+
+  .readonly {
+    width: 16%;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 33.33%;
+  }
+
+  //去边框
+  /deep/.el-form-item {
+    border-right: 0px;
+    border-bottom: 0px;
+  }
+
+  /deep/.ws-info-table {
+    border-left: 0px;
+    border-top: 0px;
+  }
+
+  .ws-info-table .el-form-item .el-form-item__content {
+    border-right: 0px;
+    border-bottom: 0px;
+    border-left: 0px;
+    border-top: 0px;
+  }
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 0px;
+    border-bottom: 0px;
+    border-left: 0px;
+    border-top: 0px;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    background: #f5f7fa;
+    border-radius: 4px;
+    border: 1px solid #d8dce6;
+    font-family: PingFangSC-Regular, PingFang SC;
+    margin-bottom: 5px;
+    background-color: #fff;
+    font-size: 14px;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+    height: auto !important;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    background-color: #fff;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: 0px;
+  }
+
+  .addressUrls {
+    width: 100%;
+    display: flex;
+    margin-top: 10px;
+  }
+
+  .addressUrl {
+    margin: 0 10px;
+    border-radius: 3px;
+  }
+
+  .addressUrls-item {
+    position: relative;
+  }
+
+  .icon-guanbi {
+    position: absolute;
+    right: 0;
+  }
+  .ws-info-table .addPerson{
+    width: 66.666%;
+  }
+  .radio{
+    display: flex;
+  }
+</style>

+ 544 - 0
src/views/warehousenew/warehouseManagementNoComplete.vue

@@ -0,0 +1,544 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">待完成记录</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnWarehouse()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <ws-form ref="deptBudgetList" :v-model="deptBudgetList">
+      <div class="center">
+        <h2 style="padding-left: 20px">
+          <img
+            style="position: relative; top: 2px"
+            width="19"
+            height="19"
+            src="../../../public/img/cangku.png"
+            alt=""
+          />
+          {{ this.$route.query.warehouseName }}
+          <span class="position" v-show="this.$route.query.warehouseType == 1">
+            {{ this.$route.query.binNumber }}仓位
+          </span>
+          <span v-show="this.$route.query.warehouseType == 2">(临)</span>
+        </h2>
+        <el-table :data="improved.records">
+          <el-table-column type="index" label="序号">
+            <template scope="scope">
+              <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+              <span v-else>{{ scope.$index + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="goodsName" label="货名"> </el-table-column>
+          <el-table-column
+            prop="grossWeight"
+            label="毛重(吨)"
+          ></el-table-column>
+          <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
+          <el-table-column
+            prop="netWeight"
+            label="净重(吨)"
+          ></el-table-column>
+          <el-table-column prop="grade" label="品级">
+            <template slot-scope="scope">
+              <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+                scope.row.grade
+              }}</span>
+              <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+                scope.row.grade
+              }}</span>
+              <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+                scope.row.grade
+              }}</span>
+              <span v-if="scope.row.grade == '等外'" class="substandard">{{
+                scope.row.grade
+              }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="inOutDate" label="出入库日期">
+          </el-table-column>
+          <el-table-column prop="inOutType" label="类型"> </el-table-column>
+          <el-table-column prop="contractNo" label="合同编号">
+          </el-table-column>
+          <el-table-column prop="carNo" label="车牌号"> </el-table-column>
+          <el-table-column prop="boxNo" label="箱号-1">
+					</el-table-column>
+					<el-table-column prop="boxNoOther" label="箱号-2">
+					</el-table-column>
+					<el-table-column prop="titleNo" label="封号-1">
+					</el-table-column>
+					<el-table-column prop="titleNoOther" label="封号-2">
+					</el-table-column>
+          <el-table-column prop="agent" label="经办人"> </el-table-column>
+          <el-table-column prop="backOffice" label="操作人"> </el-table-column>
+          <el-table-column prop="updateDate" label="保存时间">
+          </el-table-column>
+          <el-table-column prop="address" label="操作" width="200">
+            <template slot-scope="scope">
+              <div class="record" @click="edits(scope.row)">编辑</div>
+              <div class="adjustment" @click="handleDelete(scope.row)">
+                删除
+              </div>
+            </template>
+          </el-table-column>
+        </el-table>
+<div style='text-align:center;'>
+   <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    >
+    </el-pagination>
+</div>
+       
+      </div>
+    </ws-form>
+  </div>
+</template>
+<script>
+import {
+  complete,
+  delInOut,
+  completeList,
+  // deletewarehouse,
+  // warehouseName,
+  // addstorageputList,
+} from '@/model/warehouse/index'
+// import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchKeyWord: '',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      deletewarehouse: [],
+      improved: [],
+      row: [],
+      deptBudgetList1: [],
+      // 提交类型
+      submitType: true,
+      selectpackingMethod: {},
+      size: 10,
+      compId: localStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      packtypeList: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      deptBudgetList: {},
+      historyList: [],
+      // inOutDate:null,
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
+    this.binNumber = this.$route.params.binNumber
+    this.deptBudgetList.warehouseType = this.$route.query.warehouseType
+    this.createType=this.$route.query.createType,
+    //接参
+    this.getList(
+      this.$route.query.baseId,
+      this.$route.query.positionId,
+      this.$route.query.warehouseType
+    )
+    this.showType = this.isShow
+  },
+  methods: {
+    //返回按钮
+    returnWarehouse() {
+      this.$router.go(-1)
+    },
+    //编辑
+    edits(row) {
+      if (row.inOutFlag == 2) {
+        this.$store.dispatch('app/setdeptBudgetList', row)
+        this.$router.push({
+          path: 'warehouseManagementPerfectput',
+          query: {
+            id: row.id,
+            agent: row.agent,
+            baseId: row.baseId,
+            binNumber: row.binNumber,
+            carNo: row.carNo,
+            compId: row.compId,
+            contractNo: row.contractNo,
+            goodsName: row.goodsName,
+            goodsNameKey: row.goodsNameKey,
+            grade: row.grade,
+            outType:row.outType,
+            addressUrl:row.addressUrl,
+            grossWeight: row.grossWeight,
+            inOutDate: row.inOutDate,
+            inOutFlag: row.inOutFlag,
+            inOutType: row.inOutType,
+            inOutTypeKey: row.inOutTypeKey,
+            netWeight: row.netWeight,
+            positionId: row.positionId,
+            statusFlag: row.statusFlag,
+            tare: row.tare,
+            warehouseName: row.warehouseName,
+            warehouseInOutDetail: row.warehouseInOutDetail,
+            warehouseType: this.deptBudgetList.warehouseType,
+            createType: this.createType,
+            temporaryOutType : row.temporaryOutType,
+            cost:row.cost,
+            freight:row.freight,
+            type:row.type,
+            buckleWeightRatio:row.buckleWeightRatio,
+            tidalGrainWater:row.tidalGrainWater,
+            solidGrainWater:row.solidGrainWater,
+            pureWeight:row.pureWeight,
+            deductionAmount:row.deductionAmount,
+            deductionWeight:row.deductionWeight
+          },
+        })
+      } else if (row.inOutFlag == 1) {
+        this.$store.dispatch('app/setdeptBudgetList', row)
+        // this.$store.commit('deptBudgetList',row)
+        this.$router.push({
+          path: 'warehouseManagementPerfectDelivery',
+          query: {
+            id: row.id,
+            agent: row.agent,
+            baseId: row.baseId,
+            binNumber: row.binNumber,
+            carNo: row.carNo,
+            compId: row.compId,
+            contractNo: row.contractNo,
+            goodsName: row.goodsName,
+            goodsNameKey: row.goodsNameKey,
+            outType:row.outType,
+            grade: row.grade,
+            addressUrl:row.addressUrl,
+            grossWeight: row.grossWeight,
+            inOutDate: row.inOutDate,
+            inOutFlag: row.inOutFlag,
+            inOutType: row.inOutType,
+            inOutTypeKey: row.inOutTypeKey,
+            netWeight: row.netWeight,
+            positionId: row.positionId,
+            statusFlag: row.statusFlag,
+            tare: row.tare,
+            warehouseName: row.warehouseName,
+            warehouseInOutDetail: row.warehouseInOutDetail,
+            warehouseType: this.deptBudgetList.warehouseType,
+            temporaryOutType : this.temporaryOutType,
+            cost:row.cost,
+            freight:row.freight,
+            type:row.type,
+            buckleWeightRatio:row.buckleWeightRatio,
+            tidalGrainWater:row.tidalGrainWater,
+            solidGrainWater:row.solidGrainWater,
+            pureWeight:row.pureWeight,
+            deductionAmount:row.deductionAmount,
+            deductionWeight:row.deductionWeight
+          },
+        })
+      }
+    },
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'Y+': date.getFullYear().toString(), // 年
+        'm+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        // "M+": date.getMinutes().toString(),         // 分
+        // "S+": date.getSeconds().toString()          // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    //收
+    getList(id, id1, id2) {
+      if (id2 == 1) {
+        complete({
+          // compId: localStorage.getItem('ws-pf_compId'),
+          baseId: id,
+          positionId: id1,
+          pageSize: this.pageSize,
+          currentPage: this.currentPage,
+          // inOutDate:this.inOutDate
+        })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetTotal=response.total
+            this.improved = response
+          })
+      } else if (id2 == 2) {
+        completeList({
+          baseId: id,
+          positionId: id1,
+          pageSize: this.pageSize,
+          currentPage: this.currentPage,
+        })
+          .toPromise()
+          .then((response) => {
+            this.improved = response
+          })
+      }
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+    //删除
+    handleDelete(row) {
+      this.$confirm(`删除后不可恢复,确认删除?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          delInOut({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList(
+                row.baseId,
+                row.positionId,
+                this.$route.query.warehouseType
+              )
+            })
+            .catch((response) => {})
+        })
+        .catch(() => {
+          return false
+        })
+    },
+  },
+  find() {
+    this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
+    this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
+    this.currentPage = 1
+    this.getList()
+  },
+  // deletecontract(){},
+  //删除
+  approve() {},
+  listQuery() {},
+  total() {},
+  clearfiltQuery() {},
+  selectCrtDuty() {},
+}
+</script>
+<style lang="scss" scoped>
+.center {
+  position: relative;
+  top: 50px;
+  width: 90%;
+  height: 500px;
+  margin: 0 auto;
+}
+.container .bg-left {
+  margin-left: 40px;
+}
+.container .bg-bottom {
+  position: absolute;
+  float: right;
+  top: 15px;
+  right: 20px;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+/deep/.el-form-item {
+  width: 33%;
+}
+.el-row {
+  background: #f6f7fc;
+  // box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
+  border-radius: 4px 4px 1px 1px;
+}
+.container .bg-bottom {
+  width: 74px;
+  height: 32px;
+  background: #5473e8;
+  border-radius: 4px;
+}
+.bg-bottom {
+  margin-top: 5px 0px;
+}
+.el-table .el-table__header tr {
+  width: 1091px;
+  height: 50px;
+  background: #f6f7fc;
+  border: 1px solid #e8ecf6;
+  text-align: center;
+}
+.el-table .cell {
+  text-align: center;
+  width: 29px;
+  height: 20px;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #5878e8;
+  line-height: 20px;
+}
+.default .winseaview-main .el-table th > .cell {
+  color: #8890b1;
+}
+.record,
+.adjustment {
+  display: inline-block;
+  color: #5878e8;
+  padding: 0 4px !important;
+  position: relative;
+}
+/deep/.el-table td,
+.el-table th {
+  text-align: center;
+}
+/deep/.el-table .el-table__header th {
+  border-bottom-width: 0px;
+  text-align: center;
+}
+.top-grade {
+  background: linear-gradient(90deg, #5678e9, #7993f6);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.second-class {
+  background: linear-gradient(90deg, #50cdd9, #82e2ea);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.third-class {
+  background: linear-gradient(90deg, #ffa735, #ffbf70);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+.substandard {
+  background: linear-gradient(90deg, #b2b4bb, #ced0d5);
+  color: #fff;
+  padding: 3px;
+  border-radius: 2px;
+}
+// .container .bg-left{
+// width: 663px;
+// height: 28px;
+// font-size: 18px;
+// font-family: PingFangSC-Medium, PingFang SC;
+// font-weight: 500;
+// color: #262626;
+// line-height: 28px;
+// text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
+// }
+.a {
+  width: 19px;
+  height: 19px;
+  background: #afb5cb;
+  margin-left: 10px;
+}
+.container .bg-left {
+  width: 140px;
+  height: 29px;
+  font-size: 21px;
+  font-family: PingFangSC-Semibold, PingFang SC;
+  font-weight: 600;
+  color: #323233;
+  line-height: 29px;
+}
+.position {
+  width: 52px;
+  height: 20px;
+  background: #afb5cb;
+  border-radius: 2px;
+  font-size: 12px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  color: #ffffff;
+  line-height: 20px;
+}
+</style>

+ 652 - 0
src/views/warehousenew/warehouseManagementNoWeight.vue

@@ -0,0 +1,652 @@
+//检斤待完成
+<template>
+  <div class="">
+    <div class="row1">
+        <h2 class="bg-left title">检斤待完成</h2>
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnWarehouse()">返回</el-button>
+    </div>
+      <ws-form ref="deptBudgetList" :v-model="deptBudgetList">
+        <div class="center">
+          <h2 style="padding-left: 20px">
+            <img style="position: relative; top: 2px" width="19" height="19" src="../../../public/img/cangku.png"
+              alt="" />
+            {{ this.$route.query.warehouseName }}
+            <span class="position" v-show="this.$route.query.warehouseType == 1">
+              {{ this.$route.query.binNumber }}仓位
+            </span>
+            <span v-show="this.$route.query.warehouseType == 2">(临)</span>
+            <el-date-picker style="margin: 0 10px 0 10px" class="dataClass" value-format='yyyy-MM-dd' v-model="value2"
+              @change='datechange' type="daterange" align="right" range-separator="至" start-placeholder="出入库日期起"
+              end-placeholder="出入库日期止">
+            </el-date-picker>
+          </h2>
+          <el-table :data="improved.records" height="calc(100% - 200px)">
+            <el-table-column type="index" label="序号">
+              <template scope="scope">
+                <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+                <span v-else>{{ scope.$index + 1 }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="goodsName" label="货名"> </el-table-column>
+            <el-table-column prop="grossWeight" label="毛重(吨)"></el-table-column>
+            <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
+            <el-table-column prop="netWeight" label="净重(吨)"></el-table-column>
+            <el-table-column prop="grade" label="品级">
+              <template slot-scope="scope">
+                <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+                scope.row.grade
+              }}</span>
+                <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+                scope.row.grade
+              }}</span>
+                <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+                scope.row.grade
+              }}</span>
+                <span v-if="scope.row.grade == '等外'" class="substandard">{{
+                scope.row.grade
+              }}</span>
+              </template>
+            </el-table-column>
+            <el-table-column prop="inOutDate" label="出入库日期">
+            </el-table-column>
+            <el-table-column prop="inOutType" label="类型"> </el-table-column>
+            <el-table-column prop="contractNo" label="合同编号">
+            </el-table-column>
+            <el-table-column prop="carNo" label="车牌号"> </el-table-column>
+            <el-table-column prop="boxNo" label="箱号-1">
+            </el-table-column>
+            <el-table-column prop="boxNoOther" label="箱号-2">
+            </el-table-column>
+            <el-table-column prop="titleNo" label="封号-1">
+            </el-table-column>
+            <el-table-column prop="titleNoOther" label="封号-2">
+            </el-table-column>
+            <el-table-column prop="wingNumber" label="车厢号-1">
+            </el-table-column>
+            <el-table-column prop="wingNumberOther" label="车厢号-2">
+            </el-table-column>
+            <el-table-column prop="shipNumber" label="航次">
+            </el-table-column>
+            <el-table-column prop="shipName" label="船名">
+            </el-table-column>
+            <el-table-column prop="agent" label="经办人"> </el-table-column>
+            <el-table-column prop="backOffice" label="操作人"> </el-table-column>
+            <el-table-column prop="updateDate" label="保存时间">
+            </el-table-column>
+            <el-table-column prop="address" label="操作" width="200">
+              <template slot-scope="scope">
+                <ws-button v-if="scope.row.inOutFlag =='2' " v-hasPermission="
+           `warehouseManagement.warehouse.warehouseInfo.in`
+          " class="deliverystorage" @click="edits(scope.row)">
+                  皮检
+                </ws-button>
+                <ws-button v-else v-hasPermission="
+           `warehouseManagement.warehouse.warehouseInfo.out`
+          " class="putstorage" @click="edits(scope.row)">
+                  毛检
+                </ws-button>
+                <!-- <el-button @click="print(scope.row)"  v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button > -->
+
+                <!-- <div class="record" @click="edits(scope.row)">编辑</div>
+              <div class="adjustment" @click="handleDelete(scope.row)">
+                删除
+              </div> -->
+              </template>
+            </el-table-column>
+          </el-table>
+          <div style='text-align:center;'>
+            <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+              :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
+              :total="deptBudgetTotal">
+            </el-pagination>
+          </div>
+
+        </div>
+      </ws-form>
+
+  </div>
+</template>
+<script>
+  import {
+    complete,
+    delInOut,
+    completeList,
+    getPrintInfo,
+    // deletewarehouse,
+    // warehouseName,
+    // addstorageputList,
+  } from '@/model/warehouse/index'
+  // import { downloadFile } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    dayjs
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        value2: [],
+        deletewarehouse: [],
+        improved: [],
+        row: [],
+        deptBudgetList1: [],
+        // 提交类型
+        submitType: true,
+        selectpackingMethod: {},
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        contractList: [],
+        deptBudgetList: {},
+        historyList: [],
+        // inOutDate:null,
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+      }
+    },
+    activated() {
+      //cg.viewBudget
+      //cg.viewSpareMoney
+      // this.getVesselData();
+      this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
+      this.binNumber = this.$route.params.binNumber
+      this.status = this.$route.query.status
+      this.deptBudgetList.warehouseType = this.$route.query.warehouseType
+      this.createType = this.$route.query.createType
+      this.getPassYearFormatDate()
+      //接参
+      this.getList(
+        this.$route.query.baseId,
+        this.$route.query.positionId,
+        this.$route.query.warehouseType
+      )
+      this.showType = this.isShow
+    },
+    methods: {
+      datechange() {
+        this.getList()
+      },
+      //返回按钮
+      returnWarehouse() {
+        this.$router.push({
+          path: 'warehouseManagementList'
+        })
+      },
+      getPassYearFormatDate() {
+        var nowDate = new Date()
+        nowDate.setTime(nowDate.getTime() - 24 * 60 * 60 * 1000 * 30)
+        var seperator1 = '-'
+        var year = nowDate.getFullYear()
+        var month = nowDate.getMonth() + 1
+        var strDate = nowDate.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        var formatDate = year + seperator1 + month + seperator1 + strDate
+        this.getNowFormatDate(formatDate)
+      },
+      /* 获取现在时间,并接受过去时间的值 */
+      getNowFormatDate(formatDate) {
+        var date = new Date()
+        date.setTime(date.getTime() + 24 * 60 * 60 * 1000)
+        var seperator1 = '-'
+        var year = date.getFullYear()
+        var month = date.getMonth() + 1
+        var strDate = date.getDate()
+        if (month >= 1 && month <= 9) {
+          month = '0' + month
+        }
+        if (strDate >= 0 && strDate <= 9) {
+          strDate = '0' + strDate
+        }
+        var nowData = year + seperator1 + month + seperator1 + strDate
+        this.value2 = [formatDate, nowData] // 默认赋值一年时间
+      },
+      //编辑
+      edits(row) {
+        if (row.inOutFlag == 2) {
+          this.$store.dispatch('app/setdeptBudgetList', row)
+          this.$router.push({
+            path: 'warehouseManagementNoWeightIn',
+            query: {
+              id: row.id,
+              agent: row.agent,
+              baseId: row.baseId,
+              binNumber: row.binNumber,
+              carNo: row.carNo,
+              compId: row.compId,
+              boxNo: row.boxNo,
+              boxNoOther: row.boxNoOther,
+              titleNo: row.titleNo,
+              titleNoOther: row.titleNoOther,
+              contractNo: row.contractNo,
+              goodsName: row.goodsName,
+              goodsNameKey: row.goodsNameKey,
+              grade: row.grade,
+              grossWeight: row.grossWeight,
+              inOutDate: row.inOutDate,
+              inOutFlag: row.inOutFlag,
+              inOutType: row.inOutType,
+              inOutTypeKey: row.inOutTypeKey,
+              inOutTaskNo: row.inOutTaskNo,
+              netWeight: row.netWeight,
+              positionId: row.positionId,
+              statusFlag: row.statusFlag,
+              tare: row.tare,
+              warehouseName: row.warehouseName,
+              warehouseInOutDetail: row.warehouseInOutDetail,
+              warehouseType: this.deptBudgetList.warehouseType,
+              createType: this.createType,
+              temporaryOutType: row.temporaryOutType,
+              cost: row.cost,
+              freight: row.freight,
+              type: row.type,
+              buckleWeightRatio: row.buckleWeightRatio,
+              tidalGrainWater: row.tidalGrainWater,
+              solidGrainWater: row.solidGrainWater,
+              pureWeight: row.pureWeight,
+              deductionAmount: row.deductionAmount,
+              deductionWeight: row.deductionWeight,
+              allowEdit: row.allowEdit,
+              automaticWeightAcquisition: row.automaticWeightAcquisition,
+              outType:row.outType,//运输类型
+              carId:row.carId,//派车id
+            },
+          })
+        } else if (row.inOutFlag == 1) {
+          this.$store.dispatch('app/setdeptBudgetList', row)
+          // this.$store.commit('deptBudgetList',row)
+          this.$router.push({
+            path: 'warehouseManagementNoWeightOut',
+            query: {
+              id: row.id,
+              agent: row.agent,
+              baseId: row.baseId,
+              binNumber: row.binNumber,
+              carNo: row.carNo,
+              compId: row.compId,
+              contractNo: row.contractNo,
+              boxNo: row.boxNo,
+              boxNoOther: row.boxNoOther,
+              titleNo: row.titleNo,
+              titleNoOther: row.titleNoOther,
+              goodsName: row.goodsName,
+              goodsNameKey: row.goodsNameKey,
+              grade: row.grade,
+              status: '',
+              inOutTaskNo: row.inOutTaskNo,
+              grossWeight: row.grossWeight,
+              inOutDate: row.inOutDate,
+              inOutFlag: row.inOutFlag,
+              inOutType: row.inOutType,
+              inOutTypeKey: row.inOutTypeKey,
+              netWeight: row.netWeight,
+              positionId: row.positionId,
+              statusFlag: row.statusFlag,
+              tare: row.tare,
+              warehouseName: row.warehouseName,
+              warehouseInOutDetail: row.warehouseInOutDetail,
+              warehouseType: this.deptBudgetList.warehouseType,
+              temporaryOutType: this.temporaryOutType,
+              cost: row.cost,
+              freight: row.freight,
+              type: row.type,
+              buckleWeightRatio: row.buckleWeightRatio,
+              tidalGrainWater: row.tidalGrainWater,
+              solidGrainWater: row.solidGrainWater,
+              pureWeight: row.pureWeight,
+              deductionAmount: row.deductionAmount,
+              deductionWeight: row.deductionWeight,
+              allowEdit: row.allowEdit,
+              automaticWeightAcquisition: row.automaticWeightAcquisition,
+              outType:row.outType,//运输类型
+              carId:row.carId,//派车id
+            },
+          })
+        }
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'Y+': date.getFullYear().toString(), // 年
+          'm+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          // "M+": date.getMinutes().toString(),         // 分
+          // "S+": date.getSeconds().toString()          // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+      print(row) {
+
+
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      //收
+      getList(id, id1, id2) {
+        var startDate = ''
+        var endDate = ''
+        if (this.value2) {
+          startDate = this.value2[0] ? this.value2[0] : ''
+          endDate = this.value2[1] ? this.value2[1] : ''
+        }
+        if (id2 == 1) {
+          complete({
+              // compId: localStorage.getItem('ws-pf_compId'),
+              baseId: id,
+              positionId: id1,
+              pageSize: this.pageSize,
+              currentPage: this.currentPage,
+              startDate: startDate,
+              endDate: endDate,
+              // inOutDate:this.inOutDate
+            })
+            .toPromise()
+            .then((response) => {
+              this.deptBudgetTotal = response.total
+              this.improved = response
+            })
+        } else if (id2 == 2) {
+          completeList({
+              baseId: id,
+              positionId: id1,
+              pageSize: this.pageSize,
+              currentPage: this.currentPage,
+              startDate: startDate,
+              endDate: endDate,
+              searchType: this.status
+            })
+            .toPromise()
+            .then((response) => {
+              this.improved = response
+            })
+        }
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+      //删除
+      handleDelete(row) {
+        this.$confirm(`删除后不可恢复,确认删除?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            delInOut({
+                id: row.id
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '删除成功',
+                })
+                this.getList(
+                  row.baseId,
+                  row.positionId,
+                  this.$route.query.warehouseType
+                )
+              })
+              .catch((response) => {})
+          })
+          .catch(() => {
+            return false
+          })
+      },
+    },
+    find() {
+      this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
+      this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
+      this.currentPage = 1
+      this.getList()
+    },
+    // deletecontract(){},
+    //删除
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+  }
+</script>
+<style lang="scss" scoped>
+  .center {
+    // position: relative;
+    // top: 50px;
+    width: 100%;
+    height: 100%;
+    margin: 0 auto;
+  }
+
+  .container .bg-left {
+    margin-left: 40px;
+  }
+
+  .container .bg-bottom {
+    position: absolute;
+    float: right;
+    top: 15px;
+    right: 20px;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  /deep/.el-form-item {
+    width: 33%;
+  }
+
+  .el-row {
+    background: #f6f7fc;
+    // box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
+    border-radius: 4px 4px 1px 1px;
+  }
+
+  .container .bg-bottom {
+    width: 74px;
+    height: 32px;
+    background: #5473e8;
+    border-radius: 4px;
+  }
+
+  .bg-bottom {
+    margin-top: 5px 0px;
+  }
+
+  .el-table .el-table__header tr {
+    width: 1091px;
+    height: 50px;
+    background: #f6f7fc;
+    border: 1px solid #e8ecf6;
+    text-align: center;
+  }
+
+  .el-table .cell {
+    text-align: center;
+    width: 29px;
+    height: 20px;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #5878e8;
+    line-height: 20px;
+  }
+
+  .default .winseaview-main .el-table th>.cell {
+    color: #8890b1;
+  }
+
+  .record,
+  .adjustment {
+    display: inline-block;
+    color: #5878e8;
+    padding: 0 4px !important;
+    position: relative;
+  }
+
+  /deep/.el-table td,
+  .el-table th {
+    text-align: center;
+  }
+
+  /deep/.el-table .el-table__header th {
+    border-bottom-width: 0px;
+    text-align: center;
+  }
+
+  .top-grade {
+    background: linear-gradient(90deg, #5678e9, #7993f6);
+    color: #fff;
+    padding: 3px;
+    border-radius: 2px;
+  }
+
+  .second-class {
+    background: linear-gradient(90deg, #50cdd9, #82e2ea);
+    color: #fff;
+    padding: 3px;
+    border-radius: 2px;
+  }
+
+  .third-class {
+    background: linear-gradient(90deg, #ffa735, #ffbf70);
+    color: #fff;
+    padding: 3px;
+    border-radius: 2px;
+  }
+
+  .substandard {
+    background: linear-gradient(90deg, #b2b4bb, #ced0d5);
+    color: #fff;
+    padding: 3px;
+    border-radius: 2px;
+  }
+
+  // .container .bg-left{
+  // width: 663px;
+  // height: 28px;
+  // font-size: 18px;
+  // font-family: PingFangSC-Medium, PingFang SC;
+  // font-weight: 500;
+  // color: #262626;
+  // line-height: 28px;
+  // text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
+  // }
+  .a {
+    width: 19px;
+    height: 19px;
+    background: #afb5cb;
+    margin-left: 10px;
+  }
+
+  .container .bg-left {
+    width: 140px;
+    height: 29px;
+    font-size: 21px;
+    font-family: PingFangSC-Semibold, PingFang SC;
+    font-weight: 600;
+    color: #323233;
+    line-height: 29px;
+  }
+
+  .position {
+    width: 52px;
+    height: 20px;
+    background: #afb5cb;
+    border-radius: 2px;
+    font-size: 12px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    color: #ffffff;
+    line-height: 20px;
+  }
+
+  .dataClass {
+    width: 20% !important;
+    margin-left: 10px;
+  }
+  .el-form{
+    height: 100%;
+  }
+  .row1{
+   display: flex;
+    justify-content: space-between;
+    padding: 0 20px;
+    background: #f6f7fc;
+    border-radius: 4px 4px 1px 1px;
+    align-items: center;
+  }
+</style>

+ 1935 - 0
src/views/warehousenew/warehouseManagementNoWeightIn.vue

@@ -0,0 +1,1935 @@
+// 完善入库信息
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">入库皮重检斤</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="revert()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <ws-form ref="dataList" :model="dataList" :rules="rules">
+      <div class="basicInformation">
+        <h2>
+          {{ deptBudgetList1.warehouseName }}
+          <span class="position" v-show="this.$route.query.warehouseType == 1">
+            {{ deptBudgetList1.binNumber }}仓位
+          </span>
+          <span v-show="this.$route.query.warehouseType == 2">(临)</span>
+        </h2>
+        <div class="balance-row">
+          <BalanceAlert class="left" ref="weightChild" :deptBudgetList='deptBudgetList'
+            :information='information' v-on:balanceListen="setVal"></BalanceAlert>
+          <div class="top">
+            <!-- <div class="car-type">皮重</div> -->
+            <!-- <div class="weight">{{deptBudgetList.grossWeight}} <span class="kg-style">kg</span></div> -->
+             <div class="confirmInfo">
+              <div class="confirmWeight">确定重量</div>
+              <div class="weight">
+                {{ tare }} <span class="kg-style">kg</span>
+              </div>
+            </div>
+            <!-- <div class="weight">
+              {{ tare }} <span class="kg-style">kg</span>
+            </div> -->
+            <!-- <div class="car-no">{{ dataList.carNo }}</div> -->
+            <div class="confirmInfo">
+              <div class="confirmCarNo">车牌号</div>
+              <div class="car-no">{{ dataList.carNo }}</div>
+            </div>
+          </div>
+        </div>
+
+        <div class="small-title">基本信息</div>
+        <div class="flex">
+          <div class="left" style='width:66.6666%;'>
+            <ws-info-table>
+              <!--任务编号-->
+              <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+                <el-select filterable clearable v-model="dataList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect"
+                  @change="contractNoChange">
+                  <el-option v-for="item in deptBudgetList2" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
+                    :value="item.inOutTaskNo" />
+                </el-select>
+              </ws-form-item>
+              <!--毛重(公斤)-->
+              <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
+                <ws-input :disabled="allowEdit" @input="grossWeightchange" v-model="dataList.grossWeight"
+                  placeholder="请输入毛重" maxlength="20" size="small" />
+              </ws-form-item>
+
+              <ws-form-item label="合同编号" span="1" prop="contractNo">
+                <el-select disabled filterable clearable :filter-method="dataFilter1" v-model="dataList.contractNo"
+                  placeholder="请选择合同编号或移库任务编号" class="typeselect" @change="contractNoChange">
+                  <el-option v-for="item in outContractNo1" :key="item.constKey" :label="item.contractNo"
+                    :value="item.contractNo" />
+                </el-select>
+              </ws-form-item>
+              <!--皮重(公斤)-->
+              <ws-form-item label="皮重(公斤)" span="1" prop="tare" class="readonly">
+                <ws-input :disabled="allowEdit" @input="tarechange" v-model="dataList.tare" placeholder="请输入皮重"
+                  maxlength="100" size="small" />
+                <el-button type="primary" @click="openPort">重新获取</el-button>
+              </ws-form-item>
+              <ws-form-item label="提示" span="1" prop="tips">
+                <ws-input onmouseover="this.title=this.value" v-model="dataList.tips" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="扣重(公斤)" span="1" prop="deductionWeight" class="readonly">
+                <ws-input @input="tarechange" v-model="dataList.deductionWeight" placeholder="请输入扣重" maxlength="100"
+                  size="small" />
+              </ws-form-item>
+
+              <!-- 货名 -->
+              <ws-form-item label="货名" span="1">
+                <ws-select disabled v-model="dataList.goodsName" placeholder class="typeselect"
+                  @change="selectgoodsName">
+                  <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <!--净重(公斤)-->
+              <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
+                <ws-input disabled v-model="dataList.netWeight" placeholder="不可编辑,自动计算" maxlength="120" size="small" />
+              </ws-form-item>
+              <ws-form-item label="类型" span="1" prop="type">
+                <ws-select disabled v-model="dataList.type" @change="typeChange">
+                  <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+                </ws-select>
+              </ws-form-item>
+              <ws-form-item label="扣款(元/公斤)" span="1" prop="deductionAmount">
+                <ws-input @input="kkInput(dataList.deductionAmount)" v-model="dataList.deductionAmount"
+                  placeholder="请输入扣款金额" maxlength="120" size="small" />
+              </ws-form-item>
+
+              <!-- 品级 -->
+              <ws-form-item label="品级" span="1" class="readonly">
+                <ws-select v-model="dataList.grade" placeholder class="typeselect" @change="selectpackingMethod">
+                  <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <ws-form-item label="入库日期" span="1" prop="inOutDate" class="deliverydate">
+                <el-date-picker v-model="dataList.inOutDate" placeholder="请选择入库日期" type="date"
+                  value-format="yyyy-MM-dd">
+                </el-date-picker>
+              </ws-form-item>
+              <!-- 经办人  -->
+              <ws-form-item label="经办人" span="1" prop="agent">
+                <el-select v-model="dataList.agent" placeholder="请选择经办人" filterable clearable @change="selectstaff">
+                  <el-option v-for="item in options" :key="item.value" :label="item.staffName"
+                    :value="item.staffName" />
+                </el-select>
+              </ws-form-item>
+              <!-- 入库类型 -->
+              <ws-form-item label="入库类型" span="1">
+                <ws-select v-model="dataList.inOutType" placeholder class="typeselect" @change="selectstorageType"
+                  :disabled="isSelectType">
+                  <ws-option v-for="item in storageType" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <!--
+          <ws-form-item
+            v-if="dataList.type == '潮粮'"
+            label="扣重比"
+            span="1"
+            prop="buckleWeightRatio"
+            class="readonly"
+          >
+            <ws-input
+              @input="pureweight"
+              v-model="dataList.buckleWeightRatio"
+              placeholder="请输入扣重比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            v-if="dataList.type == '潮粮'"
+            label="干粮水分占比"
+            span="1"
+            prop="solidGrainWater"
+            class="readonly"
+          >
+            <ws-input
+              @input="pureweight"
+              v-model="dataList.solidGrainWater"
+              placeholder="请输入干粮水分占比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            v-if="dataList.type == '潮粮'"
+            label="潮粮水分占比"
+            span="1"
+            prop="tidalGrainWater"
+            class="readonly"
+          >
+            <ws-input
+              @input="pureweight"
+              v-model="dataList.tidalGrainWater"
+              placeholder="请输入潮粮水分占比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            v-if="dataList.type == '潮粮'"
+            label="纯重"
+            span="1"
+            prop="pureWeight"
+            class="readonly"
+          >
+            <ws-input
+              disabled
+              v-model="dataList.pureWeight"
+              placeholder="不可编辑,自动计算"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+           -->
+            </ws-info-table>
+          </div>
+          <div class="right" style='width:33.3333%;'>
+            <ws-info-table>
+              <ws-form-item label="成本(元/吨)" span="1" prop="cost">
+                <ws-input :disabled="disabled1" v-model="dataList.cost" placeholder="请输入成本" size="small" />
+                <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+                  src="../../../public/img/edit.png" @click="editClick(1)" alt="" />
+              </ws-form-item>
+              <ws-form-item label="运费(元/吨)" span="1" prop="freight">
+                <ws-input :disabled="disabled2" v-model="dataList.freight" placeholder="请输入运费" size="small" />
+                <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+                  src="../../../public/img/edit.png" @click="editClick(2)" alt="" />
+              </ws-form-item>
+              <!--入库方式-->
+              <ws-form-item label="运输方式" span="1" prop="outType">
+                <el-select v-model="deptBudgetList.outType" placeholder="请选择运输方式" filterable clearable>
+                  <el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
+                </el-select>
+              </ws-form-item>
+
+              <!--车牌号  -->
+              <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
+              deptBudgetList.outType == '汽运' ||
+              deptBudgetList.outType == '集装箱船'
+            ">
+                <ws-input v-if="!carstatus" v-model="dataList.carNo" placeholder="请输入车牌号" maxlength="7" size="small" />
+                <el-select v-if="carstatus" filterable clearable :filter-method="dataFilter2" v-model="dataList.carNo"
+                  placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="item in options2" :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
+                </el-select>
+                <span style='padding-left:10px;'>发货重量(吨):{{dataList.loadNetWeight}}</span>
+              </ws-form-item>
+              <!--船名  -->
+              <ws-form-item label="船名" span="1" prop="carNo" v-if="deptBudgetList.outType == '散船'">
+                <ws-input v-model="deptBudgetList.carNo" placeholder="请输入船名" size="small" />
+              </ws-form-item>
+              <!--车号  -->
+              <ws-form-item label="车号" span="1" prop="carNo" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.carNo" placeholder="请输入车号" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
+              deptBudgetList.outType == '汽运' ||
+              deptBudgetList.outType == '集装箱船'
+            ">
+                <ws-input v-model="dataList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
+              deptBudgetList.outType == '汽运' ||
+              deptBudgetList.outType == '集装箱船'
+            ">
+                <ws-input v-model="dataList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
+              deptBudgetList.outType == '汽运' ||
+              deptBudgetList.outType == '集装箱船'
+            ">
+                <ws-input v-model="dataList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
+              deptBudgetList.outType == '汽运' ||
+              deptBudgetList.outType == '集装箱船'
+            ">
+                <ws-input v-model="dataList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="dataList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="dataList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+
+            </ws-info-table>
+          </div>
+        </div>
+
+        <div v-show="
+            this.$route.query.warehouseType == 2 &&
+            this.$route.query.createType == 2
+          ">
+          <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
+          <ws-info-table v-show="checked == true">
+            <!-- 出库类型 -->
+            <ws-form-item label="出库类型" span="1">
+              <ws-select v-model="dataList.temporaryOutType" placeholder="" class="typeselect">
+                <ws-option v-for="item in deliveryType" :key="item.constKey" :label="item.constValue"
+                  :value="item.constValue" />
+              </ws-select>
+            </ws-form-item>
+            <!-- 出库合同编号 -->
+            <ws-form-item label="出库合同编号" span="1">
+              <ws-select v-model="dataList.contractNo" placeholder="请选择合同编号或移库任务编号" class="typeselect">
+                <ws-option v-for="item in outContractNo" :key="item.constKey" :label="item.contractNo"
+                  :value="item.contractNo" />
+              </ws-select>
+            </ws-form-item>
+          </ws-info-table>
+        </div>
+      </div>
+      <!-- <div class="small-title">上传磅单照片</div>
+       <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="
+              (res) => {
+                uploadSuccessHandle1(res)
+              }
+            "
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <div>
+            <img v-if='dataList.addressUrl' style='width:100px;height:100px;' :src="dataList.addressUrl" alt="">
+          </div> -->
+      <div class="small-title">化验数据(选填)</div>
+      <div class="inspector">
+        <!--质检员-->
+        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <ws-input
+            v-model="dataList.warehouseInOutDetail.qualityInspector"
+            placeholder="请输入质检员姓名"
+            maxlength="120"
+            size="small"
+          />
+        </ws-form-item> -->
+        <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <el-select v-model="dataList.warehouseInOutDetail.qualityInspector" placeholder="请选择质检员" filterable clearable
+            @change="qualityInspectorChange">
+            <el-option v-for="item in qualityInspectorList" :key="item.value" :label="item.staffName"
+              :value="item.staffName" />
+          </el-select>
+        </ws-form-item>
+      </div>
+      <div class="neifor">
+        <ws-info-table>
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
+            <ws-input v-model="dataList.warehouseInOutDetail.waterContent" placeholder="请输入水分占比" maxlength="120"
+              size="small" />
+          </ws-form-item>
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <ws-input v-model="dataList.warehouseInOutDetail.impurity" placeholder="请输入杂质占比" maxlength="120"
+              size="small" />
+          </ws-form-item>
+          <!--容重(克/升)>=-->
+          <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+            <ws-input v-model="dataList.warehouseInOutDetail.bulkDensity" placeholder="请输入容重" maxlength="120"
+              size="small" />
+          </ws-form-item>
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
+            <ws-input v-model="dataList.warehouseInOutDetail.mildewGrain" placeholder="请输入霉变粒占比" maxlength="120"
+              size="small" />
+          </ws-form-item>
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <ws-input v-model="dataList.warehouseInOutDetail.jiaorenli" placeholder="请输入热损伤占比" maxlength="120"
+              size="small" />
+          </ws-form-item>
+          <!--不完善粒(%)<=-->
+          <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
+            <ws-input v-model="dataList.warehouseInOutDetail.imperfectGrain" placeholder="请输入不完善粒占比" maxlength="120"
+              size="small" />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+      <div style="text-align: right; padding: 10px">
+        <!-- <el-button
+          class="bg-bottom-up"
+          type="primary"
+          size="small"
+          @click="temporaryStorage()"
+          >暂存</el-button
+        > -->
+        <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
+      </div>
+    </ws-form>
+  </div>
+</template>
+<script>
+  import {
+    pullDown,
+    addstorageputList,
+    xialaNo,
+    getstaff,
+    getPrintInfo,
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import {
+    mapActions,
+    mapGetters,
+    mapState
+  } from 'vuex'
+  import WsUpload from '@/components/WsUpload'
+  import BalanceAlert from '@/components/balanceAlert'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+      BalanceAlert
+    },
+    watch: {
+      // vesselId(val) {
+      //   this.getList()
+      // },
+      isShow(val) {
+        this.showType = val
+      },
+      dataList: {
+        //深度监听,可监听到对象、数组的变化
+        handler(val, oldVal) {
+          if (val.tare) {
+            this.dataList.netWeight = this.dataList.grossWeight - val.tare
+          }
+        },
+        deep: true, //true 深度监听
+      },
+    },
+    computed: {
+      ...mapGetters(['deptBudgetList']),
+    },
+    data() {
+      return {
+        //有没有称
+        // isShowBalance: false,
+        information: '皮重检斤',
+        deptBudgetList2: [],
+        isSelectType: true,
+        isGetCost: false,
+        qualityInspectorList: [],
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        deptBudgetTotal: 0,
+        readonly: true,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: {},
+        checked: true,
+        disabled1: true,
+        disabled2: true,
+        staffList: [],
+        options: [],
+        storageType: [],
+        deliveryType: [],
+        outContractNo: [],
+        outContractNo1: [],
+        // 提交类型
+        submitType: true,
+        typeList: ['干粮', '潮粮'],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        warehouseInOutDetail: {},
+        onChange: {},
+        deptBudgetList1: [],
+        gradeList: [],
+        rules: {
+          netWeight: [{
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          }, ],
+        },
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        skinInspector: localStorage.getItem('ws-pf_staffName'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        options1: [],
+        options2: [],
+        carstatus: false,
+        contractList: [],
+        dataList: {
+          id: '',
+          grossWeight: '',
+          contractNo: '',
+          tare: '',
+          netWeight: '',
+          grade: '',
+          agent: '',
+          carNo: '',
+          inOutDate: '',
+          boxNo: '',
+          boxNoOther: '',
+          titleNo: '',
+          titleNoOther: '',
+          inOutType: '',
+          goodsName: '',
+          warehouseInOutDetail: {},
+          cost: '',
+          freight: 0,
+          type: '',
+          buckleWeightRatio: '',
+          tidalGrainWater: '',
+          solidGrainWater: '',
+          pureWeight: '',
+          deductionAmount: '',
+          deductionWeigh: '',
+        },
+        historyList: [],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+        param: 9600,
+        allowEdit: true,
+        result1: '00',
+        multiSelector: [{
+            name: '汽运',
+            value: '0',
+          },
+          {
+            name: '火运',
+            value: '1',
+          },
+          {
+            name: '集装箱船',
+            value: '2',
+          },
+          {
+            name: '散船',
+            value: '3',
+          },
+        ],
+        tare: "",
+      }
+    },
+    mounted() {},
+    activated() {
+      if (this.$route.query.allowEdit == 1) {
+        this.allowEdit = false
+      } else {
+        this.allowEdit = true
+      }
+      this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
+      this.deptBudgetList1.binNumber = this.$route.query.binNumber
+      this.dataList.id = this.$route.query.id
+      this.dataList.grossWeight = Math.round(this.$route.query.grossWeight * 1000)
+      this.dataList.contractNo = this.$route.query.contractNo
+      this.dataList.baseId = this.$route.query.baseId
+      this.dataList.positionId = this.$route.query.positionId
+      this.dataList.warehouseName = this.$route.query.warehouseName
+      this.dataList.binNumber = this.$route.query.binNumber
+      this.dataList.tare = Math.round(this.$route.query.tare * 1000)
+      this.tare = this.dataList.tare
+      this.dataList.netWeight = Math.round(this.$route.query.netWeight * 1000)
+      this.dataList.grade = this.$route.query.grade
+      this.dataList.agent = this.$route.query.agent
+      this.dataList.boxNo = this.$route.query.boxNo
+      this.dataList.boxNoOther = this.$route.query.boxNoOther
+      this.dataList.titleNo = this.$route.query.titleNo
+      this.dataList.titleNoOther = this.$route.query.titleNoOther
+      this.dataList.carNo = this.$route.query.carNo
+      this.dataList.carId = this.$route.query.carId
+      this.dataList.inOutDate = this.$route.query.inOutDate
+      this.dataList.contractNo = this.$route.query.contractNo
+      this.dataList.inOutType = this.$route.query.inOutType
+      this.dataList.compId = this.$route.query.compId
+      this.dataList.goodsName = this.$route.query.goodsName
+      this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
+      this.dataList.inOutFlag = this.$route.inOutFlag
+      this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
+      this.dataList.statusFlag = this.$route.statusFlag
+      this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
+      this.dataList.warehouseType = this.$route.query.warehouseType
+      this.dataList.createType = this.$route.query.createType
+      this.dataList.temporaryOutType = this.$route.query.temporaryOutType
+      this.dataList.cost = this.$route.query.cost
+      this.dataList.freight = this.$route.query.freight
+      this.dataList.type = this.$route.query.type
+      this.dataList.outType = this.$route.query.outType //运输方式
+      this.dataList.buckleWeightRatio = this.$route.query.buckleWeightRatio
+      this.dataList.tidalGrainWater = this.$route.query.tidalGrainWater
+      this.dataList.solidGrainWater = this.$route.query.solidGrainWater
+      this.dataList.pureWeight = Math.round(this.$route.query.pureWeight * 1000)
+      this.dataList.deductionAmount = this.$route.query.deductionAmount / 1000
+      this.dataList.deductionWeight = Math.round(
+        this.$route.query.deductionWeight * 1000
+      )
+      this.dataList.inOutTypeFlag = 1
+      this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
+      if (this.dataList.cost) {
+        this.isGetCost = true
+        this.cost = this.dataList.cost
+      }
+      this.getList()
+      // if (this.$route.query.automaticWeightAcquisition == '1') {
+      //   this.isShowBalance = true
+      // }
+    },
+    methods: {
+      setVal(data) {
+        if (this.information == '毛重检斤') {
+          this.dataList.grossWeight = data
+        } else {
+          this.tare = data
+          this.dataList.tare = data
+        }
+      },
+      openPort() {
+        this.$refs.weightChild.openPort()
+      },
+      kkInput(val) {
+        console.log(val)
+        if (this.isGetCost) {
+          if (this.dataList.cost > val) {
+            this.dataList.cost = this.cost - this.dataList.deductionAmount
+          }
+        }
+      },
+      qualityInspectorChange(e) {
+        console.log(e)
+      },
+      uploadSuccessHandle1(res) {
+        this.dataList.addressUrl = res.url
+      },
+      pureweight(status) {
+        console.log(this.dataList)
+        if (
+          this.dataList.netWeight &&
+          this.dataList.tidalGrainWater &&
+          this.dataList.solidGrainWater &&
+          this.dataList.buckleWeightRatio
+        ) {
+          this.dataList.pureWeight =
+            (this.dataList.netWeight *
+              (100 -
+                (this.dataList.tidalGrainWater - this.dataList.solidGrainWater) *
+                this.dataList.buckleWeightRatio)) /
+            100
+        }
+      },
+      //返回按钮
+      revert() {
+        this.$router.go(-1)
+      },
+      carChange(e) {
+        for (let i = 0; i < this.tranCarInfoList.length; i++) {
+          if (this.tranCarInfoList[i].carNo == this.dataList.carNo) {
+            this.dataList.tranCarNo = this.tranCarInfoList[i].tranCarNo
+            this.dataList.carId = this.tranCarInfoList[i].id
+            this.dataList.freight = this.tranCarInfoList[i].tranPrice
+          }
+          if (this.dataList.inOutType == '移库入库') {
+            if (!this.dataList.cost) {
+              this.dataList.cost = this.tranCarInfoList[i].cost
+            }
+            this.dataList.loadNetWeight = this.tranCarInfoList[i].loadNetWeight
+          }
+        }
+      },
+      typeChange(e) {},
+      contractNoChange(e) {
+        for (let i = 0; i < this.deptBudgetList2.length; i++) {
+          if (this.deptBudgetList2[i].inOutTaskNo == e) {
+            var data = this.deptBudgetList2[i]
+            if (this.deptBudgetList2[i].contractNo) {
+              this.dataList.contractNo = this.deptBudgetList2[i].contractNo
+            } else {
+              this.dataList.contractNo = this.deptBudgetList2[i].moveTaskNo
+            }
+          }
+        }
+        if (!data) return
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (this.outContractNo[i].contractNo == this.dataList.contractNo) {
+            if (this.outContractNo[i].inOutType == '采购入库') {
+              this.dataList.tips =
+                '卖方' +
+                this.outContractNo[i].seller +
+                '( ' +
+                this.outContractNo[i].unitContractPrice +
+                '元/吨)'
+              this.dataList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库入库') {
+              if (this.outContractNo[i].unitContractPrice) {
+                this.dataList.tips =
+                  '出货库' +
+                  data.sendWarehouse +
+                  ' (' +
+                  this.outContractNo[i].unitContractPrice +
+                  '元/吨)'
+              } else {
+                this.dataList.tips = '出货库' + data.sendWarehouse
+              }
+              this.dataList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              this.dataList.tips = '出货库' + data.warehouseName
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.dataList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
+              this.dataList.inOutTypeKey = 5
+            } else if (this.outContractNo[i].inOutType == '退库') {
+              if (this.outContractNo[i].contractNo) {
+                this.dataList.tips = '买方' + this.outContractNo[i].buyer
+              } else {
+                this.dataList.tips = '出货库' + data.sendWarehouse
+              }
+              this.dataList.inOutTypeKey = 6
+            }
+            this.dataList.goodsName = this.outContractNo[i].goodsName
+            this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            this.cost = this.outContractNo[i].contractPrice
+            if (this.cost) {
+              this.isGetCost = true
+              this.dataList.cost = this.cost - this.dataList.deductionAmount
+            } else {
+              this.isGetCost = false
+              this.dataList.cost = this.dataList.cost
+            }
+            this.dataList.inOutType = this.outContractNo[i].inOutType
+            if (this.outContractNo[i].inOutType == '移库入库') {
+              this.isSelectType = false
+            } else {
+              this.isSelectType = true
+            }
+            if (this.outContractNo[i].deliverType == '1') {
+              this.carstatus = true
+            } else {
+              this.carstatus = false
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              // this.carstatus = true
+            }
+          }
+        }
+      },
+      dataFilter1(val) {
+        console.log(val)
+        this.dataList.contractNo = val
+        if (val) {
+          //val存在
+          this.options1 = this.outContractNo1.filter((item) => {
+            if (
+              !!~item.contractNo.indexOf(val) ||
+              !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options1 = this.outContractNo
+        }
+      },
+      dataFilter2(val) {
+        this.dataList.carNo = val
+        if (val) {
+          //val存在
+          this.options1 = this.outContractNo1.filter((item) => {
+            if (
+              !!~item.carNo.indexOf(val) ||
+              !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options2 = this.tranCarInfoList
+        }
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.dataList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+      editClick(status) {
+        this.isGetCost = false
+        if (status == 1) {
+          this.disabled1 = !this.disabled1
+        } else {
+          this.disabled2 = !this.disabled2
+        }
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.dataList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      //暂存按钮
+      temporaryStorage() {
+        this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.dataList.validate((valid) => {
+              if (valid) {
+                this.dataList.compId = localStorage.getItem('ws-pf_compId')
+                this.dataList.inOutFlag = 2
+                this.dataList.statusFlag = 1
+                let _data = JSON.parse(
+                  localStorage.getItem('winseaview-userInfo')
+                )
+                this.dataList.backOffice =
+                  _data.content.showCompName + '-' + _data.content.staffName
+                addstorageputList(this.dataList)
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('暂存成功')
+                    this.$router.push({
+                      path: 'warehouseManagementList',
+                    })
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      //提交按钮
+      submit() {
+        if (this.reader) {
+          this.reader.cancel()
+        }
+        if (!this.dataList.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.grossWeight) {
+          this.$message({
+            message: '毛重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.grossWeight <= 0 ||
+          this.dataList.grossWeight > 300000 ||
+          (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+            String(this.dataList.grossWeight).length -
+            (String(this.dataList.grossWeight).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (
+          this.dataList.tare < 0 ||
+          this.dataList.tare > 200000 ||
+          (String(this.dataList.tare).indexOf('.') != -1 &&
+            String(this.dataList.tare).length -
+            (String(this.dataList.tare).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '皮重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (
+          this.dataList.deductionWeight < 0 ||
+          this.dataList.deductionWeight > 10000 ||
+          (String(this.dataList.deductionWeight).indexOf('.') != -1 &&
+            String(this.dataList.deductionWeight).length -
+            (String(this.dataList.deductionWeight).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '扣重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.type == '潮粮' && !this.dataList.buckleWeightRatio) {
+          this.$message({
+            message: '扣重比不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio < 0) ||
+          (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio > 3) ||
+          (this.dataList.type == '潮粮' &&
+            String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.dataList.buckleWeightRatio).length -
+            (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '扣重比输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.type == '潮粮' && !this.dataList.tidalGrainWater) {
+          this.$message({
+            message: '潮粮水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater < 1) ||
+          (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater > 40) ||
+          (this.dataList.type == '潮粮' &&
+            String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
+            String(this.dataList.tidalGrainWater).length -
+            (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '潮粮水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.type == '潮粮' && !this.dataList.solidGrainWater) {
+          this.$message({
+            message: '干粮水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.dataList.type == '潮粮' && this.dataList.solidGrainWater < 1) ||
+          (this.dataList.type == '潮粮' && this.dataList.solidGrainWater > 40) ||
+          (this.dataList.type == '潮粮' &&
+            String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
+            String(this.dataList.solidGrainWater).length -
+            (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
+            1)
+        ) {
+          this.$message({
+            message: '干粮水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.deductionAmount < 0 ||
+          this.dataList.deductionAmount > 10000 ||
+          (String(this.dataList.deductionAmount).indexOf('.') != -1 &&
+            String(this.dataList.deductionAmount).length -
+            (String(this.dataList.deductionAmount).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '扣款输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.cost) {
+          this.$message({
+            message: '未获取到成本,请编辑后提交',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.cost < 0 ||
+          this.dataList.cost > 20000 ||
+          (String(this.dataList.cost).indexOf('.') != -1 &&
+            String(this.dataList.cost).length -
+            (String(this.dataList.cost).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '成本输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.freight && this.dataList.freight != 0) {
+          this.$message({
+            message: '运费不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.freight < 0 ||
+          this.dataList.freight > 100000 ||
+          (String(this.dataList.freight).indexOf('.') != -1 &&
+            String(this.dataList.freight).length -
+            (String(this.dataList.freight).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '运费输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.agent) {
+          this.$message({
+            message: '经办人不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
+          this.$message({
+            message: '经办人输入有误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.grade) {
+          this.$message({
+            message: '品级不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.inOutDate) {
+          this.$message({
+            message: '入库日期不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.inOutType) {
+          this.$message({
+            message: '入库类型不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.carNo) {
+          this.$message({
+            message: '车牌号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.carNo.length > 7) {
+          this.$message({
+            message: '车牌号输入错误,请输入7个字符之内',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.boxNo && this.dataList.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.boxNoOther && this.dataList.boxNoOther.length > 20) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.titleNo && this.dataList.titleNo.length > 20) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.titleNoOther &&
+          this.dataList.titleNoOther.length > 20
+        ) {
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (
+        //   this.dataList.contractNo.length < 6 ||
+        //   this.dataList.contractNo.length > 20
+        // ) {
+        //   this.$message({
+        //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+
+        if (this.dataList.netWeight > this.$route.query.capacity) {
+          this.$message({
+            message: '入库量大于该仓库容量!',
+            type: 'warning',
+          })
+          return
+        }
+        //自检员
+        if (this.dataList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
+            this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.dataList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.waterContent < 0 ||
+            this.dataList.warehouseInOutDetail.waterContent > 40 ||
+            (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.waterContent).length -
+              (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //杂质
+        if (this.dataList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.impurity < 0 ||
+            this.dataList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
+              -1 &&
+              String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //霉变
+        if (this.dataList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.mildewGrain < 0 ||
+            this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //热损伤
+        if (this.dataList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.jiaorenli < 0 ||
+            this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
+              -1 &&
+              String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //不完善粒(%)
+        if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.imperfectGrain < 0 ||
+            this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                  this.dataList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        if (this.dataList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.dataList.warehouseInOutDetail.bulkDensity < 0 ||
+            (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+                  '.'
+                ) +
+                1) >
+              0)
+          ) {
+            this.$message({
+              message: '容重(克/升)输入错误! 取值范围1-1000之间且是整数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.$confirm(`确定提交皮重检斤`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.dataList.validate((valid) => {
+              if (valid) {
+                this.dataList.compId = localStorage.getItem('ws-pf_compId')
+                this.dataList.skinInspector =
+                  localStorage.getItem('ws-pf_staffName')
+                this.dataList.inOutFlag = 2
+                this.dataList.statusFlag = 3
+                this.dataList.grossWeight = (
+                  this.dataList.grossWeight / 1000
+                ).toFixed(2)
+                this.dataList.tare = (this.dataList.tare / 1000).toFixed(2)
+                this.dataList.netWeight = (
+                  this.dataList.netWeight / 1000
+                ).toFixed(2)
+                this.dataList.pureWeight = (
+                  this.dataList.pureWeight / 1000
+                ).toFixed(2)
+                if (!this.dataList.deductionWeight) {
+                  this.dataList.deductionWeight = 0
+                }
+                if (!this.dataList.deductionAmount) {
+                  this.dataList.deductionAmount = 0
+                }
+                this.dataList.deductionWeight = (
+                  this.dataList.deductionWeight / 1000
+                ).toFixed(2)
+                this.dataList.deductionAmount = Math.round(
+                  this.dataList.deductionAmount * 1000
+                )
+                addstorageputList(this.dataList)
+                  .toPromise()
+                  .then((response) => {
+                    this.dataList.grossWeight = Math.round(
+                      this.dataList.grossWeight * 1000
+                    )
+                    this.dataList.tare = Math.round(this.dataList.tare * 1000)
+                    this.dataList.netWeight = Math.round(
+                      this.dataList.netWeight * 1000
+                    )
+                    this.dataList.pureWeight = Math.round(
+                      this.dataList.pureWeight * 1000
+                    )
+                    this.dataList.deductionWeight = Math.round(
+                      this.dataList.deductionWeight * 1000
+                    )
+                    if (this.reader) {
+                      this.reader.cancel()
+                    }
+                    this.$message.success('提交成功')
+                    this.$confirm(`是否打印磅单`, {
+                      cancelButtonText: '取消',
+                      confirmButtonText: '确定',
+                      type: 'warning',
+                    }).then(() => {
+                      getPrintInfo({
+                          id: this.dataList.id,
+                        })
+                        .toPromise()
+                        .then((response) => {
+                               localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
+                         
+                        })
+                    })
+                    this.$router
+                      .push({
+                        path: 'warehouseManagementList',
+                      })
+                      .catch(() => {
+                        return false
+                      })
+                  })
+                  .catch((response) => {
+                    this.dataList.grossWeight = Math.round(
+                      this.dataList.grossWeight * 1000
+                    )
+                    this.dataList.tare = Math.round(this.dataList.tare * 1000)
+                    this.dataList.netWeight = Math.round(
+                      this.dataList.netWeight * 1000
+                    )
+                    this.dataList.pureWeight = Math.round(
+                      this.dataList.pureWeight * 1000
+                    )
+                    this.dataList.deductionWeight = Math.round(
+                      this.dataList.deductionWeight * 1000
+                    )
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      //暂存按钮
+      returnWarehouse() {
+        this.$refs.dataList.validate((valid) => {
+          if (valid) {
+            this.dataList.compId = localStorage.getItem('ws-pf_compId')
+            this.dataList.statusFlag = 1
+            addstorageputList(this.dataList)
+              .toPromise()
+              .then((response) => {
+                this.$message.success('添加成功')
+                this.$router.push({
+                  path: 'warehouseManagementList',
+                })
+              })
+          } else {
+            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
+          }
+        })
+      },
+      tarechange(e) {
+        this.tare = this.dataList.tare
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          ).toFixed(2)
+        }
+      },
+      grossWeightchange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          ).toFixed(2)
+        }
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList.goodsNameKey = this.goodnameList[i].constKey
+            if (e == '玉米(潮粮)') {
+              this.dataList.type = '潮粮'
+            } else {
+              this.dataList.type = '干粮'
+            }
+          }
+        }
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList.packingMethodKey = this.packtypeList[i].constKey
+          }
+        }
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.storageType.length; i++) {
+          if (this.storageType[i].constValue == e) {
+            this.dataList.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      getList() {
+        // 货名
+        pullDown({
+            constId: 'CON2',
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        getReceiptTaskNo({
+            flag: 2,
+            warehouseName: this.deptBudgetList1.warehouseName,
+            agentKey: localStorage.getItem('ws-pf_userId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList2 = response
+          })
+        // 品级
+        pullDown({
+            constId: 'CON3',
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 类型
+        if (this.$route.query.warehouseType == '1') {
+          this.storageType = []
+          pullDown({
+              constId: 'CON5',
+            })
+            .toPromise()
+            .then((response) => {
+              // this.storageType = response
+              for (let i = 0; i < response.length; i++) {
+                if (
+                  response[i].constValue == '移库入库' ||
+                  response[i].constValue == '退库'
+                ) {
+                  this.storageType.push(response[i])
+                }
+              }
+            })
+        } else if (this.$route.query.warehouseType == '2') {
+          //临时仓库入库类型
+          pullDown({
+              constId: 'WARE1',
+            })
+            .toPromise()
+            .then((response) => {
+              this.storageType = response
+            })
+          //临时仓库出库类型
+          pullDown({
+              constId: 'WARE2',
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        }
+        //合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 6,
+          })
+          .toPromise()
+          .then((response) => {
+            this.options1 = response
+            this.outContractNo = response
+            this.contractNoChange(this.dataList.inOutTaskNo)
+          })
+        //合同编号2
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 7,
+          })
+          .toPromise()
+          .then((response) => {
+            for (let i = 0; i < response.length; i++) {
+              if (this.dataList.contractNo == response[i].contractNo) {
+                if (response[i].deliverType == '1') {
+                  this.carstatus = true
+                } else {
+                  this.carstatus = false
+                }
+              }
+            }
+            this.outContractNo1 = response
+          })
+        //经办人
+        getstaff({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseId: this.dataList.baseId,
+          })
+          .toPromise()
+          .then((response) => {
+            this.options = response
+            this.qualityInspectorList = response
+            this.staffList = response
+            //  this.agent = response
+          })
+
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+      },
+      fujian(row) {
+        if (
+          row.receiveAttachmentPath === null ||
+          row.receiveAttachmentPath === ''
+        ) {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
+        } else {
+          this.accessoryTFs = true
+        }
+        this.appendixIdss = row.receiveAttachmentPath
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id,
+          },
+        })
+      },
+
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        console.log(row)
+        billoperatehis({
+            id: row.id,
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+
+      async exportlist() {
+        const {
+          data
+        } = await export1({
+          compId: localStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        }, {}, {
+          responseType: 'blob',
+        }).toPromise()
+        downloadFile({
+          res: data,
+          fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+          type: 'xls',
+        })
+      },
+
+      // deletecontract(){},
+      //删除
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {},
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.basicInformation {
+    .ws-info-table {
+      border: none;
+    }
+
+    .left {
+      .el-form-item {
+        width: 50%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
+    }
+
+    .right {
+      .el-form-item {
+        width: 100%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
+    }
+  }
+
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-form {
+    padding: 0 10%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+  }
+
+  .inspector {
+    width: 50%;
+  }
+
+  //质检员
+  /deep/[data-v-58803672] .el-form-item__label {
+    width: 60px;
+  }
+
+  [data-v-58803672] .el-form-item__label {
+    width: 60px;
+  }
+
+  //选填
+  /deep/.el-form-item {
+    width: 50%;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: center;
+  }
+
+  .deliverydate {
+    display: inline-block;
+    width: 10%;
+  }
+
+  .center {
+    margin-top: -60px;
+    width: 80%;
+  }
+
+  //仓位
+  .position {
+    width: 52px;
+    height: 20px;
+    background: #afb5cb;
+    border-radius: 2px;
+    font-size: 12px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    color: #ffffff;
+    line-height: 20px;
+  }
+
+  //表格文字
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: left;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+  }
+
+  //质检员
+  .inspector .el-form-item__content {
+    text-align: left;
+    margin-left: 0px;
+  }
+
+  .small-title {
+    position: relative;
+    padding: 10px;
+    font-weight: 600;
+  }
+
+  .small-title::before {
+    position: absolute;
+    content: '';
+    display: block;
+    background: #5473e8;
+    width: 4px;
+    height: 14px;
+    left: 0px;
+    top: 13px;
+  }
+
+  .top {
+    position: absolute;
+    top: 125px;
+    width: 87%;
+    background: black;
+    color: #2aff7c;
+    font-size: 32px;
+    text-align: right;
+    // padding: 20px;
+    border-radius: 10px;
+    margin: 0 20px 0 40px;
+
+    .car-type {
+      text-align: left;
+    }
+    .confirmInfo {
+      display: flex;
+
+      .confirmWeight {
+        width: 50%;
+        text-align: left;
+        line-height: 90px;
+      }
+      .weight {
+        font-size: 68px;
+        width: 50%;
+        text-align: right;
+      }
+      .confirmCarNo {
+        width: 50%;
+        text-align: left;
+      }
+      .car-no {
+        width: 50%;
+        text-align: right;
+      }
+    }
+    .kg-style {
+      font-size: 30px;
+    }
+  }
+
+  //下面列表
+  .neifor {
+    width: 80%;
+    background-color: #f6f7fc;
+  }
+
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+    width: 35%;
+    text-align: center;
+  }
+
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+    width: 60%;
+    background-color: #f6f7fc;
+  }
+
+  /deep/.neifor .el-input--small .el-input__inner {
+    width: 100%;
+  }
+
+  .el-input__inner {
+    width: 150px;
+  }
+
+  .balance-row {
+    display: flex;
+    margin: 20px 0;
+    position: relative;
+    .left {
+       
+       width: 90%;
+    }
+  }
+</style>

+ 1657 - 0
src/views/warehousenew/warehouseManagementNoWeightOut.vue

@@ -0,0 +1,1657 @@
+// 完善出库信息
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">出库毛重检斤</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="revert()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <ws-form ref="dataList" :model="dataList" :rules="rules">
+      <div class="basicInformation">
+        <h2>
+          {{ this.deptBudgetList1.warehouseName }}
+          <span class="position" v-show="this.$route.query.warehouseType == 1">
+            {{ this.deptBudgetList1.binNumber }}仓位
+          </span>
+          <span v-show="this.$route.query.warehouseType == 2"> (临) </span>
+        </h2>
+        <div class="balance-row">
+          <BalanceAlert class="left" ref="weightChild" :deptBudgetList='deptBudgetList'
+            :information='information' v-on:balanceListen="setVal"></BalanceAlert>
+          <div class="top">
+            <div class="confirmInfo">
+              <div class="confirmWeight">确定重量</div>
+              <div class="weight">
+                {{ grossWeight }} <span class="kg-style">kg</span>
+              </div>
+            </div>
+            <!-- <div class="weight">
+              {{grossWeight }}
+              <span class="kg-style">kg</span>
+            </div> -->
+            <!-- <div class="weight">{{dataList.tare}} <span class="kg-style">kg</span></div> -->
+            <div class="confirmInfo">
+              <div class="confirmCarNo">车牌号</div>
+              <div class="car-no">{{ dataList.carNo }}</div>
+            </div>
+            <!-- <div class="car-no">{{ dataList.carNo }}</div> -->
+          </div>
+        </div>
+        <div class="small-title">基本信息</div>
+        <div class="flex">
+          <div class="left" style='width:66.6666%;'>
+            <ws-info-table>
+              <!--任务编号-->
+              <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+                <el-select filterable clearable v-model="dataList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect"
+                  @change="contractNoChange">
+                  <el-option v-for="item in deptBudgetList2" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
+                    :value="item.inOutTaskNo" />
+                </el-select>
+              </ws-form-item>
+              <!--毛重(公斤)-->
+              <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
+                <ws-input :disabled="allowEdit" @input="grossWeightchange" v-model="dataList.grossWeight"
+                  placeholder="请输入毛重" maxlength="20" size="small" />
+                <el-button type="primary" @click="openPort">重新获取</el-button>
+              </ws-form-item>
+              <ws-form-item label="合同编号" span="1" prop="contractNo">
+                <ws-select disabled v-model="dataList.contractNo" placeholder="请选择合同编号或移库任务编号" class="typeselect"
+                  @change="contractNoChange">
+                  <ws-option v-for="item in outContractNo" :key="item.constKey" :label="item.contractNo"
+                    :value="item.contractNo" />
+                </ws-select>
+              </ws-form-item>
+              <!--皮重(公斤)-->
+              <ws-form-item label="皮重(公斤)" span="1" prop="tare" class="readonly">
+                <ws-input :disabled="allowEdit" @input="tarechange" v-model="dataList.tare" placeholder="请输入皮重"
+                  maxlength="100" size="small" />
+              </ws-form-item>
+              <ws-form-item label="提示" span="1" prop="tips">
+                <ws-input onmouseover="this.title=this.value" v-model="dataList.tips" maxlength="20" size="small" />
+              </ws-form-item>
+              <!--净重(公斤)-->
+              <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
+                <ws-input readonly="readonly" v-model="dataList.netWeight" placeholder="不可编辑,自动计算" maxlength="120"
+                  size="small" />
+              </ws-form-item>
+              <!-- 货名 -->
+              <ws-form-item label="货名" span="1">
+                <ws-select disabled v-model="dataList.goodsName" placeholder class="typeselect"
+                  @change="selectgoodsName">
+                  <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <!--出库日期-->
+              <ws-form-item label="出库日期" span="1" prop="inOutDate" class="deliverydate">
+                <ws-date-picker v-model="dataList.inOutDate" type="date" placeholder="请选择出库日期"
+                  value-format="yyyy-MM-dd" />
+              </ws-form-item>
+              <ws-form-item label="类型" span="1" prop="type">
+                <ws-select disabled v-model="dataList.type" @change="typeChange">
+                  <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+                </ws-select>
+              </ws-form-item>
+              <!-- 出库类型 -->
+              <ws-form-item label="出库类型" span="1">
+                <ws-select v-model="dataList.inOutType" placeholder="" class="typeselect" @change="selectstorageType">
+                  <ws-option v-for="item in deliveryType" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <!-- <ws-form-item
+            v-if="dataList.type == '潮粮'"
+            label="扣重比"
+            span="1"
+            prop="buckleWeightRatio"
+            class="readonly"
+          >
+            <ws-input
+              @input="pureweight"
+              v-model="dataList.buckleWeightRatio"
+              placeholder="请输入扣重比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            v-if="dataList.type == '潮粮'"
+            label="干粮水分占比"
+            span="1"
+            prop="solidGrainWater"
+            class="readonly"
+          >
+            <ws-input
+              @input="pureweight"
+              v-model="dataList.solidGrainWater"
+              placeholder="请输入干粮水分占比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            v-if="dataList.type == '潮粮'"
+            label="潮粮水分占比"
+            span="1"
+            prop="tidalGrainWater"
+            class="readonly"
+          >
+            <ws-input
+              @input="pureweight"
+              v-model="dataList.tidalGrainWater"
+              placeholder="请输入潮粮水分占比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            v-if="dataList.type == '潮粮'"
+            label="纯重"
+            span="1"
+            prop="pureWeight"
+            class="readonly"
+          >
+            <ws-input
+              disabled
+              v-model="dataList.pureWeight"
+              placeholder="不可编辑,自动计算"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item> -->
+              <!-- 品级 -->
+              <ws-form-item label="品级" span="1" class="readonly">
+                <ws-select v-model="dataList.grade" placeholder="" class="typeselect" @change="selectpackingMethod">
+                  <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <!--经办人-->
+              <ws-form-item label="经办人" span="1" prop="agent">
+                <el-select v-model="dataList.agent" placeholder="请选择经办人" filterable clearable @change="selectstaff">
+                  <el-option v-for="item in options" :key="item.value" :label="item.staffName"
+                    :value="item.staffName" />
+                </el-select>
+              </ws-form-item>
+            </ws-info-table>
+          </div>
+          <div class="right" style='width:33.3333%'>
+            <ws-info-table>
+              <ws-form-item label="运输方式" span="1" prop="outType">
+                <el-select v-model="dataList.outType" placeholder="请选择运输方式">
+                  <el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
+                </el-select>
+              </ws-form-item>
+              <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
+              dataList.outType == '汽运' ||
+              dataList.outType == '集装箱船'
+            ">
+                <ws-input v-if="!carstatus || carjudge" v-model="dataList.carNo" placeholder="请输入车牌号" maxlength="7"
+                  size="small" />
+                <el-select v-else filterable clearable v-model="dataList.carNo"
+                  placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="item in options2" :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
+                </el-select>
+                <!-- <span style='padding-left:10px;'>发货重量(吨):{{dataList.loadNetWeight}}</span> -->
+                <el-button type="primary" @click="carNoTypeChange" v-if="carstatus">{{carChange1}}</el-button>
+              </ws-form-item>
+              <ws-form-item label="发货重量(吨):" span="1" prop="loadNetWeight">
+                <ws-input v-model="dataList.loadNetWeight" placeholder="暂无获取到发货重量" maxlength="10" disabled
+                  size="small" />
+              </ws-form-item>
+
+              <ws-form-item label="车号" span="1" prop="carNo" v-if="dataList.outType == '火运'">
+                <ws-input v-model="dataList.carNo" placeholder="请输入车号" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
+              dataList.outType == '汽运' ||
+              dataList.outType == '集装箱船'
+            ">
+                <ws-input v-model="dataList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
+              dataList.outType == '汽运' ||
+              dataList.outType == '集装箱船'
+            ">
+                <ws-input v-model="dataList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
+              dataList.outType == '汽运' ||
+              dataList.outType == '集装箱船'
+            ">
+                <ws-input v-model="dataList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
+              dataList.outType == '汽运' ||
+              dataList.outType == '集装箱船'
+            ">
+                <ws-input v-model="dataList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="dataList.outType == '火运'">
+                <ws-input v-model="dataList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="dataList.outType == '火运'">
+                <ws-input v-model="dataList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="船名" span="1" prop="shipName" v-if="dataList.outType == '散船'">
+                <ws-input v-model="dataList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="航次" span="1" prop="shipNumber" v-if="dataList.outType == '散船'">
+                <ws-input v-model="dataList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+              </ws-form-item>
+            </ws-info-table>
+          </div>
+        </div>
+      </div>
+      <!-- <div class="small-title">上传磅单照片</div>
+      <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="
+              (res) => {
+                uploadSuccessHandle1(res)
+              }
+            "
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <div v-if='dataList.addressUrl!=""'>
+            <img style='width:100px;height:100px;' :src="dataList.addressUrl" alt="">
+          </div> -->
+      <div class="small-title">化验数据(选填)</div>
+      <div class="inspector">
+        <!--质检员-->
+        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <ws-input
+            v-model="dataList.warehouseInOutDetail.qualityInspector"
+            placeholder="请输入质检员姓名"
+            maxlength="120"
+            size="small"
+          />
+        </ws-form-item> -->
+        <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <el-select v-model="dataList.warehouseInOutDetail.qualityInspector" placeholder="请选择质检员" filterable clearable>
+            <el-option v-for="item in qualityInspectorList" :key="item.value" :label="item.staffName"
+              :value="item.staffName" />
+          </el-select>
+        </ws-form-item>
+      </div>
+      <div class="neifor">
+        <ws-info-table>
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
+            <ws-input v-model="dataList.warehouseInOutDetail.waterContent" placeholder="请输入水分占比" maxlength="120"
+              size="small" />
+          </ws-form-item>
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <ws-input v-model="dataList.warehouseInOutDetail.impurity" placeholder="请输入杂质占比" maxlength="120"
+              size="small" />
+          </ws-form-item>
+          <!--容重(克/升)>=-->
+          <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+            <ws-input v-model="dataList.warehouseInOutDetail.bulkDensity" placeholder="请输入容重" maxlength="120"
+              size="small" />
+          </ws-form-item>
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
+            <ws-input v-model="dataList.warehouseInOutDetail.mildewGrain" placeholder="请输入霉变粒占比" maxlength="120"
+              size="small" />
+          </ws-form-item>
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <ws-input v-model="dataList.warehouseInOutDetail.jiaorenli" placeholder="请输入热损伤占比" maxlength="120"
+              size="small" />
+          </ws-form-item>
+          <!--不完善粒(%)<=-->
+          <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
+            <ws-input v-model="dataList.warehouseInOutDetail.imperfectGrain" placeholder="请输入不完善粒占比" maxlength="120"
+              size="small" />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+      <div style="text-align: right; padding: 10px">
+        <!-- <el-button
+          class="bg-bottom-up"
+          type="primary"
+          size="small"
+          @click="temporaryStorage()"
+          >暂存</el-button
+        > -->
+        <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
+      </div>
+    </ws-form>
+  </div>
+</template>
+<script>
+  import {
+    pullDown,
+    addstorageputList,
+    xialaNo,
+    getstaff,
+    getPrintInfo,
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import BalanceAlert from '@/components/balanceAlert'
+  import {
+    mapActions,
+    mapGetters,
+    mapState
+  } from 'vuex'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+      BalanceAlert
+    },
+    watch: {
+      isShow(val) {
+        this.showType = val
+      },
+      dataList: {
+        //深度监听,可监听到对象、数组的变化
+        handler(val, oldVal) {
+          if (val.grossWeight) {
+            this.dataList.netWeight = val.grossWeight - this.dataList.tare
+          }
+        },
+        deep: true, //true 深度监听
+      },
+    },
+    computed: {
+      ...mapGetters(['deptBudgetList']),
+    },
+    data() {
+      return {
+        // isShowBalance: false,
+        deptBudgetList2: [],
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        multiSelector: [{
+            name: '汽运',
+            value: '0',
+          },
+          {
+            name: '火运',
+            value: '1',
+          },
+          {
+            name: '集装箱船',
+            value: '2',
+          },
+          {
+            name: '散船',
+            value: '3',
+          },
+        ],
+        information: '毛重检斤',
+        readonly: true,
+        typeList: ['干粮', '潮粮'],
+        qualityInspectorList: [],
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: {},
+        tranCarInfoList: [],
+        staffList: [],
+        options: [],
+        options1: [],
+        options2: [],
+        carstatus: false,
+        storageType: [],
+        deliveryType: [],
+        outContractNo: [],
+        // 提交类型
+        submitType: true,
+        storageType: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        onChange: {},
+        deptBudgetList1: [],
+        gradeList: [],
+        rules: {
+          netWeight: [{
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          }, ],
+        },
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        secretaryWeigher: localStorage.getItem('ws-pf_staffName'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        contractList: [],
+        dataList: {
+          outType: '',
+          id: '',
+          grossWeight: '',
+          contractNo: '',
+          tare: '',
+          netWeight: '',
+          grade: '',
+          agent: '',
+          carNo: '',
+          inOutDate: '',
+          inOutType: '',
+          goodsName: '',
+          selfLoading: "0",
+          warehouseInOutDetail: {
+            qualityInspector: '',
+          },
+          cost: '',
+          freight: 0,
+          type: '',
+          addressUrl: '',
+          buckleWeightRatio: '',
+          tidalGrainWater: '',
+          solidGrainWater: '',
+          pureWeight: '',
+          deductionAmount: '',
+          deductionWeigh: '',
+        },
+        historyList: [],
+
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+        param: 9600,
+        allowEdit: true,
+        result1: '00',
+        grossWeight: "", //显示的毛重
+        carChange1: "手动填写",
+        carjudge: false
+      }
+    },
+    mounted() {},
+    activated() {
+      if (this.$route.query.allowEdit == 1) {
+        this.allowEdit = false
+      } else {
+        this.allowEdit = true
+      }
+      this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
+      this.deptBudgetList1.binNumber = this.$route.query.binNumber
+      this.dataList.id = this.$route.query.id
+      this.dataList.grossWeight = Math.round(this.$route.query.grossWeight * 1000)
+      this.grossWeight = this.dataList.grossWeight
+      this.dataList.contractNo = this.$route.query.contractNo
+      this.dataList.baseId = this.$route.query.baseId
+      this.dataList.positionId = this.$route.query.positionId
+      this.dataList.warehouseName = this.$route.query.warehouseName
+      this.dataList.binNumber = this.$route.query.binNumber
+      this.dataList.tare = Math.round(this.$route.query.tare * 1000)
+      this.dataList.netWeight = Math.round(this.$route.query.netWeight * 1000)
+      this.dataList.boxNo = this.$route.query.boxNo
+      this.dataList.boxNoOther = this.$route.query.boxNoOther
+      this.dataList.titleNo = this.$route.query.titleNo
+      this.dataList.titleNoOther = this.$route.query.titleNoOther
+      this.dataList.grade = this.$route.query.grade
+      this.dataList.agent = this.$route.query.agent
+      this.dataList.carNo = this.$route.query.carNo
+      this.dataList.carId = this.$route.query.carId //派车id初始化默认一下(解决第一次进来无carid)
+      this.dataList.inOutDate = this.$route.query.inOutDate
+      this.dataList.contractNo = this.$route.query.contractNo
+      this.dataList.inOutType = this.$route.query.inOutType
+      this.dataList.inOutTaskNo = this.$route.query.inOutTaskNo
+      this.dataList.compId = this.$route.query.compId
+      this.dataList.goodsName = this.$route.query.goodsName
+      this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
+      this.dataList.inOutFlag = this.$route.inOutFlag
+      this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
+      this.dataList.statusFlag = this.$route.statusFlag
+      this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
+      this.dataList.outType = this.$route.query.outType//运输方式
+      this.dataList.selfLoading = this.$route.query.selfLoading//
+      // if (this.$route.query.automaticWeightAcquisition == '1') {
+      //   this.isShowBalance = true
+      // }
+
+      this.getList()
+    },
+    methods: {
+      dataFilter2(){},
+      //切换车牌号输入状态
+      carNoTypeChange() {
+        this.carjudge = !this.carjudge
+        if (!this.carjudge) {
+          this.dataList.selfLoading = "0"
+          this.carChange1 = "手动填写"
+        } else {
+          this.dataList.selfLoading = "1"
+          this.carChange1 = "识别下拉"
+        }
+      },
+      setVal(data) {
+        if (this.information == '毛重检斤') {
+          this.dataList.grossWeight = data
+          this.grossWeight = data
+        } else {
+          this.dataList.tare = data
+        }
+      },
+      openPort() {
+        this.$refs.weightChild.openPort()
+      },
+      pureweight(status) {
+        if (
+          this.deptBudgetList.netWeight &&
+          this.deptBudgetList.tidalGrainWater &&
+          this.deptBudgetList.solidGrainWater &&
+          this.deptBudgetList.buckleWeightRatio
+        ) {
+          this.deptBudgetList.pureWeight =
+            (this.deptBudgetList.netWeight *
+              (100 -
+                (this.deptBudgetList.tidalGrainWater -
+                  this.deptBudgetList.solidGrainWater) *
+                this.deptBudgetList.buckleWeightRatio)) /
+            100
+        }
+      },
+      uploadSuccessHandle1(res) {
+        this.dataList.addressUrl = res.url
+      },
+      //返回按钮
+      revert() {
+        this.$router.go(-1)
+      },
+      dataFilter(val) {
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      carChange(e) {
+        for (let i = 0; i < this.tranCarInfoList.length; i++) {
+          if (this.tranCarInfoList[i].carNo == this.dataList.carNo) {
+            this.dataList.tranCarNo = this.tranCarInfoList[i].tranCarNo
+            this.dataList.carId = this.tranCarInfoList[i].id
+            if (this.dataList.inOutType == '移库入库') {
+              if (!this.dataList.cost) {
+                this.dataList.cost = this.tranCarInfoList[i].cost
+              }
+              this.dataList.loadNetWeight = this.tranCarInfoList[i].loadNetWeight
+            }
+          }
+        }
+      },
+      //暂存按钮
+      temporaryStorage() {
+        this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.dataList.validate((valid) => {
+              if (valid) {
+                this.dataList.compId = localStorage.getItem('ws-pf_compId')
+                this.dataList.inOutFlag = 1
+                this.dataList.statusFlag = 1
+                addstorageputList(this.dataList)
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('暂存成功')
+                    this.$router.push({
+                      path: 'warehouseManagementList',
+                    })
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      contractNoChange(e) {
+        for (let i = 0; i < this.deptBudgetList2.length; i++) {
+          if (this.deptBudgetList2[i].inOutTaskNo == e) {
+            var data = this.deptBudgetList2[i]
+            if (this.deptBudgetList2[i].contractNo) {
+              this.dataList.contractNo = this.deptBudgetList2[i].contractNo
+            } else {
+              this.dataList.contractNo = this.deptBudgetList2[i].moveTaskNo
+            }
+          }
+        }
+        if (!data) return
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (this.outContractNo[i].contractNo == this.dataList.contractNo) {
+            if (this.outContractNo[i].inOutType == '销售出库') {
+              this.dataList.tips =
+                '买方' +
+                this.outContractNo[i].buyer +
+                '( ' +
+                this.outContractNo[i].unitContractPrice +
+                '元/吨)'
+              this.dataList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              if (this.outContractNo[i].unitContractPrice) {
+                this.dataList.tips =
+                  '入货库' +
+                  data.receiveWarehouse +
+                  '( ' +
+                  this.outContractNo[i].unitContractPrice +
+                  '元/吨)'
+              } else {
+                this.dataList.tips = '入货库' + data.receiveWarehouse
+              }
+              this.dataList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.dataList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.dataList.inOutTypeKey = 5
+            } else if (this.outContractNo[i].inOutType == '采购出库') {
+              this.dataList.inOutTypeKey = 6
+            }
+            this.dataList.goodsName = this.outContractNo[i].goodsName
+            this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            if (this.outContractNo[i].deliverType == '1') {
+              this.carstatus = true
+            } else {
+              this.carstatus = false
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              // this.carstatus = true
+            }
+          }
+        }
+      },
+      contractNoChange1(e) {
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (this.outContractNo[i].contractNo == e) {
+            if (this.outContractNo[i].inOutType == '销售出库') {
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.detailData.inOutType == '采购出库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+            this.dataList.goodsName = this.outContractNo[i].goodsName
+            this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            if (this.outContractNo[i].deliverType == '1') {
+              this.carstatus = true
+            } else {
+              this.carstatus = false
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              // this.carstatus = true
+            }
+          }
+        }
+      },
+      typeChange(e) {},
+      //提交按钮
+      submit() {
+        if (this.reader) {
+          this.reader.cancel()
+        }
+        if (!this.dataList.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.grossWeight) {
+          this.$message({
+            message: '毛重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.grossWeight <= 0 ||
+          this.dataList.grossWeight > 200000 ||
+          (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+            String(this.dataList.grossWeight).length -
+            (String(this.dataList.grossWeight).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.tare < 0 ||
+          this.dataList.tare > 200000 ||
+          (String(this.dataList.tare).indexOf('.') != -1 &&
+            String(this.dataList.tare).length -
+            (String(this.dataList.tare).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '皮重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.type == '潮粮' && !this.dataList.buckleWeightRatio) {
+          this.$message({
+            message: '扣重比不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio < 0) ||
+          (this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio > 3) ||
+          (this.dataList.type == '潮粮' &&
+            String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.dataList.buckleWeightRatio).length -
+            (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '扣重比输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.type == '潮粮' && !this.dataList.tidalGrainWater) {
+          this.$message({
+            message: '潮粮水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater < 1) ||
+          (this.dataList.type == '潮粮' && this.dataList.tidalGrainWater > 40) ||
+          (this.dataList.type == '潮粮' &&
+            String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
+            String(this.dataList.tidalGrainWater).length -
+            (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '潮粮水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.type == '潮粮' && !this.dataList.solidGrainWater) {
+          this.$message({
+            message: '干粮水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.dataList.type == '潮粮' && this.dataList.solidGrainWater < 1) ||
+          (this.dataList.type == '潮粮' && this.dataList.solidGrainWater > 40) ||
+          (this.dataList.type == '潮粮' &&
+            String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
+            String(this.dataList.solidGrainWater).length -
+            (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
+            1)
+        ) {
+          this.$message({
+            message: '干粮水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.agent) {
+          this.$message({
+            message: '经办人不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
+          this.$message({
+            message: '经办人输入有误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.grade) {
+          this.$message({
+            message: '品级不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.inOutDate) {
+          this.$message({
+            message: '入库日期不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.inOutType) {
+          this.$message({
+            message: '出库类型不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        // if (!this.dataList.carNo) {
+        //   this.$message({
+        //     message: '车牌号不能为空',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (this.dataList.carNo.length > 7) {
+        //   this.$message({
+        //     message: '车牌号输入错误,请输入7个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (this.dataList.boxNo && this.dataList.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.boxNoOther && this.dataList.boxNoOther.length > 20) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.titleNo && this.dataList.titleNo.length > 20) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.titleNoOther &&
+          this.dataList.titleNoOther.length > 20
+        ) {
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.dataList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (
+        //   this.dataList.contractNo.length < 6 ||
+        //   this.dataList.contractNo.length > 20
+        // ) {
+        //   this.$message({
+        //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+
+        if (this.dataList.netWeight > this.$route.query.capacity) {
+          this.$message({
+            message: '入库量大于该仓库容量!',
+            type: 'warning',
+          })
+          return
+        }
+        //自检员
+        if (this.dataList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
+            this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.dataList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.waterContent < 0 ||
+            this.dataList.warehouseInOutDetail.waterContent > 40 ||
+            (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.waterContent).length -
+              (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //杂质
+        if (this.dataList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.impurity < 0 ||
+            this.dataList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
+              -1 &&
+              String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //霉变
+        if (this.dataList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.mildewGrain < 0 ||
+            this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //热损伤
+        if (this.dataList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.jiaorenli < 0 ||
+            this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
+              -1 &&
+              String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+                  '.'
+                ) +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //不完善粒(%)
+        if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.dataList.warehouseInOutDetail.imperfectGrain < 0 ||
+            this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                  this.dataList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        if (this.dataList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            (this.dataList.warehouseInOutDetail.bulkDensity &&
+              String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+                  '.'
+                ) +
+                1) >
+              2) ||
+            this.dataList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.dataList.warehouseInOutDetail.bulkDensity < 0
+          ) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (!this.carstatus) { //若自运的合同该字段置空
+          this.deptBudgetList.selfLoading = ""
+        }
+        this.$confirm(`确定提交毛重检斤`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.dataList.validate((valid) => {
+              if (valid) {
+                this.dataList.compId = localStorage.getItem('ws-pf_compId')
+                this.dataList.secretaryWeigher =
+                  localStorage.getItem('ws-pf_staffName')
+                this.dataList.inOutFlag = 1
+                this.dataList.statusFlag = 3
+                this.dataList.grossWeight /= 1000
+                this.dataList.tare /= 1000
+                this.dataList.netWeight /= 1000
+                this.dataList.pureWeight /= 1000
+                this.dataList.deductionAmount *= 1000
+                this.dataList.deductionWeight /= 1000
+                addstorageputList(this.dataList)
+                  .toPromise()
+                  .then((response) => {
+                    if (this.reader) {
+                      this.reader.cancel()
+                    }
+                    this.$message.success('提交成功')
+                    this.$confirm(`是否打印磅单`, {
+                        cancelButtonText: '取消',
+                        confirmButtonText: '确定',
+                        type: 'warning',
+                      })
+                      .then(() => {
+                        getPrintInfo({
+                            id: this.dataList.id,
+                          })
+                          .toPromise()
+                          .then((response) => {
+                                 localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
+                         
+                          })
+                        this.$router.push({
+                          path: 'warehouseManagementList',
+                        })
+                      })
+                      .catch(() => {
+                        return false
+                      })
+                  })
+                  .catch((response) => {
+                    this.dataList.grossWeight = Math.round(
+                      this.dataList.grossWeight * 1000
+                    )
+                    this.dataList.tare = Math.round(this.dataList.tare * 1000)
+                    this.dataList.netWeight = Math.round(
+                      this.dataList.netWeight * 1000
+                    )
+                    this.dataList.pureWeight = Math.round(
+                      this.dataList.pureWeight * 1000
+                    )
+                    this.dataList.deductionAmount = Math.round(
+                      this.dataList.deductionAmount / 1000
+                    )
+                    this.dataList.deductionWeight = Math.round(
+                      this.dataList.deductionWeight * 1000
+                    )
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      tarechange(e) {
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          ).toFixed(2)
+        }
+      },
+      grossWeightchange(e) {
+        this.grossWeight = this.dataList.grossWeight
+        if (this.dataList.grossWeight && this.dataList.tare) {
+          this.dataList.netWeight = Number(
+            this.dataList.grossWeight - this.dataList.tare
+          ).toFixed(2)
+        }
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.dataList.goodsNameKey = this.goodnameList[i].constKey
+            if (e == '玉米(潮粮)') {
+              this.dataList.type = '潮粮'
+            } else {
+              this.dataList.type = '干粮'
+            }
+          }
+        }
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.dataList.packingMethodKey = this.packtypeList[i].constKey
+          }
+        }
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.deliveryType.length; i++) {
+          if (this.deliveryType[i].constValue == e) {
+            this.dataList.inOutTypeKey = this.deliveryType[i].constKey
+          }
+        }
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      getList() {
+        // 货名
+        pullDown({
+            constId: 'CON2',
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        getReceiptTaskNo({
+            flag: 1,
+            warehouseName: this.deptBudgetList.warehouseName,
+            agentKey: localStorage.getItem('ws-pf_userId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList2 = response
+          })
+        // 品级
+        pullDown({
+            constId: 'CON3',
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 类型
+        if (this.$route.query.warehouseType == '1') {
+          pullDown({
+              constId: 'CON6',
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        } else if (this.$route.query.warehouseType == '2') {
+          //临时仓库出库类型
+          pullDown({
+              constId: 'WARE2',
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        }
+        //合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 5,
+          })
+          .toPromise()
+          .then((response) => {
+            this.outContractNo = response
+            this.contractNoChange(this.dataList.inOutTaskNo)
+            for (let i = 0; i < response.length; i++) {
+              if (this.dataList.contractNo == response[i].contractNo) {
+                if (response[i].deliverType == '1') {
+                  this.carstatus = true
+                } else {
+                  this.carstatus = false
+                }
+              }
+            }
+          })
+        //经办人
+        getstaff({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseId: this.dataList.baseId,
+          })
+          .toPromise()
+          .then((response) => {
+            this.options = response
+            this.qualityInspectorList = response
+            this.staffList = response
+            //  this.agent = response
+          })
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+      },
+      fujian(row) {
+        if (
+          row.receiveAttachmentPath === null ||
+          row.receiveAttachmentPath === ''
+        ) {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
+        } else {
+          this.accessoryTFs = true
+        }
+        this.appendixIdss = row.receiveAttachmentPath
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id,
+          },
+        })
+      },
+
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+      history(row) {
+        billoperatehis({
+            id: row.id,
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      //删除
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {},
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.basicInformation {
+    .ws-info-table {
+      border: none;
+    }
+
+    .left {
+      .el-form-item {
+        width: 50%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
+    }
+
+    .right {
+      .el-form-item {
+        width: 100%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
+    }
+  }
+
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-form {
+    padding: 0 10%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+  }
+
+
+  //选填
+  /deep/.el-form-item {
+    width: 50%;
+  }
+
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: center;
+  }
+
+  .deliverydate {
+    display: inline-block;
+    width: 10%;
+  }
+
+  .center {
+    margin-top: -60px;
+    width: 80%;
+  }
+
+  //仓位
+  .position {
+    width: 52px;
+    height: 20px;
+    background: #afb5cb;
+    border-radius: 2px;
+    font-size: 12px;
+    font-family: PingFangSC-Medium, PingFang SC;
+    color: #ffffff;
+    line-height: 20px;
+  }
+
+  //表格文字
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: left;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+  }
+
+  .inspector {
+    width: 50%;
+  }
+
+  //质检员
+  .inspector .el-form-item__content {
+    text-align: left;
+    margin-left: 0px;
+  }
+
+  /deep/[data-v-d228e17e] .el-form-item__label {
+    width: 60px;
+  }
+
+  .small-title {
+    position: relative;
+    padding: 10px;
+    font-weight: 600;
+  }
+
+  .small-title::before {
+    position: absolute;
+    content: '';
+    display: block;
+    background: #5473e8;
+    width: 4px;
+    height: 14px;
+    left: 0px;
+    top: 13px;
+  }
+
+  .top {
+    position: absolute;
+    top: 125px;
+    width: 87%;
+    background: black;
+    color: #2aff7c;
+    font-size: 32px;
+    text-align: right;
+    // padding: 20px;
+    border-radius: 10px;
+    margin: 0 20px 0 40px;
+
+    .car-type {
+      text-align: left;
+    }
+    .confirmInfo {
+      display: flex;
+
+      .confirmWeight {
+        width: 50%;
+        text-align: left;
+        line-height: 90px;
+      }
+      .weight {
+        font-size: 68px;
+        width: 50%;
+        text-align: right;
+      }
+      .confirmCarNo {
+        width: 50%;
+        text-align: left;
+      }
+      .car-no {
+        width: 50%;
+        text-align: right;
+      }
+    }
+
+    .kg-style {
+      font-size: 30px;
+    }
+  }
+  //下面列表
+  .neifor {
+    width: 80%;
+    background-color: #f6f7fc;
+  }
+
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+    width: 35%;
+    text-align: center;
+  }
+
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+    width: 60%;
+    background-color: #f6f7fc;
+  }
+
+  /deep/.neifor .el-input--small .el-input__inner {
+    width: 100%;
+  }
+
+  .el-input__inner {
+    width: 150px;
+  }
+
+  .balance-row {
+    display: flex;
+    margin: 20px 0;
+    position: relative;
+    .left {
+      
+      width: 90%;
+    }
+  }
+</style>

+ 1556 - 0
src/views/warehousenew/warehouseManagementPerfectDelivery.vue

@@ -0,0 +1,1556 @@
+
+// 完善出库信息
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">完善出库登记</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="revert()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <ws-form ref="dataList" :model="dataList" :rules="rules">
+      <div class="basicInformation">
+        <h2>
+          {{ this.deptBudgetList1.warehouseName }}库
+          <span class="position" v-show="this.$route.query.warehouseType == 1">
+            {{ this.deptBudgetList1.binNumber }}仓位
+          </span>
+          <span v-show="this.$route.query.warehouseType == 2"> (临) </span>
+        </h2>
+        <div class="small-title">基本信息</div>
+        <div class="flex">
+          <div class="left" style='width:66.6666%;'>
+            <ws-info-table>
+              <ws-form-item label="合同编号" span="1" prop="contractNo">
+                <ws-select
+                  v-model="dataList.contractNo"
+                  placeholder="请选择合同编号或移库任务编号"
+                  class="typeselect"
+                  @change='contractNoChange'
+                >
+                  <ws-option
+                    v-for="item in outContractNo"
+                    :key="item.constKey"
+                    :label="item.contractNo"
+                    :value="item.contractNo"
+                  />
+                </ws-select>
+              </ws-form-item>
+              <!--毛重(吨)-->
+              <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
+                <ws-input
+                  @input="grossWeightchange"
+                  v-model="dataList.grossWeight"
+                  placeholder="请输入毛重"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <!-- 货名 -->
+              <ws-form-item label="货名" span="1">
+                <ws-select
+                disabled
+                  v-model="dataList.goodsName"
+                  placeholder
+                  class="typeselect"
+                  @change="selectgoodsName"
+                >
+                  <ws-option
+                    v-for="item in goodnameList"
+                    :key="item.constKey"
+                    :label="item.constValue"
+                    :value="item.constValue"
+                  />
+                </ws-select>
+              </ws-form-item>
+              <!--皮重(吨)-->
+              <ws-form-item label="皮重(吨)" span="1" prop="tare" class="readonly">
+                <ws-input
+                  @input="tarechange"
+                  v-model="dataList.tare"
+                  placeholder="请输入皮重"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item label="类型" span="1" prop="type">
+                  <ws-select disabled v-model="dataList.type"  @change="typeChange">
+                    <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+                  </ws-select>
+                </ws-form-item>
+              <!--净重(吨)-->
+              <ws-form-item label="净重(吨)" span="1" prop="netWeight">
+                <ws-input
+                  readonly="readonly"
+                  v-model="dataList.netWeight"
+                  placeholder="不可编辑,自动计算"
+                  maxlength="120"
+                  size="small"
+                />
+              </ws-form-item>
+              <!-- <ws-form-item v-if='dataList.type=="潮粮"' label="扣重比" span="1" prop="buckleWeightRatio" class="readonly">
+                <ws-input
+                  @input='pureweight'
+                  v-model="dataList.buckleWeightRatio"
+                  placeholder="请输入扣重比"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item v-if='dataList.type=="潮粮"' label="干粮水分占比" span="1" prop="solidGrainWater" class="readonly">
+                <ws-input
+                @input='pureweight'
+                  v-model="dataList.solidGrainWater"
+                  placeholder="请输入干粮水分占比"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item v-if='dataList.type=="潮粮"' label="潮粮水分占比" span="1" prop="tidalGrainWater" class="readonly">
+                <ws-input
+                @input='pureweight'
+                  v-model="dataList.tidalGrainWater"
+                  placeholder="请输入潮粮水分占比"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item v-if='dataList.type=="潮粮"' label="纯重" span="1" prop="pureWeight" class="readonly">
+                <ws-input
+                  disabled
+                  v-model="dataList.pureWeight"
+                  placeholder="不可编辑,自动计算"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item> -->
+              <!-- 品级 -->
+              <ws-form-item label="品级" span="1" class="readonly">
+                <ws-select
+                  v-model="dataList.grade"
+                  placeholder=""
+                  class="typeselect"
+                  @change="selectpackingMethod"
+                >
+                  <ws-option
+                    v-for="item in gradeList"
+                    :key="item.constKey"
+                    :label="item.constValue"
+                    :value="item.constValue"
+                  />
+                </ws-select>
+              </ws-form-item>
+              <!--出库日期-->
+              <ws-form-item
+                label="出库日期"
+                span="1"
+                prop="inOutDate"
+                class="deliverydate"
+              >
+                <ws-date-picker
+                  v-model="dataList.inOutDate"
+                  type="date"
+                  placeholder="请选择出库日期"
+                  value-format="yyyy-MM-dd"
+                />
+              </ws-form-item>
+              <!--经办人-->
+              <ws-form-item label="经办人" span="1" prop="agent">
+                <el-select
+                  v-model="dataList.agent"
+                  placeholder="请选择经办人"
+                  filterable
+                  clearable
+                  @change="selectstaff"
+                >
+                  <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.staffName"
+                    :value="item.staffName"
+                  />
+                </el-select>
+              </ws-form-item>
+              <!-- 出库类型 -->
+              <ws-form-item label="出库类型" span="1">
+                <ws-select
+                  v-model="dataList.inOutType"
+                  placeholder=""
+                  class="typeselect"
+                  @change="selectstorageType"
+                >
+                  <ws-option
+                    v-for="item in deliveryType"
+                    :key="item.constKey"
+                    :label="item.constValue"
+                    :value="item.constValue"
+                  />
+                </ws-select>
+              </ws-form-item>
+            </ws-info-table>
+          </div>
+          <div class="right" style='width:33.3333%;'>
+            <ws-info-table>
+              <ws-form-item label="运输方式" span="1" prop="outType">
+                <el-select
+                  v-model="dataList.outType"
+                  placeholder="请选择运输方式"
+                >
+                  <el-option
+                    v-for="item in multiSelector"
+                    :key="item.value"
+                    :label="item.name"
+                    :value="item.name"
+                  />
+                </el-select>
+              </ws-form-item>
+              <!-- <ws-form-item label="车牌号" span="1" prop="carNo">
+                <ws-input
+                  v-if="!carstatus"
+                  v-model="deptBudgetList.carNo"
+                  placeholder="请输入车牌号"
+                  maxlength="7"
+                  size="small"
+                />
+                <el-select
+                  v-if="carstatus"
+                  filterable
+                  clearable
+                  :filter-method="dataFilter2"
+                  v-model="deptBudgetList.carNo"
+                  placeholder="请选择车牌号"
+                  class="typeselect"
+                  @change="carChange"
+                >
+                  <el-option
+                    v-for="item in options2"
+                    :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'"
+                    :value="item.carNo"
+                  />
+                </el-select>
+              </ws-form-item>
+              <ws-form-item label="箱号-1" span="1" prop="boxNo">
+                <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
+                <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-1" span="1" prop="titleNo">
+                <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther">
+                <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber">
+                <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther">
+                <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
+                  size="small" />
+              </ws-form-item> -->
+              <!--车牌号  -->
+              <ws-form-item
+            label="车牌号"
+            span="1"
+            prop="carNo"
+            v-if="
+              dataList.outType == '汽运' ||
+              dataList.outType == '集装箱船'
+            "
+          >
+            <ws-input
+              v-if="!carstatus || carjudge"
+              v-model="dataList.carNo"
+              placeholder="请输入车牌号"
+              maxlength="7"
+              size="small"
+            />
+            <el-select
+              v-else
+              filterable
+              clearable
+              :filter-method="dataFilter2"
+              v-model="dataList.carNo"
+              placeholder="请选择车牌号"
+              class="typeselect"
+              @change="carChange"
+            >
+              <el-option
+                v-for="item in options2"
+                :key="item.constKey"
+                :label="item.carNo + '(' + item.tranCarNo + ')'"
+                :value="item.carNo"
+              />
+            </el-select>
+             <el-button type="primary" @click="carNoTypeChange" v-if="carstatus">{{carChange1}}</el-button>
+          </ws-form-item>
+              <!--船名  -->
+              <ws-form-item
+                label="船名"
+                span="1"
+                prop="carNo"
+                v-if="dataList.outType == '散船'"
+              >
+                <ws-input
+                  v-model="dataList.carNo"
+                  placeholder="请输入船名"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="航次"
+                span="1"
+                prop="shipNumber"
+                v-if="dataList.outType == '散船'"
+              >
+                <ws-input
+                  v-model="dataList.shipNumber"
+                  placeholder="请输入航次"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <!--车号  -->
+              <ws-form-item
+                label="车号"
+                span="1"
+                prop="carNo"
+                v-if="dataList.outType == '火运'"
+              >
+                <ws-input
+                  v-model="dataList.carNo"
+                  placeholder="请输入车号"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="箱号-1"
+                span="1"
+                prop="boxNo"
+                v-if="
+                  dataList.outType == '汽运' ||
+                  dataList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="dataList.boxNo"
+                  placeholder="请输入箱号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="箱号-2"
+                span="1"
+                prop="boxNoOther"
+                v-if="
+                  dataList.outType == '汽运' ||
+                  dataList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="dataList.boxNoOther"
+                  placeholder="请输入箱号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="封号-1"
+                span="1"
+                prop="titleNo"
+                v-if="
+                  dataList.outType == '汽运' ||
+                  dataList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="dataList.titleNo"
+                  placeholder="请输入封号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="封号-2"
+                span="1"
+                prop="titleNoOther"
+                v-if="
+                  dataList.outType == '汽运' ||
+                  dataList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="dataList.titleNoOther"
+                  placeholder="请输入封号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="车厢号-1"
+                span="1"
+                prop="wingNumber"
+                v-if="dataList.outType == '火运'"
+              >
+                <ws-input
+                  v-model="dataList.wingNumber"
+                  placeholder="请输入车厢号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="车厢号-2"
+                span="1"
+                prop="wingNumberOther"
+                v-if="dataList.outType == '火运'"
+              >
+                <ws-input
+                  v-model="dataList.wingNumberOther"
+                  placeholder="请输入车厢号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+            </ws-info-table>
+          </div>
+        </div>
+      </div>
+      <div class="small-title">上传磅单照片</div>
+      <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="
+              (res) => {
+                uploadSuccessHandle1(res)
+              }
+            "
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <div @click='imgBig(dataList.addressUrl)' v-if='dataList.addressUrl!=""'>
+            <img  style='width:100px;height:100px;' :src="dataList.addressUrl" alt="">
+          </div>
+      <div class="small-title">化验数据(选填)</div>
+      <div class="inspector">
+        <!--质检员-->
+        <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <ws-input
+            v-model="dataList.warehouseInOutDetail.qualityInspector"
+            placeholder="请输入质检员姓名"
+            maxlength="120"
+            size="small"
+          />
+        </ws-form-item>
+      </div>
+      <div class="neifor">
+        <ws-info-table>
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.waterContent"
+              placeholder="请输入水分占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.impurity"
+              placeholder="请输入杂质占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--容重(克/升)>=-->
+          <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.bulkDensity"
+              placeholder="请输入容重"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.mildewGrain"
+              placeholder="请输入霉变粒占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.jiaorenli"
+              placeholder="请输入热损伤占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--不完善粒(%)<=-->
+          <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.imperfectGrain"
+              placeholder="请输入不完善粒占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+      <div style="text-align: right; padding: 10px">
+        <el-button
+          class="bg-bottom-up"
+          type="primary"
+          size="small"
+          @click="temporaryStorage()"
+          >暂存</el-button
+        >
+        <el-button
+          class="bg-bottom-up"
+          type="primary"
+          size="small"
+          @click="submit()"
+          >提交</el-button
+        >
+      </div>
+    </ws-form>
+  <div @click='imgshow=false' style='overflow:scroll;position:fixed;left:0;top:0;background:rgba(0,0,0,0.1);width:100%;height:100%;z-index:1030;' v-if='imgshow'>
+      <img style='position:absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);height:80%;' :src="img" alt="">
+    </div>
+  </div>
+</template>
+<script>
+import {
+  pullDown,
+  addstorageputList,
+  xialaNo,
+  getstaff,
+} from '@/model/warehouse/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { mapActions, mapGetters, mapState } from 'vuex'
+// import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import { dayjs, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  computed: {
+    ...mapGetters(['deptBudgetList']),
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      multiSelector: [
+        {
+          name: '汽运',
+          value: '0',
+        },
+        {
+          name: '火运',
+          value: '1',
+        },
+        {
+          name: '集装箱船',
+          value: '2',
+        },
+        {
+          name: '散船',
+          value: '3',
+        },
+      ],
+      readonly: true,
+      typeList:['干粮','潮粮'],
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchKeyWord: '',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      goodnameList: {},
+      tranCarInfoList:[],
+      staffList: [],
+      options: [],
+      options1: [],
+      options2: [],
+      carstatus:false,
+      storageType: [],
+      deliveryType: [],
+      outContractNo: [],
+      // 提交类型
+      submitType: true,
+      storageType: [],
+      appendixIdsAdd: '',
+      uploadSuccess: {},
+      onChange: {},
+      deptBudgetList1: [],
+      gradeList: [],
+      rules: {
+        netWeight: [
+          {
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          },
+        ],
+      },
+      size: 10,
+      compId: localStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      packtypeList: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      img:'',
+      imgshow:false,
+      dataList: {
+        id: '',
+        grossWeight: '',
+        contractNo: '',
+        tare: '',
+        netWeight: '',
+        grade: '',
+        agent: '',
+        outType:'',
+        carNo: '',
+        inOutDate: '',
+        inOutType: '',
+        goodsName: '',
+        warehouseInOutDetail: {},
+        cost:'',
+        freight:0,
+        type:'',
+        addressUrl:'',
+        buckleWeightRatio:'',
+        tidalGrainWater:'',
+        solidGrainWater:'',
+        pureWeight:'',
+        deductionAmount:'',
+        deductionWeigh:'',
+        selfLoading:"0"
+      },
+      historyList: [],
+
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+        carChange1:"手动填写",
+        carjudge:false
+    }
+  },
+  activated() {
+    this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
+    this.deptBudgetList1.binNumber = this.$route.query.binNumber
+    this.getList()
+    this.dataList.id = this.$route.query.id
+    this.dataList.grossWeight = this.$route.query.grossWeight
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.baseId = this.$route.query.baseId
+    this.dataList.positionId = this.$route.query.positionId
+    this.dataList.warehouseName = this.$route.query.warehouseName
+    this.dataList.binNumber = this.$route.query.binNumber
+    this.dataList.tare = this.$route.query.tare
+    this.dataList.netWeight = Number(this.$route.query.netWeight).toFixed(2)
+    this.dataList.grade = this.$route.query.grade
+    this.dataList.agent = this.$route.query.agent
+    if(this.$route.query.addressUrl.indexOf(',')!=-1){
+      this.dataList.addressUrl=this.$route.query.addressUrl.split(',')
+    }else{
+      this.dataList.addressUrl=this.$route.query.addressUrl
+    }
+    
+    this.dataList.carNo = this.$route.query.carNo
+    this.dataList.outType = this.$route.query.outType
+    this.dataList.inOutDate = this.$route.query.inOutDate
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.inOutType = this.$route.query.inOutType
+    this.dataList.compId = this.$route.query.compId
+    this.dataList.goodsName = this.$route.query.goodsName
+    this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
+    this.dataList.inOutFlag = this.$route.inOutFlag
+    this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
+    this.dataList.statusFlag = this.$route.statusFlag
+    this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
+     this.dataList.selfLoading = this.$route.query.selfLoading
+    console.log(this.dataList)
+  },
+  methods: {
+    //切换车牌号输入状态
+      carNoTypeChange(){
+        this.carjudge = !this.carjudge
+        if(!this.carjudge){
+            this.dataList.selfLoading = "0"
+            this.carChange1="手动填写"
+        }else{
+            this.dataList.selfLoading = "1"
+            this.carChange1="识别下拉"
+        }
+      },
+    imgBig(item){
+      console.log(item)
+      this.img=item
+      this.imgshow=true
+    },
+    pureweight(status){
+      console.log(this.deptBudgetList)
+      if(this.deptBudgetList.netWeight&&this.deptBudgetList.tidalGrainWater&&this.deptBudgetList.solidGrainWater&&this.deptBudgetList.buckleWeightRatio){
+        this.deptBudgetList.pureWeight=(this.deptBudgetList.netWeight*(100-(this.deptBudgetList.tidalGrainWater-this.deptBudgetList.solidGrainWater)*this.deptBudgetList.buckleWeightRatio))/100
+      }
+    },
+    uploadSuccessHandle1(res){
+      this.dataList.addressUrl=res.url
+    },
+    //返回按钮
+    revert() {
+      this.$router.go(-1)
+    },
+    dataFilter(val) {
+      // console.log(val,"名")
+      this.deptBudgetList.staffList = val
+      if (val) {
+        //val存在
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options = this.staffList
+      }
+    },
+
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+        }
+      }
+    },
+    //暂存按钮
+    temporaryStorage() {
+      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.dataList.validate((valid) => {
+            if (valid) {
+              this.dataList.compId = localStorage.getItem('ws-pf_compId')
+              this.dataList.inOutFlag = 1
+              this.dataList.statusFlag = 1
+              addstorageputList(this.dataList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('暂存成功')
+                  this.$router.go(-1)
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    contractNoChange(e){
+      for (var i = 0; i < this.outContractNo.length; i++) {
+        if (this.outContractNo[i].contractNo == e) {
+            if (this.outContractNo[i].inOutType == '销售出库') {
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.detailData.inOutType == '采购出库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+          this.dataList.goodsName = this.outContractNo[i].goodsName
+          this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
+          if(this.outContractNo[i].tranCarInfoList){
+            this.options2=this.outContractNo[i].tranCarInfoList
+            this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
+            this.carstatus=true
+          }
+        }
+      }
+    },
+    typeChange(e){
+
+    },
+    //提交按钮
+    submit() {
+      if (!this.dataList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.grossWeight <= 0 ||
+        this.dataList.grossWeight > 10000 ||
+        (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+          String(this.dataList.grossWeight).length -
+            (String(this.dataList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.tare < 0 ||
+        this.dataList.tare > 10000 ||
+        (String(this.dataList.tare).indexOf('.') != -1 &&
+          String(this.dataList.tare).length -
+            (String(this.dataList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.type=='潮粮'&&!this.dataList.buckleWeightRatio) {
+        this.$message({
+          message: '扣重比不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.type=='潮粮'&&this.dataList.buckleWeightRatio < 0 ||
+        this.dataList.type=='潮粮'&&this.dataList.buckleWeightRatio > 3 ||
+        (this.dataList.type=='潮粮'&&String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
+          String(this.dataList.buckleWeightRatio).length -
+            (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '扣重比输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.dataList.type=='潮粮'&&!this.dataList.tidalGrainWater) {
+        this.$message({
+          message: '潮粮水分不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.type=='潮粮'&&this.dataList.tidalGrainWater < 1 ||
+        this.dataList.type=='潮粮'&&this.dataList.tidalGrainWater > 40 ||
+        (this.dataList.type=='潮粮'&&String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
+          String(this.dataList.tidalGrainWater).length -
+            (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '潮粮水分输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.dataList.type=='潮粮'&&!this.dataList.solidGrainWater) {
+        this.$message({
+          message: '干粮水分不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.type=='潮粮'&&this.dataList.solidGrainWater < 1 ||
+        this.dataList.type=='潮粮'&&this.dataList.solidGrainWater > 40 ||
+        (this.dataList.type=='潮粮'&&String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
+          String(this.dataList.solidGrainWater).length -
+            (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
+            1)
+      ) {
+        this.$message({
+          message: '干粮水分输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (!this.dataList.agent) {
+        this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutType) {
+        this.$message({
+          message: '出库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.carNo) {
+        this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.boxNo&&this.deptBudgetList.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.boxNoOther&&this.deptBudgetList.boxNoOther.length > 20) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.titleNo&&this.deptBudgetList.titleNo.length > 20) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.titleNoOther&&this.deptBudgetList.titleNoOther.length > 20) {
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+      if (!this.dataList.contractNo) {
+        this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      // if (
+      //   this.dataList.contractNo.length < 6 ||
+      //   this.dataList.contractNo.length > 20
+      // ) {
+      //   this.$message({
+      //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+
+      if (this.dataList.netWeight > this.$route.query.capacity) {
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+      //自检员
+      if (this.dataList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
+          this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.dataList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.waterContent < 1 ||
+          this.dataList.warehouseInOutDetail.waterContent > 40 ||
+          (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.waterContent).length -
+              (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
+                '.'
+              ) +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.dataList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.impurity < 1 ||
+          this.dataList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
+            -1 &&
+            String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+                '.'
+              ) +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //霉变
+      if (this.dataList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //热损伤
+      if (this.dataList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
+            -1 &&
+            String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+                '.'
+              ) +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //不完善粒(%)
+      if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完善粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+      if (this.dataList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.dataList.warehouseInOutDetail.bulkDensity &&
+            String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf('.') != -1 &&
+            String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf('.') + 1) >
+              2) || this.dataList.warehouseInOutDetail.bulkDensity > 1000 || this.dataList.warehouseInOutDetail.bulkDensity < 0
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if(!this.carstatus){//若自运的合同该字段置空
+          this.dataList.selfLoading = ""
+        }
+      this.$refs.dataList.validate((valid) => {
+        if (valid) {
+          this.dataList.compId = localStorage.getItem('ws-pf_compId')
+          this.dataList.inOutFlag = 1
+          this.dataList.statusFlag = 3
+          addstorageputList(this.dataList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('添加成功')
+              this.$router.go(-1)
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    tarechange(e) {
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
+        ).toFixed(2)
+      }
+    },
+    grossWeightchange(e) {
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
+        ).toFixed(2)
+      }
+    },
+    selectgoodsName(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.dataList.goodsNameKey = this.goodnameList[i].constKey
+          if(e=='玉米(潮粮)'){
+              this.dataList.type='潮粮'
+            }else{
+              this.dataList.type='干粮'
+            }
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.dataList.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    selectstorageType(e) {
+      for (var i = 0; i < this.deliveryType.length; i++) {
+        if (this.deliveryType[i].constValue == e) {
+          this.dataList.inOutTypeKey = this.deliveryType[i].constKey
+        }
+      }
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      // 货名
+      pullDown({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      pullDown({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 类型
+      if (this.$route.query.warehouseType == '1') {
+        pullDown({ constId: 'CON6' })
+          .toPromise()
+          .then((response) => {
+            this.deliveryType = response
+          })
+      } else if (this.$route.query.warehouseType == '2') {
+        //临时仓库出库类型
+        pullDown({ constId: 'WARE2' })
+          .toPromise()
+          .then((response) => {
+            this.deliveryType = response
+          })
+      }
+      //合同编号
+      xialaNo({ compId: localStorage.getItem('ws-pf_compId'),flag:5 })
+        .toPromise()
+        .then((response) => {
+          this.outContractNo = response
+        })
+      //经办人
+      getstaff({ compId: localStorage.getItem('ws-pf_compId'),warehouseId:this.dataList.baseId })
+        .toPromise()
+        .then((response) => {
+          this.options = response
+          this.staffList = response
+          //  this.agent = response
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    //删除
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+/deep/.basicInformation {
+  .ws-info-table {
+    border: none;
+  }
+  .left{
+  .el-form-item {
+    width: 50%;
+    // width: 33.3333%;
+    border: none;
+
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+.right{
+  .el-form-item {
+    width: 100%;
+    // width: 33.3333%;
+    border: none;
+
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+}
+.title {
+  position: relative;
+  padding-left: 10px;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-form {
+  padding: 0 10%;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.bg-right {
+  text-align: right;
+  padding: 16px 20px;
+}
+.center {
+  position: relative;
+  top: 50px;
+  width: 40%;
+  height: 2000px;
+  margin: 0 auto;
+}
+/deep/.el-form-item__label {
+  width: 160px;
+}
+//选填
+/deep/.el-form-item {
+  width: 50%;
+}
+.container {
+  overflow: scroll;
+  height: 120vh;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: center;
+}
+.deliverydate {
+  display: inline-block;
+  width: 10%;
+}
+.center {
+  margin-top: -60px;
+  width: 80%;
+}
+//仓位
+.position {
+  width: 52px;
+  height: 20px;
+  background: #afb5cb;
+  border-radius: 2px;
+  font-size: 12px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  color: #ffffff;
+  line-height: 20px;
+}
+//表格文字
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: left;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
+}
+.inspector {
+  width: 50%;
+}
+//质检员
+.inspector .el-form-item__content {
+  text-align: left;
+  margin-left: 0px;
+}
+/deep/[data-v-d228e17e] .el-form-item__label {
+  width: 60px;
+}
+.small-title {
+  position: relative;
+  padding: 10px;
+  font-weight: 600;
+}
+.small-title::before {
+  position: absolute;
+  content: '';
+  display: block;
+  background: #5473e8;
+  width: 4px;
+  height: 14px;
+  left: 0px;
+  top: 13px;
+}
+//下面列表
+.neifor {
+  width: 80%;
+  background-color: #f6f7fc;
+}
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+  width: 35%;
+  text-align: center;
+}
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+  width: 60%;
+  background-color: #f6f7fc;
+}
+/deep/.neifor .el-input--small .el-input__inner {
+  width: 100%;
+}
+.el-input__inner {
+  width: 150px;
+}
+</style>

+ 1926 - 0
src/views/warehousenew/warehouseManagementPerfectput.vue

@@ -0,0 +1,1926 @@
+// 完善入库信息
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">完善入库登记</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="revert()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <ws-form ref="dataList" :model="dataList" :rules="rules">
+      <div class="basicInformation">
+        <h2>
+          {{ deptBudgetList1.warehouseName }}
+          <span class="position" v-show="this.$route.query.warehouseType == 1">
+            {{ deptBudgetList1.binNumber }}仓位
+          </span>
+          <span v-show="this.$route.query.warehouseType == 2">(临)</span>
+        </h2>
+        <div class="small-title">基本信息</div>
+        <div class="flex">
+          <div class="left" style='width:66.6666%;'>
+            <ws-info-table>
+              <ws-form-item label="合同编号" span="1" prop="contractNo">
+                <el-select
+                filterable clearable
+                :filter-method="dataFilter1"
+                  v-model="dataList.contractNo"
+                  placeholder="请选择合同编号或移库任务编号"
+                  class="typeselect"
+                  @change='contractNoChange'
+                >
+                  <el-option
+                    v-for="item in options1"
+                    :key="item.constKey"
+                    :label="item.contractNo"
+                    :value="item.contractNo"
+                  />
+                </el-select>
+              </ws-form-item>
+              <!--毛重(吨)-->
+              <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
+                <ws-input
+                  @input="grossWeightchange"
+                  v-model="dataList.grossWeight"
+                  placeholder="请输入毛重"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <!-- 货名 -->
+              <ws-form-item label="货名" span="1">
+                <ws-select
+                disabled
+                  v-model="dataList.goodsName"
+                  placeholder
+                  class="typeselect"
+                  @change="selectgoodsName"
+                >
+                  <ws-option
+                    v-for="item in goodnameList"
+                    :key="item.constKey"
+                    :label="item.constValue"
+                    :value="item.constValue"
+                  />
+                </ws-select>
+              </ws-form-item>
+              <!--皮重(吨)-->
+              <ws-form-item label="皮重(吨)" span="1" prop="tare" class="readonly">
+                <ws-input
+                  @input="tarechange"
+                  v-model="dataList.tare"
+                  placeholder="请输入皮重"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item label="类型" span="1" prop="type">
+                  <ws-select disabled v-model="dataList.type"  @change="typeChange">
+                    <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+                  </ws-select>
+              </ws-form-item>
+              <ws-form-item label="扣重(吨)" span="1" prop="deductionWeight" class="readonly">
+                <ws-input
+                @input="tarechange"
+                  v-model="dataList.deductionWeight"
+                  placeholder="请输入扣重"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+               <ws-form-item label="扣款(元/吨)" span="1" prop="deductionAmount">
+                <ws-input
+                @input="kkInput(dataList.deductionAmount)"
+                  v-model="dataList.deductionAmount"
+                  placeholder="请输入扣款金额"
+                  maxlength="120"
+                  size="small"
+                />
+              </ws-form-item>
+              <!--净重(吨)-->
+              <ws-form-item label="净重(吨)" span="1" prop="netWeight">
+                <ws-input
+                  readonly="readonly"
+                  v-model="dataList.netWeight"
+                  placeholder="不可编辑,自动计算"
+                  maxlength="120"
+                  size="small"
+                />
+              </ws-form-item>
+          <!-- <ws-form-item v-if='dataList.type=="潮粮"' label="扣重比" span="1" prop="buckleWeightRatio" class="readonly">
+            <ws-input
+              @input='pureweight'
+              v-model="dataList.buckleWeightRatio"
+              placeholder="请输入扣重比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item v-if='dataList.type=="潮粮"' label="干粮水分占比" span="1" prop="solidGrainWater" class="readonly">
+            <ws-input
+            @input='pureweight'
+              v-model="dataList.solidGrainWater"
+              placeholder="请输入干粮水分占比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item v-if='dataList.type=="潮粮"' label="潮粮水分占比" span="1" prop="tidalGrainWater" class="readonly">
+            <ws-input
+            @input='pureweight'
+              v-model="dataList.tidalGrainWater"
+              placeholder="请输入潮粮水分占比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item v-if='dataList.type=="潮粮"' label="纯重" span="1" prop="pureWeight" class="readonly">
+            <ws-input
+              disabled
+              v-model="dataList.pureWeight"
+              placeholder="不可编辑,自动计算"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item> -->
+          <!--净重(吨)-->
+         
+            <!-- 品级 -->
+            <ws-form-item label="品级" span="1" class="readonly">
+              <ws-select
+                v-model="dataList.grade"
+                placeholder
+                class="typeselect"
+                @change="selectpackingMethod"
+              >
+                <ws-option
+                  v-for="item in gradeList"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
+            </ws-form-item>
+
+            <!--经办人-->
+            <ws-form-item label="经办人" span="1" prop="agent">
+              <el-select
+                v-model="dataList.agent"
+                placeholder="请选择经办人"
+                filterable
+                clearable
+                @change="selectstaff"
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.staffName"
+                  :value="item.staffName"
+                />
+              </el-select>
+            </ws-form-item>
+            <!--出库日期-->
+            <ws-form-item label="入库日期" span="1" prop="inOutDate" class="deliverydate">
+              <el-date-picker
+                v-model="dataList.inOutDate"
+                placeholder="请选择入库日期"
+                type="date"
+                value-format="yyyy-MM-dd"
+              ></el-date-picker>
+            </ws-form-item>
+            <!-- 入库类型 -->
+            <ws-form-item label="入库类型" span="1">
+              <ws-select
+                v-model="dataList.inOutType"
+                placeholder
+                class="typeselect"
+                @change="selectstorageType"
+                :disabled="isSelectType"
+              >
+                <ws-option
+                  v-for="item in storageType"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
+            </ws-form-item>
+        </ws-info-table>
+        <div  v-show="this.$route.query.warehouseType == 2 && this.$route.query.createType == 2">
+          <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
+          <ws-info-table v-show="checked == true">
+            <!-- 出库类型 -->
+            <ws-form-item label="出库类型" span="1">
+              <ws-select
+                v-model="dataList.temporaryOutType"
+                placeholder=""
+                class="typeselect"
+              >
+                <ws-option
+                  v-for="item in deliveryType"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
+            </ws-form-item>
+            <!-- 出库合同编号 -->
+            <ws-form-item label="出库合同编号" span="1">
+              <ws-select
+                v-model="dataList.contractNo"
+                placeholder="请选择合同编号或移库任务编号"
+                class="typeselect"
+              >
+                <ws-option
+                  v-for="item in outContractNo"
+                  :key="item.constKey"
+                  :label="item.contractNo"
+                  :value="item.contractNo"
+                />
+              </ws-select>
+            </ws-form-item>
+          </ws-info-table>
+          </div>
+          </div>
+          <div class="right"  style='width:33.3333%;'>
+            <ws-info-table>
+
+         <ws-form-item label="成本(元/吨)" span="1" prop="cost">
+                <ws-input
+                  :disabled="disabled1"
+                  v-model="dataList.cost"
+                  placeholder="请输入成本"
+                  size="small"
+                  type="number"
+                  @mousewheel.native.prevent
+                />
+                <img
+                  width="17"
+                  height="18"
+                  style="vertical-align: text-top; position: relative; top: -1px"
+                  src="../../../public/img/edit.png"
+                  @click="editClick(1)"
+                  alt=""
+                />
+              </ws-form-item>
+              <ws-form-item label="运费(元/吨)" span="1" prop="freight">
+                <ws-input
+                  :disabled="disabled2"
+                  v-model="dataList.freight"
+                  placeholder="请输入运费"
+                  size="small"
+                  type="number"
+                  @mousewheel.native.prevent
+                />
+                <img
+                  width="17"
+                  height="18"
+                  style="vertical-align: text-top; position: relative; top: -1px"
+                  src="../../../public/img/edit.png"
+                  @click="editClick(2)"
+                  alt=""
+                />
+              </ws-form-item>
+               <ws-form-item label="运输方式" span="1" prop="outType">
+                <el-select
+                  v-model="dataList.outType"
+                  placeholder="请选择运输方式"
+                >
+                  <el-option
+                    v-for="item in multiSelector"
+                    :key="item.value"
+                    :label="item.name"
+                    :value="item.name"
+                  />
+                </el-select>
+              </ws-form-item>
+              <!-- <ws-form-item label="车牌号" span="1" prop="carNo">
+                <ws-input
+                  v-if="!carstatus"
+                  v-model="deptBudgetList.carNo"
+                  placeholder="请输入车牌号"
+                  maxlength="7"
+                  size="small"
+                />
+                <el-select
+                  v-if="carstatus"
+                  filterable
+                  clearable
+                  :filter-method="dataFilter2"
+                  v-model="deptBudgetList.carNo"
+                  placeholder="请选择车牌号"
+                  class="typeselect"
+                  @change="carChange"
+                >
+                  <el-option
+                    v-for="item in options2"
+                    :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'"
+                    :value="item.carNo"
+                  />
+                </el-select>
+              </ws-form-item>
+              <ws-form-item label="箱号-1" span="1" prop="boxNo">
+                <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
+                <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-1" span="1" prop="titleNo">
+                <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther">
+                <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber">
+                <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther">
+                <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
+                  size="small" />
+              </ws-form-item> -->
+              <!--车牌号  -->
+              <ws-form-item
+                label="车牌号"
+                span="1"
+                prop="carNo"
+                v-if="
+                  dataList.outType == '汽运' ||
+                  dataList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-if="options2.length==0"
+                  v-model="dataList.carNo"
+                  placeholder="请输入车牌号"
+                  maxlength="7"
+                  size="small" 
+                />
+                <el-select
+                  v-if='carstatus&&options2.length>0'
+                  filterable clearable
+                  :filter-method="dataFilter2"
+                  v-model="dataList.carNo"
+                  placeholder="请选择车牌号"
+                  class="typeselect"
+                  @change="carChange"
+                >
+                  <el-option
+                    v-for="item in options2"
+                    :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'"
+                    :value="item.carNo"
+                  />
+                </el-select>
+                <el-select
+                  v-if='!carstatus&&options2.length>0'
+                  filterable clearable
+                  :filter-method="dataFilter2"
+                  v-model="dataList.carNo"
+                  placeholder="请选择车牌号"
+                  class="typeselect"
+                  @change="carChange"
+                >
+                  <el-option
+                    v-for="item in options2"
+                    :key="item.constKey"
+                    :label="item.carNo"
+                    :value="item.carNo"
+                  />
+                </el-select>
+              </ws-form-item>
+              <!--船名  -->
+              <ws-form-item
+                label="船名"
+                span="1"
+                prop="carNo"
+                v-if="dataList.outType == '散船'"
+              >
+                <ws-input
+                  v-model="dataList.carNo"
+                  placeholder="请输入船名"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="航次"
+                span="1"
+                prop="shipNumber"
+                v-if="dataList.outType == '散船'"
+              >
+                <ws-input
+                  v-model="dataList.shipNumber"
+                  placeholder="请输入航次"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <!--车号  -->
+              <ws-form-item
+                label="车号"
+                span="1"
+                prop="carNo"
+                v-if="dataList.outType == '火运'"
+              >
+                <ws-input
+                  v-model="dataList.carNo"
+                  placeholder="请输入车号"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="箱号-1"
+                span="1"
+                prop="boxNo"
+                v-if="
+                  dataList.outType == '汽运' ||
+                  dataList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="dataList.boxNo"
+                  placeholder="请输入箱号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="箱号-2"
+                span="1"
+                prop="boxNoOther"
+                v-if="
+                  dataList.outType == '汽运' ||
+                  dataList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="dataList.boxNoOther"
+                  placeholder="请输入箱号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="封号-1"
+                span="1"
+                prop="titleNo"
+                v-if="
+                  dataList.outType == '汽运' ||
+                  dataList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="dataList.titleNo"
+                  placeholder="请输入封号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="封号-2"
+                span="1"
+                prop="titleNoOther"
+                v-if="
+                  dataList.outType == '汽运' ||
+                  dataList.outType == '集装箱船'
+                "
+              >
+                <ws-input
+                  v-model="dataList.titleNoOther"
+                  placeholder="请输入封号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="车厢号-1"
+                span="1"
+                prop="wingNumber"
+                v-if="dataList.outType == '火运'"
+              >
+                <ws-input
+                  v-model="dataList.wingNumber"
+                  placeholder="请输入车厢号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                label="车厢号-2"
+                span="1"
+                prop="wingNumberOther"
+                v-if="dataList.outType == '火运'"
+              >
+                <ws-input
+                  v-model="dataList.wingNumberOther"
+                  placeholder="请输入车厢号"
+                  maxlength="20"
+                  size="small"
+                />
+              </ws-form-item>
+        </ws-info-table>
+        </div>
+        </div>
+      </div>
+      <div class="small-title">上传磅单照片</div>
+       <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="
+              (res) => {
+                uploadSuccessHandle1(res)
+              }
+            "
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <div @click='imgBig(dataList.addressUrl)'>
+            <img v-if='dataList.addressUrl' style='width:100px;height:100px;' :src="dataList.addressUrl" alt="">
+          </div>
+      <div class="small-title">化验数据(选填)</div>
+      <div class="inspector">
+        <!--质检员-->
+        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <ws-input
+            v-model="dataList.warehouseInOutDetail.qualityInspector"
+            placeholder="请输入质检员姓名"
+            maxlength="120"
+            size="small"
+          />
+        </ws-form-item> -->
+           <ws-form-item label="质检员" span="1" prop="qualityInspector">
+            <el-select
+              v-model="dataList.warehouseInOutDetail.qualityInspector"
+              placeholder="请选择质检员"
+              filterable
+              clearable
+              @change="qualityInspectorChange"
+            >
+              <el-option
+                v-for="item in qualityInspectorList"
+                :key="item.value"
+                :label="item.staffName"
+                :value="item.staffName"
+              />
+            </el-select>
+          </ws-form-item>
+      </div>
+      <div class="neifor">
+        <ws-info-table>
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.waterContent"
+              placeholder="请输入水分占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.impurity"
+              placeholder="请输入杂质占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--容重(克/升)>=-->
+          <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.bulkDensity"
+              placeholder="请输入容重"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.mildewGrain"
+              placeholder="请输入霉变粒占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.jiaorenli"
+              placeholder="请输入热损伤占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--不完善粒(%)<=-->
+          <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
+            <ws-input
+              v-model="dataList.warehouseInOutDetail.imperfectGrain"
+              placeholder="请输入不完善粒占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+      <div style="text-align: right; padding: 10px">
+        <el-button
+          class="bg-bottom-up"
+          type="primary"
+          size="small"
+          @click="temporaryStorage()"
+          >暂存</el-button
+        >
+        <el-button
+          class="bg-bottom-up"
+          type="primary"
+          size="small"
+          @click="submit()"
+          >提交</el-button
+        >
+      </div>
+    </ws-form>
+    <div @click='imgshow=false' style='overflow:scroll;position:fixed;left:0;top:0;background:rgba(0,0,0,0.1);width:100%;height:100%;z-index:1030;' v-if='imgshow'>
+      <img style='position:absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);height:80%;' :src="img" alt="">
+    </div>
+  </div>
+</template>
+<script>
+import {
+  pullDown,
+  addstorageputList,
+  xialaNo,
+  getstaff,
+} from '@/model/warehouse/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import { mapActions, mapGetters, mapState } from 'vuex'
+import WsUpload from '@/components/WsUpload'
+// import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import { dayjs, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    // vesselId(val) {
+    //   this.getList()
+    // },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  computed: {
+    ...mapGetters(['dataList']),
+  },
+  data() {
+    return {
+      isSelectType:true,
+      isGetCost:false,
+      qualityInspectorList:[],
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      deptBudgetTotal: 0,
+      readonly: true,
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchKeyWord: '',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      goodnameList: {},
+      checked: true,
+      disabled1:true,
+      disabled2:true,
+      staffList: [],
+      options: [],
+      storageType: [],
+      deliveryType: [],
+      outContractNo: [],
+      outContractNo1: [],
+      // 提交类型
+      submitType: true,
+      typeList:['干粮','潮粮'],
+      appendixIdsAdd: '',
+      uploadSuccess: {},
+      warehouseInOutDetail: {},
+      onChange: {},
+      deptBudgetList1: [],
+      gradeList: [],
+      rules: {
+        netWeight: [
+          {
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          },
+        ],
+      },
+      size: 10,
+      compId: localStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      packtypeList: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      options1: [],
+      options2: [],
+      carstatus:false,
+      contractList: [],
+      img:'',
+      imgshow:false,
+      dataList: {
+        id: '',
+        grossWeight: '',
+        contractNo: '',
+        tare: '',
+        netWeight: '',
+        grade: '',
+        agent: '',
+        carNo: '',
+        inOutDate: '',
+        
+        inOutType: '',
+        goodsName: '',
+        warehouseInOutDetail: {},
+        cost:'',
+        freight:0,
+        type:'',
+        buckleWeightRatio:'',
+        tidalGrainWater:'',
+        solidGrainWater:'',
+        pureWeight:'',
+        deductionAmount:'',
+        deductionWeigh:'',
+      },
+      multiSelector: [
+        {
+          name: '汽运',
+          value: '0',
+        },
+        {
+          name: '火运',
+          value: '1',
+        },
+        {
+          name: '集装箱船',
+          value: '2',
+        },
+        {
+          name: '散船',
+          value: '3',
+        },
+      ],
+      historyList: [],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
+    this.deptBudgetList1.binNumber = this.$route.query.binNumber
+    this.getList()
+    this.dataList.id = this.$route.query.id
+    this.dataList.grossWeight = this.$route.query.grossWeight
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.baseId = this.$route.query.baseId
+    this.dataList.positionId = this.$route.query.positionId
+    this.dataList.warehouseName = this.$route.query.warehouseName
+    this.dataList.binNumber = this.$route.query.binNumber
+    this.dataList.tare = this.$route.query.tare
+    this.dataList.netWeight = this.$route.query.netWeight
+    this.dataList.grade = this.$route.query.grade
+    if(this.$route.query.addressUrl.indexOf(',')!=-1){
+      this.dataList.addressUrl=this.$route.query.addressUrl.split(',')
+    }else{
+      this.dataList.addressUrl=this.$route.query.addressUrl
+    }
+    this.dataList.agent = this.$route.query.agent
+    this.dataList.carNo = this.$route.query.carNo
+    this.dataList.outType = this.$route.query.outType
+    this.dataList.inOutDate = this.$route.query.inOutDate
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.inOutType = this.$route.query.inOutType
+    this.dataList.compId = this.$route.query.compId
+    this.dataList.goodsName = this.$route.query.goodsName
+    this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
+    this.dataList.inOutFlag = this.$route.inOutFlag
+    this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
+    this.dataList.statusFlag = this.$route.statusFlag
+    this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
+    this.dataList.warehouseType = this.$route.query.warehouseType
+    this.dataList.createType = this.$route.query.createType
+    this.dataList.temporaryOutType = this.$route.query.temporaryOutType
+    this.dataList.cost=this.$route.query.cost
+    this.dataList.freight=this.$route.query.freight
+    this.dataList.type=this.$route.query.type
+    this.dataList.buckleWeightRatio=this.$route.query.buckleWeightRatio
+    this.dataList.tidalGrainWater=this.$route.query.tidalGrainWater
+    this.dataList.solidGrainWater=this.$route.query.solidGrainWater
+    this.dataList.pureWeight=this.$route.query.pureWeight
+    this.dataList.deductionAmount=this.$route.query.deductionAmount
+    this.dataList.deductionWeight=this.$route.query.deductionWeight
+    this.dataList.inOutTypeFlag=1
+    if(this.dataList.cost){
+      this.isGetCost = true
+      this.cost = this.dataList.cost 
+    }
+
+  },
+  methods: {
+    imgBig(item){
+      console.log(item)
+      this.img=item
+      this.imgshow=true
+    },
+        kkInput(val){
+      console.log(val)
+      if(this.isGetCost){
+        if(this.dataList.cost>val){
+           this.dataList.cost = this.cost - this.dataList.deductionAmount
+          }
+      }
+    },
+       qualityInspectorChange(e){
+      console.log(e)
+    },
+    uploadSuccessHandle1(res){
+      this.dataList.addressUrl=res.url
+    },
+    pureweight(status){
+      console.log(this.dataList)
+      if(this.dataList.netWeight&&this.dataList.tidalGrainWater&&this.dataList.solidGrainWater&&this.dataList.buckleWeightRatio){
+        this.dataList.pureWeight=(this.dataList.netWeight*(100-(this.dataList.tidalGrainWater-this.dataList.solidGrainWater)*this.dataList.buckleWeightRatio))/100
+      }
+    },
+    //返回按钮
+    revert() {
+      this.$router.go(-1)
+    },
+    carChange(e){
+        for (let i = 0; i < this.tranCarInfoList.length; i++) {
+          if(this.tranCarInfoList[i].carNo==this.dataList.carNo){
+            this.dataList.tranCarNo=this.tranCarInfoList[i].tranCarNo
+            this.dataList.freight=this.tranCarInfoList[i].tranPrice
+          }
+          if(this.dataList.inOutType=='移库入库'){
+            if(!this.dataList.cost){
+              this.dataList.cost=this.tranCarInfoList[i].cost
+            }
+            this.dataList.loadNetWeight=this.tranCarInfoList[i].loadNetWeight
+          }
+        }
+    },
+    typeChange(e){
+
+    },
+    contractNoChange(e){
+      for (var i = 0; i < this.outContractNo.length; i++) {
+        if (this.outContractNo[i].contractNo == e) {
+            if (this.outContractNo[i].inOutType == '采购入库') {
+              this.dataList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库入库') {
+              this.dataList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.dataList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
+              this.dataList.inOutTypeKey = 5
+            } else if (this.detailData.inOutType == '退库') {
+              this.dataList.inOutTypeKey = 6
+            }
+          this.dataList.goodsName = this.outContractNo[i].goodsName
+          this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            this.cost = this.outContractNo[i].contractPrice
+          if(this.cost){
+            this.isGetCost = true
+              this.dataList.cost = this.cost - this.dataList.deductionAmount
+          }else{
+             this.isGetCost = false
+             this.dataList.cost = this.dataList.cost
+          }
+          this.dataList.inOutType = this.outContractNo[i].inOutType
+          if(this.outContractNo[i].inOutType=='移库入库'){
+            this.isSelectType = false
+          }else{
+            this.isSelectType = true
+          }
+          if(this.outContractNo[i].priceType=='随行就市'){
+             this.disabled1 = !this.disabled1
+          }
+          if(this.outContractNo[i].tranCarInfoList){
+            this.options2=this.outContractNo[i].tranCarInfoList
+            this.tranCarInfoList=this.outContractNo[i].tranCarInfoList
+            this.carstatus=true
+          }
+        }
+      }
+    },
+    dataFilter1(val) {
+       console.log(val)
+        this.dataList.contractNo = val;
+        if (val) { //val存在
+          this.options1 = this.outContractNo1.filter((item) => {
+            if (!!~item.contractNo.indexOf(val) || !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())) {
+              return true
+            }
+          })
+        } else { //val为空时,还原数组
+          this.options1 = this.outContractNo;
+        }
+      },
+      dataFilter2(val) {
+        this.dataList.carNo = val;
+        if (val) { //val存在
+          this.options1 = this.outContractNo1.filter((item) => {
+            if (!!~item.carNo.indexOf(val) || !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())) {
+              return true
+            }
+          })
+        } else { //val为空时,还原数组
+          this.options2 = this.tranCarInfoList;
+        }
+      },
+    dataFilter(val) {
+      // console.log(val,"名")
+      this.dataList.staffList = val
+      if (val) {
+        //val存在
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options = this.staffList
+      }
+    },
+    editClick(status){
+       this.isGetCost = false
+      if(status==1){
+        this.disabled1=!this.disabled1
+      }else{
+        this.disabled2=!this.disabled2
+      }
+    },
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.dataList.personChargeKey = this.staffList[i].staffId
+        }
+      }
+    },
+    //暂存按钮
+    temporaryStorage() {
+      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.dataList.validate((valid) => {
+            if (valid) {
+              this.dataList.compId = localStorage.getItem('ws-pf_compId')
+              this.dataList.inOutFlag = 2
+              this.dataList.statusFlag = 1
+              let _data = JSON.parse(localStorage.getItem('winseaview-userInfo'))
+              this.dataList.backOffice  = _data.content.showCompName+'-' +_data.content.staffName
+              addstorageputList(this.dataList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('暂存成功')
+                  this.$router.push({ path: 'warehouseManagementList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    //提交按钮
+    submit() {
+      if (!this.dataList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.grossWeight <= 0 ||
+        this.dataList.grossWeight > 10000 ||
+        (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+          String(this.dataList.grossWeight).length -
+            (String(this.dataList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (
+        this.dataList.tare < 0 ||
+        this.dataList.tare > 10000 ||
+        (String(this.dataList.tare).indexOf('.') != -1 &&
+          String(this.dataList.tare).length -
+            (String(this.dataList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.deductionWeight) {
+        this.$message({
+          message: '扣重不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.deductionWeight < 0 ||
+        this.dataList.deductionWeight > 10 ||
+        (String(this.dataList.deductionWeight).indexOf('.') != -1 &&
+          String(this.dataList.deductionWeight).length -
+            (String(this.dataList.deductionWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '扣重输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.dataList.type=='潮粮'&&!this.dataList.buckleWeightRatio) {
+        this.$message({
+          message: '扣重比不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.type=='潮粮'&&this.dataList.buckleWeightRatio < 0 ||
+        this.dataList.type=='潮粮'&&this.dataList.buckleWeightRatio > 3 ||
+        (this.dataList.type=='潮粮'&&String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
+          String(this.dataList.buckleWeightRatio).length -
+            (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '扣重比输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.dataList.type=='潮粮'&&!this.dataList.tidalGrainWater) {
+        this.$message({
+          message: '潮粮水分不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.type=='潮粮'&&this.dataList.tidalGrainWater < 1 ||
+        this.dataList.type=='潮粮'&&this.dataList.tidalGrainWater > 40 ||
+        (this.dataList.type=='潮粮'&&String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
+          String(this.dataList.tidalGrainWater).length -
+            (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '潮粮水分输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (this.dataList.type=='潮粮'&&!this.dataList.solidGrainWater) {
+        this.$message({
+          message: '干粮水分不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.type=='潮粮'&&this.dataList.solidGrainWater < 1 ||
+        this.dataList.type=='潮粮'&&this.dataList.solidGrainWater > 40 ||
+        (this.dataList.type=='潮粮'&&String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
+          String(this.dataList.solidGrainWater).length -
+            (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
+            1)
+      ) {
+        this.$message({
+          message: '干粮水分输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (!this.dataList.deductionAmount) {
+        this.$message({
+          message: '扣款不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.deductionAmount < 0 ||
+        this.dataList.deductionAmount > 10000 ||
+        (String(this.dataList.deductionAmount).indexOf('.') != -1 &&
+          String(this.dataList.deductionAmount).length -
+            (String(this.dataList.deductionAmount).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '扣款输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (!this.dataList.cost) {
+        this.$message({
+          message: '未获取到成本,请编辑后提交',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.cost < 0 ||
+        this.dataList.cost > 20000 ||
+        (String(this.dataList.cost).indexOf('.') != -1 &&
+          String(this.dataList.cost).length -
+            (String(this.dataList.cost).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '成本输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (!this.dataList.freight&&this.dataList.freight!=0) {
+        this.$message({
+          message: '运费不能为空',
+          type: 'warning'
+        })
+        return
+      }
+      if (
+        this.dataList.freight < 0 ||
+        this.dataList.freight > 100000 ||
+        (String(this.dataList.freight).indexOf('.') != -1 &&
+          String(this.dataList.freight).length -
+            (String(this.dataList.freight).indexOf('.') + 1) >
+            2)
+      ) {
+        this.$message({
+          message: '运费输入错误',
+          type: 'warning'
+        })
+        return
+      }
+      if (!this.dataList.agent) {
+        this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutType) {
+        this.$message({
+          message: '入库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.carNo) {
+        this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.boxNo&&this.dataList.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.boxNoOther&&this.dataList.boxNoOther.length > 20) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.titleNo&&this.dataList.titleNo.length > 20) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.dataList.titleNoOther&&this.dataList.titleNoOther.length > 20) {
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+      if (!this.dataList.contractNo) {
+        this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      // if (
+      //   this.dataList.contractNo.length < 6 ||
+      //   this.dataList.contractNo.length > 20
+      // ) {
+      //   this.$message({
+      //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+
+      if (this.dataList.netWeight > this.$route.query.capacity) {
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+      //自检员
+      if (this.dataList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
+          this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.dataList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.waterContent < 1 ||
+          this.dataList.warehouseInOutDetail.waterContent > 40 ||
+          (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.waterContent).length -
+              (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
+                '.'
+              ) +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.dataList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.impurity < 1 ||
+          this.dataList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
+            -1 &&
+            String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+                '.'
+              ) +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //霉变
+      if (this.dataList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //热损伤
+      if (this.dataList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
+            -1 &&
+            String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+                '.'
+              ) +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //不完善粒(%)
+      if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完善粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+      if (this.dataList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.bulkDensity > 1000 ||
+          this.dataList.warehouseInOutDetail.bulkDensity < 0||
+          (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+                '.'
+              ) +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      this.$confirm(`确定提交入库信息`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+          this.$refs.dataList.validate((valid) => {
+            if (valid) {
+              this.dataList.compId = localStorage.getItem('ws-pf_compId')
+              this.dataList.inOutFlag = 2
+              this.dataList.statusFlag = 3
+              addstorageputList(this.dataList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('添加成功')
+                  this.$router.push({ path: 'warehouseManagementList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    //暂存按钮
+    returnWarehouse() {
+      this.$refs.dataList.validate((valid) => {
+        if (valid) {
+          this.dataList.compId = localStorage.getItem('ws-pf_compId')
+          this.dataList.statusFlag = 1
+          addstorageputList(this.dataList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('添加成功')
+              this.$router.push({ path: 'warehouseManagementList' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    tarechange(e) {
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
+        ).toFixed(2)
+      }
+    },
+    grossWeightchange(e) {
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
+        ).toFixed(2)
+      }
+    },
+    selectgoodsName(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.dataList.goodsNameKey = this.goodnameList[i].constKey
+          if(e=='玉米(潮粮)'){
+              this.dataList.type='潮粮'
+            }else{
+              this.dataList.type='干粮'
+            }
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.dataList.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    selectstorageType(e) {
+      for (var i = 0; i < this.storageType.length; i++) {
+        if (this.storageType[i].constValue == e) {
+          this.dataList.inOutTypeKey = this.storageType[i].constKey
+        }
+      }
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      // 货名
+      pullDown({ constId: 'CON2' })
+        .toPromise()
+        .then((response) => {
+          this.goodnameList = response
+        })
+      // 品级
+      pullDown({ constId: 'CON3' })
+        .toPromise()
+        .then((response) => {
+          this.gradeList = response
+        })
+      // 类型
+      if (this.$route.query.warehouseType == '1') {
+        this.storageType = []
+        pullDown({ constId: 'CON5' })
+          .toPromise()
+          .then((response) => {
+            // this.storageType = response
+               for(let i = 0;i<response.length;i++){
+                if(response[i].constValue=='移库入库'||response[i].constValue=='退库'){
+                  this.storageType.push(response[i])
+                }
+            }
+          })
+      } else if (this.$route.query.warehouseType == '2') {
+        //临时仓库入库类型
+        pullDown({ constId: 'WARE1' })
+          .toPromise()
+          .then((response) => {
+            this.storageType = response
+          })
+        //临时仓库出库类型
+        pullDown({ constId: 'WARE2' })
+          .toPromise()
+          .then((response) => {
+            this.deliveryType = response
+          })
+      }
+      //合同编号
+      xialaNo({ compId: localStorage.getItem('ws-pf_compId'), flag: 6 })
+        .toPromise()
+        .then((response) => {
+          this.options1 = response
+          this.outContractNo = response
+        })
+      //合同编号2
+      xialaNo({ compId: localStorage.getItem('ws-pf_compId'), flag: 7 })
+        .toPromise()
+        .then((response) => {
+          this.outContractNo1 = response
+        })
+      //经办人
+      getstaff({ compId: localStorage.getItem('ws-pf_compId'),warehouseId:this.dataList.id })
+        .toPromise()
+        .then((response) => {
+          this.options = response
+          this.qualityInspectorList = response
+          this.staffList = response
+          //  this.agent = response
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: localStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
+
+    // deletecontract(){},
+    //删除
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+/deep/.basicInformation {
+  .ws-info-table {
+    border: none;
+  }
+  .left{
+  .el-form-item {
+    width: 50%;
+    // width: 33.3333%;
+    border: none;
+
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+.right{
+  .el-form-item {
+    width: 100%;
+    // width: 33.3333%;
+    border: none;
+
+    .el-form-item__label {
+      background: transparent;
+      border: none;
+    }
+
+    .el-form-item__content {
+      border: none;
+    }
+  }
+}
+}
+.title {
+  position: relative;
+  padding-left: 10px;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-form {
+  padding: 0 10%;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.bg-right {
+  text-align: right;
+  padding: 16px 20px;
+}
+.center {
+  position: relative;
+  top: 50px;
+  width: 40%;
+  height: 2000px;
+  margin: 0 auto;
+}
+/deep/.el-form-item__label {
+  width: 160px;
+}
+.inspector {
+  width: 50%;
+}
+//质检员
+/deep/[data-v-58803672] .el-form-item__label {
+  width: 60px;
+}
+[data-v-58803672] .el-form-item__label {
+  width: 60px;
+}
+//选填
+/deep/.el-form-item {
+  width: 50%;
+}
+.container {
+  overflow: scroll;
+  height: 120vh;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: center;
+}
+.deliverydate {
+  display: inline-block;
+  width: 10%;
+}
+.center {
+  margin-top: -60px;
+  width: 80%;
+}
+//仓位
+.position {
+  width: 52px;
+  height: 20px;
+  background: #afb5cb;
+  border-radius: 2px;
+  font-size: 12px;
+  font-family: PingFangSC-Medium, PingFang SC;
+  color: #ffffff;
+  line-height: 20px;
+}
+//表格文字
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: left;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
+}
+//质检员
+.inspector .el-form-item__content {
+  text-align: left;
+  margin-left: 0px;
+}
+.small-title {
+  position: relative;
+  padding: 10px;
+  font-weight: 600;
+}
+.small-title::before {
+  position: absolute;
+  content: '';
+  display: block;
+  background: #5473e8;
+  width: 4px;
+  height: 14px;
+  left: 0px;
+  top: 13px;
+}
+//下面列表
+.neifor {
+  width: 80%;
+  background-color: #f6f7fc;
+}
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+  width: 35%;
+  text-align: center;
+}
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+  width: 60%;
+  background-color: #f6f7fc;
+}
+/deep/.neifor .el-input--small .el-input__inner {
+  width: 100%;
+}
+.el-input__inner {
+  width: 150px;
+}
+</style>

+ 2173 - 0
src/views/warehousenew/warehouseManagementPut.vue

@@ -0,0 +1,2173 @@
+// 入库登记
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">入库登记</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="revert()">
+          <img width="6" height="10" style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png" alt />返回
+        </el-button>
+      </el-col>
+    </el-row>
+
+    <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
+      <div class="basicInformation">
+        <h2>
+          <img style="position: relative; top: 2px" width="19" height="19" src="../../../public/img/cangku.png" alt />
+          {{ deptBudgetList.warehouseName }}
+          <span class="position" v-show="this.$route.query.warehouseType == 1">{{ deptBudgetList.binNumber }}仓位</span>
+          <span v-show="this.$route.query.warehouseType == 2">(临)</span>
+        </h2>
+        <div class="flex">
+          <div class="left" style='width:66.6666%;'>
+            <ws-info-table>
+              <!-- 任务编号 -->
+              <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+                <el-select filterable clearable v-model="deptBudgetList.inOutTaskNo" placeholder="请选择任务编号"
+                  class="typeselect" @change="contractNoChange">
+                  <el-option v-for="item in deptBudgetList1" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
+                    :value="item.inOutTaskNo" />
+                </el-select>
+              </ws-form-item>
+              <!--合同编号-->
+              <ws-form-item label="合同编号" span="1" prop="contractNo">
+                <el-select filterable clearable :filter-method="dataFilter1" v-model="deptBudgetList.contractNo"
+                  placeholder="请选择合同编号或移库任务编号" class="typeselect" @change="contractNoChange" disabled>
+                  <el-option v-for="item in options1" :key="item.constKey" :label="item.contractNo"
+                    :value="item.contractNo" />
+                </el-select>
+              </ws-form-item>
+              <!--毛重(吨)-->
+              <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
+                <ws-input @input="grossWeightchange" v-model="deptBudgetList.grossWeight" placeholder="请输入毛重"
+                  maxlength="20" type="number" @mousewheel.native.prevent size="small" />
+              </ws-form-item>
+              <!-- 货名 -->
+              <ws-form-item label="货名" span="1">
+                <ws-select disabled v-model="deptBudgetList.goodsName" placeholder class="typeselect"
+                  @change="selectgoodsName">
+                  <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <!--皮重(吨)-->
+              <ws-form-item label="皮重(吨)" span="1" prop="tare" class="readonly">
+                <ws-input @input="tarechange" v-model="deptBudgetList.tare" placeholder="请输入皮重" type="number"
+                  @mousewheel.native.prevent maxlength="100" size="small" />
+              </ws-form-item>
+              <ws-form-item label="提示" span="1" prop="tips">
+                <ws-input onmouseover="this.title=this.value" v-model="deptBudgetList.tips" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="扣重(吨)" span="1" prop="deductionWeight" class="readonly">
+                <ws-input @input="tarechange" v-model="deptBudgetList.deductionWeight" placeholder="请输入扣重" type="number"
+                  @mousewheel.native.prevent maxlength="100" size="small" />
+              </ws-form-item>
+              <ws-form-item label="类型" span="1" prop="type">
+                <ws-select disabled v-model="deptBudgetList.type" @change="typeChange">
+                  <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+                </ws-select>
+              </ws-form-item>
+              <!--净重(吨)-->
+              <ws-form-item label="净重(吨)" span="1" prop="netWeight">
+                <ws-input readonly="readonly" v-model="deptBudgetList.netWeight" placeholder="不可编辑,自动计算" maxlength="120"
+                  size="small" />
+              </ws-form-item>
+              <!-- <ws-form-item
+                v-if="deptBudgetList.type == '潮粮'"
+                label="扣重比"
+                span="1"
+                prop="buckleWeightRatio"
+                class="readonly"
+              >
+                <ws-input
+                  @input="pureweight"
+                  v-model="deptBudgetList.buckleWeightRatio"
+                  placeholder="请输入扣重比"
+                  type="number"
+                  @mousewheel.native.prevent
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                v-if="deptBudgetList.type == '潮粮'"
+                label="干粮水分占比"
+                span="1"
+                prop="solidGrainWater"
+                class="readonly"
+              >
+                <ws-input
+                  @input="pureweight"
+                  v-model="deptBudgetList.solidGrainWater"
+                  placeholder="请输入干粮水分占比"
+                  maxlength="100"
+                  type="number"
+                  @mousewheel.native.prevent
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                v-if="deptBudgetList.type == '潮粮'"
+                label="潮粮水分占比"
+                span="1"
+                prop="tidalGrainWater"
+                class="readonly"
+              >
+                <ws-input
+                  @input="pureweight(1)"
+                  v-model="deptBudgetList.tidalGrainWater"
+                  placeholder="请输入潮粮水分占比"
+                  maxlength="100"
+                  type="number"
+                  @mousewheel.native.prevent
+                  size="small"
+                />
+              </ws-form-item>
+              <ws-form-item
+                v-if="deptBudgetList.type == '潮粮'"
+                label="纯重"
+                span="1"
+                prop="pureWeight"
+                class="readonly"
+              >
+                <ws-input
+                  disabled
+                  v-model="deptBudgetList.pureWeight"
+                  placeholder="不可编辑,自动计算"
+                  maxlength="100"
+                  size="small"
+                />
+              </ws-form-item> -->
+              <!-- 品级 -->
+              <ws-form-item label="品级" span="1" class="readonly">
+                <ws-select v-model="deptBudgetList.grade" placeholder class="typeselect" @change="selectpackingMethod">
+                  <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <!--净重(吨)-->
+              <ws-form-item label="扣款(元/吨)" span="1" prop="deductionAmount">
+                <ws-input @input="kkInput(deptBudgetList.deductionAmount)" v-model="deptBudgetList.deductionAmount"
+                  placeholder="请输入扣款金额" maxlength="120" size="small" />
+              </ws-form-item>
+              <!--经办人-->
+              <ws-form-item label="经办人" span="1" prop="agent">
+                <el-select v-model="deptBudgetList.agent" placeholder="请选择经办人" filterable clearable
+                  @change="selectstaff">
+                  <el-option v-for="item in options" :key="item.value" :label="item.staffName"
+                    :value="item.staffName" />
+                </el-select>
+              </ws-form-item>
+              <ws-form-item label="入库日期" span="1" prop="inOutDate" class="deliverydate">
+                <el-date-picker v-model="deptBudgetList.inOutDate" placeholder="请选择入库日期" type="date"
+                  value-format="yyyy-MM-dd"></el-date-picker>
+              </ws-form-item>
+              <!-- 入库类型 -->
+              <ws-form-item label="入库类型" span="1">
+                <ws-select v-model="deptBudgetList.inOutType" placeholder class="typeselect" @change="selectstorageType"
+                  :disabled="isSelectType">
+                  <ws-option v-for="item in storageType" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+            </ws-info-table>
+          </div>
+          <div class="right" style='width:33.3333%;'>
+            <ws-info-table>
+              <ws-form-item label="成本(元/吨)" span="1" prop="cost">
+                <ws-input :disabled="disabled1" v-model="deptBudgetList.cost" placeholder="请输入成本" size="small"
+                  type="number" @mousewheel.native.prevent />
+                <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+                  src="../../../public/img/edit.png" @click="editClick(1)" alt="" />
+              </ws-form-item>
+              <ws-form-item label="运费(元/吨)" span="1" prop="freight">
+                <ws-input :disabled="disabled2" v-model="deptBudgetList.freight" placeholder="请输入运费" size="small"
+                  type="number" @mousewheel.native.prevent />
+                <img width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
+                  src="../../../public/img/edit.png" @click="editClick(2)" alt="" />
+              </ws-form-item>
+              <ws-form-item label="运输方式" span="1" prop="outType">
+                <el-select v-model="deptBudgetList.outType" placeholder="请选择运输方式">
+                  <el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
+                </el-select>
+              </ws-form-item>
+              <!-- <ws-form-item label="车牌号" span="1" prop="carNo">
+                <ws-input
+                  v-if="!carstatus"
+                  v-model="deptBudgetList.carNo"
+                  placeholder="请输入车牌号"
+                  maxlength="7"
+                  size="small"
+                />
+                <el-select
+                  v-if="carstatus"
+                  filterable
+                  clearable
+                  :filter-method="dataFilter2"
+                  v-model="deptBudgetList.carNo"
+                  placeholder="请选择车牌号"
+                  class="typeselect"
+                  @change="carChange"
+                >
+                  <el-option
+                    v-for="item in options2"
+                    :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'"
+                    :value="item.carNo"
+                  />
+                </el-select>
+              </ws-form-item>
+              <ws-form-item label="箱号-1" span="1" prop="boxNo">
+                <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
+                <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-1" span="1" prop="titleNo">
+                <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther">
+                <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber">
+                <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther">
+                <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
+                  size="small" />
+              </ws-form-item> -->
+              <!--车牌号  -->
+              <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
+                  deptBudgetList.outType == '汽运' ||
+                  deptBudgetList.outType == '集装箱船'
+                ">
+                <ws-input v-if="options2.length==0" v-model="deptBudgetList.carNo" placeholder="请输入车牌号" maxlength="7"
+                  size="small" />
+                <el-select v-if='carstatus&&options2.length>0' filterable clearable :filter-method="dataFilter2"
+                  v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="item in options2" :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
+                </el-select>
+                <el-select v-if='!carstatus&&options2.length>0' filterable clearable :filter-method="dataFilter2"
+                  v-model="deptBudgetList.carNo" placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="item in options2" :key="item.constKey" :label="item.carNo" :value="item.carNo" />
+                </el-select>
+              </ws-form-item>
+              <!--船名  -->
+              <ws-form-item label="船名" span="1" prop="carNo" v-if="deptBudgetList.outType == '散船'">
+                <ws-input v-model="deptBudgetList.carNo" placeholder="请输入船名" size="small" />
+              </ws-form-item>
+              <ws-form-item label="航次" span="1" prop="shipNumber" v-if="deptBudgetList.outType == '散船'">
+                <ws-input v-model="deptBudgetList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+              </ws-form-item>
+              <!--车号  -->
+              <ws-form-item label="车号" span="1" prop="carNo" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.carNo" placeholder="请输入车号" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
+                  deptBudgetList.outType == '汽运' ||
+                  deptBudgetList.outType == '集装箱船'
+                ">
+                <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
+                  deptBudgetList.outType == '汽运' ||
+                  deptBudgetList.outType == '集装箱船'
+                ">
+                <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
+                  deptBudgetList.outType == '汽运' ||
+                  deptBudgetList.outType == '集装箱船'
+                ">
+                <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
+                  deptBudgetList.outType == '汽运' ||
+                  deptBudgetList.outType == '集装箱船'
+                ">
+                <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <!-- onkeyup="value=value.replace(/[^\A-\Z0-9\u4E00-\u9FA5\.]/g,'')" -->
+            </ws-info-table>
+          </div>
+        </div>
+        <div v-show="
+            this.$route.query.warehouseType == 2 &&
+            this.deptBudgetList.createType == 2
+          ">
+          <el-checkbox v-model="checked" checked>退库并出库</el-checkbox>
+          <ws-info-table v-show="checked == true && this.deptBudgetList.createType == 2">
+            <!-- 出库类型 -->
+            <ws-form-item label="出库类型" span="1" prop="temporaryOutType">
+              <!-- v-model="deptBudgetList.deliveryType" -->
+              <ws-select v-model="deptBudgetList.temporaryOutType" placeholder class="typeselect">
+                <ws-option v-for="item in deliveryType" :key="item.constKey" :label="item.constValue"
+                  :value="item.constValue" />
+              </ws-select>
+            </ws-form-item>
+            <!-- 出库合同编号 -->
+            <ws-form-item label="出库合同编号" span="1">
+              <ws-select v-model="deptBudgetList.outContractNo" placeholder="请选择合同编号或移库任务编号" class="typeselect">
+                <ws-option v-for="item in outContractNo" :key="item.constKey" :label="item.contractNo"
+                  :value="item.contractNo" />
+              </ws-select>
+            </ws-form-item>
+          </ws-info-table>
+        </div>
+      </div>
+      <div class="small-title">上传磅单照片</div>
+      <el-upload action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false" :on-success="
+          (res) => {
+            uploadSuccessHandle1(res)
+          }
+        " class="avatar-uploader" accept=".jpg, .jpeg, .png, .gif">
+        <el-button size="small" type="primary">点击上传</el-button>
+      </el-upload>
+      <div @click='imgBig(deptBudgetList.addressUrl)' v-if='deptBudgetList.addressUrl!=""'>
+        <img style="width: 100px; height: 100px" :src="deptBudgetList.addressUrl" alt="" />
+      </div>
+      <div class="small-title">化验数据(选填)</div>
+      <div class="inspector">
+        <!--自检员-->
+        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <ws-input
+            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+            placeholder="请输入质检员姓名"
+            maxlength="10"
+            size="small"
+          />
+        </ws-form-item> -->
+
+        <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <el-select v-model="deptBudgetList.warehouseInOutDetail.qualityInspector" placeholder="请选择质检员" filterable
+            clearable @change="qualityInspectorChange">
+            <el-option v-for="item in qualityInspectorList" :key="item.value" :label="item.staffName"
+              :value="item.staffName" />
+          </el-select>
+        </ws-form-item>
+      </div>
+
+      <div class="neifor">
+        <ws-info-table>
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)" span="1" prop="waterContent">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.waterContent" type="number"
+              @mousewheel.native.prevent placeholder="请输入水分占比" maxlength="40" size="small" />
+          </ws-form-item>
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)" span="1" prop="impurity">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.impurity" type="number" @mousewheel.native.prevent
+              placeholder="请输入杂质占比" maxlength="40" size="small" />
+          </ws-form-item>
+          <!--容重(克/升)-->
+          <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.bulkDensity" type="number" @mousewheel.native.prevent
+              placeholder="请输入容重" maxlength="40" size="small" />
+          </ws-form-item>
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.mildewGrain" type="number" @mousewheel.native.prevent
+              placeholder="请输入霉变粒占比" maxlength="40" size="small" />
+          </ws-form-item>
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.jiaorenli" type="number" @mousewheel.native.prevent
+              placeholder="请输入热损伤占比" maxlength="40" size="small" />
+          </ws-form-item>
+          <!--不完善粒(%)<=-->
+          <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain" type="number"
+              @mousewheel.native.prevent placeholder="请输入不完善粒占比" maxlength="40" size="small" />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+      <div style="text-align: right; padding: 10px">
+        <el-button class="bg-bottom-up" type="primary" size="small" @click="temporaryStorage()">暂存</el-button>
+        <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
+      </div>
+    </ws-form>
+    <div @click='imgshow=false'
+      style='overflow:scroll;position:fixed;left:0;top:0;background:rgba(0,0,0,0.1);width:100%;height:100%;z-index:1030;'
+      v-if='imgshow'>
+      <img style='position:absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);height:80%;'
+        :src="img" alt="">
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    pullDown,
+    addstorageputList,
+    xialaNo,
+    getstaff,
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      // vesselId(val) {
+      //   this.getList()
+      // },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        qualityInspectorList: [],
+        isGetCost: false,
+        isSelectType: true,
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        typeList: ['干粮', '潮粮'],
+        // 年
+        year: '',
+        carstatus: false,
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: {},
+        checked: true,
+        agent: [],
+        staffList: [],
+        options: [],
+        options1: [],
+        options2: [],
+        multiSelector: [{
+            name: '汽运',
+            value: '0',
+          },
+          {
+            name: '火运',
+            value: '1',
+          },
+          {
+            name: '集装箱船',
+            value: '2',
+          },
+          {
+            name: '散船',
+            value: '3',
+          },
+        ],
+        outContractNo1: [],
+        outContractNo: [],
+
+        // 提交类型
+        submitType: true,
+        storageType: [],
+        deliveryType: [],
+        readonly: true,
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        onChange: {},
+        img: '',
+        imgshow: false,
+        gradeList: [],
+        rules: {
+          netWeight: [{
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          }, ],
+        },
+        size: 10,
+        disabled1: true,
+        disabled2: true,
+        tranCarInfoList: [],
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        contractList: [],
+        deptBudgetList: {
+          type: '干粮',
+          freight: 0,
+          cost: '',
+          addressUrl: '',
+          warehouseInOutDetail: {},
+          deductionAmount: 0,
+        },
+        historyList: [],
+        cost: '',
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+        deptBudgetList1: [],
+      }
+    },
+    mounted() {
+      this.deptBudgetList.baseId = this.$route.query.baseId
+      this.deptBudgetList.positionId = this.$route.query.positionId
+      this.deptBudgetList.warehouseName = this.$route.query.warehouseName
+      this.deptBudgetList.binNumber = this.$route.query.binNumber
+      this.deptBudgetList.warehouseType = this.$route.query.warehouseType
+      this.deptBudgetList.createType = this.$route.query.createType
+      this.getList()
+      this.deptBudgetList.grade = '一等品'
+      this.deptBudgetList.gradeKey = '1'
+      this.deptBudgetList.inOutTypeFlag = 1
+      if (this.deptBudgetList.cost) {
+        if (this.deptBudgetList.cost > this.deptBudgetList.deductionAmount) {
+          this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
+        } else {
+
+        }
+      }
+      // if (this.deptBudgetList.warehouseType == 1) {
+      //   // this.deptBudgetList.inOutType = '采购入库'
+      //   this.deptBudgetList.inOutTypeKey = '1'
+      // } else {
+      //   // this.deptBudgetList.inOutType = '退库'
+      //   this.deptBudgetList.inOutTypeKey = '1'
+      // }
+    },
+    methods: {
+      imgBig(item) {
+        console.log(item)
+        this.img = item
+        this.imgshow = true
+      },
+      qualityInspectorChange(e) {
+        console.log(e)
+      },
+      kkInput(val) {
+        console.log(val)
+        if (this.isGetCost) {
+          if (this.deptBudgetList.cost > val) {
+            this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
+          }
+        }
+      },
+      uploadSuccessHandle1(res) {
+        this.deptBudgetList.addressUrl = res.url
+        console.log(this.deptBudgetList.addressUrl)
+      },
+      dataFilter1(val) {
+        console.log(val)
+        this.deptBudgetList.contractNo = val
+        if (val) {
+          //val存在
+          this.options1 = this.outContractNo1.filter((item) => {
+            if (
+              !!~item.contractNo.indexOf(val) ||
+              !!~item.contractNo.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options1 = this.outContractNo
+        }
+      },
+      dataFilter2(val) {
+        this.deptBudgetList.carNo = val
+        if (val) {
+          //val存在
+          this.options1 = this.outContractNo1.filter((item) => {
+            if (
+              !!~item.carNo.indexOf(val) ||
+              !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options2 = this.tranCarInfoList
+        }
+      },
+      editClick(status) {
+        this.isGetCost = false
+        if (status == 1) {
+          this.disabled1 = !this.disabled1
+        } else {
+          this.disabled2 = !this.disabled2
+        }
+      },
+      //返回按钮
+      revert() {
+        this.$router.go(-1)
+      },
+      carChange(e) {
+        for (let i = 0; i < this.tranCarInfoList.length; i++) {
+          if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
+            this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
+            this.deptBudgetList.freight = this.tranCarInfoList[i].tranPrice
+          }
+          if (this.deptBudgetList.inOutType == '移库入库') {
+            if (!this.deptBudgetList.cost) {
+              this.deptBudgetList.cost = this.tranCarInfoList[i].cost
+            }
+            this.deptBudgetList.loadNetWeight = this.tranCarInfoList[i].loadNetWeight
+          }
+        }
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      //提交按钮
+      submit() {
+        if (!this.deptBudgetList.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.grossWeight) {
+          this.$message({
+            message: '毛重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.grossWeight < 0 ||
+          this.deptBudgetList.grossWeight > 10000 ||
+          (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.tare) {
+          this.$message({
+            message: '皮重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.tare < 0 ||
+          this.deptBudgetList.tare > 10000 ||
+          (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+            String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '皮重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deductionWeight) {
+          this.$message({
+            message: '扣重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.deductionWeight < 0 ||
+          this.deptBudgetList.deductionWeight > 10 ||
+          (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.deductionWeight).length -
+            (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '扣重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.buckleWeightRatio
+        ) {
+          this.$message({
+            message: '扣重比不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.buckleWeightRatio < 0) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.buckleWeightRatio > 3) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.deptBudgetList.buckleWeightRatio).length -
+            (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '扣重比输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.tidalGrainWater
+        ) {
+          this.$message({
+            message: '潮粮水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.tidalGrainWater < 1) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.tidalGrainWater > 40) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
+            String(this.deptBudgetList.tidalGrainWater).length -
+            (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '潮粮水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.solidGrainWater
+        ) {
+          this.$message({
+            message: '干粮水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.solidGrainWater < 1) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.solidGrainWater > 40) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
+            String(this.deptBudgetList.solidGrainWater).length -
+            (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
+            1)
+        ) {
+          this.$message({
+            message: '干粮水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!String(this.deptBudgetList.deductionAmount)) {
+          this.$message({
+            message: '扣款不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.deductionAmount < 0 ||
+          this.deptBudgetList.deductionAmount > 10000 ||
+          (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
+            String(this.deptBudgetList.deductionAmount).length -
+            (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '扣款输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.cost) {
+          this.$message({
+            message: '未获取到成本,请编辑后提交',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.cost < 0 ||
+          this.deptBudgetList.cost > 20000 ||
+          (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
+            String(this.deptBudgetList.cost).length -
+            (String(this.deptBudgetList.cost).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '成本输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!String(this.deptBudgetList.freight)) {
+          this.$message({
+            message: '运费不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.freight < 0 ||
+          this.deptBudgetList.freight > 100000 ||
+          (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.freight).length -
+            (String(this.deptBudgetList.freight).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '运费输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.agent) {
+          this.$message({
+            message: '经办人不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.agent.length < 2 ||
+          this.deptBudgetList.agent.length > 10
+        ) {
+          this.$message({
+            message: '经办人输入有误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.grade) {
+          this.$message({
+            message: '品级不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.inOutDate) {
+          this.$message({
+            message: '入库日期不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.inOutType) {
+          this.$message({
+            message: '入库类型不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.carNo) {
+          this.$message({
+            message: '车牌号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.carNo.length > 7) {
+          this.$message({
+            message: '车牌号输入错误,请输入7个字符之内',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.boxNoOther && this.deptBudgetList.boxNoOther.length > 20) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.titleNo && this.deptBudgetList.titleNo.length > 20) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.titleNoOther && this.deptBudgetList.titleNoOther.length > 20) {
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (
+        //   this.deptBudgetList.contractNo.length < 6 ||
+        //   this.deptBudgetList.contractNo.length > 20
+        // ) {
+        //   this.$message({
+        //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (!this.deptBudgetList.addressUrl) {
+          this.$message({
+            message: '附件不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        //自检员
+        if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.waterContent
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //杂质
+        if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.impurity
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //霉变
+        if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.mildewGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //热损伤
+        if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.jiaorenli
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //不完善粒(%)
+        if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
+              String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.bulkDensity
+                ).indexOf('.') +
+                1) >
+              2) ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+          ) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        console.log(this.deptBudgetList, '入库对象')
+        this.deptBudgetList.id = this.$route.query.id
+        this.$confirm(`确定提交入库信息`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.deptBudgetList.validate((valid) => {
+              if (valid) {
+                this.deptBudgetList.compId =
+                  localStorage.getItem('ws-pf_compId')
+                this.deptBudgetList.inOutFlag = 2
+                this.deptBudgetList.pcFlag = 1
+                this.deptBudgetList.statusFlag = 3
+                addstorageputList(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('添加成功')
+                    this.$router.go(-1)
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      temporaryStorage() {
+        if (!this.deptBudgetList.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.grossWeight) {
+          this.$message({
+            message: '毛重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.grossWeight < 0 ||
+          this.deptBudgetList.grossWeight > 10000 ||
+          (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.tare) {
+          this.$message({
+            message: '皮重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.tare < 0 ||
+          this.deptBudgetList.tare > 10000 ||
+          (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+            String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '皮重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deductionWeight) {
+          this.$message({
+            message: '扣重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.deductionWeight < 0 ||
+          this.deptBudgetList.deductionWeight > 10 ||
+          (String(this.deptBudgetList.deductionWeight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.deductionWeight).length -
+            (String(this.deptBudgetList.deductionWeight).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '扣重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.buckleWeightRatio
+        ) {
+          this.$message({
+            message: '扣重比不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.buckleWeightRatio < 0) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.buckleWeightRatio > 3) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.deptBudgetList.buckleWeightRatio).length -
+            (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '扣重比输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.tidalGrainWater
+        ) {
+          this.$message({
+            message: '潮粮水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.tidalGrainWater < 1) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.tidalGrainWater > 40) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
+            String(this.deptBudgetList.tidalGrainWater).length -
+            (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '潮粮水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.solidGrainWater
+        ) {
+          this.$message({
+            message: '干粮水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.solidGrainWater < 1) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.solidGrainWater > 40) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
+            String(this.deptBudgetList.solidGrainWater).length -
+            (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
+            1)
+        ) {
+          this.$message({
+            message: '干粮水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deductionAmount) {
+          this.$message({
+            message: '扣款不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.deductionAmount < 0 ||
+          this.deptBudgetList.deductionAmount > 10000 ||
+          (String(this.deptBudgetList.deductionAmount).indexOf('.') != -1 &&
+            String(this.deptBudgetList.deductionAmount).length -
+            (String(this.deptBudgetList.deductionAmount).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '扣款输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.cost) {
+          this.$message({
+            message: '未获取到成本,请编辑后提交',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.cost < 0 ||
+          this.deptBudgetList.cost > 20000 ||
+          (String(this.deptBudgetList.cost).indexOf('.') != -1 &&
+            String(this.deptBudgetList.cost).length -
+            (String(this.deptBudgetList.cost).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '成本输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.freight) {
+          this.$message({
+            message: '运费不能为空',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (
+          this.deptBudgetList.freight < 0 ||
+          this.deptBudgetList.freight > 100000 ||
+          (String(this.deptBudgetList.freight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.freight).length -
+            (String(this.deptBudgetList.freight).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '运费输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.agent) {
+          this.$message({
+            message: '经办人不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.agent.length < 2 ||
+          this.deptBudgetList.agent.length > 10
+        ) {
+          this.$message({
+            message: '经办人输入有误',
+            type: 'warning',
+          })
+          return
+        }
+        // if (!this.deptBudgetList.carNo) {
+        //   this.$message({
+        //     message: '车牌号不能为空',
+        //     type: 'warning'
+        //   })
+        //   return
+        // }
+        // if (this.deptBudgetList.carNo.length > 7) {
+        //   this.$message({
+        //     message: '车牌号输入错误,请输入7个字符之内',
+        //     type: 'warning'
+        //   })
+        //   return
+        // }
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (
+        //   this.deptBudgetList.contractNo.length < 6 ||
+        //   this.deptBudgetList.contractNo.length > 20
+        // ) {
+        //   this.$message({
+        //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        // if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
+        //   this.$message({
+        //     message: '入库量大于该仓库容量!',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        //自检员
+        if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.waterContent
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //杂质
+        if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.impurity
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //霉变
+        if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.mildewGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //热损伤
+        if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.jiaorenli
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //不完善粒(%)
+        if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
+              String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.bulkDensity
+                ).indexOf('.') +
+                1) >
+              2) ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+          ) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.deptBudgetList.validate((valid) => {
+              if (valid) {
+                this.deptBudgetList.compId =
+                  localStorage.getItem('ws-pf_compId')
+                this.deptBudgetList.inOutFlag = 2
+                this.deptBudgetList.statusFlag = 1
+                let _data = JSON.parse(localStorage.getItem('winseaview-userInfo'))
+                this.deptBudgetList.backOffice = _data.content.showCompName + '-' + _data.content.staffName
+                addstorageputList(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('暂存成功')
+                    this.$router.go(-1)
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      tarechange(e) {
+        if (
+          this.deptBudgetList.grossWeight &&
+          this.deptBudgetList.tare &&
+          this.deptBudgetList.deductionWeight
+        ) {
+          this.deptBudgetList.netWeight = Number(
+            this.deptBudgetList.grossWeight -
+            this.deptBudgetList.tare -
+            this.deptBudgetList.deductionWeight
+          ).toFixed(2)
+        }
+      },
+      grossWeightchange(e) {
+        if (
+          this.deptBudgetList.grossWeight &&
+          this.deptBudgetList.tare &&
+          this.deptBudgetList.deductionWeight
+        ) {
+          this.deptBudgetList.netWeight = Number(
+            this.deptBudgetList.grossWeight -
+            this.deptBudgetList.tare -
+            this.deptBudgetList.deductionWeight
+          ).toFixed(2)
+        }
+      },
+      contractNoChange(e) {
+        for (let i = 0; i < this.deptBudgetList1.length; i++) {
+          if (this.deptBudgetList1[i].inOutTaskNo == e) {
+            var data = this.deptBudgetList1[i]
+            if (this.deptBudgetList1[i].contractNo) {
+              this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
+            } else {
+              this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
+            }
+          }
+        }
+        if (!data) return
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (this.outContractNo[i].contractNo == this.deptBudgetList.contractNo) {
+            if (this.outContractNo[i].inOutType == '采购入库') {
+              if (!this.outContractNo[i].unitContractPrice) {
+                this.deptBudgetList.tips =
+                  '卖方' +
+                  this.outContractNo[i].seller
+              } else {
+                this.deptBudgetList.tips =
+                  '卖方' +
+                  this.outContractNo[i].seller +
+                  '( ' +
+                  this.outContractNo[i].unitContractPrice +
+                  '元/吨)'
+              }
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库入库') {
+              if (this.outContractNo[i].unitContractPrice) {
+                this.deptBudgetList.tips = '出货库' + this.outContractNo[i].sendWarehouse + ' (' + this.outContractNo[i]
+                  .unitContractPrice + '元/吨)'
+              } else {
+                this.deptBudgetList.tips = '出货库' + this.outContractNo[i].sendWarehouse
+              }
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务入库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.detailData.inOutType == '退库') {
+              if (this.outContractNo[i].contractNo) {
+                this.deptBudgetList.tips = '买方' + this.outContractNo[i].buyer
+              } else {
+                this.deptBudgetList.tips = '出货库' + this.outContractNo[i].sendWarehouse
+              }
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+            this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+            this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            // this.deptBudgetList.cost = this.outContractNo[i].contractPrice
+            this.cost = this.outContractNo[i].contractPrice
+            if (this.cost) {
+              this.isGetCost = true
+              this.deptBudgetList.cost = this.cost - this.deptBudgetList.deductionAmount
+            } else {
+              this.isGetCost = false
+              this.deptBudgetList.cost = this.deptBudgetList.cost
+            }
+            this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+            if (this.outContractNo[i].inOutType == '移库入库') {
+              this.isSelectType = false
+            } else {
+              this.isSelectType = true
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              this.carstatus = true
+            }
+          }
+        }
+      },
+      typeChange(e) {},
+      pureweight(status) {
+        console.log(this.deptBudgetList)
+        if (
+          this.deptBudgetList.netWeight &&
+          this.deptBudgetList.tidalGrainWater &&
+          this.deptBudgetList.solidGrainWater &&
+          this.deptBudgetList.buckleWeightRatio
+        ) {
+          this.deptBudgetList.pureWeight =
+            (this.deptBudgetList.netWeight *
+              (100 -
+                (this.deptBudgetList.tidalGrainWater -
+                  this.deptBudgetList.solidGrainWater) *
+                this.deptBudgetList.buckleWeightRatio)) /
+            100
+        }
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].constValue == e) {
+            this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+            if (e == '玉米(潮粮)') {
+              this.deptBudgetList.type = '潮粮'
+            } else {
+              this.deptBudgetList.type = '干粮'
+            }
+          }
+        }
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+          }
+        }
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.storageType.length; i++) {
+          if (this.storageType[i].constValue == e) {
+            this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
+          }
+        }
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      getList() {
+        // 货名
+        pullDown({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        pullDown({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 类型
+        if (this.deptBudgetList.warehouseType == '1') {
+          this.storageType = []
+          pullDown({
+              constId: 'CON5'
+            })
+            .toPromise()
+            .then((response) => {
+              // this.storageType = response
+              for (let i = 0; i < response.length; i++) {
+                if (response[i].constValue == '移库入库' || response[i].constValue == '退库') {
+                  this.storageType.push(response[i])
+                }
+              }
+            })
+        } else if (this.deptBudgetList.warehouseType == '2') {
+          pullDown({
+              constId: 'WARE1'
+            })
+            .toPromise()
+            .then((response) => {
+              this.storageType = response
+            })
+
+          pullDown({
+              constId: 'WARE2'
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        }
+        getReceiptTaskNo({
+            flag: 2,
+            warehouseName: this.deptBudgetList.warehouseName,
+            agentKey: localStorage.getItem('ws-pf_userId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList1 = response
+          })
+        //合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 6
+          })
+          .toPromise()
+          .then((response) => {
+            this.options1 = response
+            this.outContractNo = response
+          })
+        //合同编号2
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 7
+          })
+          .toPromise()
+          .then((response) => {
+            this.outContractNo1 = response
+          })
+        //经办人
+        getstaff({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseId: this.deptBudgetList.baseId,
+          })
+          .toPromise()
+          .then((response) => {
+            this.options = response
+            this.qualityInspectorList = response
+            this.staffList = response
+            //  this.agent = response
+          })
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+      },
+      fujian(row) {
+        if (
+          row.receiveAttachmentPath === null ||
+          row.receiveAttachmentPath === ''
+        ) {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
+        } else {
+          this.accessoryTFs = true
+        }
+        this.appendixIdss = row.receiveAttachmentPath
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.basicInformation {
+    .ws-info-table {
+      border: none;
+    }
+
+    .left {
+      .el-form-item {
+        width: 50%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
+    }
+
+    .right {
+      .el-form-item {
+        width: 100%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
+    }
+  }
+
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-form {
+    padding: 0 10%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+  }
+
+  //选填
+  /deep/.el-form-item {
+    width: 50%;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 120vh;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: center;
+  }
+
+  .deliverydate {
+    display: inline-block;
+    width: 10%;
+  }
+
+  .center {
+    margin-top: -60px;
+    width: 80%;
+  }
+
+  //仓位
+
+  .position {
+    background: #afb5cb;
+    border-radius: 2px;
+    font-size: 12px;
+    color: #ffffff;
+    line-height: 20px;
+    display: inline-grid;
+    padding: 2px 4px;
+  }
+
+  //表格文字
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: left;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+  }
+
+  .inspector {
+    width: 50%;
+  }
+
+  //质检员
+  .inspector .el-form-item__content {
+    text-align: left;
+    margin-left: 0px;
+  }
+
+  .small-title {
+    position: relative;
+    padding: 10px;
+    font-weight: 600;
+  }
+
+  .small-title::before {
+    position: absolute;
+    content: '';
+    display: block;
+    background: #5473e8;
+    width: 4px;
+    height: 14px;
+    left: 0px;
+    top: 13px;
+    padding: 4px 2px;
+  }
+
+  //下面列表
+  .neifor {
+    width: 80%;
+    background-color: #f6f7fc;
+  }
+
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+    width: 35%;
+    text-align: center;
+  }
+
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+    width: 60%;
+    background-color: #f6f7fc;
+  }
+
+  /deep/.neifor .el-input--small .el-input__inner {
+    width: 100%;
+  }
+</style>

+ 654 - 0
src/views/warehousenew/warehouseManagementPutOut.vue

@@ -0,0 +1,654 @@
+//出入库任务
+<template>
+ <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">出入库任务</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="revert()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>  
+    <!-- <div> -->
+     <div>
+       <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按照合同编号和任务编号进行查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class="findValue"
+        ></ws-input>
+        <ws-button class="but" type="primary" @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+     </div>
+        <ws-button  type="primary" @click="statusquery(1)" >
+          执行中</ws-button
+        >
+        <ws-button  @click="statusquery(2)">已完成</ws-button>
+      <el-table
+        class="wenzi"
+        :data="warehouseList.records"
+        style="width: 100%; margin-top: 20px"
+        height="780"
+      >
+        <el-table-column type="index" label="序号" width="80" >
+        </el-table-column>
+        <el-table-column class="table_td" prop="inOutTaskNo" label="任务编号">
+        </el-table-column>
+        <el-table-column class="table_td" prop="contractNo" label="合同编号">
+
+        </el-table-column>
+        <el-table-column class="table_td"  prop="warehouseName" label="仓库名" >
+         
+        </el-table-column>
+        <el-table-column class="table_td"  prop="inOutType" label="出入库类型">
+          
+        </el-table-column>
+        <el-table-column class="table_td" prop="goodsName" label="货名" >
+          
+        </el-table-column>
+        <el-table-column class="table_td"  prop="weight" label="重量(吨)" >
+         
+        </el-table-column>
+        <el-table-column class="table_td"  prop="send" label="已完成(吨)">
+          
+        </el-table-column>
+        <el-table-column class="table_td" prop="predictDate" label="预计时间" >
+          
+        </el-table-column>
+        <el-table-column class="table_td" prop="agent" label="经办人" >
+          
+        </el-table-column>
+      <el-table-column prop="taskStatus" label="状态">
+          <template slot-scope="scope">
+            <el-popover
+              placement="left"
+              :width="285"
+              trigger="click"
+              visible-arrow="false"
+              @show="history(scope.row)"
+            >
+              <template>
+                <span slot="reference">
+                  <span
+                    v-if="scope.row.taskStatus == '待执行'"
+                    class="executory"
+                  ></span>
+                  <span
+                    v-if="scope.row.taskStatus == '执行中'"
+                    class="inExecution"
+                  ></span>
+                  <span v-if="scope.row.taskStatus == '已完成'" class="done"></span
+                  >{{ scope.row.taskStatus }}
+                </span>
+              </template>
+              <div>
+                <p style="margin-top: 0; padding-left: 10px">历史记录</p>
+                <div v-for="(item, index) in historyList" class="flex" :key="index">
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
+                  <div>
+                    <div class="vertical-circle"></div>
+                    <div
+                      v-if="index != historyList.length - 1"
+                      class="vertical-line"
+                    ></div>
+                  </div>
+                  <div class="vertical-text">
+                    {{ item.operateUser }}<br />{{ item.dealMsg }}
+                  </div>
+                </div>
+              </div>
+            </el-popover>
+            <img
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="editClick(scope.row)"
+              alt=""
+            />
+          </template>
+      </el-table-column>
+
+      <el-table-column class="table_td" label="接单日期" prop="establishDate">
+        </el-table-column>
+        <el-table-column prop="seller" label="详情" width="300">
+          <template slot-scope="scope">
+            <div class="record" @click="handleLook(scope.row)">
+              查看
+            </div>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 页数 -->
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-size="pageSize"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"
+      >
+      </el-pagination>
+    </div>
+  <!-- </div> -->
+</template>
+<script>
+import {
+ taskList,
+} from '@/model/warehouse/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      pickerOptions:{
+        
+      },
+      value2: '',
+      deptBudgetTotal:0,
+      currentPage: 1,
+      tranTypeKey:1,
+      pageSize: 10,
+      searchType: 1,
+      searchTypeText: '未完成',
+      searchKeyWord: '',
+      contractType: 2,
+      
+      // 提交类型
+      submitType: true,
+      size: 10,
+      spanArr: [],
+      contractNo: '',
+      inOutTaskNo:'',
+      compId: localStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      warehouseList: [],
+      deptBudgetList: {},
+      historyList: [],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+    getList(){
+      console.log(123456)
+      taskList({
+        compId: localStorage.getItem('ws-pf_compId'),
+        currentPage:this.currentPage,
+        pageSize:this.pageSize,
+        contractType:this.contractType,
+        tranTypeKey: this.tranTypeKey, 
+        searchType:this.searchType,
+        contractNo:this.contractNo,
+        inOutTaskNo:this.inOutTaskNo,
+
+      })
+      .toPromise()
+      .then((response)=>{
+        this.warehouseList = response  
+      })
+    },
+    statusquery(state){
+      this.searchType = state
+      this.getList()
+    },
+    delivery(item) {
+      this.$router.push({
+        path: 'warehouseManagementDelivery',
+        query: {
+          baseId: item.warehouseId,
+          positionId: item.binNumberId,
+          warehouseName: item.warehouseName,
+          binNumber: item.binNumber,
+          capacity: item.capacity,
+        },
+      })
+    },
+    getSpanArr(data) {
+      let that = this
+
+      //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+      that.spanArr = []
+
+      that.pos = 0
+
+      // //遍历数据
+
+      data.forEach((item, index) => {
+        //判断是否是第一项
+
+        if (index === 0) {
+          this.spanArr.push(1)
+          this.pos = 0
+        } else {
+        //不是第一项时,就根据标识去存储
+        if (data[index].warehouseNumViewList.length > 1) {
+          查找到符合条件的数据时每次要把之前存储的数据+1
+          this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+          this.spanArr.push(0)
+        } else {
+          // 没有符合的数据时,要记住当前的index
+          this.spanArr.push(1)
+          this.pos = index
+        }
+        }
+      })
+    },
+    //查看
+    handleLook(row) {
+      this.$router.push({ 
+        path: 'warehouseManagementPutOutLook',
+        query: { 
+           relevanceId: row.relevanceId,
+         }
+         })
+    },
+    //返回
+    revert(){
+        this.$router.push({path:'warehouseManagementList'})
+    },
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'Y+': date.getFullYear().toString(), // 年
+        'm+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        // "M+": date.getMinutes().toString(),         // 分
+        // "S+": date.getSeconds().toString()          // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    editClick(row) {
+      var status = ''
+      if (row.status == '待审核' || row.status == '已完成') {
+        status = '执行中'
+      } else if (row.status == '执行中') {
+        status = '已完成'
+      }
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`是否将状态改为${status}`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          alsostate({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    // fujian(row) {
+    //   if (
+    //     row.receiveAttachmentPath === null ||
+    //     row.receiveAttachmentPath === ''
+    //   ) {
+    //     EventBus.$emit(
+    //       'warning',
+    //       this.$t('system.noticeCircular.NoInformation')
+    //     )
+    //   } else {
+    //     this.accessoryTFs = true
+    //   }
+    //   this.appendixIdss = row.receiveAttachmentPath
+    // },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    }, 
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    //查找
+    find() {
+      this.currentPage = 1
+      this.getList()
+    },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: localStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
+    total(){},
+  },
+}
+</script>
+<style lang="scss" scoped>
+.connert {
+  width: 90%;
+  margin: 0 auto;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+//分页
+.el-pagination {
+  padding: 10px 15px;
+  margin-bottom: 0;
+  text-align: center;
+}
+/deep/.el-pager li.active {
+  color: #5878e8;
+  cursor: default;
+}
+/deep/.el-pager li:hover {
+  color: #5878e8;
+  cursor: default;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  color: #8890b1;
+  border-color: #e8eaf1;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: 0;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+  width: 385px;
+}
+.completed.el-button--default {
+  border-color: #5878e8;
+  background-color: #f6f7fc;
+  color: #5878e8;
+}
+.putstorage.el-button--default,
+.deliverystorage.el-button--default {
+  border-color: #8890b1;
+  background-color: #fff;
+  color: #8890b1;
+}
+/deep/.el-table td,
+/deep/.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+}
+/deep/.el-table tr td:first-child,
+/deep/.el-table tr th.is-leaf:first-child {
+  border-left: 1px solid #e9ecf7;
+}
+.record,
+.adjustment {
+  display: inline-block;
+  color: #5878e8;
+  padding: 0 4px !important;
+  position: relative;
+}
+.record:after {
+  position: absolute;
+  content: '';
+  display: block;
+  top: 5px;
+  right: -2px;
+  width: 1px;
+  height: 12px;
+  background: #e9ecf7;
+}
+// .el-row{
+//     height: 150px;
+// }
+.base_header_layout .grid-content{
+    margin-top: 80px;
+}
+.el-input--small .el-input__inner{
+    margin-left: 20px;
+}
+.el-range-editor--small.el-input__inner {
+    height: 32px;
+    margin-left: -20%;
+}
+//执行样式
+.executory,
+.inExecution,
+.done {
+  width: 6px;
+  height: 6px;
+  display: inline-block;
+  border-radius: 50%;
+  position: relative;
+  top: -1px;
+  font-size: 14px;
+}
+.executory {
+  background: #ff9f24;
+}
+.inExecution {
+  background: #5878e8;
+}
+.done {
+  background: #50cad4;
+}
+.record, .adjustment{
+  display: inline-block;
+  color: #5878e8;
+  padding: 0 4px !important;
+  position: relative;
+  font-size: 14px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.bg-left {
+  padding-left: 30px;
+}
+.title {
+  position: relative;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+    // margin-left: 85%;
+    margin-top: 20px;
+}
+//导航条样式
+.el-col-12 {
+    width: 50%;
+    height: 60px;
+    background: #F6F7FC;
+    border-radius: 4px 4px 1px 1px;
+}
+.el-input--small .el-input__inner {
+    height: 32px;
+    line-height: 32px;
+    width: 385px;
+    margin-top: 10px;
+}
+.bg-bottom{
+ margin-left: 85%;
+}
+.but {
+    margin-left: 30%;
+    /* margin-top: -32px; */
+    overflow: auto;
+    /* float: left; */
+    /* margin-left: 1px; */
+    margin-left: -10px;
+}
+.el-input--small {
+    font-size: 13px;
+    width: 390px;
+}
+
+</style>

+ 672 - 0
src/views/warehousenew/warehouseManagementPutOutLook.vue

@@ -0,0 +1,672 @@
+// 出入库任务查看
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">任务详情</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="revert()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <div class="basicInformation">
+        <div class="small-title">
+        </div>
+        <el-form ref="dataList" :model="dataList" label-width="140px">
+          <!-- 任务编号 -->
+          <el-form-item label="任务编号">
+            <el-input
+              disabled
+              v-model="dataList.inOutTaskNo"
+              class="typeselect"
+            >
+              <el-option
+                v-for="item in warehouseNameList"
+                :key="item.constKey"
+                :label="item.warehouseName"
+                :value="item.warehouseName"
+              />
+            </el-input>
+          </el-form-item>
+          <!-- 合同编号 -->
+          <el-form-item label="合同编号">
+            <el-input
+              disabled
+              v-model="dataList.contractNo"
+              class="typeselect"
+            >
+              <el-option
+                v-for="item in contractNoList"
+                :key="item.constKey"
+                :label="item.contractNo"
+                :value="item.contractNo"
+              ></el-option>
+            </el-input>
+          </el-form-item>
+          <!-- 仓库名 -->
+          <el-form-item label="仓库名">
+            <el-input
+              disabled
+              v-model="dataList.warehouseName"
+              class="typeselect"
+            >
+              <el-option
+                v-for="item in goodnameList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              ></el-option>
+            </el-input>
+          </el-form-item>
+          <!-- 类型-->
+          <el-form-item label="类型">
+            <el-input
+              disabled
+              v-model="dataList. inOutType"
+              class="typeselect"
+            >
+              <el-option
+                v-for="item in goodnameList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              ></el-option>
+            </el-input>
+          </el-form-item>
+          <!-- 货名 -->
+          <el-form-item label="货名">
+            <el-input
+              disabled
+              v-model="dataList.goodsName"
+              placeholder="货名"
+              class="typeselect"
+            >
+              <el-option
+                v-for="item in goodnameList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              ></el-option>
+            </el-input>
+          </el-form-item>
+          <!--重量(吨)-->
+          <el-form-item label="重量(吨)">
+            <el-input
+              disabled
+              v-model="dataList.weight"
+              maxlength="120"
+              size="small"
+            />
+          </el-form-item>
+          <!-- 预计日期 -->
+          <el-form-item
+            label="预计日期"
+            span="1"
+            prop="predictDate"
+            class="deliverydate"
+          >
+            <el-date-picker
+              disabled
+              v-model="dataList.predictDate"
+              type="date"
+              value-format="yyyy-MM-dd"
+            />
+          </el-form-item>
+          <!--经办人-->
+          <el-form-item label="经办人">
+            <el-input
+              disabled
+              v-model="dataList.agent"
+              filterable
+              clearable
+            >
+              <el-option
+                v-for="item in options"
+                :key="item.value"
+                :label="item.staffName"
+                :value="item.staffName"
+              />
+            </el-input>
+          </el-form-item>
+          <!-- 品级 -->
+          <el-form-item label="品级">
+            <el-input
+              v-model="dataList.grade"
+              class="typeselect"
+              disabled
+            >
+              <el-option
+                v-for="item in gradeList"
+                :key="item.constKey"
+                :label="item.constValue"
+                :value="item.constValue"
+              />
+            </el-input>
+          </el-form-item>
+          <!--容重(克/升)>=-->
+          <el-form-item label="容重(克/升)>=">
+            <el-input
+              disabled
+              v-model="dataList.bulkDensity"
+              maxlength="120"
+              size="small"
+            />
+          </el-form-item>
+          <!--水分(%)<=-->
+          <el-form-item label="水分(%)<=">
+            <el-input
+              disabled
+              v-model="dataList.waterContent"
+              maxlength="120"
+              size="small"
+            />
+          </el-form-item>
+          <!--单价(元/吨)-->
+          <el-form-item label="单价(元/吨)">
+            <el-input
+              disabled
+              v-model="dataList.unitPrice"
+              maxlength="120"
+              size="small"
+            />
+          </el-form-item>
+         <!--发布人-->
+          <el-form-item label="发布人">
+            <el-input
+              disabled
+              v-model="dataList.publisher"
+              maxlength="120"
+              size="small"
+            />
+          </el-form-item>
+          <!--审核人-->
+          <el-form-item label="审核人">
+            <el-input
+              disabled
+              v-model="dataList.unitPrice"
+              maxlength="120"
+              size="small"
+            />
+          </el-form-item>
+         <!--仓位-->
+          <el-form-item label="仓位">
+            <el-input
+              disabled
+              v-model="dataList.positionId"
+              maxlength="120"
+              size="small"
+            />
+          </el-form-item>
+          <!--业务描述=-->
+          <el-form-item label="业务描述">
+            <el-input
+              disabled
+              v-model="dataList.businessDescribe"
+              placeholder="请输入业务描述,不超过150字"
+              maxlength="150"
+              size="small"
+            />
+          </el-form-item>
+        </el-form>
+      </div>
+      
+    <!-- 关闭 -->
+    <div style="text-align: right; padding: 10px" class="center">
+      <el-button class="bg-bottom" type="primary" size="small" @click="revert()"
+        >关闭</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+import {
+  // getwarehousename,
+  // xialaNo,
+  // addoreditoutput,
+  outexamine,
+} from '@/model/tasksport/index'
+import { packList } from '@/model/contarct/index'
+import { pullDown, getstaff } from '@/model/warehouse/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import { mapActions, mapGetters, mapState } from 'vuex'
+import WsUpload from '@/components/WsUpload'
+// import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import { dayjs, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    // vesselId(val) {
+    //   this.getList()
+    // },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  computed: {
+    ...mapGetters(['deptBudgetList']),
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      contractNoList: [],
+      deptBudgetTotal: 0,
+      readonly: true,
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchKeyWord: '',
+      radio: '1',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      goodnameList: [],
+      checked: true,
+      form: {},
+
+      staffList: [],
+      options: [],
+      storageType: [],
+      storageType1: [],
+      outContractNo: [],
+      // 提交类型
+      submitType: true,
+      status: [],
+      unitPricechange: [],
+      warehouseNameList: [],
+      warehouseNameList1: [],
+      waterContentchange: [],
+      appendixIdsAdd: '',
+      uploadSuccess: {},
+      warehouseInOutDetail: {},
+      onChange: {},
+      deptBudgetList1: [],
+      gradeList: [],
+      rules: {
+        netWeight: [
+          {
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          },
+        ],
+      },
+      size: 10,
+      compId: localStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      packtypeList: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      contractList: [],
+      inOutTaskNo: '',
+      inOutTaskNo1: '',
+      dataList: { taskTypeKey: '1' },
+      dataList1: { taskTypeKey: '1' },
+      historyList: [],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  mounted() {
+    this.getList()
+  },
+  methods: {
+    //返回按钮
+    revert() {
+      this.$router.go(-1)
+      
+    },
+    // returnsales() {
+    //   this.$router.push({ path: 'warehouseManagementPutOut' })
+    // },
+
+    // 获取当前年月日
+    getdate() {
+      var date = new Date()
+      var year = date.getFullYear() //获取完整的年份(4位)
+      var mouth = date.getMonth() + 1 //获取当前月份(0-11,0代表1月)
+      var datetime = date.getDate() //获取当前日(1-31)
+      if (mouth < 10) {
+        mouth = '0' + mouth
+      }
+      if (datetime < 10) {
+        datetime = '0' + datetime
+      }
+      return year +'' + mouth + datetime
+    },
+
+    dataFilter(val) {
+      // console.log(val,"名")
+      this.deptBudgetList.staffList = val
+      if (val) {
+        //val存在
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options = this.staffList
+      }
+    },
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.dataList.agentKey = this.staffList[i].staffId
+        }
+      }
+    },
+    selectstaff1(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.dataList1.agentKey = this.staffList[i].staffId
+        }
+      }
+    },
+    requestadd(list, status) {
+      this.$refs.dataList.validate((valid) => {
+        if (valid) {
+          list.compId = localStorage.getItem('ws-pf_compId')
+          list.publisher =
+            localStorage.getItem('ws-pf_roleName') +
+            localStorage.getItem('ws-pf_staffName')
+          addoreditoutput(list)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('添加成功')
+              this.$router.push({ path: 'tranManagementWarehouseInOutTask' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    // 关闭
+    close(){
+        this.$router.push({ 
+        path: 'warehouseManagementPutOut',
+        })
+    },
+    //提交按钮
+    // submit() {
+    //   if (this.dataList.taskTypeKey == 1) {
+    //     this.dataList.inOutTaskNo = this.inOutTaskNo
+    //     this.requestadd(this.dataList)
+    //   } else if (this.dataList.taskTypeKey == 2) {
+    //     this.dataList.inOutTaskNo = this.inOutTaskNo1
+    //     this.requestadd(this.dataList)
+    //   } else if (
+    //     this.dataList.taskTypeKey == 3 ||
+    //     this.dataList.taskTypeKey == 4
+    //   ) {
+    //     this.dataList.inOutTaskNo = this.inOutTaskNo
+    //     this.dataList.relevanceId = this.GetRandomNum(100000, 999999)
+    //     this.requestadd(this.dataList, 'repetition')
+    //     this.dataList1.inOutTaskNo = this.inOutTaskNo1
+    //     this.dataList1.relevanceId = this.dataList.relevanceId
+    //     this.requestadd(this.dataList1, 'repetition')
+    //   }
+    // },
+    selectwarehouseName() {},
+    tarechange(e) {
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
+        )
+      }
+    },
+    grossWeightchange(e) {
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
+        )
+      }
+    },
+    selectgoodsName(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.dataList.goodsNameKey = this.goodnameList[i].constKey
+        }
+      }
+    },
+    selectgoodsName1(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.dataList1.goodsNameKey = this.goodnameList[i].constKey
+        }
+      }
+    },
+    selectpackingMethod(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.dataList.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    selectpackingMethod1(e) {
+      for (var i = 0; i < this.packtypeList.length; i++) {
+        if (this.packtypeList[i].constValue == e) {
+          this.dataList1.packingMethodKey = this.packtypeList[i].constKey
+        }
+      }
+    },
+    selectstorageType(e) {
+      for (var i = 0; i < this.storageType.length; i++) {
+        if (this.storageType[i].constValue == e) {
+          this.dataList.inOutTypeKey = this.storageType[i].constKey
+        }
+      }
+    },
+    selectstorageType1(e) {
+      for (var i = 0; i < this.storageType1.length; i++) {
+        if (this.storageType1[i].constValue == e) {
+          this.dataList1.inOutTypeKey = this.storageType[i].constKey
+        }
+      }
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    tasktypechange() {
+      this.tasknumber()
+    },
+    GetRandomNum(Min, Max) {
+      var Range = Max - Min
+      var Rand = Math.random()
+      return Min + Math.round(Rand * Range)
+    },
+    getList() {
+      outexamine({ relevanceId: this.$route.query.relevanceId })
+        .toPromise()
+        .then((response) => {
+          if (response.length > 1) {
+            this.dataList = response[0]
+            this.dataList1 = response[1]
+          } else {
+            this.dataList = response[0]
+          }
+        })
+
+    },
+    // deletecontract(){},
+    //删除
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+  },
+}
+</script>
+<style lang="scss" scoped>
+/deep/.basicInformation {
+  .el-info-table {
+    border: none;
+    position: relative;
+  }
+  .el-form-item {
+    width: 33.3333%;
+    border: none;
+    margin: 0;
+    .el-form-item__label {
+      text-align: left;
+      font-size: 14px;
+      font-family: PingFangSC-Regular, PingFang SC;
+      font-weight: 400;
+      color: #8890b1;
+    }
+    .el-form-item__content {
+      padding-left: 0px;
+      padding-right: 10px;
+      background: #fff;
+      white-space: nowrap;
+      height: 40px;
+      display: flex;
+      -webkit-box-align: center;
+      align-items: center;
+      text-align: left;
+      overflow: hidden;
+    }
+  }
+}
+/deep/.el-radio {
+  color: #606266;
+  font-weight: 500;
+  line-height: 1;
+  cursor: pointer;
+  white-space: nowrap;
+  outline: 0;
+  margin-right: 30px;
+  margin-top: 15px;
+}
+/deep/.el-radio__inner {
+  border: 1px solid #dcdfe6;
+  border-radius: 100%;
+  width: 14px;
+  height: 14px;
+  background-color: #fff;
+  cursor: pointer;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  margin-left: 100px;
+}
+/deep/.el-radio__input {
+  white-space: nowrap;
+  cursor: pointer;
+  outline: 0;
+  line-height: 1;
+  vertical-align: middle;
+  margin-top: -1px;
+}
+.title {
+  position: relative;
+  padding-left: 10px;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-form {
+  padding: 0 15%;
+  display: flex;
+  flex-wrap: wrap;
+  margin-left: -50px;
+  margin-top: 15px;
+  width: 110%;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-col {
+  background: #f6f7fc;
+}
+.bg-right {
+  text-align: right;
+  padding: 16px 20px;
+}
+.center {
+  position: relative;
+  top: 50px;
+  width: 40%;
+  height: 2000px;
+  margin: 0 auto;
+  margin-right: 180px;
+}
+/deep/.el-form-item__label {
+  width: 160px;
+}
+.inspector {
+  width: 50%;
+}
+/deep/.el-form-item--small .el-form-item__label,
+.el-form-item--small .el-form-item__content {
+  text-align: left;
+}
+/deep/.el-input--small {
+  font-size: 13px;
+  position: relative;
+  display: inline-block;
+}
+.center1 .small-title {
+  margin-left: 150px;
+}
+.center1 {
+  width: 90%;
+  margin: 0 auto;
+  margin-left: 10px;
+  margin-top: 25px;
+}
+/deep/.el-input--small .el-input__inner {
+  height: 32px;
+  line-height: 32px;
+}
+/deep/.el-select {
+  display: inline-block;
+  position: relative;
+  width: 100%;
+}
+</style>

+ 1167 - 0
src/views/warehousenew/warehouseManagementRecord.vue

@@ -0,0 +1,1167 @@
+<template>
+	<div class="container">
+		<el-row>
+			<el-col :span="18">
+				<h2 class="bg-left title">流转记录</h2>
+			</el-col>
+			<el-col :span="6" class="bg-right">
+				<el-button class="bg-bottom" type="primary" size="small" @click="iossrecord()"
+					v-show="this.warehouseType != 2">盘损记录</el-button>
+				<el-button class="bg-bottom" type="primary" size="small" @click="returnWarehouse()">返回</el-button>
+			</el-col>
+		</el-row>
+		<div class="center">
+			<h2 style="padding-left: 20px">
+				<img style="position: relative; top: 2px" width="19" height="19" src="../../../public/img/cangku.png"
+					alt="" />
+				<span style="color: #323233">{{ deptBudgetList.warehouseName }}</span>
+				<div class="ware" v-show="warehouseType==1">
+					<!-- {{binNumber}}仓位(容量{{capacity}}吨) -->
+					<span class="binNo">仓位号:</span>
+					<el-select filterable clearable v-model="binNumber" placeholder="请选择仓位" class="typeselect"
+              @change="binNumberChange">
+			  <el-option  key="" label="全部仓位"
+                value="全部仓位" />
+              <el-option v-for="item in binnumberList" :key="item.binNumber" :label="item.binNumber"
+                :value="item.binNumber" />
+            </el-select>
+				</div>
+				<span v-show="warehouseType==2">(临)</span>
+			</h2>
+			<p v-if='remark' style="
+          margin-left: 42px;
+          background: #f6f7fc;
+          color: #afb5cb;
+          width: 245px;
+        ">
+				备注:{{remark }}
+			</p>
+
+			<ws-form ref="deptBudgetList" :model="deptBudgetList">
+				<div class="record" :class="{ active: status == 1 }" @click="record('', 1)">
+					<img v-if="status != 1" width="14" height="14" src="../../../public/img/radio.png" alt="" />
+					<img v-if="status == 1" width="18" height="18" src="../../../public/img/radio-check.png"
+						alt="" />全部记录
+				</div>
+				<div class="record" :class="{ active: status == 2 }" @click="record(2, 2)">
+					<img v-if="status != 2" width="14" height="14" src="../../../public/img/radio.png" alt="" />
+					<img v-if="status == 2" width="18" height="18" src="../../../public/img/radio-check.png"
+						alt="" />出库记录
+				</div>
+				<div class="record" :class="{ active: status == 3 }" @click="record(3, 3)">
+					<img v-if="status != 3" width="14" height="14" src="../../../public/img/radio.png" alt="" />
+					<img v-if="status == 3" width="18" height="18" src="../../../public/img/radio-check.png"
+						alt="" />入库记录
+				</div>
+				<el-date-picker  style="margin: 0 10px 0 0" class="dataClass" value-format='yyyy-MM-dd' v-model="value2" @change='datechange' type="daterange" align="right" range-separator="至"
+					start-placeholder="出入库日期起" end-placeholder="出入库日期止" >
+				</el-date-picker>
+		<ws-input
+          v-model="searchKeyWord"
+          placeholder="可按合同编号、车牌号查找"
+          clearable
+          maxlength="250"
+          type="input"
+		  class="input"
+        >
+        </ws-input>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button class="find" type="primary" @click="find()">
+          <img
+            width="16"
+            height="16"
+            style="vertical-align: text-top; position: relative; top: 0px"
+            src="../../../public/img/sousuo.png"
+            alt
+          />
+        </ws-button>
+		<el-button type="primary" @click="batchPrint">批量打印</el-button>
+				<el-table show-summary :summary-method="getSummaries" ref="tableData" :data="warehouseList.records" height="570" v-show="this.warehouseType== '1'" @selection-change="handleSelectionChange">
+						 <el-table-column type="selection" width="55" :selectable="selectInit"></el-table-column>
+					<el-table-column type="expand">
+						<template #default="props">
+							<ws-form ref="deptBudgetList" :model="deptBudgetList">
+								<ws-info-table>
+									<ws-form-item label="水分(%)" span="1" prop="waterContent">
+										{{ props.row.waterContent }}
+									</ws-form-item>
+									<ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+										{{ props.row.bulkDensity }}
+									</ws-form-item>
+									<ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+										{{ props.row.jiaorenli }}
+									</ws-form-item>
+									<ws-form-item label="杂质(%)" span="1" prop="impurity">
+										{{ props.row.impurity }}
+									</ws-form-item>
+									<ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+										{{ props.row.mildewGrain }}
+									</ws-form-item>
+									<ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
+										{{ props.row.imperfectGrain }}
+									</ws-form-item>
+									<ws-form-item label="质检员" span="1" prop="qualityInspector">
+										{{ props.row.qualityInspector }}
+									</ws-form-item>
+									<ws-form-item label="扣重比" span="1" prop="buckleWeightRatio">
+										{{ props.row.buckleWeightRatio }}
+									</ws-form-item>
+									<ws-form-item label="干粮水分(%)" span="1" prop="solidGrainWater">
+										{{ props.row.solidGrainWater }}
+									</ws-form-item>
+								</ws-info-table>
+							</ws-form>
+						</template>
+					</el-table-column>
+				
+					<el-table-column type="index" label="序号">
+						
+						<template scope="scope">
+							<span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+							<span v-else>{{ scope.$index + 1 }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="binNumber" label="仓位号" width="60px"> </el-table-column>
+					<el-table-column prop="goodsName" label="货名" width="100"> </el-table-column>
+					<!-- <el-table-column prop="type" label="类型" width="60px"> </el-table-column> -->
+					<el-table-column prop="grossWeight" label="毛重(吨)" >
+						
+					</el-table-column>
+					<el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
+					<el-table-column prop="deductionWeight" label="扣重(吨)"> </el-table-column>
+					<el-table-column prop="netWeight" label="净重(吨)"></el-table-column>
+					<el-table-column prop="pureWeight" label="纯重(吨)"> </el-table-column>
+					<el-table-column prop="deductionAmount" label="扣款(元/吨)" width="100"> </el-table-column>
+					<el-table-column prop="grade" label="品级" width="80px">
+						<template slot-scope="scope">
+							<span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+                scope.row.grade
+              }}</span>
+							<span v-if="scope.row.grade == '二等品'" class="second-class">{{
+                scope.row.grade
+              }}</span>
+							<span v-if="scope.row.grade == '三等品'" class="third-class">{{
+                scope.row.grade
+              }}</span>
+							<span v-if="scope.row.grade == '等外'" class="substandard">{{
+                scope.row.grade
+              }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="inOutDate" label="出入库日期" width="100px">
+						<template slot-scope="scope">
+							<span style="color: #8890b1">{{ scope.row.inOutDate }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="inOutType" label="类型"> </el-table-column>
+					<el-table-column prop="contractNo" label="合同编号" width="180">
+						<template slot-scope="scope">
+							<span style="color: #8890b1">{{ scope.row.contractNo }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="carNo" label="车牌号">
+						<template slot-scope="scope">
+							<span style="color: #8890b1">{{ scope.row.carNo }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="boxNo" label="箱号-1">
+					</el-table-column>
+					<el-table-column prop="boxNoOther" label="箱号-2">
+					</el-table-column>
+					<el-table-column prop="titleNo" label="封号-1">
+					</el-table-column>
+					<el-table-column prop="titleNoOther" label="封号-2">
+					</el-table-column>
+					<el-table-column prop="wingNumber" label="车厢号-1">
+					</el-table-column>
+					<el-table-column prop="wingNumberOther" label="车厢号-2">
+					</el-table-column>
+					<el-table-column prop="agent" label="经办人">
+					</el-table-column>
+					<el-table-column prop="backOffice" label="操作人" width="120px">
+					</el-table-column>
+					<el-table-column prop="addressUrl" label="操作" width="100px">
+						<template slot-scope="scope">
+							<!-- <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+								src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" /> -->
+          					<el-button @click="print(scope.row)" v-if="scope.row.inOutType != '收购入库'&&scope.row.inOutType != '期初'"  v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button >
+
+						</template>
+					</el-table-column>
+					<el-table-column prop="createDate" label="录入时间">
+						<template slot-scope="scope">
+							<span style="color: #8890b1">{{ scope.row.createDate }}</span>
+						</template>
+					</el-table-column>
+
+				</el-table>
+				<el-table show-summary :summary-method="getSummaries" :data="warehouseList.records" height="560" v-show="this.warehouseType== '2'">
+					<el-table-column type="expand">
+						<template #default="props">
+							<ws-form ref="deptBudgetList" :model="deptBudgetList">
+								<ws-info-table>
+									<ws-form-item label="水分(%)" span="1" prop="waterContent">
+										{{ props.row.waterContent }}
+									</ws-form-item>
+									<ws-form-item label="容重(g/l)" span="1" prop="bulkDensity">
+										{{ props.row.bulkDensity }}
+									</ws-form-item>
+									<ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+										{{ props.row.jiaorenli }}
+									</ws-form-item>
+									<ws-form-item label="杂质(%)" span="1" prop="impurity">
+										{{ props.row.impurity }}
+									</ws-form-item>
+									<ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+										{{ props.row.mildewGrain }}
+									</ws-form-item>
+									<ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
+										{{ props.row.imperfectGrain }}
+									</ws-form-item>
+									<ws-form-item label="质检员" span="1" prop="qualityInspector">
+										{{ props.row.qualityInspector }}
+									</ws-form-item>
+								</ws-info-table>
+							</ws-form>
+						</template>
+					</el-table-column>
+					<el-table-column type="index" label="序号">
+						<template scope="scope">
+							<span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+							<span v-else>{{ scope.$index + 1 }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="goodsName" label="货名"> </el-table-column>
+					<el-table-column prop="grossWeight" label="毛重(吨)"></el-table-column>
+					<el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
+					<el-table-column prop="netWeight" label="净重(吨)"></el-table-column>
+					<el-table-column prop="grade" label="品级">
+						<template slot-scope="scope">
+							<span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+                scope.row.grade
+              }}</span>
+							<span v-if="scope.row.grade == '二等品'" class="second-class">{{
+                scope.row.grade
+              }}</span>
+							<span v-if="scope.row.grade == '三等品'" class="third-class">{{
+                scope.row.grade
+              }}</span>
+							<span v-if="scope.row.grade == '等外'" class="substandard">{{
+                scope.row.grade
+              }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="inOutDate" label="出入库日期">
+						<template slot-scope="scope">
+							<span style="color: #8890b1">{{ scope.row.inOutDate }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="inOutType" label="类型"> </el-table-column>
+					<el-table-column prop="contractNo" label="合同编号">
+						<template slot-scope="scope">
+							<span style="color: #8890b1">{{ scope.row.contractNo }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="carNo" label="车牌号">
+						<template slot-scope="scope">
+							<span style="color: #8890b1">{{ scope.row.carNo }}</span>
+						</template>
+					</el-table-column>
+					<el-table-column prop="agent" label="经办人">
+					</el-table-column>
+					<el-table-column prop="backOffice" label="操作人"> </el-table-column>
+					<el-table-column prop="addressUrl" label="附件">
+						<template slot-scope="scope">
+							<img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+								src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
+							<!-- <span v-if="scope.row.addressUrlArray.length > 0">{{
+                scope.row.addressUrlArray.length
+              }}</span> -->
+							<!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
+						</template>
+					</el-table-column>
+					<el-table-column prop="createDate" label="录入时间">
+						<template slot-scope="scope">
+							<span style="color: #8890b1">{{ scope.row.createDate }}</span>
+						</template>
+					</el-table-column>
+
+				</el-table>
+
+
+				<div style="text-align: center; padding: 10px">
+					    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-sizes="[10, 30, 50, 100,500,1000,9999]" layout="total, sizes, prev, pager, next, jumper"
+        :total="deptBudgetTotal"></el-pagination>
+				</div>
+			</ws-form>
+		</div>
+		<WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+			@on-cancel="handleClose">
+			<p>查看附件</p>
+			<el-image 
+    style="width: 100px; height: 100px"
+    :src="appendixIdss" 
+    :preview-src-list="srcList">
+  </el-image>
+		</WinseaContentModal>
+	</div>
+
+</template>
+
+
+<script>
+	import {
+		addselectinfoList,
+		recordss,
+		getPrintInfo,
+		getbinnumber
+	} from '@/model/warehouse/index'
+	import {
+		downloadFile
+	} from '@/utils/batchDown'
+	import Pagination from '@/components/Pagination'
+	import WsUpload from '@/components/WsUpload'
+	import {
+		dayjs,
+		fmoney,
+		EventBus
+	} from 'base-core-lib'
+	export default {
+		name: 'viewSpareMoney',
+		components: {
+			WsUpload,
+			Pagination,
+		},
+		watch: {
+			vesselId(val) {
+				this.getList()
+			},
+			isShow(val) {
+				this.showType = val
+			},
+		},
+		data() {
+			return {
+				//弹出框
+				dialogViewSpareMoney: false,
+				binnumberList:[],
+				// 船舶类型
+				monetaryKey: null,
+				// 是否显示
+				showType: true,
+				// 年
+				year: '',
+				srcList:[],
+				deptBudgetTotal: 0,
+				currentPage: 1,
+				pageSize: 10,
+				capacity: '',
+				searchKeyWord: '',
+				contractType: 2,
+				startDate: null,
+				endDate: null,
+				remark: '',
+				binNumber: '',
+				status: 1,
+				value2:[],
+				appendixIdss:'',
+				// 提交类型
+				submitType: true,
+				selectpackingMethod: {},
+				size: 10,
+				warehouseType: '1',
+				compId: localStorage.getItem('ws-pf_compId'),
+				deptCircularPage: {},
+				pcFlag: 1,
+				date: {
+					year: dayjs().format('YYYY'),
+					month: dayjs().format('MM'),
+				},
+				warehouseList: [],
+				deptBudgetList: {},
+				historyList: [],
+				searchType: '',
+				allurl: '../../../public/img/radio.png',
+				pickerBeginDateBefore: {
+					disabledDate: (time) => {
+						return time.getTime() > Date.now()
+					},
+				},
+				accessoryTFs: false,
+				modification:[],
+				printList:[],//批量打印数据
+			}
+		},
+
+		activated() {
+			this.deptBudgetList.baseId = this.$route.query.baseId
+			this.deptBudgetList.positionId = this.$route.query.positionId
+			this.deptBudgetList.warehouseName = this.$route.query.warehouseName
+			this.remark = this.$route.query.remark
+			this.binNumber = this.$route.query.binNumber
+			this.capacity = this.$route.query.capacity
+			this.warehouseType = this.$route.query.warehouseType
+			this.getList()
+            this.getPassYearFormatDate()
+			this.showType = this.isShow
+		},
+		updated() {
+			this.$nextTick(() => {
+			this.$refs['tableData'].doLayout();
+			})
+		},
+		methods: {
+			batchPrint(){
+				if(this.modification.length == 0 ){
+					this.$message.error("请勾选要打印的条目!")
+				}else{
+					localStorage.removeItem("warehouseBatchPrint")
+				var count = 0
+				for(var i = 0 ; i < this.modification.length ; i++){
+						getPrintInfo({
+                        id: this.modification[i].id
+                      })
+                        .toPromise()
+                        .then((response) => {
+							count++
+                           this.printList.push(response)
+						     if(count == this.modification.length){
+						   localStorage.setItem("warehouseBatchPrint", JSON.stringify(this.printList))
+						  window.open( '../../../../static/warehouseBatchPrint.html')
+					  }
+                     })
+				}
+				}
+				
+			},
+			   handleSelectionChange(val) {
+			this.modification = val
+			console.log("sfasa",this.modification)
+	     	},
+			selectInit(row){
+				 //在这里一定要记得类型匹配的上。
+				if (row.inOutType != '收购入库' && row.inOutType != '期初') {
+					return true
+				} else  {
+				return false
+				}
+			},
+			binNumberChange(e){
+				if(e=='全部仓位'){
+					this.deptBudgetList.positionId=''
+				}else{
+					for (let i = 0; i < this.binnumberList.length; i++) {
+						if(this.binnumberList[i].binNumber==e){
+							this.deptBudgetList.positionId=this.binnumberList[i].id
+						}
+					}
+				}
+				
+				this.getList()
+			},
+			//合计
+			getSummaries(param) {
+				const { columns, data } = param
+				const sums = []
+				columns.forEach((column, index) => {
+					if (index === 0) {
+						sums[index] = '合计'
+					} else if (
+						index === 4||
+						index === 5||
+						index === 6||
+						index === 7||
+						index === 8||
+						index === 9
+					) {
+						const values = data.map((item) => Number(item[column.property]))
+						if (!values.every((value) => isNaN(value))) {
+							sums[index] = values.reduce((prev, curr) => {
+								const value = Number(curr)
+								if (!isNaN(value)) {
+									return prev + curr
+								} else {
+									return prev
+								}
+								}, 0)
+							sums[index] = sums[index].toFixed(3)
+						}
+					} else {
+						sums[index] = '--'
+					}
+				})
+				return sums
+			},
+		getPassYearFormatDate () {
+          var nowDate = new Date()
+          nowDate.setTime(nowDate.getTime()-24*60*60*1000*30)
+          var seperator1 = '-'
+          var year = nowDate.getFullYear()
+          var month = nowDate.getMonth() + 1
+          var strDate = nowDate.getDate()
+          if (month >= 1 && month <= 9) {
+            month = '0' + month
+          }
+          if (strDate >= 0 && strDate <= 9) {
+            strDate = '0' + strDate
+          }
+          var formatDate = year + seperator1 + month + seperator1 + strDate
+          this.getNowFormatDate(formatDate)
+        },
+		/* 获取现在时间,并接受过去时间的值 */
+        getNowFormatDate (formatDate) {
+			var date = new Date()
+			date.setTime(date.getTime()+24*60*60*1000)
+			var seperator1 = '-'
+			var year = date.getFullYear()
+			var month = date.getMonth() + 1
+			var strDate = date.getDate()
+			if (month >= 1 && month <= 9) {
+				month = '0' + month
+			}
+			if (strDate >= 0 && strDate <= 9) {
+				strDate = '0' + strDate
+			}
+			var nowData = year + seperator1 + month + seperator1 + strDate
+			this.value2= [formatDate, nowData]  // 默认赋值一年时间
+   		 },
+			print(row){
+				sessionStorage.removeItem('record_print')
+				getPrintInfo({
+                        id: row.id
+                      })
+                        .toPromise()
+                        .then((response) => {
+                                     localStorage.setItem('ck_bd_printData',JSON.stringify(response))
+                         window.open('../../../../static/weightCheckInOut.html?type=2')
+                         
+                        })
+			},
+			//返回按钮
+			returnWarehouse() {
+				this.$router.push({
+					path: 'warehouseManagementList'
+				})
+				this.searchKeyWord = ''
+			},
+			//
+			iossrecord() {
+				this.$router.push({
+					path: 'warehouseManagementIossRecord',
+					query: {
+						baseId: this.deptBudgetList.baseId,
+						positionId: this.deptBudgetList.positionId,
+						warehouseName: this.deptBudgetList.warehouseName,
+						binNumber: this.binNumber,
+					},
+				})
+			},
+			dateFormat(fmt, date) {
+				let ret
+				const opt = {
+					'Y+': date.getFullYear().toString(), // 年
+					'm+': (date.getMonth() + 1).toString(), // 月
+					'd+': date.getDate().toString(), // 日
+					'H+': date.getHours().toString(), // 时
+					// "M+": date.getMinutes().toString(),         // 分
+					// "S+": date.getSeconds().toString()          // 秒
+					// 有其他格式化字符需求可以继续添加,必须转化成字符串
+				}
+				for (let k in opt) {
+					ret = new RegExp('(' + k + ')').exec(fmt)
+					if (ret) {
+						fmt = fmt.replace(
+							ret[1],
+							ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+						)
+					}
+				}
+				return fmt
+			},
+			datechange(){
+				this.getList()
+			},
+			find() {
+      			this.getList()
+    		},
+			handleClose() {
+				this.accessoryTFs = false
+			},
+			handleSizeChange(val) {
+				console.log(`每页 ${val} 条`)
+				this.pageSize = val
+				this.getList()
+			},
+			handleCurrentChange(val) {
+				this.currentPage = val
+				console.log(`当前页: ${val}`)
+				this.getList()
+			},
+			record(status, status1) {
+				this.status = status1
+				this.searchType = status
+				this.currentPage = '1'
+				this.getList()
+			},
+			// 上传附件
+			uploadSuccess(data, files, url) {
+				console.log(data, files, url)
+
+				// this.deptBudgetList.
+				// this.formData.append('files', files)
+				// this.feedbackObj.uploadNameAttachment = data.appendixName
+				// this.feedbackObj.pathUploadAttachment = data.appendixPath
+				// // this.newAppendixs = files
+				// this.onChangeFlag = true
+			},
+			getList() {
+					var startDate=''
+					var endDate=''
+					if(this.value2){
+					startDate=this.value2[0]?this.value2[0]:''
+					endDate=this.value2[1]?this.value2[1]:''
+				}
+				if (this.warehouseType == 1) {
+					getbinnumber({id: this.deptBudgetList.baseId}).toPromise()
+						.then((response) => {
+							
+							this.binnumberList = response.warehousePositionInfoList
+						})
+					addselectinfoList({
+							compId: localStorage.getItem('ws-pf_compId'),
+							baseId: this.deptBudgetList.baseId,
+							positionId: this.deptBudgetList.positionId,
+							warehouseName: this.deptBudgetList.warehouseName,
+							startDate:startDate,
+       					    endDate:endDate,
+							searchType: this.searchType,
+							searchKeyWord: this.searchKeyWord,
+							currentPage: this.currentPage,
+							pcFlag: this.pcFlag,
+							pageSize: this.pageSize
+						})
+						.toPromise()
+						.then((response) => {
+							for (var i = 0; i < response.records.length; i++) {
+								if (response.records[i].addressUrl != null) {
+									response.records[i].addressUrlArray = response.records[
+										i
+									].addressUrl.split(',')
+								} else {
+									response.records[i].addressUrlArray = []
+								}
+							}
+							this.deptCircularPage.currentPage = response.current
+							this.deptCircularPage.pageSize = response.size
+							this.deptBudgetTotal = response.total
+							this.warehouseList = response
+						})
+				} else if (this.warehouseType == 2) {
+					recordss({
+							compId: localStorage.getItem('ws-pf_compId'),
+							baseId: this.deptBudgetList.baseId,
+							positionId: this.deptBudgetList.positionId,
+							warehouseName: this.deptBudgetList.warehouseName,
+							startDate:startDate,
+       					    endDate:endDate,
+							searchType: this.searchType,
+							searchKeyWord: this.searchKeyWord,
+							currentPage: this.currentPage,
+							pageSize: this.pageSize,
+						})
+						.toPromise()
+						.then((response) => {
+							for (var i = 0; i < response.records.length; i++) {
+								if (response.records[i].addressUrl != null) {
+									response.records[i].addressUrlArray = response.records[
+										i
+									].addressUrl.split(',')
+								} else {
+									response.records[i].addressUrlArray = []
+								}
+							}
+							this.deptCircularPage.currentPage = response.current
+							this.deptCircularPage.pageSize = response.size
+							this.deptBudgetTotal = response.total
+							this.warehouseList = response
+						})
+				}
+
+			},
+			selecttaskType(e) {
+				for (var i = 0; i < this.taskTypeList.length; i++) {
+					if (this.taskTypeList[i].value == e) {
+						this.searchType = this.taskTypeList[i].type
+					}
+				}
+			},
+			fujian(row) {
+				if (
+					row.addressUrl === null ||
+					row.addressUrl === ''
+				) {
+					EventBus.$emit(
+						'warning',
+						this.$t('system.noticeCircular.NoInformation')
+					)
+				} else {
+					this.accessoryTFs = true
+				}
+				this.appendixIdss = row.addressUrl
+				this.srcList=[row.addressUrl]
+			},
+			// 关闭 dialog时 处理文件url 初始化upload组件
+			handleCloe() {
+				this.dialogViewSpareMoney = false
+			},
+			history(row) {
+				console.log(row)
+				billoperatehis({
+						id: row.id
+					})
+					.toPromise()
+					.then((response) => {
+						this.historyList = response
+					})
+			},
+			// async exportlist() {
+			//   const { data } = await export1(
+			//     {
+			//       compId: localStorage.getItem('ws-pf_compId'),
+			//       contractType: this.contractType,
+			//       currentPage: this.currentPage,
+			//       pageSize: this.pageSize,
+			//       searchType: this.searchType,
+			//       searchKeyWord: this.searchKeyWord,
+			//       startDate: this.startDate,
+			//       endDate: this.endDate,
+			//     },
+			//     {},
+			//     { responseType: 'blob' }
+			//   ).toPromise()
+			//   downloadFile({
+			//     res: data,
+			//     fileName: `${
+			//       this.date.year + (this.date.month ? `-${this.date.month}` : '')
+			//     }_采购合同`,
+			//     type: 'xls',
+			//   })
+			// },
+			// deletecontract(){},
+			//删除
+
+			approve() {},
+			listQuery() {},
+			total() {},
+			clearfiltQuery() {},
+			selectCrtDuty() {},
+		},
+	}
+</script>
+<style lang="scss" scoped>
+	/deep/.totalStorage .el-input__inner {
+		color: #afb5cb;
+		background: #f5f7fa;
+	}
+
+	.small-title {
+		position: relative;
+		padding: 10px;
+		font-weight: 600;
+	}
+
+	.small-title::before {
+		position: absolute;
+		content: '';
+		display: block;
+		background: #5473e8;
+		width: 4px;
+		height: 14px;
+		left: 0px;
+		top: 13px;
+	}
+
+	.position {
+		position: relative;
+	}
+
+	.add,
+	.del {
+		position: absolute;
+		right: -38px;
+		top: 9px;
+		cursor: pointer;
+	}
+
+	.del {
+		right: -70px;
+	}
+
+	.amap-page-container {
+		width: 300px;
+		height: 300px;
+	}
+
+	.ware {
+		font-size: 12px;
+		color: rgb(255, 255, 255);
+		padding: 3px;
+		position: relative;
+		top: -1px;
+		border-radius: 3px;
+		display: inline-block;
+		text-align: center;
+	}
+
+	.title {
+		position: relative;
+	}
+
+	.title::before {
+		content: '';
+		display: inline-block;
+		width: 5px;
+		height: 30px;
+		background: #5473e8;
+		position: absolute;
+		left: 0;
+	}
+
+	.ws-info-table {
+		border-left: 1px solid transparent;
+		border-top: 1px solid transparent;
+	}
+
+	.el-button--primary {
+		background-color: #5878e8;
+		border-color: #5878e8;
+	}
+
+	.adjustment.el-button--primary {
+		background-color: #51cdd9;
+		border-color: #51cdd9;
+	}
+
+	.el-col {
+		background: #f6f7fc;
+	}
+
+	.record {
+		background: #fff;
+		color: #8890b1;
+		border-color: #fff;
+		display: inline-block;
+		margin-bottom: 10px;
+		cursor: pointer;
+		margin-left: 5px;
+		margin-right: 5px;
+	}
+
+	.record img {
+		position: relative;
+		top: 2px;
+	}
+
+	.record.active img {
+		position: relative;
+		top: 4px;
+	}
+
+	.record.active {
+		color: #262626;
+	}
+
+	.button-container {
+		display: flex;
+		flex-wrap: nowrap;
+		justify-content: space-between;
+		align-items: center;
+		background-color: #fff;
+		width: 100%;
+		height: 50px;
+		padding: 0 10px;
+
+		&>div {
+			margin-left: 10px;
+			display: flex;
+			flex-wrap: nowrap;
+			flex-direction: row;
+
+			&>span {
+				line-height: 50px;
+			}
+		}
+
+		/deep/.auditFlow-box {
+			position: unset;
+			margin-left: 10px;
+
+			&/deep/.auditFlow-icon {
+				width: auto;
+				padding-right: 30px;
+			}
+
+			&/deep/.auditFlow-main {
+				position: absolute;
+			}
+		}
+	}
+
+	.box-app {
+		display: inline-block;
+		float: left;
+		margin-left: 30px;
+		line-height: 50px;
+	}
+
+	/deep/.el-dialog {
+		.el-form-item {
+			margin-bottom: 0 !important;
+
+			.el-input--medium {
+				textarea {
+					min-height: 100px !important;
+				}
+			}
+		}
+	}
+
+	.top-grade {
+		background: linear-gradient(90deg, #5678e9, #7993f6);
+		color: #fff;
+		padding: 3px;
+		border-radius: 2px;
+	}
+
+	.second-class {
+		background: linear-gradient(90deg, #50cdd9, #82e2ea);
+		color: #fff;
+		padding: 3px;
+		border-radius: 2px;
+	}
+
+	.third-class {
+		background: linear-gradient(90deg, #ffa735, #ffbf70);
+		color: #fff;
+		padding: 3px;
+		border-radius: 2px;
+	}
+
+	.substandard {
+		background: linear-gradient(90deg, #b2b4bb, #ced0d5);
+		color: #fff;
+		padding: 3px;
+		border-radius: 2px;
+	}
+
+	.collapse-bottom {
+		margin-bottom: 20px;
+	}
+
+	.input-main .textarea .el-textarea__inner {
+		width: 100%;
+		z-index: 1;
+	}
+
+	.bg-left {
+		padding-left: 30px;
+	}
+
+	.bg-right {
+		padding-right: 10px;
+		text-align: right;
+	}
+
+	.bg-bottom {
+		margin: 15px 0px;
+	}
+
+	.wenzi {
+		width: 900px;
+		margin: 0 auto;
+	}
+
+	.wenzi h3 {
+		display: inline-block;
+		left: 10px;
+	}
+
+	.wenzi p {
+		display: inline-block;
+	}
+
+	.center {
+		padding: 0 1%;
+	}
+
+	.el-form-item {
+		width: 50%;
+	}
+
+	.el-form-item__label {
+		text-align: center;
+	}
+
+	.ce {
+		width: 900px;
+		margin: 0 auto;
+	}
+
+	/*.crt-main .textarea /deep/ .el-form-item__label {*/
+	/*  height: 82px;*/
+	/*}*/
+	// 控制select为只读的时候显示样式
+
+	.hide-sel {
+		.el-input__inner {
+			border: 0px;
+		}
+
+		.el-icon-arrow-up {
+			display: none;
+		}
+
+		.el-textarea__inner {
+			background-color: #fff !important;
+			border: 0;
+		}
+
+		.el-date-editor {
+			i {
+				display: none;
+			}
+		}
+
+		.is-disabled {
+			.el-input__inner:hover {
+				background-color: #fff !important;
+				border: 0;
+			}
+
+			color: #606266;
+
+			.el-input__inner {
+				background-color: #fff !important;
+				border: 0;
+				color: #606266;
+			}
+
+			.el-textarea__inner {
+				background-color: #fff !important;
+				border: 0;
+				color: #606266;
+			}
+		}
+	}
+
+	// 控制select为只读的时候显示样式
+	/deep/.ws-class-table-col {
+		height: auto;
+		padding: 0px 2px;
+
+		/deep/.el-input__inner {
+			padding: 0px 2px;
+		}
+	}
+
+	/deep/.is-disabled {
+		.el-input__prefix,
+		.el-input__suffix {
+			display: none;
+		}
+
+		.el-input__inner {
+			background-color: #fff;
+			border-color: #fff !important;
+			color: #000 !important;
+			font-size: 14px;
+			cursor: text;
+			padding: 0 !important;
+		}
+	}
+
+	.winseaview-view {
+		padding: 0 0 20px;
+	}
+
+	.container {
+		overflow: scroll;
+		height: 93vh;
+	}
+
+	.el-textarea__inner {
+		display: none;
+	}
+
+	.readonly {
+		width: 16%;
+	}
+
+	.ws-info-table .el-form-item {
+		width: 14.28%;
+	}
+	.dataClass {
+       width: 20% !important;
+	}
+	.input {
+		width: 20% !important;
+	}
+
+
+	/deep/.ws-info-table .el-form-item .el-form-item__label {
+		background-color: #f6f7fc;
+		font-size: 12px;
+		height: 45px;
+	}
+
+	//去边框
+	/deep/.el-form-item {
+		border-right: 0px;
+		border-bottom: 0px;
+	}
+
+	/deep/.ws-info-table {
+		border-left: 0px;
+		border-top: 0px;
+	}
+
+	.ws-info-table .el-form-item .el-form-item__content {
+		border-right: 0px;
+		border-bottom: 0px;
+		border-left: 0px;
+		border-top: 0px;
+	}
+
+	/deep/.ws-info-table .el-form-item {
+		border-right: 0px;
+		border-bottom: 0px;
+		border-left: 0px;
+		border-top: 0px;
+	}
+
+	/deep/.ws-info-table .el-form-item .el-form-item__content {
+		background: #f5f7fa;
+		border-radius: 4px;
+		border: 1px solid #d8dce6;
+		font-family: PingFangSC-Regular, PingFang SC;
+		margin-bottom: 5px;
+		background-color: #fff;
+		font-size: 14px;
+		font-weight: 400;
+		color: #8890b1;
+		line-height: 16px;
+	}
+
+	/deep/.ws-info-table .el-form-item .el-form-item__content {
+		border: 0px;
+	}
+	/deep/.el-table td , /deep/.el-table .el-table__header .cell{
+		text-align: center;
+	}
+	.binNo{
+		color: #333;
+		font-size: 18px;
+		margin-left: 20px;
+	}
+</style>

+ 1936 - 0
src/views/warehousenew/warehouseManagementTare.vue

@@ -0,0 +1,1936 @@
+// 出库登记
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="20">
+        <h2 class="bg-left title">{{ information }}</h2>
+      </el-col>
+      <el-col :span="4" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="revert()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
+      <div class="basicInformation">
+        <h2>
+          {{ deptBudgetList.warehouseName }}
+          <span class="position" v-show="this.deptBudgetList.warehouseType == 1">
+            {{ deptBudgetList.binNumber }}仓位
+          </span>
+          <span v-show="this.deptBudgetList.warehouseType == 2">(临)</span>
+        </h2>
+        <div class="balance-row">
+          <BalanceAlert class="left" ref="weightChild" :deptBudgetList='deptBudgetList'
+            :information='information' v-on:balanceListen="setVal"></BalanceAlert>
+          <div class="top">
+            <!-- <div class="car-type">皮重</div> -->
+            <!-- <div class="weight">{{deptBudgetList.grossWeight}} <span class="kg-style">kg</span></div> -->
+              <div class="confirmInfo">
+              <div class="confirmWeight">确定重量</div>
+              <div class="weight">
+                {{ tare }} <span class="kg-style">kg</span>
+              </div>
+            </div>
+            <!-- <div class="weight">
+              {{ tare }} <span class="kg-style">kg</span>
+            </div> -->
+            <div class="confirmInfo">
+              <div class="confirmCarNo">车牌号</div>
+              <div class="car-no">{{ deptBudgetList.carNo }}</div>
+            </div>
+            <!-- <div class="car-no">{{ deptBudgetList.carNo }}</div> -->
+          </div>
+        </div>
+        <div class="small-title">基本信息</div>
+        <div class='flex'>
+          <div class='left' style='width:66.6666%;'>
+            <ws-info-table>
+              <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
+                <el-select filterable clearable v-model="deptBudgetList.inOutTaskNo" placeholder="请选择任务编号"
+                  class="typeselect" @change="contractNoChange">
+                  <el-option v-for="item in deptBudgetList1" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
+                    :value="item.inOutTaskNo" />
+                </el-select>
+              </ws-form-item>
+              <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
+                <ws-input :disabled="allowEdit" @input="grossWeightchange" v-model="deptBudgetList.grossWeight"
+                  type="number" @mousewheel.native.prevent placeholder="请输入毛重" maxlength="20" size="small" />
+                <el-button type="primary" v-if="information == '毛重检斤'" @click="openPort">重新获取</el-button>
+              </ws-form-item>
+              <ws-form-item label="合同编号" span="1" prop="contractNo">
+                <ws-select disabled v-model="deptBudgetList.contractNo" class="typeselect" @change="contractNoChange1">
+                  <ws-option v-for="item in outContractNo" :key="item.constKey" :label="item.contractNo"
+                    :value="item.contractNo" />
+                </ws-select>
+              </ws-form-item>
+              <ws-form-item label="皮重(公斤)" span="1" prop="tare" class="readonly">
+                <ws-input :disabled="allowEdit" @input="tarechange" v-model="deptBudgetList.tare" type="number"
+                  @mousewheel.native.prevent placeholder="请输入皮重" maxlength="100" size="small" />
+                <el-button type="primary" v-if="information == '皮重检斤'" @click="openPort">重新获取</el-button>
+              </ws-form-item>
+              <ws-form-item label="提示" span="1" prop="tips">
+                <ws-input onmouseover="this.title=this.value" v-model="deptBudgetList.tips" maxlength="20"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
+                <ws-input disabled v-model="deptBudgetList.netWeight" placeholder="不可编辑,自动计算" maxlength="120"
+                  size="small" />
+              </ws-form-item>
+              <ws-form-item label="货名" span="1">
+                <ws-select disabled v-model="deptBudgetList.goodsName" placeholder class="typeselect"
+                  @change="selectgoodsName">
+                  <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+              <ws-form-item label="出库日期" span="1" prop="inOutDate" class="deliverydate">
+                <ws-date-picker v-model="deptBudgetList.inOutDate" type="date" placeholder="请选择出库日期"
+                  value-format="yyyy-MM-dd" />
+              </ws-form-item>
+              <ws-form-item label="类型" span="1" prop="type">
+                <ws-select disabled v-model="deptBudgetList.type" @change="typeChange">
+                  <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
+                </ws-select>
+              </ws-form-item>
+
+              <ws-form-item label="出库类型" span="1">
+                <ws-input v-model="deptBudgetList.inOutType" class="right-bottom" :disabled="isSelectType"
+                  placeholder="暂无" />
+
+              </ws-form-item>
+              <ws-form-item v-if="deptBudgetList.type == '潮粮'" label="扣重比" span="1" prop="buckleWeightRatio"
+                class="readonly">
+                <ws-input @input="pureweight" v-model="deptBudgetList.buckleWeightRatio" type="number"
+                  @mousewheel.native.prevent placeholder="请输入扣重比" maxlength="100" size="small" />
+              </ws-form-item>
+              <!-- <ws-form-item
+            v-if="deptBudgetList.type == '潮粮'"
+            label="干粮水分占比"
+            span="1"
+            prop="solidGrainWater"
+            class="readonly"
+          >
+            <ws-input
+              @input="pureweight"
+              v-model="deptBudgetList.solidGrainWater"
+              type="number"
+              @mousewheel.native.prevent
+              placeholder="请输入干粮水分占比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            v-if="deptBudgetList.type == '潮粮'"
+            label="潮粮水分占比"
+            span="1"
+            prop="tidalGrainWater"
+            class="readonly"
+          >
+            <ws-input
+              @input="pureweight"
+              v-model="deptBudgetList.tidalGrainWater"
+              type="number"
+              @mousewheel.native.prevent
+              placeholder="请输入潮粮水分占比"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+          <ws-form-item
+            v-if="deptBudgetList.type == '潮粮'"
+            label="纯重"
+            span="1"
+            prop="pureWeight"
+            class="readonly"
+          >
+            <ws-input
+              disabled
+              v-model="deptBudgetList.pureWeight"
+              type="number"
+              @mousewheel.native.prevent
+              placeholder="不可编辑,自动计算"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item> -->
+
+              <ws-form-item label="品级" span="1" class="readonly">
+                <ws-select v-model="deptBudgetList.grade" placeholder="" class="typeselect"
+                  @change="selectpackingMethod">
+                  <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+                    :value="item.constValue" />
+                </ws-select>
+              </ws-form-item>
+
+              <ws-form-item label="经办人" span="1" prop="agent">
+                <el-select v-model="deptBudgetList.agent" placeholder="请选择经办人" filterable clearable
+                  @change="selectstaff">
+                  <el-option v-for="item in options" :key="item.value" :label="item.staffName"
+                    :value="item.staffName" />
+                </el-select>
+              </ws-form-item>
+            </ws-info-table>
+          </div>
+          <div class='right' style='width:33.3333%;'>
+            <ws-info-table>
+              <ws-form-item label="运输方式" span="1" prop="outType">
+                <el-select v-model="deptBudgetList.outType" placeholder="请选择运输方式">
+                  <el-option v-for="item in multiSelector" :key="item.value" :label="item.name" :value="item.name" />
+                </el-select>
+              </ws-form-item>
+
+              <ws-form-item label="车牌号" span="1" prop="carNo"
+                v-if="deptBudgetList.outType == '汽运' || deptBudgetList.outType == '集装箱船'">
+                <ws-input v-if="!carstatus || carjudge" v-model="deptBudgetList.carNo" placeholder="请输入车牌号"
+                  maxlength="7" size="small" />
+                <el-select v-else filterable clearable :filter-method="dataFilter2" v-model="deptBudgetList.carNo"
+                  placeholder="请选择车牌号" class="typeselect" @change="carChange">
+                  <el-option v-for="item in options2" :key="item.constKey"
+                    :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
+                </el-select>
+                <el-button type="primary" @click="carNoTypeChange" v-if="carstatus">{{carChange1}}</el-button>
+              </ws-form-item>
+
+              <ws-form-item label="车号" span="1" prop="carNo" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.carNo" placeholder="请输入车号" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
+              deptBudgetList.outType == '汽运' ||
+              deptBudgetList.outType == '集装箱船'
+            ">
+                <ws-input v-model="deptBudgetList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
+              deptBudgetList.outType == '汽运' ||
+              deptBudgetList.outType == '集装箱船'
+            ">
+                <ws-input v-model="deptBudgetList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
+              deptBudgetList.outType == '汽运' ||
+              deptBudgetList.outType == '集装箱船'
+            ">
+                <ws-input v-model="deptBudgetList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
+              deptBudgetList.outType == '汽运' ||
+              deptBudgetList.outType == '集装箱船'
+            ">
+                <ws-input v-model="deptBudgetList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="deptBudgetList.outType == '火运'">
+                <ws-input v-model="deptBudgetList.wingNumberOther" placeholder="请输入车厢号" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="船名" span="1" prop="shipName" v-if="deptBudgetList.outType == '散船'">
+                <ws-input v-model="deptBudgetList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
+              </ws-form-item>
+              <ws-form-item label="航次" span="1" prop="shipNumber" v-if="deptBudgetList.outType == '散船'">
+                <ws-input v-model="deptBudgetList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
+              </ws-form-item>
+            </ws-info-table>
+          </div>
+        </div>
+      </div>
+      <!-- <div class="small-title">上传磅单照片</div>
+      <el-upload
+            action="https://www.zthymaoyi.com/upload/admin"
+            :show-file-list="false"
+            :on-success="
+              (res) => {
+                uploadSuccessHandle1(res)
+              }
+            "
+            class="avatar-uploader"
+            accept=".jpg, .jpeg, .png, .gif"
+            ><el-button size="small" type="primary">点击上传</el-button>
+          </el-upload>
+          <div v-if='deptBudgetList.addressUrl!=""'>
+            <img style='width:100px;height:100px;' :src="deptBudgetList.addressUrl" alt="">
+          </div> -->
+      <div class="small-title">化验数据(选填)</div>
+      <div class="inspector">
+        <!--自检员-->
+        <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <ws-input
+            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+            placeholder="请输入质检员姓名"
+            maxlength="120"
+            size="small"
+          />
+        </ws-form-item> -->
+        <ws-form-item label="质检员" span="1" prop="qualityInspector">
+          <el-select v-model="deptBudgetList.warehouseInOutDetail.qualityInspector" placeholder="请选择质检员" filterable
+            clearable @change="qualityInspectorChange">
+            <el-option v-for="item in qualityInspectorList" :key="item.value" :label="item.staffName"
+              :value="item.staffName" />
+          </el-select>
+        </ws-form-item>
+      </div>
+      <div class="neifor">
+        <ws-info-table>
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)" span="1" prop="waterContent">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.waterContent" placeholder="请输入水分占比" maxlength="120"
+              type="number" @mousewheel.native.prevent size="small" />
+          </ws-form-item>
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)" span="1" prop="impurity">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.impurity" placeholder="请输入杂质占比" type="number"
+              @mousewheel.native.prevent maxlength="120" size="small" />
+          </ws-form-item>
+          <!--容重(克/升)>=-->
+          <ws-form-item label="容重(克/升)" span="1" prop="bulkDensity">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.bulkDensity" placeholder="请输入容重" type="number"
+              @mousewheel.native.prevent maxlength="120" size="small" />
+          </ws-form-item>
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)" span="1" prop="mildewGrain">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.mildewGrain" placeholder="请输入霉变粒占比" maxlength="120"
+              type="number" @mousewheel.native.prevent size="small" />
+          </ws-form-item>
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)" span="1" prop="jiaorenli">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.jiaorenli" placeholder="请输入热损伤占比" type="number"
+              @mousewheel.native.prevent maxlength="120" size="small" />
+          </ws-form-item>
+          <!--不完善粒(%)<=-->
+          <ws-form-item label="不完善粒(%)" span="1" prop="imperfectGrain">
+            <ws-input v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain" placeholder="请输入不完善粒占比" type="number"
+              @mousewheel.native.prevent maxlength="120" size="small" />
+          </ws-form-item>
+        </ws-info-table>
+      </div>
+      <div style="text-align: right; padding: 10px">
+        <el-button v-if="information == '皮重检斤'" class="bg-bottom-up" size="small" @click="temporaryStorage()">保存
+        </el-button>
+        <el-button v-if="!allowEdit" class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
+        <el-button v-if="!allowEdit" class="bg-bottom-up" type="primary" size="small" @click="print()">提交并打印</el-button>
+      </div>
+    </ws-form>
+  </div>
+</template>
+<script>
+  import {
+    pullDown,
+    addstorageputList,
+    goodsname,
+    xialaNo,
+    getstaff,
+    goodsnameXiala,
+    getReceiptTaskNo,
+  } from '@/model/warehouse/index'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import BalanceAlert from '@/components/balanceAlert'
+  // import { dayjs, fmoney, EventBus } from 'base-core-lib'
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+      BalanceAlert
+    },
+    watch: {
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        // isShowBalance: false,
+        deptBudgetList1: [],
+        isSelectType: true,
+        carstatus: false,
+        qualityInspectorList: [],
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        readonly: true,
+        // 年
+        year: '',
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 10,
+        searchType: 1,
+        searchKeyWord: '',
+        contractType: 2,
+        startDate: null,
+        endDate: null,
+        goodnameList: {},
+        // 提交类型
+        submitType: true,
+        deliveryType: [],
+        typeList: ['干粮', '潮粮'],
+        outContractNo: [],
+        appendixIdsAdd: '',
+        uploadSuccess: {},
+        gradeList: [],
+        agent: [],
+        staffList: [],
+        options: [],
+        value: '',
+        rules: {
+          netWeight: [{
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          }, ],
+        },
+        size: 10,
+        compId: localStorage.getItem('ws-pf_compId'),
+        skinInspector: localStorage.getItem('ws-pf_staffName'),
+        deptCircularPage: {},
+        packtypeList: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        contractList: [],
+        deptBudgetList: {
+          type: '干粮',
+          addressUrl: '',
+          warehouseInOutDetail: {},
+          grossWeight: '',
+          tare: '',
+          inOutDate: '',
+          selfLoading: "0",
+        },
+        weightbills: {},
+        historyList: [],
+
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+        allowEdit: true,
+        param: 9600,
+        information: '',
+        result1: '00',
+        multiSelector: [{
+            name: '汽运',
+            value: '0',
+          },
+          {
+            name: '火运',
+            value: '1',
+          },
+          {
+            name: '集装箱船',
+            value: '2',
+          },
+          {
+            name: '散船',
+            value: '3',
+          },
+        ],
+        tare: "0", //显示的皮重
+        carChange1: "手动填写",
+        carjudge: false,
+        options2: [],
+      }
+    },
+    mounted() {
+      let date = new Date()
+      var year = date.getFullYear()
+      var month = date.getMonth() + 1
+      var strDate = date.getDate()
+      this.deptBudgetList.inOutDate = year + '-' + month + '-' + strDate
+      this.information = this.$route.query.information
+      if (this.$route.query.allowEdit == 1) {
+        this.allowEdit = false
+      } else {
+        this.allowEdit = true
+      }
+      this.deptBudgetList.baseId = this.$route.query.baseId
+      this.deptBudgetList.positionId = this.$route.query.positionId
+      this.deptBudgetList.warehouseName = this.$route.query.warehouseName
+      this.deptBudgetList.binNumber = this.$route.query.binNumber
+      this.deptBudgetList.warehouseType = this.$route.query.warehouseType
+      this.deptBudgetList.warehouseId = this.$route.query.warehouseId
+      this.getList()
+      getReceiptTaskNo({
+          flag: 1,
+          warehouseName: this.deptBudgetList.warehouseName,
+          agentKey: localStorage.getItem('ws-pf_userId'),
+        })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList1 = response
+        })
+      // if (this.$route.query.automaticWeightAcquisition == '1') {
+      //   this.isShowBalance = true
+      // }
+    },
+    methods: {
+      //切换车牌号输入状态
+      carNoTypeChange() {
+        this.carjudge = !this.carjudge
+        if (!this.carjudge) {
+          this.deptBudgetList.selfLoading = "0"
+          this.carChange1 = "手动填写"
+        } else {
+          this.deptBudgetList.selfLoading = "1"
+          this.carChange1 = "识别下拉"
+        }
+      },
+      setVal(data) {
+        if (this.information == '毛重检斤') {
+          this.deptBudgetList.grossWeight = data
+        } else {
+          this.tare = data
+          this.deptBudgetList.tare = data
+        }
+      },
+      openPort() {
+        this.$refs.weightChild.openPort()
+      },
+      qualityInspectorChange(e) {
+        console.log(e)
+      },
+      uploadSuccessHandle1(res) {
+        this.deptBudgetList.addressUrl = res.url
+      },
+      //返回按钮
+      revert() {
+        this.$router.push({
+          path: 'warehouseManagementList',
+        })
+      },
+      carChange(e) {
+        for (let i = 0; i < this.tranCarInfoList.length; i++) {
+          if (this.tranCarInfoList[i].carNo == this.deptBudgetList.carNo) {
+            this.deptBudgetList.tranCarNo = this.tranCarInfoList[i].tranCarNo
+            this.deptBudgetList.carId = this.tranCarInfoList[i].id
+          }
+        }
+      },
+      print() {
+        this.submit(1)
+      },
+      typeChange(e) {},
+      contractNoChange(e) {
+        for (let i = 0; i < this.deptBudgetList1.length; i++) {
+          if (this.deptBudgetList1[i].inOutTaskNo == e) {
+            var data = this.deptBudgetList1[i]
+            if (this.deptBudgetList1[i].contractNo) {
+              this.deptBudgetList.contractNo = this.deptBudgetList1[i].contractNo
+            } else {
+              this.deptBudgetList.contractNo = this.deptBudgetList1[i].moveTaskNo
+            }
+          }
+        }
+        if (!data) return
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (
+            this.outContractNo[i].contractNo == this.deptBudgetList.contractNo
+          ) {
+            this.weightbills.goodsName = this.outContractNo[i].goodsName
+            this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+            if (this.deptBudgetList.goodsName == '玉米(潮粮)') {
+              this.deptBudgetList.type = '潮粮'
+            } else {
+              this.deptBudgetList.type = '干粮'
+            }
+            this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            this.deptBudgetList.grade = this.outContractNo[i].grade
+            this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+            if (this.outContractNo[i].inOutType == '销售出库') {
+              this.weightbills.buyer = this.outContractNo[i].buyer
+              this.weightbills.seller = localStorage.getItem('ws-pf_compName')
+              if (!this.outContractNo[i].unitContractPrice) {
+                this.deptBudgetList.tips =
+                  '买方' +
+                  this.outContractNo[i].buyer
+              } else {
+                this.deptBudgetList.tips =
+                  '买方' +
+                  this.outContractNo[i].buyer +
+                  '( ' +
+                  this.outContractNo[i].unitContractPrice +
+                  '元/吨)'
+              }
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+
+              this.weightbills.buyer = this.outContractNo[i].receiveWarehouse
+              this.weightbills.seller = this.outContractNo[i].sendWarehouse
+              this.deptBudgetList.goodsName = data.goodsName
+              this.deptBudgetList.goodsNameKey = data.goodsNameKey
+              this.deptBudgetList.grade = data.grade
+              if (this.outContractNo[i].unitContractPrice) {
+                this.deptBudgetList.tips =
+                  '入货库' +
+                  data.receiveWarehouse +
+                  '( ' +
+                  this.outContractNo[i].unitContractPrice +
+                  '元/吨)'
+              } else {
+                this.deptBudgetList.tips = '入货库' + data.receiveWarehouse
+              }
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.outContractNo[i].inOutType == '采购出库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+            if (this.outContractNo[i].deliverType == '1') {
+              this.carstatus = true
+            } else {
+              this.carstatus = false
+            }
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              this.carstatus = true
+            }
+          }
+        }
+      },
+      contractNoChange1(e) {
+        for (var i = 0; i < this.outContractNo.length; i++) {
+          if (this.outContractNo[i].contractNo == e) {
+            if (this.outContractNo[i].inOutType == '销售出库') {
+              this.deptBudgetList.inOutTypeKey = 1
+            } else if (this.outContractNo[i].inOutType == '移库出库') {
+              this.deptBudgetList.inOutTypeKey = 3
+            } else if (this.outContractNo[i].inOutType == '暂存入库') {
+              this.deptBudgetList.inOutTypeKey = 4
+            } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
+              this.deptBudgetList.inOutTypeKey = 5
+            } else if (this.outContractNo[i].inOutType == '采购出库') {
+              this.deptBudgetList.inOutTypeKey = 6
+            }
+            this.deptBudgetList.goodsName = this.outContractNo[i].goodsName
+            this.deptBudgetList.goodsNameKey = this.outContractNo[i].goodsNameKey
+            this.deptBudgetList.grade = this.outContractNo[i].grade
+            this.deptBudgetList.inOutType = this.outContractNo[i].inOutType
+            if (this.outContractNo[i].tranCarInfoList) {
+              this.options2 = this.outContractNo[i].tranCarInfoList
+              this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
+              this.carstatus = true
+            }
+          }
+        }
+      },
+      dataFilter2(val) {
+        this.deptBudgetList.carNo = val
+        if (val) {
+          //val存在
+          this.options1 = this.outContractNo1.filter((item) => {
+            if (
+              !!~item.carNo.indexOf(val) ||
+              !!~item.carNo.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options2 = this.tranCarInfoList
+        }
+      },
+      dataFilter(val) {
+        // console.log(val,"名")
+        this.deptBudgetList.staffList = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      pureweight(e) {
+        if (
+          this.deptBudgetList.netWeight &&
+          this.deptBudgetList.tidalGrainWater &&
+          this.deptBudgetList.solidGrainWater &&
+          this.deptBudgetList.buckleWeightRatio
+        ) {
+          this.deptBudgetList.pureWeight =
+            (this.deptBudgetList.netWeight *
+              (100 -
+                (this.deptBudgetList.tidalGrainWater -
+                  this.deptBudgetList.solidGrainWater) *
+                this.deptBudgetList.buckleWeightRatio)) /
+            100
+        }
+      },
+      temporaryStorage() {
+        if (!this.deptBudgetList.goodsName) {
+          this.$message({
+            message: '货名不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.information == '毛重检斤' && !this.deptBudgetList.grossWeight) {
+          this.$message({
+            message: '毛重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.information == '毛重检斤' &&
+          (this.deptBudgetList.grossWeight <= 0 ||
+            this.deptBudgetList.grossWeight > 200000 ||
+            (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+              String(this.deptBudgetList.grossWeight).length -
+              (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+              3))
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.information == '皮重检斤' && !this.deptBudgetList.tare) {
+          this.$message({
+            message: '皮重不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.information == '皮重检斤' &&
+          (this.deptBudgetList.tare < 0 ||
+            this.deptBudgetList.tare > 200000 ||
+            (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+              String(this.deptBudgetList.tare).length -
+              (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+              3))
+        ) {
+          this.$message({
+            message: '皮重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        // if (this.deptBudgetList.carNo.length > 7) {
+        //   this.$message({
+        //     message: '车牌号输入错误,请输入7个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        // if (
+        //   this.deptBudgetList.contractNo.length < 6 ||
+        //   this.deptBudgetList.contractNo.length > 20
+        // ) {
+        //   this.$message({
+        //     message: '合同编号长度不符合要求,请输入6-20个字符之内',
+        //     type: 'warning',
+        //   })
+        //   return
+        // }
+        //自检员
+        if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.waterContent < 0 ||
+            this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.waterContent
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //杂质
+        if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.impurity < 0 ||
+            this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.impurity
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //霉变
+        if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain < 0 ||
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.mildewGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //热损伤
+        if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli < 0 ||
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.jiaorenli
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //不完善粒(%)
+        if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 0 ||
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
+              String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.bulkDensity
+                ).indexOf('.') +
+                1) >
+              2) ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+          ) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        this.$confirm(`是否保存皮重检斤`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          })
+          .then(() => {
+            this.$refs.deptBudgetList.validate((valid) => {
+              if (valid) {
+                this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
+                this.deptBudgetList.skinInspector =
+                  localStorage.getItem('ws-pf_staffName')
+                this.deptBudgetList.inOutFlag = 1
+                this.deptBudgetList.pcFlag = 1
+                this.deptBudgetList.statusFlag = 1
+                this.deptBudgetList.grossWeight /= 1000
+                this.deptBudgetList.tare /= 1000
+                if (this.deptBudgetList.netWeight) {
+                  this.deptBudgetList.netWeight = Number(
+                    this.deptBudgetList.netWeight
+                  ).toFixed(2)
+                }
+                this.deptBudgetList.pureWeight /= 1000
+                addstorageputList(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                    if (this.reader) {
+                      this.reader.cancel()
+                    }
+                    this.$message.success('保存成功')
+                    this.$router.push({
+                      path: 'warehouseManagementList',
+                    })
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      //提交按钮
+      submit(status) {
+        if (!this.deptBudgetList.goodsName) {
+          this.$message({
+            message: '货名不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.grossWeight) {
+          this.$message({
+            message: '毛重不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.grossWeight <= 0 ||
+          this.deptBudgetList.grossWeight > 5000000 ||
+          (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '毛重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.tare) {
+          this.$message({
+            message: '皮重不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.tare < 0 ||
+          this.deptBudgetList.tare > 500000 ||
+          (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+            String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+        ) {
+          this.$message({
+            message: '皮重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.netWeight) {
+          this.$message({
+            message: '净重不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.netWeight <= 0 ||
+          this.deptBudgetList.netWeight >= 5000000
+        ) {
+          this.$message({
+            message: '净重输入错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.grade) {
+          this.$message({
+            message: '品级不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.buckleWeightRatio
+        ) {
+          this.$message({
+            message: '扣重比不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.buckleWeightRatio < 0) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.buckleWeightRatio > 3) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.buckleWeightRatio).indexOf('.') != -1 &&
+            String(this.deptBudgetList.buckleWeightRatio).length -
+            (String(this.deptBudgetList.buckleWeightRatio).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '扣重比输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.tidalGrainWater
+        ) {
+          this.$message({
+            message: '潮粮水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.tidalGrainWater < 1) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.tidalGrainWater > 40) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.tidalGrainWater).indexOf('.') != -1 &&
+            String(this.deptBudgetList.tidalGrainWater).length -
+            (String(this.deptBudgetList.tidalGrainWater).indexOf('.') + 1) >
+            2)
+        ) {
+          this.$message({
+            message: '潮粮水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.type == '潮粮' &&
+          !this.deptBudgetList.solidGrainWater
+        ) {
+          this.$message({
+            message: '干粮水分不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.solidGrainWater < 1) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            this.deptBudgetList.solidGrainWater > 40) ||
+          (this.deptBudgetList.type == '潮粮' &&
+            String(this.deptBudgetList.solidGrainWater).indexOf('.') != -1 &&
+            String(this.deptBudgetList.solidGrainWater).length -
+            (String(this.deptBudgetList.solidGrainWater).indexOf('.') + 1) >
+            1)
+        ) {
+          this.$message({
+            message: '干粮水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+
+        if (!this.deptBudgetList.agent) {
+          this.$message({
+            message: '经办人不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.agent.length < 2 ||
+          this.deptBudgetList.agent.length > 10
+        ) {
+          this.$message({
+            message: '经办人姓名输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.inOutDate) {
+          this.$message({
+            message: '出库日期不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.inOutType) {
+          this.$message({
+            message: '出库类型不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.boxNo && this.deptBudgetList.boxNo.length > 20) {
+          this.$message({
+            message: '箱号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.boxNoOther &&
+          this.deptBudgetList.boxNoOther.length > 20
+        ) {
+          this.$message({
+            message: '箱号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.titleNo &&
+          this.deptBudgetList.titleNo.length > 20
+        ) {
+          this.$message({
+            message: '封号-1输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.titleNoOther &&
+          this.deptBudgetList.titleNoOther.length > 20
+        ) {
+          this.$message({
+            message: '封号-2输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractNo.length < 6 ||
+          this.deptBudgetList.contractNo.length > 50
+        ) {
+          this.$message({
+            message: '合同编号输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        //自检员
+        if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+          if (
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+            this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+          ) {
+            this.$message({
+              message: '质检员姓名长度错误!',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+            this.$message({
+              message: '水分(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.waterContent < 0 ||
+            this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.waterContent
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '水分(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //杂质
+        if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+            this.$message({
+              message: '杂质(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.impurity < 0 ||
+            this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.impurity
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '杂质(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //霉变
+        if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+            this.$message({
+              message: '霉变粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain < 0 ||
+            this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.mildewGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.mildewGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '霉变粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //热损伤
+        if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+            this.$message({
+              message: '热损伤(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli < 0 ||
+            this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+            (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+                '.'
+              ) != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.jiaorenli
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '热损伤(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+
+        //不完善粒(%)
+        if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+            this.$message({
+              message: '不完善粒(%)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 0 ||
+            this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+            (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+                ).indexOf('.') +
+                1) >
+              2)
+          ) {
+            this.$message({
+              message: '不完善粒(%)输入错误! 取值范围0-40之间且可以保留2小数',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        //容重
+        if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+          if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+            this.$message({
+              message: '容重(克/升)非数字!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            (this.deptBudgetList.warehouseInOutDetail.bulkDensity &&
+              String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') != -1 &&
+              String(this.deptBudgetList.warehouseInOutDetail.bulkDensity)
+              .length -
+              (String(
+                  this.deptBudgetList.warehouseInOutDetail.bulkDensity
+                ).indexOf('.') +
+                1) >
+              2) ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity > 1000 ||
+            this.deptBudgetList.warehouseInOutDetail.bulkDensity < 0
+          ) {
+            this.$message({
+              message: '容重输入错误',
+              type: 'warning',
+            })
+            return
+          }
+        }
+        if (!this.carstatus) { //若自运的合同该字段置空
+          this.deptBudgetList.selfLoading = ""
+        }
+        this.$confirm(`确定提交出库信息`, {
+          cancelButtonText: '取消',
+          confirmButtonText: '确定',
+          type: 'warning',
+        }).then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.grossWeight /= 1000
+              this.deptBudgetList.tare /= 1000
+              this.deptBudgetList.netWeight /= 1000
+              this.deptBudgetList.pureWeight /= 1000
+              this.deptBudgetList.deductionAmount *= 1000
+              this.deptBudgetList.deductionWeight /= 1000
+              this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
+              this.deptBudgetList.skinInspector =
+                localStorage.getItem('ws-pf_staffName')
+              this.deptBudgetList.inOutFlag = 1
+              this.deptBudgetList.statusFlag = 3
+              addstorageputList(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  if (this.reader) {
+                    this.reader.cancel()
+                  }
+                  this.$message.success('添加成功')
+                  if (status) {
+                    this.weightbills.carNo = this.deptBudgetList.carNo
+                    this.weightbills.boxNo = this.deptBudgetList.boxNo
+                    this.weightbills.boxNoOther = this.deptBudgetList.boxNoOther
+                    this.weightbills.wingNumber = this.deptBudgetList.wingNumber
+                    this.weightbills.wingNumberOther = this.deptBudgetList.wingNumberOther
+                    this.weightbills.shipName = this.deptBudgetList.shipName
+                    this.weightbills.shipNumber = this.deptBudgetList.shipNumber
+                    this.weightbills.type = this.deptBudgetList.type
+                    this.weightbills.grossWeight = this.deptBudgetList.grossWeight
+                    this.weightbills.tare = this.deptBudgetList.tare
+                    this.weightbills.netWeight = this.deptBudgetList.netWeight
+                    this.weightbills.outType = this.deptBudgetList.outType
+                    this.weightbills.backOffice = this.deptBudgetList.outType
+
+                    var date = new Date()
+                    this.weightbills.updateDate = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' +
+                      date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date
+                      .getSeconds()
+                       localStorage.setItem('ck_bd_printData1',JSON.stringify(this.weightbills))
+                      window.open('../../../../static/weightCheckOut.html?type=2')
+                    // window.open('../../../../static/weightCheckOut.html?type=2&tableData=' +
+                    //   encodeURIComponent(JSON.stringify(this.weightbills)))
+                  }
+                  this.$router.push({
+                    path: 'warehouseManagementList',
+                  })
+                })
+                .catch((response) => {
+                  this.deptBudgetList.grossWeight = Math.round(
+                    this.deptBudgetList.grossWeight * 1000
+                  )
+                  this.deptBudgetList.tare = Math.round(
+                    this.deptBudgetList.tare * 1000
+                  )
+                  this.deptBudgetList.netWeight = Math.round(
+                    this.deptBudgetList.netWeight * 1000
+                  )
+                  this.deptBudgetList.pureWeight = Math.round(
+                    this.deptBudgetList.pureWeight * 1000
+                  )
+                  this.deptBudgetList.deductionAmount = Math.round(
+                    this.deptBudgetList.deductionAmount / 1000
+                  )
+                  this.deptBudgetList.deductionWeight = Math.round(
+                    this.deptBudgetList.deductionWeight * 1000
+                  )
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+      },
+      tarechange(e) {
+        this.tare = this.deptBudgetList.tare 
+        if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+          this.deptBudgetList.netWeight = Number(
+            this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+          ).toFixed(2)
+        }
+      },
+      grossWeightchange(e) {
+        if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
+          this.deptBudgetList.netWeight = Number(
+            this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+          ).toFixed(2)
+        }
+      },
+      selectgoodsName(e) {
+        for (var i = 0; i < this.goodnameList.length; i++) {
+          if (this.goodnameList[i].goodsName == e) {
+            this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
+            if (e == '玉米(潮粮)') {
+              this.deptBudgetList.type = '潮粮'
+            } else {
+              this.deptBudgetList.type = '干粮'
+            }
+          }
+        }
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+          }
+        }
+      },
+      selectstorageType(e) {
+        for (var i = 0; i < this.deliveryType.length; i++) {
+          if (this.deliveryType[i].constValue == e) {
+            this.deptBudgetList.inOutTypeKey = this.deliveryType[i].constKey
+          }
+        }
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      getList() {
+        // 品级
+        pullDown({
+            constId: 'CON3',
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+
+        // 类型
+        if (this.deptBudgetList.warehouseType == 1) {
+          // 货名
+          goodsname({
+              positionId: this.$route.query.positionId,
+            })
+            .toPromise()
+            .then((response) => {
+              this.goodnameList = response
+            })
+          //类型
+          pullDown({
+              constId: 'CON6',
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        } else if (this.deptBudgetList.warehouseType == 2) {
+          goodsnameXiala({
+              baseId: this.deptBudgetList.warehouseId,
+            })
+            .toPromise()
+            .then((response) => {
+              this.goodnameList = response
+            })
+          pullDown({
+              constId: 'WARE2',
+            })
+            .toPromise()
+            .then((response) => {
+              this.deliveryType = response
+            })
+        }
+        //合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 5,
+          })
+          .toPromise()
+          .then((response) => {
+            this.outContractNo = response
+          })
+        //经办人
+        getstaff({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseId: this.deptBudgetList.baseId,
+          })
+          .toPromise()
+          .then((response) => {
+            // this.agent = response
+            this.qualityInspectorList = response
+            this.options = response
+            this.staffList = response
+          })
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+      },
+      fujian(row) {
+        if (
+          row.receiveAttachmentPath === null ||
+          row.receiveAttachmentPath === ''
+        ) {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
+        } else {
+          this.accessoryTFs = true
+        }
+        this.appendixIdss = row.receiveAttachmentPath
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id,
+          },
+        })
+      },
+      //删除
+      approve() {},
+      listQuery() {},
+      total() {},
+      clearfiltQuery() {},
+      selectCrtDuty() {},
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  /deep/.basicInformation {
+    .ws-info-table {
+      border: none;
+    }
+
+    .left {
+      .el-form-item {
+        width: 50%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
+    }
+
+    .right {
+      .el-form-item {
+        width: 100%;
+        // width: 33.3333%;
+        border: none;
+
+        .el-form-item__label {
+          background: transparent;
+          border: none;
+        }
+
+        .el-form-item__content {
+          border: none;
+        }
+      }
+    }
+
+  }
+
+  .el-button--default {
+    color: #5473e8;
+    border-color: #5473e8;
+  }
+
+  .title {
+    position: relative;
+    padding-left: 10px;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-form {
+    padding: 0 10%;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .center {
+    position: relative;
+    top: 50px;
+    width: 40%;
+    height: 2000px;
+    margin: 0 auto;
+  }
+
+  //选填
+  /deep/.el-form-item {
+    width: 50%;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: center;
+  }
+
+  .deliverydate {
+    display: inline-block;
+    width: 10%;
+  }
+
+  .center {
+    margin-top: -60px;
+    width: 80%;
+  }
+
+  //仓位
+  .position {
+    background: #afb5cb;
+    border-radius: 2px;
+    font-size: 12px;
+    color: #ffffff;
+    line-height: 20px;
+    padding: 2px 4px;
+    position: relative;
+    top: -2px;
+  }
+
+  .neifor /deep/.ws-info-table .el-form-item .el-form-item__label {
+    background: #f6f7fc;
+  }
+
+  .neifor .ws-info-table {
+    border-left: 1px solid #cdd2dc;
+    border-top: 1px solid #cdd2dc;
+  }
+
+  .neifor .ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  .inspector /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 59px;
+  }
+
+  //表格文字
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    text-align: center;
+    font-size: 14px;
+    font-family: PingFangSC-Regular, PingFang SC;
+    font-weight: 400;
+    color: #8890b1;
+    line-height: 16px;
+  }
+
+  .inspector {
+    width: 50%;
+  }
+
+  //质检员
+  .inspector .el-form-item__content {
+    text-align: left;
+    margin-left: 0px;
+  }
+
+  .small-title {
+    position: relative;
+    padding: 10px;
+    font-weight: 600;
+  }
+
+  .small-title::before {
+    position: absolute;
+    content: '';
+    display: block;
+    background: #5473e8;
+    width: 4px;
+    height: 14px;
+    left: 0px;
+    top: 13px;
+  }
+
+
+
+  .weight {
+    font-size: 68px;
+  }
+
+  //下面列表
+  .neifor {
+    width: 80%;
+    background-color: #f6f7fc;
+  }
+
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
+    width: 35%;
+    text-align: center;
+  }
+
+  /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
+    width: 60%;
+    background-color: #f6f7fc;
+  }
+
+  /deep/.neifor .el-input--small .el-input__inner {
+    width: 100%;
+  }
+
+  .balance-row {
+    display: flex;
+    margin: 20px 0 0 0;
+    position: relative;
+    .left {
+     
+      width: 90%;
+    }
+      .top {
+    position: absolute;
+    top: 125px;
+    width: 87%;
+    background: black;
+    color: #2aff7c;
+    font-size: 32px;
+    text-align: right;
+    // padding: 20px;
+    border-radius: 10px;
+    margin: 0 20px 20px 40px;
+
+    .car-type {
+      text-align: left;
+    }
+    .confirmInfo {
+      display: flex;
+
+      .confirmWeight {
+        width: 50%;
+        text-align: left;
+        line-height: 90px;
+      }
+      .weight {
+        font-size: 68px;
+        width: 50%;
+        text-align: right;
+      }
+      .confirmCarNo {
+        width: 50%;
+        text-align: left;
+      }
+      .car-no {
+        width: 50%;
+        text-align: right;
+      }
+    }
+
+    .kg-style {
+      font-size: 30px;
+    }
+  }
+  }
+</style>

+ 775 - 0
src/views/warehousenew/warehouselocation.vue

@@ -0,0 +1,775 @@
+<!--库点费用-->
+<template>
+  <div>
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">库点费用</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <el-row class="top-row">
+      <div class='left'>
+        <ws-button class="find" type="primary" @click="addlist()"
+          v-hasPermission="`warehouseManagement.costControl.delete`">添加</ws-button>
+        <div class='left'>
+          <div :class='{"forbidden":forbidden==true}' @click='minus'><i class="el-icon-arrow-left"></i></div>
+          <ws-select v-model="year" placeholder="" @change="yearChange" :value="searchType" style="margin: 0 10px">
+            <ws-option v-for="item in yearList" :key="item.value" :label="item.value" :value="item.value"
+              style="color: #8890b1" />
+          </ws-select>
+          <div :class='{"forbidden":forbidden1==true}' @click='add'><i class="el-icon-arrow-right"></i></div>
+        </div>
+        <span v-if='deptBudgetTotal>0'>合计:{{count}}元</span>
+      </div>
+      <div class="top-row2">
+        <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
+          style="margin: 0 10px">
+          <ws-option v-for="item in warehouseList1" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            " src="../../../public/img/sousuo.png" alt="" /></ws-button>
+      </div>
+    </el-row>
+    <el-table class="wenzi" :data="warehouseList.records" style="width: 100%; margin-top: 20px" height="780">
+      <el-table-column label="序号" type="index" show-overflow-tooltip width="50">
+      </el-table-column>
+      <el-table-column prop="expenseName" label="费用名称">
+      </el-table-column>
+      <el-table-column prop="amount" label="金额(元)">
+      </el-table-column>
+      <el-table-column prop="storage" label="附件">
+        <template slot-scope="scope">
+          <img v-if='scope.row.applUrl' width="18" height="20"
+            style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/fujian.png"
+            @click="fujian(scope.row)" alt="" />
+          <span v-else>暂无附件</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="costDate" label="日期">
+      </el-table-column>
+      <el-table-column prop="applicant " label="申请人">
+      </el-table-column>
+
+      <el-table-column prop="address" label="操作" width="200">
+        <template slot-scope="scope">
+          <div class="adjustment" v-hasPermission="
+           `warehouseManagement.costControl.audit`
+          " @click="editlist(scope.row)">编辑</div>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+      :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+    </el-pagination>
+    <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
+      @on-cancel="handleClose">
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+
+    </WinseaContentModal>
+    <el-dialog :title="dialogtitle" :visible.sync="addvisible">
+      <el-form label-width="140px" label-position='right'>
+        <el-form-item label="费用名称">
+          <el-input v-model="expenseName" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="金额">
+          <el-input v-model="amount" autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="申请人">
+          <el-input v-model="applicant " autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="付款截图">
+          <ws-upload ref="upload" :comp-id="compId" :appendix-ids="applUrl" :size-limit="size" :limit='limit'
+            @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="addvisible = false">取 消</el-button>
+        <el-button type="primary" @click="addInventory">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    getinventory,
+    addinventory,
+    editinventory,
+    getwarehousebase,
+    editcost,
+    export1,
+    editstatus,
+    billoperatehis,
+    clearancee,
+  } from '@/model/warehouse/index'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import Pagination from '@/components/Pagination'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    EventBus
+  } from 'base-core-lib'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      Pagination,
+    },
+    watch: {
+      vesselId(val) {
+        this.getList()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        currectPage: 1,
+        pageSize: 10,
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        expenseName: '',
+        yearList: [],
+        dialogtitle: '',
+        appendixIdss: [],
+        amount: '',
+        applUrl: '',
+        price: '',
+        costDate: '',
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+
+        searchType: 1,
+        searchTypeText: '未完成',
+        searchKeyWord: '',
+        contractType: 2,
+        currentPage: 1,
+        warehouseType: '1',
+        // 提交类型
+        submitType: true,
+        size: 10,
+        limit: 1,
+        spanArr: [],
+        id: 0,
+        warehouseName: '',
+        warehouseId: '',
+        start: 2021,
+        forbidden: false,
+        forbidden1: false,
+        addvisible: false,
+        compId: localStorage.getItem('ws-pf_compId'),
+        deptCircularPage: {},
+        warehouseList: [],
+        warehouseList1: [],
+        deptBudgetList: {},
+        historyList: [],
+        count: 0,
+        applicant: '',
+        deptBudgetTotal: 0,
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        accessoryTFs: false,
+      }
+    },
+    activated() {
+      this.yearList = []
+      this.cangid = this.$route.query.cangId
+      this.year = new Date().getFullYear()
+      for (var i = this.start; i <= this.year; i++) {
+        this.yearList.push({
+          value: i
+        })
+      }
+      if (this.year >= new Date().getFullYear()) {
+        this.forbidden1 = true
+      }
+      if (this.year <= this.start) {
+        this.forbidden = true
+      }
+      this.selectWarehouse()
+      // this.getList()
+
+      this.showType = this.isShow
+    },
+    mounted() {
+
+    },
+    methods: {
+      returnsales() {
+        this.$router.go(-1)
+      },
+      fujian(row) {
+        if (row.applUrl === null || row.applUrl === '') {
+          EventBus.$emit(
+            'warning',
+            this.$t('system.noticeCircular.NoInformation')
+          )
+        }
+        this.appendixIdss = row.applUrl
+        this.accessoryTFs = true
+      },
+      uploadSuccessHandle(e) {
+        this.applUrl = e.url
+      },
+      counttotal() {
+        this.count = 0
+        for (let i = 0; i < this.warehouseList.records.length; i++) {
+          this.count += this.warehouseList.records[i].amount
+        }
+      },
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.applUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      minus() {
+
+        if (this.year <= this.start) {
+          this.forbidden = true
+        } else {
+          this.year--
+        }
+      },
+      add() {
+
+        if (this.year >= new Date().getFullYear()) {
+          this.forbidden1 = true
+        } else {
+          this.year++
+        }
+      },
+      addInventory() {
+        if (this.dialogtitle == '编辑费用') {
+          this.editInventory()
+          return
+        }
+        if (!this.expenseName) {
+          this.$message({
+            message: '费用名称不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.applicant) {
+          this.$message({
+            message: '申请人不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.expenseName.length < 1 || this.expenseName.length > 10) {
+          this.$message({
+            message: '费用名称1-10个字!',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.amount) {
+          this.$message({
+            message: '金额不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.amount < 0 || this.amount > 100000000 || (String(this.amount).indexOf('.') != -1 &&
+            String(this.amount).length -
+            (String(this.amount).indexOf('.') + 1) >
+            2)) {
+          this.$message({
+            message: '金额输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        addinventory({
+            applUrl: this.applUrl,
+            expenseName: this.expenseName,
+            amount: this.amount,
+            warehouseId: this.cangid,
+            warehouseName: this.warehouseName,
+            applicant: this.applicant
+          }).toPromise()
+          .then((response) => {
+            this.$notify.success({
+              title: '成功',
+              message: '添加成功',
+            })
+            this.addvisible = false
+            this.expenseName = ''
+            this.amount = ''
+            this.applUrl = ''
+            this.getList()
+          })
+      },
+      editInventory() {
+        if (!this.expenseName) {
+          this.$message({
+            message: '费用名称不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.expenseName.length < 1 || this.expenseName.length > 10) {
+          this.$message({
+            message: '费用名称1-10个字!',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.amount) {
+          this.$message({
+            message: '金额不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (!this.applicant) {
+          this.$message({
+            message: '申请人不能为空!',
+            type: 'warning'
+          })
+          return
+        }
+        if (this.amount < 0 || this.amount > 100000000) {
+          this.$message({
+            message: '金额输入错误!',
+            type: 'warning'
+          })
+          return
+        }
+        editinventory({
+            id: this.id,
+            applUrl: this.applUrl,
+            expenseName: this.expenseName,
+            amount: this.amount,
+            warehouseId: this.cangid,
+            warehouseName: this.warehouseName,
+            applicant: this.applicant
+          }).toPromise()
+          .then((response) => {
+            this.$notify.success({
+              title: '成功',
+              message: '编辑成功',
+            })
+            this.addvisible = false
+            this.expenseName = ''
+            this.amount = ''
+            this.applUrl = ''
+            this.getList()
+          })
+      },
+      yearChange() {
+
+      },
+      addlist() {
+        this.addvisible = true
+        this.dialogtitle = '添加费用'
+      },
+      editlist(item) {
+        this.addvisible = true
+        this.dialogtitle = '编辑费用'
+        this.id = item.id
+        this.applUrl = item.applUrl
+        this.expenseName = item.expenseName
+        this.amount = item.amount
+      },
+      warehouselocation() {
+        this.$router.push({
+          path: 'warehouselocation'
+        })
+      },
+      warehouseNameChange(e) {
+        for (let i = 0; i < this.warehouseList1.length; i++) {
+          if (this.warehouseList1[i].value == e) {
+            this.warehouseName = this.warehouseList1[i].value
+            this.warehouseCount = this.warehouseList1[i].count
+            this.warehouseNo = this.warehouseList1[i].No
+            this.cangid = this.warehouseList1[i].id
+            this.WAREHOUSE[1].payname = this.warehouseList1[i].value
+            this.purchasePriceList = this.warehouseList1[i].purchasePriceList
+          }
+        }
+        this.getList()
+      },
+      edit(item) {
+        this.price = item.cost
+        this.editvisible = true
+        this.id = item.id
+      },
+      editprice() {
+        this.$confirm(`加权成本价格修改后不可恢复,确认提交`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editcost({
+                id: this.id,
+                cost: this.price
+              }).toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '价格修改成功',
+                })
+                this.editvisible = false
+                this.getList()
+              })
+          })
+
+      },
+      handleClose() {
+        this.accessoryTFs = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      selectWarehouse() {
+        getwarehousebase({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseType: ''
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList1 = []
+            for (let i = 0; i < response.length; i++) {
+              this.warehouseList1.push({
+                value: response[i].warehouseName,
+                id: response[i].id,
+                count: response[i].count,
+                purchasePriceList: response[i].purchasePriceList,
+                No: response[i].commonWarehouseNo
+              })
+              if (this.cangid && this.cangid == response[i].id) {
+                this.warehouseName = response[i].warehouseName
+                this.warehouseCount = response[i].count
+                this.warehouseNo = response[i].commonWarehouseNo
+                this.purchasePriceList = response[i].purchasePriceList
+              }
+            }
+            if (this.warehouseList1.length > 0 && !this.cangid) {
+              this.warehouseName = this.warehouseList1[0].value
+              this.warehouseCount = this.warehouseList1[0].count
+              this.warehouseNo = this.warehouseList1[0].No
+              this.cangid = this.warehouseList1[0].id
+              this.purchasePriceList = this.warehouseList1[0].purchasePriceList
+              this.WAREHOUSE[1].payname = this.warehouseList1[0].value
+            }
+            this.getList()
+          })
+        getwarehousebase({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseType: 2
+          })
+          .toPromise()
+          .then((response) => {
+            for (let i = 0; i < response.length; i++) {
+              this.warehouseList1.push({
+                value: response[i].warehouseName,
+                id: response[i].id,
+                count: response[i].count,
+                purchasePriceList: response[i].purchasePriceList,
+                No: response[i].commonWarehouseNo
+              })
+              if (this.cangid && this.cangid == response[i].id) {
+                this.warehouseName = response[i].warehouseName
+                this.warehouseCount = response[i].count
+                this.warehouseNo = response[i].commonWarehouseNo
+                this.purchasePriceList = response[i].purchasePriceList
+              }
+            }
+          })
+      },
+      getList() {
+        getinventory({
+            compId: localStorage.getItem('ws-pf_compId'),
+            warehouseId: this.cangid,
+            year: this.year,
+            currectPage: this.currectPage,
+            pageSize: this.pageSize
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList = response
+            this.deptBudgetTotal = response.total
+            this.counttotal()
+          })
+      },
+      editClick(row) {
+        var status = ''
+        if (row.status == '待执行' || row.status == '已完成') {
+          status = '执行中'
+        } else if (row.status == '执行中') {
+          status = '已完成'
+        }
+        //cancelButtonClass: "btn-custom-cancel"
+        this.$confirm(`是否将状态改为${status}`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editstatus({
+                id: row.id
+              })
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      selecttaskType(e) {
+        for (var i = 0; i < this.taskTypeList.length; i++) {
+          if (this.taskTypeList[i].value == e) {
+            this.searchType = this.taskTypeList[i].type
+          }
+        }
+      },
+      handleExamine(row) {
+        this.$router.push({
+          name: 'salesContractExamine',
+          query: {
+            id: row.id
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleCloe() {
+        this.dialogViewSpareMoney = false
+      },
+
+      history(row) {
+        billoperatehis({
+            id: row.id
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      find() {
+        this.currentPage = 1
+        this.getList()
+      },
+      async exportlist() {
+        const {
+          data
+        } = await export1({
+          compId: localStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        }, {}, {
+          responseType: 'blob'
+        }).toPromise()
+        downloadFile({
+          res: data,
+          fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+          type: 'xls',
+        })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .connert {
+    width: 90%;
+    margin: 0 auto;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    text-align: right;
+    padding: 16px 20px;
+  }
+
+  .el-icon-arrow-left,
+  .el-icon-arrow-right {
+    font-size: 24px;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-button--default {
+    color: #8890b1;
+    border-color: #e8eaf1;
+  }
+
+  /deep/.base_header_layout .grid-content.right .find.el-button--primary {
+    width: 30px;
+    margin-left: 0;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+
+  /deep/.findValue .el-input__inner {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+
+  .completed.el-button--default {
+    border-color: #5878e8;
+    background-color: #f6f7fc;
+    color: #5878e8;
+  }
+
+  .putstorage.el-button--default,
+  .deliverystorage.el-button--default {
+    border-color: #8890b1;
+    background-color: #fff;
+    color: #8890b1;
+  }
+
+  /deep/.el-table td,
+  /deep/.el-table th.is-leaf {
+    border-right: 1px solid #e9ecf7;
+    text-align: center;
+  }
+
+  /deep/.el-table tr td:first-child,
+  /deep/.el-table tr th.is-leaf:first-child {
+    border-left: 1px solid #e9ecf7;
+  }
+
+  /deep/.el-table .el-table__header .cell,
+  /deep/.el-table .el-table__body .cell {
+    -webkit-line-clamp: 10;
+    max-height: 400px;
+  }
+
+  .record,
+  .adjustment {
+    display: inline-block;
+    color: #5878e8;
+    padding: 0 4px !important;
+    position: relative;
+  }
+
+  .record:after {
+    position: absolute;
+    content: '';
+    display: block;
+    top: 5px;
+    right: -2px;
+    width: 1px;
+    height: 12px;
+    background: #e9ecf7;
+  }
+
+  /deep/.el-radio-button:first-child .el-radio-button__inner {
+    margin-left: 10px;
+  }
+
+  //分页
+  .el-pagination {
+    text-align: center;
+    white-space: nowrap;
+    padding: 2px 5px;
+    color: #303133;
+    font-weight: 700;
+    margin-bottom: 20px;
+  }
+
+  .forbidden {
+    cursor: not-allowed;
+  }
+
+  .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+
+  .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+
+  .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 178px;
+    height: 178px;
+    line-height: 178px;
+    text-align: center;
+  }
+
+  .avatar {
+    width: 178px;
+    height: 178px;
+    display: block;
+  }
+
+  .top-row {
+    display: flex;
+    padding-left: 20px;
+
+    .left {
+      display: flex;
+      align-items: center;
+    }
+  }
+</style>

+ 570 - 0
src/views/warehousenew/weightedsubsidiary.vue

@@ -0,0 +1,570 @@
+<!--加权明细-->
+<template>
+  <div>
+      <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">加权明细</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+    <el-row>
+      <el-col class='bg-left' :span="12">
+        <div style='align-items:center;' class='flex'>
+          <div style='align-items:center;' class='flex'>
+              <div :class='{"forbidden":forbidden==true}' @click='minus'><i class="el-icon-arrow-left"></i></div>
+              <ws-select
+                v-model="year"
+                placeholder=""
+                @change="yearChange"
+                :value="searchType"
+                style="margin: 0 10px"
+                >
+                <ws-option
+                    v-for="item in yearList"
+                    :key="item.value"
+                    :label="item.value"
+                    :value="item.value"
+                    style="color: #8890b1"
+                />
+                </ws-select>
+              <div :class='{"forbidden":forbidden1==true}' @click='add'><i class="el-icon-arrow-right"></i></div>
+          </div>
+        </div>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+       <ws-select
+          v-model="warehouseName"
+          placeholder=""
+          @change="warehouseNameChange"
+          :value="searchType"
+          style="margin: 0 10px"
+        >
+          <ws-option
+            v-for="item in warehouseList1"
+            :key="item.value"
+            :label="item.value"
+            :value="item.value"
+            style="color: #8890b1"
+          />
+        </ws-select>
+        <ws-select
+            v-model="goodsName"
+            placeholder=""
+            class="typeselect"
+            @change="selectgoodsName"
+          >
+            <ws-option
+              v-for="item in goodnameList"
+              :key="item.constKey"
+              :label="item.goodsName"
+              :value="item.goodsName"
+            />
+          </ws-select>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button class="find" type="primary" @click="find()"
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+     </el-col>
+    </el-row>
+      <el-table
+        class="wenzi"
+        :data="warehouseList.records"
+        style="width: 100%; margin-top: 20px"
+        height="780"
+      >
+      <el-table-column label="序号" type="index" show-overflow-tooltip width="50">
+      </el-table-column>
+        <el-table-column prop="goodsName" label="货名" >
+        </el-table-column>
+        <el-table-column prop="grainType" label="粮食类型" >
+        </el-table-column>
+        <el-table-column prop="inType" label="入库类型" >
+        </el-table-column>
+        <el-table-column prop="netWeight" label="净重(吨)" >
+        </el-table-column>
+        <el-table-column prop="pureWeight" label="纯重(吨)" >
+        </el-table-column>
+        <el-table-column prop="unitPrice" label="价格(元/吨)" >
+        </el-table-column> 
+        <el-table-column prop="deductionAmount" label="扣款(元/吨)" >
+        </el-table-column>
+        <el-table-column prop="freight" label="运费(元/吨)" >
+        </el-table-column>
+        <el-table-column prop="originalStock" label="原库存量(吨)" >
+        </el-table-column>
+        <el-table-column prop="costBefore" label="入库前加权成本" >
+        </el-table-column>
+        <el-table-column prop="costAfter" label="入库后加权成本" >
+          <template slot-scope="scope">
+            <div>{{scope.row.costAfter}}<span v-if='!scope.row.grainType'>(改)</span></div>
+          </template>
+        </el-table-column>
+        <el-table-column  prop="createDate" label="更新日期">
+        </el-table-column>
+      </el-table>
+      <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    >
+    </el-pagination>
+  </div>
+</template>
+<script>
+
+import {
+  weighteddetails,
+  getwarehousebase,
+  editcost,
+  export1,
+  editstatus,
+  billoperatehis,
+} from '@/model/warehouse/index'
+import {
+  packList,
+} from '@/model/contarct/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+import WsUpload from '@/components/WsUpload'
+import { EventBus } from 'base-core-lib'
+import { toFixed } from 'xe-utils/methods'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+        currectPage:1,
+        pageSize:10,
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+      goodnameList:[],
+      goodsName:'玉米',
+      goodsNameKey:1,
+      expenseName:'',
+      yearList:[],
+      dialogtitle:'',
+      appendixIdss:[],
+      amount:'',
+      applUrl:'',
+      price:'',
+      costDate:'',
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+
+      searchType: 1,
+      searchTypeText: '未完成',
+      searchKeyWord: '',
+      contractType: 2,
+      currentPage:1,
+      warehouseType: '1',
+      // 提交类型
+      submitType: true,
+      size: 10,
+      limit:1,
+      spanArr: [],
+      id:0,
+      warehouseName: '',
+      warehouseId:'',
+      forbidden:false,
+      forbidden1:false,
+      start:2021,
+      addvisible:false,
+      compId: localStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      warehouseList: [],
+      warehouseList1: [],
+      deptBudgetList: {},
+      historyList: [],
+      count:0,
+      deptBudgetTotal: 0,
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    this.cangid=this.$route.query.cangId
+// 货名
+      // packList({ constId: 'CON2' })
+      //   .toPromise()
+      //   .then((response) => {
+      //     this.goodnameList = response
+      //   })
+      this.year=new Date().getFullYear()
+      for(var i=this.start;i<=this.year;i++){
+          this.yearList.push({value:i})
+      }
+      if(this.year>=new Date().getFullYear()){
+          this.forbidden1=true
+      }
+      if(this.year<=this.start){
+          this.forbidden=true
+      }
+    this.selectWarehouse()
+    // this.getList()
+
+    this.showType = this.isShow
+  },
+  methods: {
+      selectgoodsName(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].goodsName == e) {
+          this.goodsNameKey = this.goodnameList[i].goodsNameKey
+        }
+      }
+    },
+      returnsales(){
+          this.$router.go(-1)
+      },
+    counttotal(){
+        for (let i = 0; i < this.warehouseList.records.length; i++) {
+            this.count+=this.warehouseList.records[i].amount
+        }
+    },
+    minus(){
+
+        if(this.year<=this.start){
+            this.forbidden=true
+        }else{
+            this.year--
+        }
+    },
+    add(){
+
+        if(this.year>=new Date().getFullYear()){
+            this.forbidden1=true
+        }else{
+            this.year++
+        }
+    },
+    yearChange(){
+
+    },
+    warehouseNameChange(e) {
+      for(let i = 0 ; i < this.warehouseList1.length; i++){
+        if(this.warehouseList1[i].value == e){
+           this.warehouseName = this.warehouseList1[i].value
+          this.warehouseCount = this.warehouseList1[i].count
+          this.warehouseNo = this.warehouseList1[i].No
+          this.cangid = this.warehouseList1[i].id
+          this.WAREHOUSE[1].payname = this.warehouseList1[i].value
+          this.purchasePriceList = this.warehouseList1[i].purchasePriceList
+          this.goodnameList=this.warehouseList1[i].goodsNameInfos
+        }
+      }
+      this.getList()
+    },
+    edit(item){
+      this.price=item.cost
+      this.editvisible=true
+      this.id=item.id
+    },
+    //查看
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    selectWarehouse(){
+       getwarehousebase({
+        compId: localStorage.getItem('ws-pf_compId'),
+        warehouseType:'',
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList1 = []
+          for (let i = 0; i < response.length; i++) {
+            this.warehouseList1.push({
+              value: response[i].warehouseName,
+              id: response[i].id,
+              count: response[i].count,
+              purchasePriceList: response[i].purchasePriceList,
+              No:response[i].commonWarehouseNo, 
+              goodsNameInfos:response[i].goodsNameInfos
+            })
+            if (this.cangid&&this.cangid == response[i].id) {
+              this.warehouseName = response[i].warehouseName
+              this.warehouseCount =  response[i].count
+              this.warehouseNo =  response[i].commonWarehouseNo
+              this.purchasePriceList =  response[i].purchasePriceList
+              this.goodnameList=response[i].goodsNameInfos
+              if(this.goodnameList.length>0){
+                if(this.goodnameList.some( function( item, index, array ){ return item.goodsName == '玉米'})){
+                  this.goodsName='玉米'
+                  this.goodsNameKey=1
+                }else{
+                  this.goodsName=this.goodnameList[0].goodsName
+                  this.goodsNameKey=this.goodnameList[0].goodsNameKey
+                }
+              }
+            } 
+          }
+          if(this.warehouseList1.length > 0 && !this.cangid){
+            this.warehouseName = this.warehouseList1[0].value
+            this.warehouseCount =  this.warehouseList1[0].count
+            this.warehouseNo =  this.warehouseList1[0].No
+            this.cangid =  this.warehouseList1[0].id
+            this.purchasePriceList =  this.warehouseList1[0].purchasePriceList
+            this.WAREHOUSE[1].payname = this.warehouseList1[0].value
+            this.goodnameList=this.warehouseList1[0].goodsNameInfos
+            if(this.goodnameList.length>0){
+              if(this.goodnameList.some( function( item, index, array ){ return item.goodsName == '玉米'})){
+                  this.goodsName='玉米'
+                  this.goodsNameKey=1
+                }else{
+                  this.goodsName=this.goodnameList[0].goodsName
+                  this.goodsNameKey=this.goodnameList[0].goodsNameKey
+                }
+            }
+          }
+          this.getList()
+        })
+    },
+    getList() {
+      weighteddetails({
+        compId: localStorage.getItem('ws-pf_compId'),
+        warehouseId: this.cangid,
+        goodsNameKey:this.goodsNameKey,
+        year: this.year,
+        currectPage:this.currectPage,
+        pageSize:this.pageSize
+      })
+        .toPromise()
+        .then((response) => {
+          for (let i = 0; i < response.records.length; i++) {
+            response.records[i].costAfter=response.records[i].costAfter.toFixed(2)
+          }
+          this.warehouseList = response
+          this.deptBudgetTotal=response.total
+          this.counttotal()
+        })
+    },
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+
+    history(row) {
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      this.currentPage = 1
+      this.getList()
+    },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: localStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.connert {
+  width: 90%;
+  margin: 0 auto;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  text-align: right;
+  padding: 16px 20px;
+}
+.el-icon-arrow-left,.el-icon-arrow-right{
+    font-size:24px;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  color: #8890b1;
+  border-color: #e8eaf1;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: 0;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.completed.el-button--default {
+  border-color: #5878e8;
+  background-color: #f6f7fc;
+  color: #5878e8;
+}
+.putstorage.el-button--default,
+.deliverystorage.el-button--default {
+  border-color: #8890b1;
+  background-color: #fff;
+  color: #8890b1;
+}
+/deep/.el-table td,
+/deep/.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+}
+/deep/.el-table tr td:first-child,
+/deep/.el-table tr th.is-leaf:first-child {
+  border-left: 1px solid #e9ecf7;
+}
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  -webkit-line-clamp: 10;
+  max-height: 400px;
+}
+.record,
+.adjustment {
+  display: inline-block;
+  color: #5878e8;
+  padding: 0 4px !important;
+  position: relative;
+}
+.record:after {
+  position: absolute;
+  content: '';
+  display: block;
+  top: 5px;
+  right: -2px;
+  width: 1px;
+  height: 12px;
+  background: #e9ecf7;
+}
+/deep/.el-radio-button:first-child .el-radio-button__inner {
+  margin-left: 10px;
+}
+//分页
+.el-pagination {
+  text-align: center;
+    white-space: nowrap;
+    padding: 2px 5px;
+    color: #303133;
+    font-weight: 700;
+    margin-bottom: 20px;
+}
+.forbidden{
+    cursor: not-allowed;
+}
+ .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+  }
+  .avatar-uploader .el-upload:hover {
+    border-color: #409EFF;
+  }
+  .avatar-uploader-icon {
+    font-size: 28px;
+    color: #8c939d;
+    width: 178px;
+    height: 178px;
+    line-height: 178px;
+    text-align: center;
+  }
+  .avatar {
+    width: 178px;
+    height: 178px;
+    display: block;
+  }
+</style>