gjy hace 3 años
padre
commit
4cd672c424

+ 11 - 1
src/lang/zh.js

@@ -500,6 +500,11 @@ export default {
     collectionContractEdit: '代收合同  /  编辑',
     collectionContractExamine:'代收合同  /  查看',
     collectionContractRecord:'代收合同  /  记录',
+    storageContract: '代储合同',
+    storageContractAdd: '代储合同  /  添加',
+    storageContractEdit: '代储合同  /  编辑',
+    storageContractExamine: '代储合同  /  查看',
+    storageContractRecord:'代储合同  /  记录',
     purchaseContractExamine: '现货采购合同  /  查看',
     salesContract: '现货销售合同',
     salesContractEdit: '现货销售合同  /  编辑',
@@ -4828,7 +4833,12 @@ export default {
     collectionContractAdd: '代收合同添加',
     collectionContractEdit: '代收合同编辑',
     collectionContractExamine: '代收合同查看',
-    collectionContractRecord:'代收合同记录'
+    collectionContractRecord:'代收合同记录',
+    storageContract: '代储合同',
+    storageContractAdd: '代储合同添加',
+    storageContractEdit: '代储合同编辑',
+    storageContractExamine: '代储合同查看',
+    storageContractRecord:'代储合同记录'
 
   },
   purchase: {

+ 1 - 1
src/views/contractManagement/collectionContract.vue

@@ -199,7 +199,7 @@
         deliver_type: 1,
         deptBudgetTotal: 0,
         currentPage: 1,
-        pageSize: 10,
+        pageSize: 9999,
         appendixIdsAdd: '',
         searchType: 1,
         searchTypeText: '未完成',

+ 1 - 1
src/views/contractManagement/collectionContractAdd.vue

@@ -449,7 +449,7 @@
             }
           }
         }
-        console.log(this.deptBudgetList)
+        // console.log(this.deptBudgetList)
       },
       feedbackLeaderChange(e) {
         this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName

+ 77 - 0
src/views/contractManagement/component/routers/route.js

@@ -391,6 +391,83 @@ const contractManagementRouter = {
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
+    },// 代收合同
+    {
+      path: 'storageContract',
+      component: () =>
+        import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/storageContract'),
+      name: 'storageContract',
+      meta: {
+        title: 'storageContract',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.dsContract',
+        permissicon: [],
+        keepAlive: true
+      }
+    },
+    //代收合同添加
+    {
+      path: 'storageContractAdd',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/storageContractAdd'),
+      name: 'storageContractAdd',
+      meta: {
+        title: 'storageContractAdd',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.dsContract.dsContractInfo.add',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
+    //代收合同编辑
+    {
+      path: 'storageContractEdit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/storageContractEdit'),
+      name: 'storageContractEdit',
+      meta: {
+        title: 'storageContractEdit',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.dsContract.dsContractInfo.edit',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
+    //代收合同查看
+    {
+      path: 'storageContractExamine',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/storageContractExamine'),
+      name: 'storageContractExamine',
+      meta: {
+        title: 'storageContractExamine',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.dsContract.dsContractInfo.view',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
+    },
+    //代收合同记录
+    {
+      path: 'storageContractRecord',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/storageContractRecord'),
+      name: 'storageContractRecord',
+      meta: {
+        title: 'storageContractRecord',
+        shortcutEntrance: 'contractManagement',
+        module: 'contractManagement.dsContract.dsContractInfo.list',
+        permissicon: [],
+        keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+      hidden: true
     },
   ],
 

+ 1 - 1
src/views/contractManagement/futuresPurchaseContract.vue

@@ -169,7 +169,7 @@
         deliver_type: 1,
         deptBudgetTotal: 0,
         currentPage: 1,
-        pageSize: 10,
+        pageSize: 9999,
         appendixIdsAdd: '',
         searchType: 1,
         searchTypeText: '未完成',

+ 1 - 1
src/views/contractManagement/purchaseContract.vue

@@ -217,7 +217,7 @@
         deliver_type: 1,
         deptBudgetTotal: 0,
         currentPage: 1,
-        pageSize: 10,
+        pageSize: 9999,
         appendixIdsAdd: '',
         searchType: 1,
         searchTypeText: '未完成',

+ 1 - 1
src/views/contractManagement/salesContract.vue

@@ -221,7 +221,7 @@
         year: '',
         deptBudgetTotal: 0,
         currentPage: 1,
-        pageSize: 10,
+        pageSize: 9999,
         appendixIdsAdd: '',
         searchType: 1,
         searchTypeText: '未完成',

+ 923 - 0
src/views/contractManagement/storageContract.vue

@@ -0,0 +1,923 @@
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="8">
+      <template slot="left">
+        <ws-button type="primary" @click="handleAdd()"
+          v-hasPermission="`contractManagement.dsContract.dsContractInfo.add`">添加</ws-button>
+        <ws-button @click="exportlist()" v-hasPermission="
+            `contractManagement.dsContract.dsContractInfo.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>
+        <el-input v-model="searchKeyWord" placeholder="可按照合同编号、买方名称、卖方名称进行查找" clearable maxlength="500" type="input"
+          class="findValue" @keyup.enter.native="find()"></el-input>
+        <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="calc(100% - 105px)">
+      <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="合同编号">
+      </el-table-column>
+      <el-table-column prop="goodsName" 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="weight" label="重量(吨)"> </el-table-column>
+      <el-table-column prop="completed" label="已完成(吨)">
+        <template slot-scope="scope">
+          <span style="color: #5473e8; font-weight: 600">{{
+            scope.row.completed
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="amountIngPayable" label="应付(元)"> </el-table-column>
+      <el-table-column prop="amountEdPayableNew" label="已付(元)"> </el-table-column>
+      <el-table-column prop="amountNotCollectable" label="应收(元)"> </el-table-column>
+      <el-table-column prop="amountEdCollectionable" label="已收(元)"> </el-table-column>
+      <el-table-column width='200' prop="invoiced" label="已开销售发票(元)"> </el-table-column>
+      <el-table-column prop="status" label="状态">
+        <template slot-scope="scope">
+          <span v-if="scope.row.approveStatus">{{
+            scope.row.approveStatus
+          }}</span>
+          <el-popover v-else placement="left" 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 v-if="!scope.row.approveStatus" 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="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 != null">
+            {{
+              scope.row.addressUrlArray.length == 0
+                ? ''
+                : scope.row.addressUrlArray.length
+            }}
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
+      <el-table-column prop="address" label="操作" width="160">
+        <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.dsContract.dsContractInfo.view`
+            " alt="" />
+          <div v-if="
+              (scope.row.approveStatus != '待决策人审核' &&
+                !scope.row.approveStatus)
+            " style="display: inline-block">
+            <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.dsContract.dsContractInfo.edit`
+              " alt="" />
+          </div>
+          <img width="16" height="17" style="
+              vertical-align: text-top;
+              position: relative;
+              top: -1px;
+              margin: 0 6px;
+            " v-if="scope.row.status != '执行中'&&scope.row.status != '已完成'" src="../../../public/img/shanchu.png"
+            v-hasPermission="
+              `contractManagement.dsContract.dsContractInfo.delete`
+            " @click="handleDelete(scope.row)" alt="" />
+          <img width="16" height="17" style="
+                vertical-align: text-top;
+                position: relative;
+                top: -1px;
+                margin: 0 6px;
+              " v-if="scope.row.status == '执行中'||scope.row.status == '已完成'" src="../../../public/img/jl.png"
+            v-hasPermission="
+                `contractManagement.dsContract.dsContractInfo.list`
+              " @click="handleRecord(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">
+      <ws-upload ref="upload" :size-limit="size" @onChange="onChange" :comp-id="compId" :appendix-ids="appendixIdss"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+    </WinseaContentModal>
+  </div>
+</template>
+<script>
+  import {
+    getList,
+    export2,
+    editstatus,
+    billoperatehis,
+    deletecontract,
+    editInfo,
+  } 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 {
+        id: '',
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        size: 10,
+        // 是否显示
+        // showType: true,
+        // 年
+        year: '',
+        deliver_type: 1,
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 9999,
+        appendixIdsAdd: '',
+        searchType: 1,
+        searchTypeText: '未完成',
+        searchKeyWord: '',
+        contractType: 4,
+        goodsType: 1,
+        startDate: null,
+        endDate: null,
+        addressUrls: [],
+        accesscard: false,
+        // 提交类型
+        submitType: true,
+        deptCircularPage: {},
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+        contractList: [],
+        deptBudgetList: {},
+        historyList: [],
+        appendixIdss: [],
+        fileList: [],
+        compId: localStorage.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() {
+      //cg.viewBudget
+      //cg.viewSpareMoney
+      // this.getVesselData();
+      this.getList()
+      // this.showType = this.isShow
+    },
+    methods: {
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async (response) => {
+            this.deptBudgetList.addressUrl = response
+            this.deptBudgetList.id = this.id
+            this.deptBudgetList.flag = 1
+            editInfo(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                this.accessoryTFs = false
+                this.$message.success('上传成功')
+                this.getList()
+              })
+          })
+          .catch((res) => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      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.dialogViewSpareMoney = false
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+      getList() {
+        getList({
+            compId: localStorage.getItem('ws-pf_compId'),
+            contractType: this.contractType,
+            goodsType: this.goodsType,
+            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].completedQuantity) {
+                response.records[i].completedQuantity = response.records[i].completedQuantity.toFixed(3)
+              }
+
+              if (response.records[i].addressUrl != null) {
+                if (response.records[i].addressUrl) {
+                  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
+            for (var i = 0; i < response.records.length; i++) {
+              var arr = new Array()
+              this.addressUrls[i] = new Array()
+              if (this.contractList.records[i].addressUrl != null) {
+                arr = this.contractList.records[i].addressUrl.split(',')
+                this.addressUrls[i] = arr
+              }
+            }
+          })
+      },
+      // 上传附件
+      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
+            this.find()
+          }
+        }
+      },
+      fujian(row) {
+        this.id = row.id
+        this.accessoryTFs = true
+        this.appendixIdss = row.addressUrl
+        console.log(this.appendixIdss)
+      },
+      handleExamine(row) {
+        console.log(row)
+        this.$router.push({
+          name: 'storageContractExamine',
+          query: {
+            id: row.id,
+            status: row.status,
+          },
+        })
+      },
+      handleAdd() {
+        this.$router.push({
+          path: 'storageContractAdd',
+        })
+      },
+      handleEdit(row) {
+        this.$router.push({
+          name: 'storageContractEdit',
+          query: {
+            id: row.id,
+          },
+        })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      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 export2({
+          compId: localStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          goodsType: this.goodsType,
+          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
+          })
+      },
+      //记录
+      handleRecord(row) {
+        this.$router.push({
+          name: 'storageContractRecord',
+          query: {
+            id: row.id,
+          },
+        })
+      },
+    },
+  }
+</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: 64px;
+    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>

+ 1941 - 0
src/views/contractManagement/storageContractAdd.vue

@@ -0,0 +1,1941 @@
+<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="center">
+      <ws-form ref="deptBudgetList" :model="deptBudgetList">
+        <div class="remark">
+          <h3>基本信息</h3>
+          <p style="color: #8890b1">
+            &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>”
+            标记的条目提交后不可修改。
+          </p>
+        </div>
+        <!--基本信息-->
+        <ws-info-table>
+          <!--合同编号-->
+          <ws-form-item label="合同编号" span="1" prop="contractNo" class="readonly">
+            <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" maxlength="50" size="small"
+              :rules="ruleDeptBudget" />
+          </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">
+            <el-select v-model="deptBudgetList.buyer" placeholder="请选择买方名称" class="typeselect" filterable clearable
+              @change="buyerSelect">
+              <el-option v-for="(item,index) in customerinfo" :key="index" :label="item.customerName"
+                :value="item.customerName" />
+            </el-select>
+          </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">
+            <el-autocomplete class="inline-input" v-model="deptBudgetList.seller" :fetch-suggestions="querySearch2"
+              placeholder="请输入卖方名称" @select="handleSelect"></el-autocomplete>
+          </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>
+          <!-- <el-radio v-model="deptBudgetList.deliverType" v-if="deptBudgetList.priceType == '随行就市'" disabled label="1">
+              我方自提</el-radio>
+            <el-radio v-model="deptBudgetList.deliverType" v-else label="1">我方自提</el-radio>
+            <el-radio v-model="deptBudgetList.deliverType" v-if="deptBudgetList.priceType == '随行就市'" disabled label="2">
+              对方送货</el-radio>
+            <el-radio v-model="deptBudgetList.deliverType" v-else label="2">对方送货</el-radio> -->
+        </ws-form-item>
+        <!--买方电话-->
+          <ws-form-item label="买方电话" span="1" prop="contractNo">
+            <el-autocomplete class="inline-input" v-model="deptBudgetList.buyerPhone" :fetch-suggestions="querySearch3"
+              placeholder="请输入买方电话" @select="handleSelect"></el-autocomplete>
+          </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" /> -->
+            <el-autocomplete class="inline-input" v-model="deptBudgetList.sellerPhone" :fetch-suggestions="querySearch4"
+              placeholder="请输入卖方电话" @select="handleSelect"></el-autocomplete>
+          </ws-form-item>
+           <!--验收方式-->
+          <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+            <el-select v-model="deptBudgetList.acceptanceMethod" placeholder="请选择验收方式" style="width: 100%" clearable
+              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 label="货源所在地区" span="1" prop="sourceGoods">
+          <!-- <el-cascader
+            :options="options_"
+            v-model="selectedOptions"
+            clearable
+            size="large"
+            placeholder="请选择货源所在地区"
+            style="width: 200%"
+            @change="handleChange"
+          /> -->
+          <el-button @click="mapInputClick('source')" class='address-btn'>
+            {{newSelectedOptions}}
+          </el-button>
+        </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="placeDelivery">
+            <el-button @click="mapInputClick('deliveryProv')" class="address-btn">
+              {{ newSelectedOptions1 }}
+            </el-button>
+          </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="storageFee">
+            <ws-input v-model="deptBudgetList.storageFee" placeholder="请输入仓储费" maxlength="20" size="small" />
+          </ws-form-item>
+          <!--合同单价(元/吨)-->
+        <ws-form-item class="readonly" label="合同单价(元/吨)" span="1" prop="unitContractPrice">
+          <ws-input @input="pricechange" v-model="deptBudgetList.unitContractPrice" placeholder="请输入合同单价"
+            maxlength="100" size="small" />
+        </ws-form-item>
+        <ws-form-item label="代储费起算重量" span="1" prop="storageFeeWeight">
+            <ws-input v-model="deptBudgetList.storageFeeWeight" placeholder="请输入代储费起算重量" maxlength="20" 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="storageFeeStartdate">
+            <ws-date-picker v-model="deptBudgetList.storageFeeStartdate" type="date" placeholder="请选择代储费起算日期"
+              value-format="yyyy-MM-dd" />
+          </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="storageFeeEnddate">
+            <ws-date-picker v-model="deptBudgetList.storageFeeEnddate" 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="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" 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="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="3000" />
+        <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+          @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+          v-hasPermission="`contractManagement.salesContract.salesContractInfo.appl`" />
+      </ws-form>
+      <div v-if="dialogVisible" class="map">
+        <map-drag @marker="marker" :isShowaddress="true" v-on:addressListen="getAddress" :type="type">
+        </map-drag>
+      </div>
+    </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 {
+    packList,
+    addList,
+    xiala,
+    addxiala,
+    editxiala,
+    delxiala,
+    getRelationContractNo,
+    getcustomerinfo,
+    getstafffind
+  } from '@/model/contarct/index'
+  import {
+    getstaff,
+  } from '@/model/warehouse/index'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    regionData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
+  import thirdPartyInspectionReportAddVue from '../system/shipInspection/thirdPartyInspectionReportAdd.vue'
+  import mapDrag from '@/components/mapdrag/mapdrag'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      mapDrag,
+    },
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        options: [],
+        staffList: [],
+        restaurants1: [],
+        restaurants2: [],
+        restaurants3: [],
+        restaurants4: [],
+        customerinfo: [],
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        type: '',
+        dialogVisible: false,
+        options_: regionData,
+        selectedOptions: [],
+        newSelectedOptions: '请选择货源所在地',
+        selectedOptions1: [],
+        newSelectedOptions1: '请选择交货所在地区',
+        // 提交类型
+        submitType: true,
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt',
+        }, ],
+        trainingMethods: {},
+        packtypeList: [],
+        compId: localStorage.getItem('ws-pf_compId'),
+        mainReportAdd: {},
+        appendixIdsAdd: '',
+        size: 10,
+        unitList: [],
+        goodnameList: [],
+        gradeList: [],
+        ChapterTwoList: [],
+        deptBudgetList: {
+          deliverType: '1',
+          agreementType: '代储合同',
+          finalTradingVolume: 0,
+          totalContractPrice: 0,
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          buyerPhone: '',
+          contractProcessInfo: {},
+          addressUrl: '',
+          // sourceGoods: '',
+          sourceProvince :'',
+          sourceCity :'',
+          sourceArea :'',
+          sourceGoods: '',
+          sourceLocation :'',
+          placeDelivery: '',
+          settlementWeightMethod: '1',
+        },
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        ruleDeptBudget: {
+          contractNo: [{
+              required: true,
+              message: '请输入活动名称',
+              trigger: 'blur',
+            },
+            {
+              min: 6,
+              max: 50,
+              message: '长度在 6 到 50 个字符',
+              trigger: 'blur',
+            },
+          ],
+        },
+        selectIntendedShip: {},
+        interviewTypeList: {},
+        fileList: [],
+        priceTypeList: ['定价销售', '随行就市'],
+        contractNoList: [],
+        feedbackLeaders: [], //收货反馈负责人
+      }
+    },
+    activated() {
+      // this.newSelectedOptions = '请选择货源所在地'
+      this.newSelectedOptions1 = '请选择交货所在地'
+      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
+      getstafffind({
+          roles: 'd6a5c8a52da544309259f91f75de1ec6'
+        })
+        .toPromise()
+        .then((response) => {
+          this.options = response
+          this.staffList = response
+        })
+      this.loaddata()
+      // this.showType = this.isShow
+    },
+    mounted() {
+      this.restaurants1 = JSON.parse(localStorage.getItem('deptBudgetList_data1'));
+      this.restaurants2 = JSON.parse(localStorage.getItem('deptBudgetList_data2'));
+      this.restaurants3 = JSON.parse(localStorage.getItem('deptBudgetList_data3'));
+      this.restaurants4 = JSON.parse(localStorage.getItem('deptBudgetList_data4'));
+      if (!this.restaurants1) this.restaurants1 = [];
+      if (!this.restaurants2) this.restaurants2 = [];
+      if (!this.restaurants3) this.restaurants3 = [];
+      if (!this.restaurants4) this.restaurants4 = [];
+    },
+    methods: {
+      selectstaff(e) {
+        this.deptBudgetList.personCharge = ''
+        for (var i = 0; i < this.staffList.length; i++) {
+          for (var j = 0; j < e.length; j++) {
+            if (this.staffList[i].staffMobilePhone == e[j]) {
+              this.deptBudgetList.personCharge += this.staffList[i].staffName + ' ' + this.staffList[i]
+                .staffMobilePhone + ','
+            }
+          }
+        }
+        // console.log(this.deptBudgetList)
+      },
+      feedbackLeaderChange(e) {
+        this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName
+        this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[e].staffMobilePhone
+      },
+      buyerSelect(item) {
+        // console.log(item)
+        for (let i = 0; i < this.customerinfo.length; i++) {
+          console.log(this.customerinfo[i].customerName, item)
+          if (this.customerinfo[i].customerName == item) {
+            this.deptBudgetList.buyerPhone = this.customerinfo[i].customerPhone
+          }
+        }
+      },
+      querySearch1(queryString, cb) {
+        var restaurants1 = this.restaurants1;
+        var results = queryString ? restaurants1.filter(this.createFilter(queryString)) : restaurants1;
+        // 调用 callback 返回建议列表的数据
+        cb(results);
+      },
+      querySearch2(queryString, cb) {
+        var restaurants2 = this.restaurants2;
+        var results = queryString ? restaurants2.filter(this.createFilter(queryString)) : restaurants2;
+        // 调用 callback 返回建议列表的数据
+        cb(results);
+      },
+      querySearch3(queryString, cb) {
+        var restaurants3 = this.restaurants3;
+        var results = queryString ? restaurants3.filter(this.createFilter(queryString)) : restaurants3;
+        // 调用 callback 返回建议列表的数据
+        cb(results);
+      },
+      querySearch4(queryString, cb) {
+        var restaurants4 = this.restaurants4;
+        var results = queryString ? restaurants4.filter(this.createFilter(queryString)) : restaurants4;
+        // 调用 callback 返回建议列表的数据
+        cb(results);
+      },
+      createFilter(queryString) {
+        return (restaurant) => {
+          return (restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+        };
+      },
+      handleSelect(item) {
+        console.log(item);
+      },
+      marker: function(item) {
+        this.deptBudgetList.warehousePositioning =
+          item.lnglat.lat + ',' + item.lnglat.lng
+      },
+      getAddress(data) {
+        console.log('getAddress', data)
+        if (data[4] == 'source') {
+          this.newSelectedOptions = data[0] + '/' + data[1] + '/' + data[2]
+          this.deptBudgetList.sourceProvince = data[0]
+          this.deptBudgetList.sourceCity = data[1]
+          this.deptBudgetList.sourceArea = data[2]
+          this.deptBudgetList.sourceGoods = data[3]
+          this.deptBudgetList.sourceLocation = data[5].lat + ',' + data[5].lng
+        } else {
+          this.newSelectedOptions1 = data[0] + '/' + data[1] + '/' + data[2]
+          this.deptBudgetList.deliveryProvince = data[0]
+          this.deptBudgetList.deliveryCity = data[1]
+          this.deptBudgetList.deliveryArea = data[2]
+          this.deptBudgetList.placeDelivery = data[3]
+          this.deptBudgetList.deliveryLocation = data[5].lat + ',' + data[5].lng
+        }
+      },
+      mapInputClick(type) {
+        this.dialogVisible = true
+        this.type = type
+      },
+      blurMap() {
+        this.dialogVisible = false
+      },
+      focusMap() {
+        this.dialogVisible = true
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+      },
+      returnsales() {
+        this.deptBudgetList = {
+          deliverType: '1',
+          agreementType: '代储合同',
+          finalTradingVolume: 0,
+          totalContractPrice: 0,
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          buyerPhone: '',
+          contractProcessInfo: {},
+          addressUrl: '',
+          // sourceGoods: '',
+          placeDelivery: '',
+          settlementWeightMethod: '1',
+        }
+        this.$router.push({
+          path: 'storageContract',
+        })
+      },
+      loaddata() {
+        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
+          })
+        getcustomerinfo({
+            compId: localStorage.getItem('ws-pf_compId'),
+          }).toPromise()
+          .then((response) => {
+            var arr = []
+            for (let i = 0; i < response.length; i++) {
+              if (response[i].customerType == '个人客户') {
+                arr.push({
+                  customerName: response[i].customerName,
+                  customerPhone: response[i].customerPhone
+                })
+              } else {
+                arr.push({
+                  customerName: response[i].compName,
+                  customerPhone: response[i].customerPhone
+                })
+              }
+            }
+            this.customerinfo = arr
+          })
+      },
+      selectRelation(e) {
+        for (var i = 0; i < this.contractNoList.length; i++) {
+          if (this.contractNoList[i].contractNo == e) {
+            this.deptBudgetList = this.contractNoList[i]
+            this.deptBudgetList.agreementNo = this.contractNoList[i].contractNo
+            this.deptBudgetList.contractNo = this.contractNoList[i].contractNo
+            this.deptBudgetList.agreementType = '补充协议'
+            // this.newSelectedOptions = this.contractNoList[i].sourceProvince + this.contractNoList[i].sourceCity + this
+            //   .contractNoList[i].sourceArea
+            // this.deptBudgetList.sourceGoods = this.contractNoList[i].sourceGoods
+            this.newSelectedOptions1 = this.contractNoList[i].deliveryProvince + this.contractNoList[i].deliveryCity +
+              this.contractNoList[i].deliveryArea
+            this.deptBudgetList.placeDelivery = this.contractNoList[i].placeDelivery
+          }
+        }
+      },
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async (response) => {
+            this.deptBudgetList.addressUrl = response
+          })
+          .catch((res) => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      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
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+
+      submit() {
+        // if (this.deptBudgetList.placeDelivery.indexOf('省') > -1) {
+        //   this.$message({
+        //     message: '请手动删除详细地址中省市区/市,避免重复显示省市区/市!',
+        //     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: '合同编号长度不符合要求,请输入6到50个字符之内!',
+            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.settlementMethod) {
+          this.$message({
+            message: '结算方式不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.settlementMethod.length < 1 ||
+          this.deptBudgetList.settlementMethod.length > 20
+        ) {
+          this.$message({
+            message: '结算方式长度不符合要求,请输入1到20个字符之内!',
+            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.sellerPhone) {
+          this.$message({
+            message: '请输入卖方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (isNaN(this.deptBudgetList.sellerPhone)) {
+          this.$message({
+            message: '输入卖方电话有误!',
+            type: 'warning',
+          })
+          return
+        }
+        // if (this.deptBudgetList.deliverType == '2') {
+        //   if (!this.deptBudgetList.feedbackLeader) {
+        //     this.$message({
+        //       message: '请选择收货反馈负责人',
+        //       type: 'warning',
+        //     })
+        //     return
+        //   }
+        // }
+
+        if (!this.deptBudgetList.acceptanceMethod) {
+          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.storageFee) {
+          this.$message({
+            message: '代储费不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.storageFeeWeight) {
+          this.$message({
+            message: '代储费起算重量不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          isNaN(this.deptBudgetList.storageFee) ||
+          (String(this.deptBudgetList.storageFee).indexOf('.') != -1 &&
+            String(this.deptBudgetList.storageFee).length -
+            (String(this.deptBudgetList.storageFee).indexOf('.') + 1) >
+            2) ||
+          this.deptBudgetList.storageFee < 0 ||
+          this.deptBudgetList.storageFee > 1000
+        ) {
+          this.$message({
+            message: '代储费填写错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          isNaN(this.deptBudgetList.storageFeeWeight) ||
+          (String(this.deptBudgetList.storageFeeWeight).indexOf('.') != -1 &&
+            String(this.deptBudgetList.storageFeeWeight).length -
+            (String(this.deptBudgetList.storageFeeWeight).indexOf('.') + 1) >
+            3) ||
+          this.deptBudgetList.storageFeeWeight < 0 ||
+          this.deptBudgetList.storageFeeWeight > 200000
+        ) {
+          this.$message({
+            message: '代储费起算重量填写错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateStart) {
+          this.$message({
+            message: '请选择交货日期(起)',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.overShort) {
+          this.$message({
+            message: '请输入溢短装!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          isNaN(this.deptBudgetList.overShort) ||
+          (String(this.deptBudgetList.overShort).indexOf('.') != -1 &&
+            String(this.deptBudgetList.overShort).length -
+            (String(this.deptBudgetList.overShort).indexOf('.') + 1) >
+            2) ||
+          this.deptBudgetList.overShort < 0 ||
+          this.deptBudgetList.overShort > 50
+        ) {
+          this.$message({
+            message: '溢短装输入有误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateEnd) {
+          this.$message({
+            message: '请选择交货日期(止)',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.unitContractPrice) {
+            this.$message({
+              message: '请输入合同单价!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            isNaN(this.deptBudgetList.unitContractPrice) ||
+            (String(this.deptBudgetList.unitContractPrice).indexOf('.') != -1 &&
+              String(this.deptBudgetList.unitContractPrice).length -
+              (String(this.deptBudgetList.unitContractPrice).indexOf('.') + 1) >
+              2) ||
+            this.deptBudgetList.unitContractPrice <= 0 ||
+            this.deptBudgetList.unitContractPrice > 10000
+          ) {
+            this.$message({
+              message: '合同单价输入有误!',
+              type: 'warning',
+            })
+            return
+          }
+          if (!this.deptBudgetList.totalContractPrice) {
+            this.$message({
+              message: '请输入合同总价!',
+              type: 'warning',
+            })
+            return
+          }
+          if (
+            isNaN(this.deptBudgetList.totalContractPrice) ||
+            (String(this.deptBudgetList.totalContractPrice).indexOf('.') != -1 &&
+              String(this.deptBudgetList.totalContractPrice).length -
+              (String(this.deptBudgetList.totalContractPrice).indexOf('.') +
+                1) >
+              2) ||
+            this.deptBudgetList.totalContractPrice <= 0 ||
+            this.deptBudgetList.totalContractPrice > 1000000000
+          ) {
+            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.newSelectedOptions) {
+          this.$message({
+            message: '请选择货源所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.sourceGoods) {
+          this.$message({
+            message: '请输入货源详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.newSelectedOptions1) {
+          this.$message({
+            message: '请选择交货所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.placeDelivery) {
+          this.$message({
+            message: '请输入交货详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.signingDate) {
+          this.$message({
+            message: '请选择签订日期',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          isNaN(this.deptBudgetList.finalTradingVolume) ||
+          (String(this.deptBudgetList.finalTradingVolume).indexOf('.') != -1 &&
+            String(this.deptBudgetList.finalTradingVolume).length -
+            (String(this.deptBudgetList.finalTradingVolume).indexOf('.') + 1) >
+            3) ||
+          this.deptBudgetList.finalTradingVolume < 0 ||
+          this.deptBudgetList.finalTradingVolume > 200000
+        ) {
+          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.waterContent &&
+            String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
+            (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf(
+                '.'
+              ) +
+              1) >
+            2) ||
+          this.deptBudgetList.contractGoodsInfo.waterContent > 40 ||
+          this.deptBudgetList.contractGoodsInfo.waterContent < 0
+        ) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.grade) {
+          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('.') !=
+            -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
+                '.'
+              ) +
+              1) >
+            2) ||
+          this.deptBudgetList.contractGoodsInfo.impurity > 40 ||
+          this.deptBudgetList.contractGoodsInfo.impurity < 0
+        ) {
+          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(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+                '.'
+              ) +
+              1) >
+            2) ||
+          this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 ||
+          this.deptBudgetList.contractGoodsInfo.bulkDensity < 0
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
+          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.deptBudgetList.contractGoodsInfo.mildewGrain > 40 ||
+          this.deptBudgetList.contractGoodsInfo.mildewGrain < 0
+        ) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
+          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.deptBudgetList.contractGoodsInfo.jiaorenli > 40 ||
+          this.deptBudgetList.contractGoodsInfo.jiaorenli < 0
+        ) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
+          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.deptBudgetList.contractGoodsInfo.imperfectGrain > 40 ||
+          this.deptBudgetList.contractGoodsInfo.imperfectGrain < 0
+        ) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.contractProcessInfo.goodsNameKey) {
+
+          if (
+            !this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000 ||
+            this.deptBudgetList.contractProcessInfo.goodsNameKey < 100 ||
+            (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.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) {
+            if(this.deptBudgetList.personPhone){
+              this.deptBudgetList.personPhone=this.deptBudgetList.personPhone.toString()
+            }
+            this.deptBudgetList.compId = this.compId
+            this.deptBudgetList.contractType = 4
+            this.deptBudgetList.goodsType = 1
+            addList(this.deptBudgetList)
+              .toPromise()
+              .then((response) => {
+                // 存储买方、卖方、买方电话、卖方电话
+                let _data = {
+                  byer: this.deptBudgetList.buyer,
+                  seller: this.deptBudgetList.seller,
+                  buyerPhone: this.deptBudgetList.buyerPhone,
+                  sellerPhone: this.deptBudgetList.sellerPhone
+                }
+                if (this.restaurants1.length <= 20) {
+                  this.restaurants1 = this.restaurants1.filter(function(val) {
+                    if (val.value != _data.byer) {
+                      return val
+                    }
+                  })
+                  this.restaurants1.unshift({
+                    value: _data.byer
+                  })
+                } else {
+                  this.restaurants1.unshift({
+                    value: _data.byer
+                  }).pop({
+                    value: _data.byer
+                  })
+                }
+                localStorage.setItem('deptBudgetList_data1', JSON.stringify(this.restaurants1));
+                if (this.restaurants2.length <= 20) {
+                  this.restaurants2 = this.restaurants2.filter(function(val) {
+                    if (val.value != _data.seller) {
+                      return val
+                    }
+                  })
+                  this.restaurants2.unshift({
+                    value: _data.seller
+                  })
+                } else {
+                  this.restaurants2.unshift({
+                    value: _data.seller
+                  }).pop({
+                    value: _data.seller
+                  })
+                }
+                localStorage.setItem('deptBudgetList_data2', JSON.stringify(this.restaurants2));
+                if (this.restaurants2.length <= 20) {
+                  this.restaurants3 = this.restaurants3.filter(function(val) {
+                    if (val.value != _data.buyerPhone) {
+                      return val
+                    }
+                  })
+                  this.restaurants3.unshift({
+                    value: _data.buyerPhone
+                  })
+                } else {
+                  this.restaurants3.unshift({
+                    value: _data.buyerPhone
+                  }).pop({
+                    value: _data.buyerPhone
+                  })
+                }
+                localStorage.setItem('deptBudgetList_data3', JSON.stringify(this.restaurants3));
+                if (this.restaurants4.length <= 20) {
+                  this.restaurants4 = this.restaurants3.filter(function(val) {
+                    if (val.value != _data.sellerPhone) {
+                      return val
+                    }
+                  })
+                  this.restaurants4.unshift({
+                    value: _data.sellerPhone
+                  })
+                } else {
+                  this.restaurants4.unshift({
+                    value: _data.sellerPhone
+                  }).pop({
+                    value: _data.sellerPhone
+                  })
+                }
+                localStorage.setItem('deptBudgetList_data4', JSON.stringify(this.restaurants4));
+                this.$message.success('添加成功')
+                this.deptBudgetList = {
+                  deliverType: '1',
+                  agreementType: '代储合同',
+                  finalTradingVolume: 0,
+                  totalContractPrice: 0,
+                  contractGoodsInfo: {
+                    goodsName: '',
+                  },
+                  buyerPhone: '',
+                  contractProcessInfo: {},
+                  addressUrl: '',
+                  // sourceGoods: '',
+                  placeDelivery: '',
+                  settlementWeightMethod: '1',
+                }
+
+                this.$router.push({
+                  path: 'storageContract',
+                })
+              })
+          } 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 = localStorage.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 = localStorage.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()
+            })
+        }
+      },
+      handleExamine() {},
+      approve() {},
+      addClick() {
+        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
+            this.deptBudgetList.contractGoodsInfo.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
+            this.deptBudgetList.contractGoodsInfo.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
+          }
+        }
+      },
+      selectpriceType(e) {
+        if (e == '随行就市') {
+          this.deptBudgetList.deliverType = '1'
+        }
+      },
+      weightchange(e) {
+        this.deptBudgetList.finalTradingVolume = e
+      },
+      pricechange(e) {
+        this.deptBudgetList.totalContractPrice = e * this.deptBudgetList.weight
+      },
+      // 编辑
+      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;
+  }
+
+  .upload-demo {
+    margin-top: 10px;
+  }
+
+  .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;
+  }
+
+  .addressUrls {
+    width: 100%;
+    display: flex;
+    margin-top: 10px;
+  }
+
+  .addressUrls-item {
+    position: relative;
+    display: flex;
+  }
+
+  .icon-guanbi {
+    position: absolute;
+    right: 8px;
+  }
+
+  .addressUrl {
+    margin: 0px 10px;
+    border-radius: 3px;
+  }
+
+  //上传文件成功标识
+  /deep/.el-upload-list__item-status-label {
+    position: absolute;
+    right: 22px;
+    top: -1px;
+    line-height: inherit;
+    display: none;
+  }
+
+  .map {
+    position: fixed;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+    width: 850px;
+    height: 400px;
+    background: gainsboro;
+    border-radius: 20px;
+    padding: 10px;
+    box-sizing: border-box;
+    z-index: 99;
+  }
+
+  .amap-container {
+    width: 100% !important;
+  }
+
+  .address-btn {
+    width: 100%;
+    text-align: left;
+    color: #000;
+    border: 1px solid #ccc;
+  }
+
+  .inline-input {
+    width: 100%;
+  }
+</style>

+ 1609 - 0
src/views/contractManagement/storageContractEdit.vue

@@ -0,0 +1,1609 @@
+<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="center">
+      <ws-form ref="deptBudgetList" :rules="ruleDeptBudget" :model="deptBudgetList">
+         <div class="remark">
+      <h3>基本信息</h3>
+      <p style="color: #8890b1">
+          &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>”
+          标记的条目提交后不可修改。
+        </p>
+    </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="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.buyer }}
+            </div>
+            <span class="unchangeable">*</span>
+          </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="contractNo">
+            <div class="unchanged">
+              {{ deptBudgetList.seller }}
+            </div>
+            <span class="unchangeable">*</span>
+          </ws-form-item>
+   <!--验收方式-->
+          <ws-form-item label="验收方式" span="1" prop="acceptanceMethod">
+            <el-select v-model="deptBudgetList.acceptanceMethod" placeholder="请选择验收方式" style="width: 100%" clearable 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.buyerPhone" 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>
+          <!--卖方电话-->
+          <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="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">
+            <ws-input v-model="deptBudgetList.weight" placeholder="请输入重量(吨)" maxlength="100" 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="placeDelivery">
+            <!-- <el-cascader
+              :options="options_"
+              v-model="selectedOptions1"
+              clearable
+              size="large"
+              placeholder="请选择交货地所在地区"
+              style="width: 200%"
+              @change="handleChange1"
+            /> -->
+             <el-button @click="mapInputClick('deliveryProv')" class="address-btn">
+                          {{ newSelectedOptions1 }}
+                        </el-button>
+          </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="agencyCharge">
+            <ws-input v-model="deptBudgetList.agencyCharge" placeholder="请输入仓储费" maxlength="20" size="small" />
+          </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">
+            <el-select v-model="deptBudgetList.personPhone" multiple placeholder="请选择临时仓库负责人" filterable clearable
+              @change="selectstaff">
+              <el-option v-for="item in options" :key="item.value" :label="item.staffName"
+                :value="item.staffMobilePhone" />
+            </el-select>
+          </ws-form-item>
+
+          <!--客户送粮上限(元/吨)-->
+          <ws-form-item label="客户送粮上限(吨)" span="1" prop="grainDelivery">
+            <ws-input v-model="deptBudgetList.grainDelivery" placeholder="请输入客户送粮上限,如2000" maxlength="100"
+              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">
+            <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">
+            <div class="unchanged">
+              {{ deptBudgetList.contractGoodsInfo.grade }}
+            </div>
+            <span class="unchangeable">*</span>
+          </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="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="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="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" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :editable="false" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" v-hasPermission="
+            `contractManagement.salesContract.salesContractInfo.appl`"/>
+      </ws-form>
+    </div>
+    <div v-if="dialogVisible" class="map">
+      <map-drag @marker="marker" :isShowaddress="true" v-on:addressListen="getAddress" :type="type">
+      </map-drag>
+    </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 {
+    regionData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
+  import WsUpload from '@/components/WsUpload'
+  import mapDrag from '@/components/mapdrag/mapdrag'
+  import {
+    examineList,
+    editInfo,
+    packList,
+    xiala,
+    addxiala,
+    editxiala,
+    delxiala,
+    getRelationContractNo,
+    getstafffind
+  } from '@/model/contarct/index'
+  import { getstaff, } from '@/model/warehouse/index'
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      mapDrag
+    },
+    watch: {
+      vesselId(val) {
+        this.loaddata()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        type: '',
+        dialogVisible: false,
+        newSelectedOptions1: '请选择交货所在地区',
+        newSelectedOptions: '请选择货源所在地',
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        // 提交类型
+        submitType: true,
+        options_: regionData,
+        options:[],
+        selectedOptions: [],
+        selectedOptions1: [],
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        selectunitList: {},
+        uploadSuccess: {},
+        selectgrade: {},
+        goodnameList: {},
+        selectpackingMethod: {},
+        unitList: {},
+        packtypeList: [],
+        compId: localStorage.getItem('ws-pf_compId'),
+        appendixIdsAdd: '',
+        size: 10,
+        deptBudgetList: {
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          contractProcessInfo: {},
+          sourceGoods:'',
+          placeDelivery:'',
+        },
+        ruleDeptBudget: {},
+        trainingMethods: {},
+        isEdited: false,
+        registered: {},
+        selectCrtDuty: {},
+        dutyList: {},
+        sexList: {},
+        selectDuty: {},
+        gradeList: {},
+        ChapterTwoList: {},
+        selectIntendedShip: {},
+        interviewTypeList: {},
+        feedbackLeaders:[],//收货反馈负责人
+      }
+    },
+    activated() {
+      //cg.viewBudget
+      //cg.viewSpareMoney
+      // this.getVesselData();
+      getstafffind({
+          roles: 'd6a5c8a52da544309259f91f75de1ec6'
+        })
+        .toPromise()
+        .then((response) => {
+          this.options = response
+          this.staffList = response
+        })
+      this.loaddata()
+      this.editInfo()
+      this.showType = this.isShow
+      // console.log(this.$route.params)
+      this.showType = this.isShow
+    },
+    methods: {
+      selectstaff(e) {
+        this.deptBudgetList.personCharge = ''
+        for (var i = 0; i < this.staffList.length; i++) {
+          for (var j = 0; j < e.length; j++) {
+            if (this.staffList[i].staffMobilePhone == e[j]) {
+              this.deptBudgetList.personCharge += this.staffList[i].staffName + ' ' + this.staffList[i]
+                .staffMobilePhone + ','
+            }
+          }
+        }
+        console.log(this.deptBudgetList)
+      },
+       feedbackLeaderChange(e){
+        this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName
+        this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[e].staffMobilePhone
+        console.log(  this.deptBudgetList.feedbackLeader,this.deptBudgetList.feedbackLeaderPhone)
+      },
+      marker(item) {
+        this.deptBudgetList.warehousePositioning =
+          item.lnglat.lat + ',' + item.lnglat.lng
+      },
+      getAddress(data) {
+        console.log('getAddress', data)
+        if (data[4] == 'source') {
+          this.newSelectedOptions = data[0] + '/' + data[1] + '/' + data[2]
+          this.deptBudgetList.sourceProvince = data[0]
+          this.deptBudgetList.sourceCity = data[1]
+          this.deptBudgetList.sourceArea = data[2]
+          this.deptBudgetList.sourceGoods = data[3]
+          this.deptBudgetList.sourceLocation=data[5].lat+','+data[5].lng
+        } else {
+          this.newSelectedOptions1 = data[0] + '/' + data[1] + '/' + data[2]
+          this.deptBudgetList.deliveryProvince = data[0]
+          this.deptBudgetList.deliveryCity = data[1]
+          this.deptBudgetList.deliveryArea = data[2]
+          this.deptBudgetList.placeDelivery = data[3]
+          this.deptBudgetList.deliveryLocation=data[5].lat+','+data[5].lng
+        }
+      },
+      mapInputClick(type) {
+        this.dialogVisible = true
+        this.type = type
+      },
+      blurMap() {
+        this.dialogVisible = false
+      },
+      focusMap() {
+        this.dialogVisible = true
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      returnsales() {
+        this.deptBudgetList = {}
+        this.$router.push({
+          path: 'collectionContract'
+        })
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+      },
+      // 上传附件
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.deptBudgetList.addressUrl = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
+      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
+            var name=[]
+            this.deptBudgetList.personPhone=this.deptBudgetList.personPhone.split(',')
+            // var arr=this.deptBudgetList.personCharge.split(',')
+            // for (let i = 0; i < arr.length; i++) {
+            //   if(arr[i].split(' ')[0]!=''){
+            //     name.push(arr[i].split(' ')[0])
+            //   }
+            // }
+            // this.
+            // console.log(name)
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方送货'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方自提'
+            }
+            if (this.deptBudgetList.agreementType == 1) {
+              this.deptBudgetList.agreementType1 = '销售合同'
+            } else if (this.deptBudgetList.agreementType == 2) {
+              this.deptBudgetList.agreementType1 = '补充协议'
+            }
+          })
+        // 包装方式
+        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
+          })
+            // 收货反馈负责人
+           getstaff({
+            compId: localStorage.getItem('ws-pf_compId')
+          })
+          .toPromise()
+          .then((response) => {
+            this.feedbackLeaders = 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
+              }
+            })
+            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 = localStorage.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 = localStorage.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() {
+        this.unitList.push({
+          flag: 'add',
+          constValue: '',
+          constKey: '',
+        })
+      },
+      submit() {
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractNo.length < 6 ||
+          this.deptBudgetList.contractNo.length > 50
+        ) {
+          this.$message({
+            message: '合同编号长度不符合要求,请输入6到50个字符之内!',
+            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.settlementMethod) {
+          this.$message({
+            message: '结算方式不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.settlementMethod.length < 1 ||
+          this.deptBudgetList.settlementMethod.length > 20
+        ) {
+          this.$message({
+            message: '结算方式长度不符合要求,请输入1到20个字符之内!',
+            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.sellerPhone) {
+          this.$message({
+            message: '请输入卖方电话!',
+            type: 'warning',
+          })
+          return
+        }
+        if (isNaN(this.deptBudgetList.sellerPhone)) {
+          this.$message({
+            message: '输入卖方电话有误!',
+            type: 'warning',
+          })
+          return
+        }
+        // if (this.deptBudgetList.deliverType == '2') {
+        //   if (!this.deptBudgetList.feedbackLeader) {
+        //     this.$message({
+        //       message: '请选择收货反馈负责人',
+        //       type: 'warning',
+        //     })
+        //     return
+        //   }
+        // }
+
+        if (!this.deptBudgetList.acceptanceMethod) {
+          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.agencyCharge) {
+          this.$message({
+            message: '代收费不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.grainDelivery) {
+          this.$message({
+            message: '客户送粮上限不能为空!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          isNaN(this.deptBudgetList.agencyCharge) ||
+          (String(this.deptBudgetList.agencyCharge).indexOf('.') != -1 &&
+            String(this.deptBudgetList.agencyCharge).length -
+            (String(this.deptBudgetList.agencyCharge).indexOf('.') + 1) >
+            2) ||
+          this.deptBudgetList.agencyCharge < 0 ||
+          this.deptBudgetList.agencyCharge > 1000
+        ) {
+          this.$message({
+            message: '代收费填写错误!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.deliveryDateStart) {
+          this.$message({
+            message: '请选择交货日期(起)',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.overShort) {
+          this.$message({
+            message: '请输入溢短装!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          isNaN(this.deptBudgetList.overShort) ||
+          (String(this.deptBudgetList.overShort).indexOf('.') != -1 &&
+            String(this.deptBudgetList.overShort).length -
+            (String(this.deptBudgetList.overShort).indexOf('.') + 1) >
+            2) ||
+          this.deptBudgetList.overShort < 0 ||
+          this.deptBudgetList.overShort > 50
+        ) {
+          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.newSelectedOptions1) {
+          this.$message({
+            message: '请选择交货所在地区!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.placeDelivery) {
+          this.$message({
+            message: '请输入交货详细地址!',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.signingDate) {
+          this.$message({
+            message: '请选择签订日期',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          isNaN(this.deptBudgetList.finalTradingVolume) ||
+          (String(this.deptBudgetList.finalTradingVolume).indexOf('.') != -1 &&
+            String(this.deptBudgetList.finalTradingVolume).length -
+            (String(this.deptBudgetList.finalTradingVolume).indexOf('.') + 1) >
+            3) ||
+          this.deptBudgetList.finalTradingVolume < 0 ||
+          this.deptBudgetList.finalTradingVolume > 200000
+        ) {
+          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.waterContent &&
+            String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.waterContent).length -
+            (String(this.deptBudgetList.contractGoodsInfo.waterContent).indexOf(
+                '.'
+              ) +
+              1) >
+            2) ||
+          this.deptBudgetList.contractGoodsInfo.waterContent > 40 ||
+          this.deptBudgetList.contractGoodsInfo.waterContent < 0
+        ) {
+          this.$message({
+            message: '水分输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.grade) {
+          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('.') !=
+            -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.impurity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.impurity).indexOf(
+                '.'
+              ) +
+              1) >
+            2) ||
+          this.deptBudgetList.contractGoodsInfo.impurity > 40 ||
+          this.deptBudgetList.contractGoodsInfo.impurity < 0
+        ) {
+          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(
+              '.'
+            ) != -1 &&
+            String(this.deptBudgetList.contractGoodsInfo.bulkDensity).length -
+            (String(this.deptBudgetList.contractGoodsInfo.bulkDensity).indexOf(
+                '.'
+              ) +
+              1) >
+            2) ||
+          this.deptBudgetList.contractGoodsInfo.bulkDensity > 1000 ||
+          this.deptBudgetList.contractGoodsInfo.bulkDensity < 0
+        ) {
+          this.$message({
+            message: '容重输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.mildewGrain) {
+          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.deptBudgetList.contractGoodsInfo.mildewGrain > 40 ||
+          this.deptBudgetList.contractGoodsInfo.mildewGrain < 0
+        ) {
+          this.$message({
+            message: '霉变粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.jiaorenli) {
+          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.deptBudgetList.contractGoodsInfo.jiaorenli > 40 ||
+          this.deptBudgetList.contractGoodsInfo.jiaorenli < 0
+        ) {
+          this.$message({
+            message: '热损伤输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.deptBudgetList.contractGoodsInfo.imperfectGrain) {
+          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.deptBudgetList.contractGoodsInfo.imperfectGrain > 40 ||
+          this.deptBudgetList.contractGoodsInfo.imperfectGrain < 0
+        ) {
+          this.$message({
+            message: '不完善粒输入错误',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.contractProcessInfo.goodsNameKey) {
+
+          if (
+            !this.deptBudgetList.contractProcessInfo.goodsNameKey > 1000000000 ||
+            this.deptBudgetList.contractProcessInfo.goodsNameKey < 100 ||
+            (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.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.$confirm(`确定提交本次修改?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning'
+          })
+          .then(() => {
+            this.$refs.deptBudgetList.validate((valid) => {
+              if (valid) {
+                this.deptBudgetList.compId = this.compId
+                this.deptBudgetList.contractType = 1
+                editInfo(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('编辑成功')
+                    this.deptBudgetList = {}
+                    this.$router.push({
+                      path: 'collectionContract'
+                    })
+                  })
+              } 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;
+  }
+
+  /deep/.el-form-item.is-success .el-input__inner,
+  /deep/.el-cascader .el-input .el-input__inner,
+  /deep/.el-textarea__inner {
+    color: #8890b1;
+  }
+
+  .addressUrls {
+    width: 100%;
+    display: flex;
+    margin-top: 10px;
+  }
+
+  .addressUrls-item {
+    position: relative;
+    display: flex;
+  }
+
+  .icon-guanbi {
+    position: absolute;
+    right: 8px;
+  }
+
+  .addressUrl {
+    margin: 0px 10px;
+    border-radius: 3px;
+  }
+
+  //上传文件成功标识
+  /deep/.el-upload-list__item-status-label {
+    position: absolute;
+    right: 22px;
+    top: -1px;
+    line-height: inherit;
+    display: none;
+  }
+
+  .map {
+    position: fixed;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+    width: 850px;
+    height: 400px;
+    background: gainsboro;
+    border-radius: 20px;
+    padding: 10px;
+    box-sizing: border-box;
+    z-index: 99;
+  }
+
+  .amap-container {
+    width: 100% !important;
+  }
+
+  .address-btn {
+    width: 100%;
+    text-align: left;
+    color:#000;
+    border:1px solid #ccc;
+  }
+</style>

+ 692 - 0
src/views/contractManagement/storageContractExamine.vue

@@ -0,0 +1,692 @@
+<!--采购合同查看-->
+<!--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="title-top">
+        代储合同<span class="title-number">【编号:{{ deptBudgetList.contractNo }}】</span>
+        <div class="icon" v-if="deptBudgetList.status">
+          <template>
+            <el-popover placement="right" :width="285" trigger="click" visible-arrow="false"
+              @show="history(deptBudgetList.id)">
+              <template>
+                <div slot="reference"> {{deptBudgetList.status }}</div>
+              </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>
+          </template>
+        </div>
+      </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">
+          {{ 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="storageFee">
+          {{deptBudgetList.storageFee}}
+        </ws-form-item>
+        <ws-form-item label="合同单价(元/吨)" span="1" prop="unitContractPrice" v-if="deptBudgetList.priceType == '定价采购'">
+          {{ deptBudgetList.unitContractPrice }}
+        </ws-form-item>
+        <ws-form-item label="代储费起算重量" span="1" prop="storageFeeWeight">
+          {{deptBudgetList.storageFeeWeight}}
+        </ws-form-item>
+        <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice" v-if="deptBudgetList.priceType == '定价采购'">
+          {{ deptBudgetList.totalContractPrice }}
+        </ws-form-item>
+         <ws-form-item label="代储费起算日期" span="1" prop="storageFeeStartdate">
+          {{deptBudgetList.storageFeeStartdate}}
+        </ws-form-item>
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          {{ deptBudgetList.signingDate }}
+        </ws-form-item>
+        <ws-form-item label="代储费预计终止日期" span="1" prop="storageFeeEnddate">
+          {{deptBudgetList.storageFeeEnddate}}
+        </ws-form-item>
+        <ws-form-item label="最终实际交易量(吨)" span="1" prop="finalTradingVolume">
+          {{ deptBudgetList.finalTradingVolume }}
+        </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="mildewGrain">
+          {{deptBudgetList.contractProcessInfo.mildewGrain}}
+        </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="mildewGrain">
+         {{deptBudgetList.contractProcessInfo.mildewGrain}}
+       </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>
+      <div style=" color: #afb5cb;margin-left: 20px;">
+        {{ deptBudgetList.remarks }}
+      </div>
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :editable="false"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
+    </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,
+    billoperatehis,
+  } from '@/model/contarct/index'
+  import {
+    gettaskhistories
+  } from '@/model/tasksport/index'
+  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: '',
+        status: '',
+        // 提交类型
+        submitType: true,
+        historyList: [],
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+        ruleDeptBudget: [],
+        taskhistories: [],
+        deptBudgetList: {
+          contractProcessInfo: {},
+          contractGoodsInfo: {},
+        },
+        mainReportAdd: {},
+        list: {},
+        compId: localStorage.getItem('ws-pf_compId'),
+      }
+    },
+
+    activated() {
+      this.status = this.$route.query.status
+      this.loaddata()
+      this.showType = this.isShow
+    },
+    methods: {
+      loaddata() {
+        gettaskhistories({
+            businessKey: this.$route.query.id,
+            workflowId: this.$route.query.workflowId
+          }).toPromise()
+          .then((response) => {
+            this.taskhistories = response
+          })
+        // 数据
+        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: 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
+              }
+            })
+            //
+            if (currItem) {
+              this.selectContract(currItem.constValue)
+            }
+          })
+      },
+      history(id1) {
+        billoperatehis({
+            id: id1
+          })
+          .toPromise()
+          .then((response) => {
+            this.historyList = response
+          })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      returnsales() {
+        this.$router.go(-1)
+      },
+    },
+  }
+</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;
+    color: #afb5cb;
+  }
+
+  /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;
+  }
+
+  .vertical-text-left {
+    width: 62px;
+    text-align: right;
+  }
+
+  .vertical-text {
+    margin: 0 10px;
+    color: #8890b1;
+    font-size: 12px;
+    margin-top: -4px;
+  }
+
+  .vertical-line {
+    height: 100px;
+    border-left: 2px solid #e9ecf7;
+    margin-left: 4px;
+    padding: 0 3px;
+  }
+
+  .vertical-circle {
+    width: 10px;
+    height: 10px;
+    border: 2px solid #5878e8;
+    background-color: #ffffff;
+    -webkit-border-radius: 100px;
+  }
+
+  .vertical-circle:first-child {
+    color: red;
+  }
+
+  .icon {
+    display: inline-block;
+    width: 60px;
+    background: #ecfeff;
+    border-radius: 12px;
+    border: 1px solid #50cad4;
+    position: relative;
+    font-size: 14px;
+    color: #50cad4;
+    padding: 1px 7px;
+  }
+
+  .title-top {
+    margin-top: 20px;
+    font-size: 21px;
+    font-weight: 600;
+  }
+
+  .title-number {
+    font-size: 14px;
+    font-weight: 400;
+  }
+</style>

+ 1655 - 0
src/views/contractManagement/storageContractRecord.vue

@@ -0,0 +1,1655 @@
+<!--付款管理-->
+<template>
+  <div>
+    <div class="mask" v-show="isShowPrintType"></div>
+    <div class="print-type" v-show="isShowPrintType">
+      <div class="print-type-content">
+        <div class="print-type-title">打印凭证</div>
+        <div class="print-type-checkbox">
+          <el-checkbox-group v-model="ruleForm.type">
+            <el-checkbox label="打印身份证(正反面)" name="type" class="label-width" @change="selectType"></el-checkbox>
+            <el-checkbox label="打印银行卡(正反面)" name="type" class="label-width" @change="selectType"></el-checkbox>
+            <el-checkbox label="打印结算凭证" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
+            <el-checkbox label="打印检斤单" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
+            <el-checkbox label="打印回执单" name="type" class="label-width" @change="selectType($event)"></el-checkbox>
+          </el-checkbox-group>
+        </div>
+      </div>
+      <div class="bottom-btn">
+        <el-button @click="typePrintClick(printType)">确定</el-button>
+        <el-button @click="typePrintCannelClick">取消</el-button>
+      </div>
+    </div>
+    <div class="top-btn">
+      <div class="left">
+        <ws-button :type="searchType == '' ? 'primary' : ''" @click="screen(-1)">全部</ws-button>
+           <ws-button v-hasPermission="`acquisitionManagement.acquisitionPay.pay`" :type="searchType == 7 ? 'primary' : ''" @click="screen(7)">未付款</ws-button>
+         <ws-button :type="searchType == 1 ? 'primary' : ''" @click="screen(1)">已付款</ws-button>
+         <ws-button :type="searchType == 1 ? 'primary' : ''" @click="screen(1)">未收款</ws-button>
+          <ws-button :type="searchType == 1 ? 'primary' : ''" @click="screen(1)">已收款</ws-button>
+        <ws-button :type="searchType == 1 ? 'primary' : ''" @click="screen(1)">待审核</ws-button>
+
+        <ws-button :type="searchType == 2 ? 'primary' : ''" @click="screen(2)"
+          v-hasPermission="`acquisitionManagement.acquisitionPay.add`">待结算</ws-button>
+          <ws-button :type="invoicing === 0 ? 'primary' : ''" @click="screen(0)">未开自采发票</ws-button>
+        <ws-button :type="invoicing === 0 ? 'primary' : ''" @click="screen(0)">未开销售发票</ws-button>
+      </div>
+      <div class="right">
+        <el-select class="warehouse_select" v-model="warehouseNameKey" placeholder="请选择仓库" @change="warehouseChange"
+          filterable clearable style="margin: 0 10px">
+          <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
+          </el-option>
+        </el-select>
+        <el-date-picker class="date-select" size="small" style="margin: 0 10px 0 0" value-format="yyyy-MM-dd" v-model="value2" @change="datechange"
+          type="daterange" align="right" unlink-panels range-separator="至" start-placeholder="结算时间起"
+          end-placeholder="结算时间止">
+        </el-date-picker>
+        <div class="serch">
+          <ws-input class='findinput' @keyup.enter.native="find()" v-model="searchKeyWord" placeholder="可按编号、客户名、车牌号查找"
+            clearable maxlength="500" type="input">
+          </ws-input>
+          <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+          <ws-button class="find" type="primary" @click="find()">
+            <img width="16" height="16" src="../../../public/img/sousuo.png" alt />
+          </ws-button>
+        </div>
+
+      </div>
+    </div>
+    <div class="top-btn-two">
+      <div class="left">
+        <ws-button type="primary" @click="reject">结算</ws-button>
+        <ws-button type="primary" @click="reject">驳回</ws-button>
+        <ws-button type="primary" @click="adopt">通过</ws-button>
+       <ws-button type="primary" @click="payment" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">付款
+       </ws-button>
+       <ws-button type="primary" @click="payment" v-hasPermission="`acquisitionManagement.acquisitionPay.pay`">收款
+       </ws-button>
+       <ws-button type="primary" @click="selectPrint(1)"
+         v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">财务批量打印
+       </ws-button>
+       <ws-button type="primary" @click="invoicingClick"
+          v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">开自采发票</ws-button>
+          <ws-button type="primary" @click="invoicingClick"
+             v-hasPermission="`acquisitionManagement.acquisitionPay.finace`">开销售发票</ws-button>
+        <ws-button type="primary" @click="exportlist" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">导出
+        </ws-button>
+        <ws-button type="primary" @click="exportlist" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">导入
+        </ws-button>
+        <ws-button type="primary" @click="agreementPrint()"
+          v-hasPermission="`acquisitionManagement.acquisitionPay.dow`">模板下载
+        </ws-button>
+      </div>
+    </div>
+    <div class="content-top">
+      <div class="content-top-item">合同编号:1234567</div>
+      <div class="content-top-item">买方:xxx公司</div>
+      <div class="content-top-item">货名:玉米</div>
+      <div class="content-top-item">合同量:10000吨</div>
+      <div class="content-top-item">已完成量:9000吨</div>
+      <div class="content-top-item">代收费:10元/吨</div>
+    </div>
+    <el-table :data="paymentList" ref="table" style="width: 100%; margin-top: 20px" border height="calc(100% - 190px)"
+      @row-click="handleRowClick" @selection-change="handleSelectionChange" :summary-method="getSummaries" show-summary>
+      <el-table-column :selectable="selectInit" type="selection" width="30"></el-table-column>
+      <el-table-column type="index" label="序号" width="50">
+        <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 class="table_td" prop="customerName" label="客户" sortable>
+        <template slot-scope="scope">
+          <div @click.stop="customer(scope.row)">
+            <span class="text_css">{{ scope.row.customerName }}</span>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
+      <el-table-column class="table_td" prop="goodsName" width="70" label="货名"></el-table-column>
+      <el-table-column class="table_td" prop="goodsName" width="70" label="等级"></el-table-column>
+      <el-table-column class="table_td" prop="netWeight" width="100" label="净重(吨)"></el-table-column>
+       <el-table-column class="table_td" prop="netWeight" width="100" label="收购单价(元/吨)"></el-table-column>
+       <el-table-column class="table_td" prop="amountIngPayable" width="80" label="应付(元)"></el-table-column>
+       <el-table-column class="table_td" prop="amountEdPayable" width="80" label="已付(元)"></el-table-column>
+         <el-table-column class="table_td" prop="status" width="80" label="自采发票">
+           <template scope="scope">
+             <span v-if="scope.row.invoicing == '0'">未开票</span>
+             <span v-else>已开票</span>
+           </template>
+         </el-table-column>
+          <el-table-column class="table_td" prop="netWeight" width="100" label="销售单价(元/吨)"></el-table-column>
+          <el-table-column class="table_td" prop="amountIngPayable" width="80" label="应收(元)"></el-table-column>
+          <el-table-column class="table_td" prop="amountEdPayable" width="80" label="已收(元)"></el-table-column>
+         <el-table-column class="table_td" prop="status" width="80" label="销售发票">
+           <template scope="scope">
+             <span v-if="scope.row.invoicing == '0'">未开票</span>
+             <span v-else>已开票</span>
+           </template>
+         </el-table-column>
+
+           <el-table-column class="table_td" prop="updateDate" label="更新时间" width="150" sortable></el-table-column>
+
+
+      <el-table-column class="table_td" prop="status" width="80" label="状态">
+        <template scope="scope">
+          <span v-if="scope.row.approveStatus">{{
+            scope.row.approveStatus
+          }}</span>
+          <span v-else>{{ scope.row.status }}</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column class="table_td" prop="collectionEdPayable" label="操作" width="300">
+        <template scope="scope">
+          <el-button @click="rowLook(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.view`">查看
+          </el-button>
+          <el-button @click="rowEdit(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.print`">编辑</el-button>
+          <el-button type="danger" v-if="
+              (!scope.row.approveStatus ||
+                scope.row.approveStatus == '待结算') &&
+              scope.row.status == '待结算'
+            " @click="del(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionPay.delete`">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <!-- 付款弹窗 -->
+    <el-dialog width="40%" :visible.sync="paymentForm" :append-to-body="true" title="付款">
+      <div class="tanchuang">
+        <ws-form>
+          <ws-info-table>
+            <ws-form-item label="未付金额(元)" prop="amountNotPayable">
+              {{ payments.amountNotPayable }}
+            </ws-form-item>
+            <ws-form-item label="本次付款金额(元)" prop="money">
+              <ws-input type="number" @mousewheel.native.prevent v-model="payments.money" placeholder="请输入本次付款金额(元)"
+                maxlength="100" size="small" />
+            </ws-form-item>
+            <ws-form-item label="付款日期" prop=" paymentDate">
+              <el-date-picker v-model="payments.paymentDate" type="date" placeholder="选择日期"></el-date-picker>
+            </ws-form-item>
+            <ws-form-item label="上传截图" prop=" paymentScreenshot"></ws-form-item>
+            <div class="upLoad">
+              <el-upload class="avatar-uploader" action="https://www.zthymaoyi.com/upload/admin" :show-file-list="false"
+                :on-success="handleAvatarSuccess">
+                <img v-if="imageUrl" :src="imageUrl" class="avatar" />
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+              </el-upload>
+            </div>
+          </ws-info-table>
+          <div style="text-align: center; margin-top: 20px">
+            <el-button @click="paymentForm = false">取消</el-button>
+            <el-button @click="paymentSubmit">提交</el-button>
+          </div>
+        </ws-form>
+      </div>
+    </el-dialog>
+    <!-- 付款截图 -->
+<!--    <el-dialog width="50%" :visible.sync="showPayImgs" :append-to-body="true" title="付款截图">
+      <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+        :on-success="handleAvatarSuccess1" :file-list='payImg' :limit='1'>
+        <i slot="default" class="el-icon-plus"></i>
+        <div slot="file" slot-scope="{file}">
+          <img class="el-upload-list__item-thumbnail" :src="file.url" alt="">
+
+          <span class="el-upload-list__item-actions">
+            <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
+              <i class="el-icon-zoom-in"></i>
+            </span>
+            <span v-if="!disabled" class="el-upload-list__item-delete" @click="_handleRemove(file)">
+              <i class="el-icon-delete"></i>
+            </span>
+          </span>
+        </div>
+      </el-upload>
+      <div style="text-align: center; margin: 10px auto">
+        <el-button @click="showPayImgs = false" type="primary">关闭</el-button>
+      </div>
+    </el-dialog> -->
+    <div style="text-align: center">
+      <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>
+      <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint"
+        :title="printData.compName + '结算凭证'">
+        <paymentPrint :printData="printData" :customerInfo="customerList" :showType="ruleForm.type"></paymentPrint>
+        <div style="text-align: center">
+          <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
+          <!-- <el-button type="primary" @click="printSmall">打印小票</el-button> -->
+          <el-button type="primary" @click="printBig">打印单据</el-button>
+        </div>
+      </el-dialog>
+    </div>
+    <el-dialog :visible.sync="dialogVisible">
+      <img width="100%" :src="dialogImageUrl" alt="">
+    </el-dialog>
+    <!--客户信息-->
+    <el-dialog width="20%" title="客户信息" :visible.sync="customerInfo" :append-to-body="true" :close="customerclose">
+      <el-form class="customer" label-position="right" label-width="120px">
+        <el-form-item class="customer-item" label="客户" >
+         <el-select class="warehouse_select" v-model="warehouseNameKey" placeholder="客户姓名" @change="warehouseChange"
+           filterable clearable style="margin: 0 10px">
+           <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
+           </el-option>
+         </el-select>
+        </el-form-item>
+
+        <el-form-item class="customer-item" label="身份证号" >
+          <el-input v-model="customerlist.customerNumberCard" placeholder="请输入身份证号" maxlength="100"
+            size="small" />
+        </el-form-item>
+        <el-form-item class="customer-item" label="车牌号" >
+          <el-input v-model="customerlist.customerNumberCard" placeholder="请输入车牌号" maxlength="100"
+            size="small" />
+        </el-form-item>
+        <el-form-item class="customer-item" label="净重(吨)">
+          <el-input v-model="customerlist.customerNumberCard" placeholder="请输入净重" maxlength="100"
+            size="small" />
+        </el-form-item>
+        <el-form-item class="customer-item" label="等级">
+         <el-select class="warehouse_select" v-model="warehouseNameKey" placeholder="等级" @change="warehouseChange"
+           filterable clearable style="margin: 0 10px">
+           <el-option v-for="item in warehouseList" :key="item.id" :label="item.warehouseName" :value="item.id">
+           </el-option>
+         </el-select>
+        </el-form-item>
+        <el-form-item class="customer-item" label="收购单价(元)">
+         <el-input v-model="customerlist.customerNumberCard" placeholder="收购单价" maxlength="100"
+           size="small" />
+        </el-form-item>
+        <el-form-item class="customer-item" label="入库日期">
+          </el-date-picker>
+           <el-date-picker
+                v-model="value2"
+                type="datetime"
+                placeholder="选择日期时间">
+              </el-date-picker>
+        </el-form-item>
+        <el-form-item class="customer-item" label="销售单价(元)">
+          <el-input v-model="customerlist.customerNumberCard" placeholder="销售单价" maxlength="100"
+            size="small" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="customerclose">取 消</el-button>
+      </div>
+    </el-dialog>
+<!--    <el-dialog width="50%" title="付款回执单" :visible.sync="isPreviewPayOrder" :close="paymentReceiptClose">
+      <div class="no-messege" v-if="!paymentReceipt">暂未上传付款回执单</div>
+      <el-image class="my-img" ref="myImg" v-if="paymentReceipt" :src="paymentReceipt"
+        :preview-src-list="[paymentReceipt]">
+      </el-image>
+    </el-dialog>
+ -->
+  </div>
+</template>
+<script>
+  import {
+    dayjs,
+    EventBus
+  } from 'base-core-lib'
+  import {
+    downloadFile
+  } from '@/utils/batchDown'
+  import JSZip from 'jszip'
+  import FileSaver from 'file-saver'
+  import {
+    getpayment,
+    selectWarehouseSelf,
+    delpayment,
+    auditpayment,
+    getpaymentexamine,
+    getCustomerLook,
+    paymentCommit,
+    getJurisdiction,
+    invoicing,
+    export1,
+    settlementEdit,
+    workflowcontent
+  } from '@/model/houseSelfCollect/index'
+  import {
+    posthandle,
+    postqueryhandle
+  } from '@/model/purchasingManagement/index'
+  import paymentPrint from './component/paymentPrint.vue'
+  import {
+    getHp
+  } from '@/utils/getHasPermission'
+  import download from '../../components/WsDownload/download'
+  export default {
+    components: {
+      paymentPrint,
+    },
+    watch: {},
+    data() {
+      return {
+        viewLock:false,
+        paymentReceipt: '',
+        isPreviewPayOrder: false,
+        printType: 0,
+        isShowPrintType1: true,
+        isShowPrintType2: true,
+        isShowPrintType3: true,
+        isShowPrintType4: true,
+        customerInfo: false,
+        form: {},
+        formLabelWidth: '300px',
+        invoicing: '',
+        deleteshow: false,
+        customerlist: {
+          payeeAddressUrls: [],
+        },
+
+        ruleForm: {
+          type: [
+            '打印身份证(正反面)',
+            '打印银行卡(正反面)',
+            '打印结算凭证',
+            '打印检斤单',
+            '打印回执单'
+            // '打印发票'
+          ],
+        },
+        row: {},
+        isShowPrintType: false,
+        customerList: {
+          customerName: '',
+          customerNumberCard: '',
+          bankCard: '',
+          bankDeposit: '',
+        },
+        selectCustomerList: [],
+        selectPrintList: [],
+        identity: [],
+        //分页
+        currentPage: 1,
+        pageSize: 10,
+        paymentList: [],
+        deptCircularPage: {},
+        deptBudgetTotal: 0,
+        paymentForm: false,
+        searchType: '',
+        searchTypeText: '',
+        searchKeyWord: '',
+        warehouseList: [],
+        warehouseNameKey: '',
+        warehouseName: '',
+        isShowPrint: false,
+        printData: {},
+        warehouse: [],
+        disabled: false,
+        dialogImageUrl: '',
+        dialogVisible: false,
+        value1: '', //付款日期
+        modification: [],
+        userJurisdiction: true,
+        payments: {
+          amountNotPayable: 0,
+          paymentDate: '',
+        },
+        showPayImgs: false,
+        isShowAdopt: false,
+        //上传截图路径
+        imageUrl: '',
+        payImg: [],
+        rowData: {},
+        value2: [],
+        date: {
+          year: dayjs().format('YYYY'),
+          month: dayjs().format('MM'),
+        },
+      }
+    },
+    activated() {
+      this.userJurisdiction = getHp('acquisitionManagement.acquisitionPay.print')
+      this.getPassYearFormatDate()
+      this.getWarehouse()
+      // this.getList()
+    },
+    updated() {
+      this.$nextTick(() => {
+        this.$refs['table'].doLayout()
+      })
+    },
+    methods: {
+      rowLook(row){
+        this.customerInfo = true
+        this.viewLock = true
+      },
+      rowEdit(row){
+        this.customerInfo = true
+      },
+      imgshow() {
+        this.deleteshow = false
+        console.log(11111)
+      },
+      handlePictureCardPreview(file) {
+        this.dialogImageUrl = file.url;
+        this.dialogVisible = true;
+      },
+      previewPayOrder(val) {
+        this.paymentReceipt = val.paymentScreenshot
+        this.isPreviewPayOrder = true
+        console.log(val.paymentScreenshot)
+
+      },
+      paymentReceiptClose() {},
+      datechange() {
+        this.getList()
+      },
+      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] // 默认赋值一年时间
+      },
+      selectPrint() {
+        console.log('批量打印数据', this.modification)
+        this.printType = 1
+        this.isShowPrintType = true
+      },
+      agreementPrint() {
+        var arr = []
+        for (let i = 0; i < this.modification.length; i++) {
+          if (this.modification[i].pictureAddress) {
+            arr.push({
+              fileUrl: this.modification[i].pictureAddress,
+              renameFileName: '结算单' + i + '.png',
+            })
+          }
+
+        }
+        if (arr.length > 0) {
+          this.filesToRar(arr, '结算单文件')
+        }
+      },
+      async exportlist() {
+        console.log('导出数据', this.modification)
+        let _data = {
+          paymentManagementList: this.modification,
+        }
+        const {
+          data
+        } = await export1(
+          _data, {}, {
+            responseType: 'blob',
+          }
+        ).toPromise()
+        downloadFile({
+          res: data,
+          fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }结算凭证`,
+          type: 'xls',
+        })
+      },
+      filesToRar(arrImages, filename) {
+        let _this = this
+        let zip = new JSZip()
+        let cache = {}
+        let promises = []
+        _this.title = '正在加载压缩文件'
+        for (let item of arrImages) {
+          const promise = _this.getImgArrayBuffer(item.fileUrl).then((data) => {
+            // 下载文件, 并存成ArrayBuffer对象(blob)
+            zip.file(item.renameFileName, data, {
+              binary: true
+            }) // 逐个添加文件
+            cache[item.renameFileName] = data
+          })
+          promises.push(promise)
+        }
+        Promise.all(promises)
+          .then(() => {
+            zip.generateAsync({
+              type: 'blob'
+            }).then((content) => {
+              _this.title = '正在压缩'
+              // 生成二进制流
+              FileSaver.saveAs(content, filename) // 利用file-saver保存文件 自定义文件名
+              _this.title = '压缩完成'
+            })
+          })
+          .catch((res) => {
+            _this.$message.error('文件压缩失败')
+          })
+      },
+      //获取文件blob
+      getImgArrayBuffer(url) {
+        let _this = this
+        return new Promise((resolve, reject) => {
+          //通过请求获取文件blob格式
+          let xmlhttp = new XMLHttpRequest()
+          xmlhttp.open('GET', url, true)
+          xmlhttp.responseType = 'blob'
+          xmlhttp.onload = function() {
+            if (this.status == 200) {
+              resolve(this.response)
+            } else {
+              reject(this.status)
+            }
+          }
+          xmlhttp.send()
+        })
+      },
+      invoicingClick() {
+        // let data = JSON.stringify({
+        //   paymentManagementList : this.modification
+        // })
+        // //开票
+        //   invoicing(data)
+        //   .toPromise()
+        //   .then(response => {
+        //     console.log(response)
+        //   })
+
+        let data = {
+          paymentManagementList: this.modification,
+        }
+        for (let i = 0; i < this.modification.length; i++) {
+          if (
+            this.modification[i].status != '全部付款' &&
+            this.modification[i].status != '部分付款' &&
+            this.modification[i].status != '已通过'
+          ) {
+            this.$message.error('开票只能选择全部付款或部分付款或已通过!')
+            return
+          }
+        }
+        //开票
+        invoicing(data)
+          .toPromise()
+          .then((response) => {
+            if (response.length > 0) {
+              var arr = []
+              for (let i = 0; i < response.length; i++) {
+                arr.push({
+                  fileUrl: response[i],
+                  renameFileName: '发票' + i + '.xml',
+                })
+              }
+              this.filesToRar(arr, '开票XML文件')
+            }
+          })
+          .catch(() => {})
+      },
+      customer(row) {
+        getCustomerLook({
+            id: row.identityId,
+            authenticationStatusKey: 7,
+          })
+          .toPromise()
+          .then((response) => {
+            this.customerInfo = true
+            this.customerlist = response
+            this.customerlist.cardAddressUrl1 =
+              this.customerlist.cardAddressUrl.split(',')[0]
+            this.customerlist.cardAddressUrl2 =
+              this.customerlist.cardAddressUrl.split(',')[1]
+            this.customerlist.payeeAddressUrls =
+              this.customerlist.payeeAddressUrl.split(',')
+          })
+      },
+      customerclose(e) {
+        //  row.textcss = false
+        this.customerInfo = false
+      },
+      //合计
+      getSummaries(param) {
+        console.log(param)
+        const {
+          columns,
+          data
+        } = param
+        const sums = []
+        var _number = []
+        if (this.warehouseName == "鲅鱼圈金信库") {
+          _number = [11, 12, 16, 17, 18]
+        } else {
+          _number = [10, 11, 15, 16, 17]
+        }
+        if (this.modification.length > 0) {
+          columns.forEach((column, index) => {
+            console.log(column, index)
+            if (index === 0) {
+              sums[index] = '合计'
+            } else if (index === 10 || index === 11 || index === 15 || index === 16) {
+              const values = this.modification.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] = '元'
+              }
+            } else {
+              sums[index] = '--'
+            }
+          })
+        } else {
+          columns.forEach((column, index) => {
+            if (index === 0) {
+              sums[index] = '合计'
+            } else if (index === _number[0] || index === _number[1] || index === _number[2] || index === _number[
+              3] || index === _number[4]) {
+              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] = '元'
+              }
+            } else {
+              sums[index] = '--'
+            }
+          })
+        }
+
+        // sums[6]=sums[6].toFixed(2)
+        // sums[sums.length-2]=sums[sums.length-2].toFixed(2)
+        return sums
+      },
+      selectType(val) {
+        for (let i = 0; i < this.ruleForm.type.length; i++) {
+          switch (this.ruleForm.type[i]) {
+            case '打印身份证(正反面)':
+              this.isShowPrintType1 = !this.isShowPrintType1
+              break
+            case '打印银行卡(正反面)':
+              this.isShowPrintType2 = !this.isShowPrintType2
+              break
+            case '打印结算凭证':
+              this.isShowPrintType3 = !this.isShowPrintType3
+            case '打印检斤单':
+              this.isShowPrintType4 = !this.isShowPrintType4
+              break
+          }
+        }
+      },
+      typePrintCannelClick() {
+        this.isShowPrintType = false
+      },
+      typePrintClick(type) {
+        // type 1批量打印 0单个打印
+        //  this.isShowPrint = true
+        this.selectCustomerList = []
+        this.selectPrintList = []
+        if (type == 1) {
+          let index1 = 0
+          let index2 = 0
+          for (let i = 0; i < this.modification.length; i++) {
+            getCustomerLook({
+                id: this.modification[i].identityId,
+                authenticationStatusKey: 7,
+              })
+              .toPromise()
+              .then((response) => {
+                this.selectCustomerList.push(response)
+                index2++
+                if (
+                  index1 == this.modification.length &&
+                  index2 == this.modification.length
+                ) {
+                  this.printData.compName = ''
+                  // this.isShowPrint = true
+                  this.printBig()
+                }
+                getpaymentexamine({
+                    id: this.modification[i].id,
+                  })
+                  .toPromise()
+                  .then((response) => {
+                    if (response.compName == '黑龙江秋收有限公司') {
+                      response.compName = '黑龙江中天昊元贸易有限公司'
+                    }
+                    index1++
+                    let date = new Date()
+                    response.currentTime =
+                      date.getFullYear() +
+                      '年' +
+                      Number(date.getMonth() + 1) +
+                      '月' +
+                      date.getDate() +
+                      '日'
+                    this.selectPrintList.push(response)
+                    if (
+                      index1 == this.modification.length &&
+                      index2 == this.modification.length
+                    ) {
+                      this.printData.compName = ''
+                      // this.isShowPrint = true
+                      this.printBig()
+                    }
+                  })
+              })
+          }
+        } else {
+          let _url1 = process.env.VUE_APP_BASE_API + '/identityAuthenticationInfo/api/getIdentityAuthenticationInfo'
+          let _url2 = process.env.VUE_APP_BASE_API + '/paymentManagement/getInfo'
+          this.$axios.all([
+            this.$axios.get(_url1, {
+              params: {
+                id: this.rowData.identityId,
+                authenticationStatusKey: 7,
+              }
+            }).then(res => res.data),
+            this.$axios.get(_url2, {
+              params: {
+                id: this.rowData.id
+              }
+            }).then(res => res.data)
+          ]).then(
+            this.$axios.spread((val1, val2) => {
+              // val 是数组中每个接口返回的值 res.data
+              console.log('两个接口全部加载完成', val1, val2);
+              this.printData = val2.data
+              if (val2.data.compName == '黑龙江秋收有限公司') {
+                this.printData.compName = '黑龙江中天昊元贸易有限公司'
+              }
+              this.isShowPrint = true
+              // if(this.printData.solidGrainPrice){
+              //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
+              // }
+              let date = new Date()
+              this.printData.currentTime =
+                date.getFullYear() +
+                '年' +
+                Number(date.getMonth() + 1) +
+                '月' +
+                date.getDate() +
+                '日'
+            })
+          ).catch(err => {
+            console.log(err);
+          })
+          // getCustomerLook({
+          //     id: this.rowData.identityId,
+          //     authenticationStatusKey: 7,
+          //   })
+          //   .toPromise()
+          //   .then((response) => {
+          //     this.customerList = response
+          //     getpaymentexamine({
+          //         id: this.rowData.id,
+          //       })
+          //       .toPromise()
+          //       .then((response) => {
+          //         this.printData = response
+          //         this.isShowPrint = true
+          //         // if(this.printData.solidGrainPrice){
+          //         //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
+          //         // }
+          //         let date = new Date()
+          //         this.printData.currentTime =
+          //           date.getFullYear() +
+          //           '年' +
+          //           Number(date.getMonth() + 1) +
+          //           '月' +
+          //           date.getDate() +
+          //           '日'
+          //       })
+          //   })
+        }
+      },
+      handleRowClick(row) {
+        // if (row.status != '已驳回') {
+        //   if (
+        //     row.taskId == null &&
+        //     row.status != '已通过' &&
+        //     row.status != '部分付款'
+        //   ) {
+        //     return false
+        //   } else {
+        //     this.$refs.paymentList.toggleRowSelection(row)
+        //     return true
+        //   }
+        // } else {
+        //   this.$refs.paymentList.toggleRowSelection(row)
+        //   return true
+        // }
+        return true
+      },
+      handlepass() {
+        var that = this
+        if (this.modification.length == 0) {
+          this.$message.warning('请选择要通过的条目')
+        } else {
+          this.$confirm(`审核通过后,任务将发送给财务,是否确定通过?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          }).then(() => {
+            that.audit(this.modification[0], 0, true, 2)
+          })
+        }
+      },
+      //查看付款截图
+      showPayImg(row) {
+        // if (!row.paymentScreenshot) {
+        //   this.$message({
+        //     message: '暂无付款截图!',
+        //     type: 'warning',
+        //   })
+        //   return
+        // } else {
+        this.showPayImgs = true
+        this.id = row.id
+        var arr = row.paymentScreenshot.split('$')
+        console.log(arr)
+        this.payImg = []
+        for (let i = 0; i < arr.length; i++) {
+          if (arr[i] != '') {
+            this.payImg.push({
+              url: arr[i]
+            })
+          }
+        }
+        // }
+      },
+      getWarehouse() {
+        let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
+        _wareHouse = JSON.parse(_wareHouse)
+        selectWarehouseSelf({
+            compId: localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.warehouseList = response
+            if (this.$route.query.warehouseName) {
+              //判断是否在任务页面进来
+              this.warehouseName = this.$route.query.warehouseName
+              this.warehouseNameKey = this.$route.query.warehouseName
+              this.getList()
+            } else {
+              for (let index = 0; index < this.warehouseList.length; index++) {
+                if (_wareHouse && _wareHouse.value == this.warehouseList[index].warehouseName) {
+                  this.warehouseName = this.warehouseList[index].warehouseName
+                  this.warehouseNameKey = this.warehouseList[index].warehouseName
+                  break
+                } else {
+                  this.warehouseNameKey = this.warehouseList[0].id
+                  if (this.warehouseName) {
+                    this.warehouseNameKey = this.WAREHOUSE[3].payname
+                  } else {
+                    this.WAREHOUSE[3].payname = this.warehouseList[0].id
+                    this.warehouseName = this.warehouseList[0].warehouseName
+                  }
+                }
+              }
+            }
+            this.getList()
+          })
+      },
+      //上传付款截图
+      handleAvatarSuccess(e) {
+        this.imageUrl = e.url
+      },
+      handleAvatarSuccess1(file) {
+        if (this.payImg[0]) {
+          this.$set(this.payImg[0], 'url', file.url)
+        } else {
+          this.payImg[0] = {
+            url: file.url
+          }
+        }
+        settlementEdit({
+            id: this.id,
+            paymentScreenshot: this.payImg[0].url
+          }).toPromise()
+          .then((response) => {
+            this.showPayImgs = false
+            this.$message.success('修改成功')
+            this.getList()
+          })
+      },
+      _handleRemove() {
+        this.payImg[0].url = ''
+        settlementEdit({
+            id: this.id,
+            paymentScreenshot: this.payImg[0].url
+          }).toPromise()
+          .then((response) => {
+            this.showPayImgs = false
+            this.$message.success('修改成功')
+            this.getList()
+          })
+      },
+      printSmall() {
+        window.open(
+          '../../../../../static/payprint.html?type=1&dataList=' +
+          JSON.stringify(this.printData)
+        )
+      },
+      printBig() {
+        let _list1 = []
+        let _list2 = []
+        if (this.printType == 1) {
+          localStorage.setItem('cwprint', true)
+          // 财务批量打印数据
+          localStorage.setItem(
+            'selectPrint_selectPrintList',
+            JSON.stringify(this.selectPrintList)
+          )
+          localStorage.setItem(
+            'selectPrint_selectCustomerList',
+            JSON.stringify(this.selectCustomerList)
+          )
+        } else if (this.printType == 0) {
+          localStorage.setItem('cwprint', true)
+          _list1 = JSON.stringify(this.printData)
+          _list2 = JSON.stringify(this.customerList)
+        } else {
+          _list1 = JSON.stringify(this.printData)
+          _list2 = JSON.stringify(this.customerList)
+        }
+        window.open(
+          '../../../../../static/payprint.html?type=2&dataList=' +
+          _list1 +
+          '&customerList=' +
+          _list2 +
+          '&printTypeList=' +
+          this.ruleForm.type,
+          '结算凭证'
+        )
+      },
+      getList() {
+        this.payments = {
+          amountNotPayable: 0,
+          paymentDate: '',
+        }
+        var searchParam = ''
+        if (this.searchType != -1) {
+          searchParam = this.searchType
+        }
+        var startDate = ''
+        var endDate = ''
+        if (this.value2) {
+          startDate = this.value2[0] ? this.value2[0] : ''
+          endDate = this.value2[1] ? this.value2[1] : ''
+        }
+
+        getpayment({
+            currentPage: this.currentPage,
+            pageSize: this.pageSize,
+            startDate: startDate,
+            endDate: endDate,
+            searchKeyWord: this.searchKeyWord,
+            searchType: searchParam,
+            warehouseName: this.warehouseName,
+            managementType: 1,
+            invoicing: this.invoicing,
+            compId: localStorage.getItem('ws-pf_compId'),
+          })
+          .toPromise()
+          .then((response) => {
+            this.paymentList = response.records
+            this.deptBudgetTotal = response.total
+          })
+        // getJurisdiction({
+        //   managementType: 1,
+        //   warehouseName: this.warehouseName,
+        //   compId: localStorage.getItem('ws-pf_compId')
+        // })
+        //   .toPromise()
+        //   .then(response => {
+        //     this.isShowAdopt = response
+        //   })
+      },
+      del(row) {
+        this.$confirm(
+            '对应的质检和检斤记录将一并删除,是否确定删除操作?',
+            '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            }
+          )
+          .then(() => {
+            delpayment({
+                id: row.id,
+              })
+              .toPromise()
+              .then((response) => {
+                this.$message.success('删除成功')
+                this.getList()
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      screen(num) {
+        if (num == 0) {
+          this.searchType = -1
+          this.invoicing = num
+        } else {
+          this.invoicing = ''
+          this.searchType = num
+        }
+        this.currentPage = 1
+        this.getList()
+      },
+      find() {
+        this.getList()
+      },
+      settlement(index, row) {
+        if (row.goodsName) {
+          localStorage.setItem('paymentManagementReturn', false)
+          this.$router.push({
+            path: 'settlement',
+            query: {
+              type: index,
+              id: row.id,
+            },
+          })
+        }
+      },
+      payment() {
+        this.imageUrl = ''
+        if (this.modification.length == 0) {
+          this.$message.warning('请选择要付款的条目')
+        } else {
+          for (let i = 0; i < this.modification.length; i++) {
+            if (this.modification[i].status != '已驳回') {
+              if (
+                this.modification[i].approveStatus == '待决策人审核' || this.modification[i].approveStatus == '待财务审核' ||
+                this.modification[i].status == '全部付款'
+              ) {
+                this.$message.error(
+                  '请选择状态为已通过且待结算或者部分付款的条目'
+                )
+                return false
+              } else {}
+            } else {
+              this.$message.error('状态为已驳回的条目不能付款')
+              return false
+
+            }
+          }
+          let sum = 0
+          let count = 0
+          for (let i = 0; i < this.modification.length; i++) {
+            sum += this.modification[i].amountIngPayable
+            count += this.modification[i].amountEdPayable
+          }
+          this.payments.amountNotPayable = (sum - count).toFixed(2)
+          this.paymentForm = true
+        }
+      },
+      paymentSubmit() {
+        if (!this.payments.money) {
+          this.$message({
+            message: '付款金额不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          Number(this.payments.money) > Number(this.payments.amountNotPayable)
+        ) {
+          this.$message({
+            message: '付款金额不能超过未付金额',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.payments.paymentDate) {
+          this.$message({
+            message: '付款日期不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (!this.imageUrl) {
+          this.$message({
+            message: '请上传付款截图 ',
+            type: 'warning',
+          })
+          return
+        }
+        this.payments.paymentScreenshot = this.imageUrl
+        this.payments.cashier = localStorage.getItem('ws-pf_staffName')
+        this.payments.paymentManagementList = this.modification
+        this.$confirm('确定提交付款信息?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            //付款提交
+            paymentCommit(this.payments)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '付款成功',
+                })
+                this.paymentForm = false
+                this.getList()
+              })
+          })
+          .catch(() => {
+            return false
+          })
+      },
+      reject() {
+        if (this.modification.length == 0) {
+          this.$message.warning('请选择要驳回的条目')
+        } else {
+          this.$confirm('是否确定驳回?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              this.audit(this.modification[0], 0, false, '', '')
+            })
+            .catch(() => {
+              return false
+            })
+        }
+      },
+      audit(item, index, status, status2, reason) {
+        if (index < this.modification.length) {
+          if (status == true && item.status == '已驳回') {
+            auditpayment({
+                compId: localStorage.getItem('ws-pf_compId'),
+                id: item.id,
+              })
+              .toPromise()
+              .then((response) => {
+                workflowcontent({
+                    workflowId: item.workflowId,
+                    businessKey: item.id,
+                    type: '付款管理'
+                  }).toPromise()
+                  .then((response1) => {
+                    console.log(response1)
+                    // this.$message.success('审核成功')
+                    // this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
+                  })
+                this.audit(
+                  this.modification[index + 1],
+                  index + 1,
+                  status,
+                  status2,
+                  reason
+                )
+              })
+          } else {
+            posthandle({
+                taskId: item.taskId,
+                approved: status,
+                auditMind: reason != undefined ? '已驳回' : '34',
+                needReapply: status2 != undefined ? true : false,
+              })
+              .toPromise()
+              .then((response) => {
+                workflowcontent({
+                    workflowId: item.workflowId,
+                    businessKey: item.id,
+                    type: '付款管理'
+                  }).toPromise()
+                  .then((response1) => {
+                    console.log(response1)
+                    // this.$message.success('审核成功')
+                    // this.$router.push({ path: 'tranManagementWarehouseInOuttask' })
+                  })
+                // postqueryhandle({workflowId:item.workflowId}).toPromise()
+                // .then((response) => {
+                this.audit(
+                  this.modification[index + 1],
+                  index + 1,
+                  status,
+                  status2,
+                  reason
+                )
+                // })
+              })
+              .catch((req) => {
+                this.$message.warning(req.message)
+              })
+          }
+        } else {
+          if (status == true) {
+            this.$message.success('通过成功')
+            this.getList()
+          } else if (status == false) {
+            this.$message.success('驳回成功')
+            this.getList()
+          }
+        }
+      },
+      adopt() {
+        var that = this
+        if (this.modification.length == 0) {
+          this.$message.warning('请选择要通过的条目')
+        } else {
+          this.$confirm('是否确定通过?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {
+              this.audit(this.modification[0], 0, true)
+            })
+            .catch(() => {
+              return false
+            })
+        }
+      },
+      print1(row) {
+        this.printType = 0
+        this.isShowPrintType = true
+        this.rowData = row
+        localStorage.setItem('cwprint', true)
+      },
+      print(row) {
+        this.printType = 2
+        localStorage.setItem('cwprint', false)
+        getpaymentexamine({
+            id: row.id,
+          })
+          .toPromise()
+          .then((response) => {
+            this.printData = response
+            if (response.compName == '黑龙江秋收有限公司') {
+              this.printData.compName = '黑龙江中天昊元贸易有限公司'
+            }
+            this.isShowPrint = true
+            // if(this.printData.solidGrainPrice){
+            //   this.printData.solidGrainPrice = (this.printData.tidalGrainPrice * this.printData.netWeight)/this.printData.pureWeight
+            // }
+            let date = new Date()
+            this.printData.currentTime =
+              date.getFullYear() +
+              '年' +
+              Number(date.getMonth() + 1) +
+              '月' +
+              date.getDate() +
+              '日'
+          })
+      },
+      examine() {
+        if (this.modification.length == 0) {
+          this.$message.warning('请选择要审核的条目')
+        } else {
+          this.$confirm('审核通过后,任务将发送给财务,是否确定通过?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning',
+            })
+            .then(() => {})
+            .catch(() => {
+              return false
+            })
+        }
+      },
+      selectInit(row) {
+        //在这里一定要记得类型匹配的上。
+        // if (row.status != '已驳回') {
+        //   if (
+        //     row.taskId == null &&
+        //     row.status != '已通过' &&
+        //     row.status != '部分付款'
+        //   ) {
+        //     return false
+        //   } else {
+        //     return true
+        //   }
+        // } else {
+        //   return true
+        // }
+        return true
+      },
+      handleSelectionChange(val) {
+        this.modification = val
+      },
+      warehouseChange(e) {
+        for (let i = 0; i < this.warehouseList.length; i++) {
+          if (this.warehouseList[i].id == this.warehouseNameKey) {
+            this.warehouseName = this.warehouseList[i].warehouseName
+
+
+            localStorage.setItem('houseSelfCollect_house1',
+              JSON.stringify({
+                value: this.warehouseList[i].warehouseName,
+                warehouseId: this.warehouseList[i].id,
+                allowEdit: this.warehouseList[i].allowEdit,
+                monitorUrl1: this.warehouseList[i].monitorUrl1,
+                monitorUrl2: this.warehouseList[i].monitorUrl2,
+                warehouseNo: this.warehouseList[i].commonWarehouseNo,
+                compId: localStorage.getItem('ws-pf_compId')
+              })
+            )
+            this.WAREHOUSE[3].payname = this.warehouseList[i].id
+          }
+        }
+        this.getList()
+      },
+      handleSizeChange(val) {
+        console.log(`每页 ${val} 条`)
+        this.pageSize = val
+        this.getList()
+      },
+      handleCurrentChange(val) {
+        this.currentPage = val
+        console.log(`当前页: ${val}`)
+        this.getList()
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .ws-info-table {
+    border: none;
+  }
+
+  .ws-info-table .el-form-item {
+    width: 50%;
+    border: none;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 30%;
+    min-width: 125px;
+    text-align: center;
+    background: #ffffff;
+    color: #8890b1;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    border: none;
+  }
+
+  /deep/.el-dialog__title {
+    font-size: 24px !important;
+  }
+
+  /deep/.el-dialog__header {
+    text-align: center !important;
+    padding: 10px 0 !important;
+    height: auto !important;
+    // border-bottom: none !important;
+    border-top-left-radius: 3px;
+    border-top-right-radius: 3px;
+  }
+
+  .title {
+    font-size: 16px;
+    font-weight: 600;
+  }
+
+  table,
+  table tr th,
+  table tr td {
+    border: 2px solid #333333;
+    padding: 5px 0;
+  }
+
+  table {
+    width: 100%;
+    min-height: 25px;
+    line-height: 25px;
+    text-align: center;
+    border-collapse: collapse;
+    border: 3px solid #333333;
+  }
+
+  .formItem {
+    width: 70% !important;
+  }
+
+  /deep/.el-table .el-table__header .cell,
+  /deep/.el-table .cell {
+    text-align: center;
+    line-height: 15px;
+  }
+
+  /deep/.el-table--enable-row-transition .el-table__body td {
+    text-align: center;
+  }
+
+  .title {
+    padding: 10px;
+    text-align: center;
+  }
+
+  .tanchuang {
+    margin: 0 auto;
+  }
+
+  .tanchuang .ws-info-table {
+    display: initial;
+  }
+
+  .tanchuang .ws-info-table .el-form-item {
+    margin: 0 auto;
+    text-align: center;
+  }
+
+  .upLoad {
+    width: 40%;
+    margin: 0 auto;
+    // border: 1px solid #8890b1;
+    // border-radius: 3px;
+  }
+
+  // .avatar{
+  //   width: 150px;
+  //   height: 150px;
+  // }
+  .avatar-uploader {
+    position: relative;
+    width: 178px;
+  }
+
+  .avatar-uploader .el-upload {
+    border: 1px dashed #d9d9d9;
+    border-radius: 6px;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+    width: 178px;
+  }
+
+  .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;
+    border: 1px solid #8890b1;
+    border-radius: 5px;
+  }
+
+  .avatar {
+    width: 178px;
+    height: 178px;
+    border: 1px solid #8890b1;
+    border-radius: 5px;
+    display: block;
+  }
+
+  .pay_img {
+    width: 50%;
+    // display: flex;
+    display: inline-block;
+
+    .img {
+      height: 350px;
+      width: 100%;
+    }
+  }
+
+  .print-type {
+    position: absolute;
+    top: 0;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    margin: auto;
+    width: 200px;
+    height: 250px;
+    background: white;
+    border-radius: 10px;
+    z-index: 999;
+  }
+
+  .label-width {
+    width: 100%;
+  }
+
+  .mask {
+    background: black;
+    width: 100vw;
+    height: 100vh;
+    position: fixed;
+    top: 0;
+    z-index: 99;
+    opacity: 0.3;
+  }
+
+  .print-type-title {
+    text-align: center;
+    font-size: 18px;
+    margin: 20px;
+  }
+
+  .bottom-btn {
+    margin: 20px 0;
+    text-align: center;
+  }
+
+  .print-type-checkbox {
+    padding-left: 20px;
+  }
+
+  .img_css {
+    width: 90%;
+    height: 220px;
+  }
+
+  .text_css {
+    color: #5878e8;
+  }
+
+  /deep/.base_header_layout {
+    height: 48px;
+  }
+
+  .warehouse_select {
+    width:150px;
+  }
+
+  // .el-button {
+  //   margin: 5px;
+  // }
+
+  .no-messege {
+    text-align: center;
+    font-size: 30px;
+    padding: 50px;
+  }
+
+  .my-img {
+    width: 200px;
+    height: 200px;
+  }
+
+  .el-icon-delete {
+    font-size: 20px;
+  }
+
+  /deep/.base_header_layout .find.el-button--primary {
+    width: 30px;
+    margin: 0;
+    border-top-left-radius: 0px;
+    border-bottom-left-radius: 0px;
+  }
+.findinput {
+  width: 230px;
+}
+  /deep/.base_header_layout .findinput input {
+    border-top-right-radius: 0px;
+    border-bottom-right-radius: 0px;
+  }
+  .top-btn{
+    display:flex;
+    justify-content: space-between;
+    .right,.serch{
+      display: flex;
+      .find{
+        display: flex;
+        align-items: center;
+        justify-content: center;
+      }
+    }
+    .date-select{
+      width: 240px;
+    }
+  }
+  .top-btn-two{
+    margin-top: 20px;
+  }
+  .content-top{
+    display: flex;
+    margin-top: 20px;
+  }
+  .customer-item{
+    margin-bottom: 0;
+    display: flex;
+  }
+  .el-form-item__content{
+    width: 100%;
+    margin-left: 0!important;
+  }
+  .el-date-editor{
+    width: 220px!important;
+  }
+</style>