gjy %!s(int64=2) %!d(string=hai) anos
pai
achega
c98c204d6e
Modificáronse 25 ficheiros con 5427 adicións e 201 borrados
  1. 7 1
      src/components/WsUpload/index.vue
  2. 16 12
      src/lang/zh.js
  3. 2 1
      src/model/outboundManagement/index.js
  4. 1023 0
      src/views/contractManagement/acquisitionContract.vue
  5. 1758 0
      src/views/contractManagement/acquisitionContractAdd.vue
  6. 1438 0
      src/views/contractManagement/acquisitionContractEdit.vue
  7. 677 0
      src/views/contractManagement/acquisitionContractExamine.vue
  8. 166 100
      src/views/contractManagement/component/routers/route.js
  9. 2 2
      src/views/contractManagement/purchaseContract.vue
  10. 22 3
      src/views/contractManagement/purchaseContractAdd.vue
  11. 6 0
      src/views/contractManagement/purchaseContractEdit.vue
  12. 6 0
      src/views/contractManagement/purchaseContractExamine.vue
  13. 2 2
      src/views/contractManagement/salesContract.vue
  14. 35 2
      src/views/contractManagement/salesContractAdd.vue
  15. 9 0
      src/views/contractManagement/salesContractEdit.vue
  16. 15 0
      src/views/contractManagement/salesContractExamine.vue
  17. 31 31
      src/views/customer/component/router/route.js
  18. 68 14
      src/views/houseSelfCollect/inspectionManagementNew.vue
  19. 9 0
      src/views/houseSelfCollect/newWeighingManagement.vue
  20. 10 1
      src/views/outboundManagement/weighingManagementNew.vue
  21. 59 8
      src/views/profitable/cashout.vue
  22. 5 1
      src/views/taskManagement/tranManagementWarehouseInOutTask.vue
  23. 8 2
      src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue
  24. 45 18
      src/views/taskManagement/tranManagementWarehouseInOutTaskEdit.vue
  25. 8 3
      src/views/warehousenew/warehousingOrder.vue

+ 7 - 1
src/components/WsUpload/index.vue

@@ -19,8 +19,13 @@
         @click="_handleUploadClick"
         >{{ buttonName ? buttonName : $t('upload.uploadButton') }}</el-button
       >
+      <!-- <el-tooltip class="item" effect="dark" :content="$t('upload.uploadText01')+formatTxt+'格式的文件,单个文件大小不能超过10M'" placement="top">
+        <i class="el-icon-question"></i>
+      </el-tooltip> -->
+      
       <div class="tip">
-        {{ $t('upload.uploadText01') }}{{ formatTxt }}
+        {{ $t('upload.uploadText01') }}
+        {{  formatTxt}}
         格式的文件,单个文件大小不能超过10M
       </div>
     </div>
@@ -215,6 +220,7 @@ export default {
   },
   computed: {
     formatTxt() {
+      console.log(this.accept)
       return this.accept
         .replace(/\./g, '')
         .replace(/ /g, '')

+ 16 - 12
src/lang/zh.js

@@ -481,12 +481,12 @@ export default {
     protectionInventory: '劳保库存',
     // 合同管理
     contractManagement: '合同管理',
-    purchaseContract: '现货采购合同',
+    purchaseContract: '采购合同',
     collectionContract: '代收合同',
-    purchaseContractAdd: '现货采购合同  /  添加',
-    purchaseContractcost:'现货采购合同  /  费用',
+    purchaseContractAdd: '采购合同  /  添加',
+    purchaseContractcost:'采购合同  /  费用',
     collectionContractAdd: '代收合同  /  添加',
-    purchaseContractEdit: '现货采购合同  /  编辑',
+    purchaseContractEdit: '采购合同  /  编辑',
     collectionContractEdit: '代收合同  /  编辑',
     collectionContractExamine:'代收合同  /  查看',
     collectionContractRecord:'代收合同  /  记录',
@@ -496,13 +496,17 @@ export default {
     storageContractExamine: '代储合同  /  查看',
     storageContractRecord:'代储合同  /  代储费',
     storageContractRecord:'代储合同  /  记录',
-    purchaseContractExamine: '现货采购合同  /  查看',
-    salesContract: '现货销售合同',
-    salesContractEdit: '现货销售合同  /  编辑',
-    salesContractcost: '现货销售合同  /  费用',
-    salesContractExamine: '现货销售合同  /  查看',
-    salesContractAudit: '现货销售合同  /  审核',
-    salesContractAdd: '现货销售合同  /  添加',
+    purchaseContractExamine: '采购合同  /  查看',
+    acquisitionContract:'收购合同',
+    acquisitionContractAdd: '收购合同  /  添加',
+    acquisitionContractEdit: '收购合同  /  编辑',
+    acquisitionContractExamine: '收购合同  /  查看',
+    salesContract: '销售合同',
+    salesContractEdit: '销售合同  /  编辑',
+    salesContractcost: '销售合同  /  费用',
+    salesContractExamine: '销售合同  /  查看',
+    salesContractAudit: '销售合同  /  审核',
+    salesContractAdd: '销售合同  /  添加',
     futuresPurchaseContract: '期货采购合同',
     futuresPurchaseContractAdd: '期货采购合同  /  添加',
     futuresPurchaseContractEdit: '期货采购合同  /  编辑',
@@ -542,7 +546,7 @@ export default {
     //客户管理
     customerList: '客户管理',
     //客户管理
-    customerFundList: '客户资金管理',
+    customerFundList: '客户管理',
     customerFundEdit: '客户管理编辑',
     customerFundAdd: '客户管理添加',
     //采购管理

+ 2 - 1
src/model/outboundManagement/index.js

@@ -27,7 +27,8 @@ import {
     API_POST_IMPORT_YK,
     API_POST_GO_BACK,
     API_GAT_INFO,
-    API_GET_TRANTASK
+    API_GET_TRANTASK,
+    API_GET_WEIGHT
 }   from '@/api/V2/outboundManagement'
 
   //质检列表

+ 1023 - 0
src/views/contractManagement/acquisitionContract.vue

@@ -0,0 +1,1023 @@
+<!--现货采购合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="8">
+      <template slot="left">
+        <ws-button type="primary" @click="handleAdd()"
+          v-hasPermission="`contractManagement.buyContract.buyContractInfo.add`">添加</ws-button>
+        <ws-button @click="exportlist()" v-hasPermission="
+            `contractManagement.buyContract.buyContractInfo.view`
+          ">导出</ws-button>
+      </template>
+      <template slot="right">
+        <span style="width: 142px; display: inline-block; color: #8890b1">状态:</span>
+        <ws-select v-model="searchTypeText" placeholder="" class="typeselect" @change="selecttaskType"
+          :value="searchType">
+          <ws-option v-for="item in taskTypeList" :key="item.value" :label="item.value" :value="item.value"
+            style="color: #8890b1" />
+        </ws-select>
+        <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
+          start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
+        </el-date-picker>
+        <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="合同编号" width="150">
+      </el-table-column>
+      <el-table-column prop="goodsName" label="货名" width="80">
+      </el-table-column>
+      <!-- <el-table-column prop="grade" label="品级" width="80">
+        <template slot-scope="scope">
+          <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+            scope.row.grade
+          }}</span>
+          <span v-if="scope.row.grade == '等外'" class="substandard">{{
+            scope.row.grade
+          }}</span>
+        </template>
+      </el-table-column> -->
+      <el-table-column prop="weight" label="重量(吨)"> </el-table-column>
+      <el-table-column width='130' prop="unitContractPrice" label="合同单价(元)">
+      </el-table-column>
+      <!-- <el-table-column prop="packingMethod" label="包装方式"> </el-table-column> -->
+      <el-table-column prop="buyer" label="收购方"> </el-table-column>
+      <el-table-column prop="seller" label="合营方"> </el-table-column>
+      <el-table-column width='120' prop="completedQuantity" label="已完成(吨)">
+        <template slot-scope="scope">
+          <span style="color: #5473e8; font-weight: 600">{{
+            scope.row.completedQuantity
+          }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column width='150' prop="status" label="状态">
+        <template slot-scope="scope">
+          <div v-if="scope.row.status != '执行中'&&scope.row.status != '发运结束'">
+            <!-- <span v-if="scope.row.approveStatus">{{
+              scope.row.approveStatus
+            }}</span> -->
+            <el-select v-if="scope.row.approveStatus" v-model="scope.row.approveStatus" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'
+            disabled
+            :value="scope.row.approveStatus">
+            <el-option label="待决策人审核" value="待决策人审核"
+              style="color: #8890b1" />
+          </el-select>
+          <el-select v-else v-model="scope.row.status" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'
+
+            :value="scope.row.status">
+            <el-option label="待执行" value="待执行"
+              style="color: #8890b1" />
+              <el-option label="执行中" value="执行中"
+              style="color: #8890b1" />
+          </el-select>
+            <!-- <el-popover v-else placement="left" :width="285" trigger="click" visible-arrow="false"
+              @show="history(scope.row)">
+              <template>
+                <span slot="reference">
+                  <span v-if="scope.row.status == '待执行'" class="executory"></span>
+                  <span v-if="scope.row.status == '执行中'" class="inExecution"></span>
+                  <span v-if="scope.row.status == '已完成'" class="done"></span>{{ scope.row.status }}
+                </span>
+              </template>
+              <div>
+                <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+                <div v-for="(item, index) in historyList" class="flex">
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
+                  <div>
+                    <div class="vertical-circle"></div>
+                    <div v-if="index != historyList.length - 1" class="vertical-line"></div>
+                  </div>
+                  <div class="vertical-text">
+                    {{ item.operateUser }}<br />{{ item.dealMsg }}
+                  </div>
+                </div>
+              </div>
+            </el-popover>
+            <img 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="" /> -->
+          </div>
+          <div v-else>
+            <!-- {{scope.row.status}} -->
+            <el-select v-model="scope.row.status" placeholder="" class="statusselect"
+            @change='selectstatuschange($event,scope.row)'
+            :value="scope.row.status"
+          >
+            <el-option v-for="item in statusList" :key="item.value" :label="item.value" :value="item.value"
+              style="color: #8890b1" />
+          </el-select>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column width='120' prop="signingDate" label="签订日期"> </el-table-column>
+      <el-table-column width='120' prop="contractExpenditure" label="合同支出"> </el-table-column>
+      <el-table-column width='120' prop="expenses" label="费用支出"> </el-table-column>
+      
+      <el-table-column width='130' prop="mildewGrain" label="已付款(元)">
+      </el-table-column>
+      <el-table-column prop="amountEdPayable" label="已付运费"> </el-table-column>
+      <el-table-column width='130' prop="goodsNames" label="已开发票 (元)">
+      </el-table-column>
+      <el-table-column prop="addressUrl" label="附件">
+        <template slot-scope="scope">
+          <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
+          <span v-if="scope.row.addressUrlArray != null">
+            {{
+              scope.row.addressUrlArray.length == 0
+                ? ''
+                : scope.row.addressUrlArray.length
+            }}
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="address" label="操作" width="160">
+        <template slot-scope="scope">
+           <!-- <img width="16" height="17" style="
+                vertical-align: text-top;
+                position: relative;
+                top: -1px;
+                margin: 0 6px;
+              "  src="../../../public/img/daichu.png"
+               v-hasPermission="
+              `contractManagement.nonContract.nonContractInfo.view`"
+             @click="handlecost(scope.row)" alt="" /> -->
+             
+          <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
+            src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
+              `contractManagement.buyContract.buyContractInfo.view`
+            " alt="" />
+          <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.buyContract.buyContractInfo.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.buyContract.buyContractInfo.delete`
+            " @click="handleDelete(scope.row)" alt="" />
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination  :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" @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,
+    export1,
+    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,
+        statusList:[{
+          value:'已完成',
+        },{value:'发运结束',}],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        deliver_type: 1,
+        deptBudgetTotal: 0,
+        currentPage: 1,
+        pageSize: 9999,
+        appendixIdsAdd: '',
+        searchType: 1,
+        searchTypeText: '未完成',
+        searchKeyWord: '',
+        contractType: 3,
+        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: {
+      handlecost(row){
+         this.$router.push({
+          name: 'buyContractcost',
+          query: {
+            id: row.id,
+            contractNo: row.contractNo,
+            status:row.status,
+            seller:row.seller
+          },
+        })
+      },
+      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
+      },
+      selectstatuschange(e,row){
+        var data={}
+        if(e=='发运结束'){
+          data={id: row.id,endFlag:1}
+        }else{
+          data={id: row.id}
+        }
+        this.$confirm(`是否将状态改为${e}`, {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning',
+          })
+          .then(() => {
+            editstatus(data)
+              .toPromise()
+              .then((response) => {
+                this.$notify.success({
+                  title: '成功',
+                  message: '状态修改成功',
+                })
+                this.getList()
+              })
+              .catch((response) => {
+                // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              })
+          })
+          .catch(() => {
+            row.status=row.currectstatus
+            return 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].status){
+                response.records[i].currectstatus=response.records[i].status
+              }
+              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 == '执行中'||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: 'acquisitionContractExamine',
+          query: {
+            id: row.id,
+            status: row.status,
+          },
+        })
+      },
+      handleAdd() {
+        this.$router.push({
+          path: 'acquisitionContractAdd',
+        })
+      },
+      handleEdit(row) {
+        this.$router.push({
+          name: 'acquisitionContractEdit',
+          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 export1({
+          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
+          })
+      },
+    },
+  }
+</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;
+  }
+  /deep/.statusselect .el-input__inner {
+    color: #8890b1;
+    width:100%;
+  }
+</style>

+ 1758 - 0
src/views/contractManagement/acquisitionContractAdd.vue

@@ -0,0 +1,1758 @@
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12"  class="bg">
+        <h2 class="bg-left title">创建收购合同</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right bg">
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <ws-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList">
+      <div class="remark">
+        <h3>基本信息</h3>
+        <el-row>
+        <el-col :span="12">
+        <p style="color: #8890b1">
+          注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>” 标记的条目提交后不可修改。
+        </p>
+        </el-col>
+      <el-col :span="12" style='text-align:right;'>
+        <!-- <el-select v-model="contractNo" placeholder="请选择要复制的合同" class="typeselect" filterable clearable
+              @change="copySelect">
+              <el-option v-for="(item,index) in outContractNo" :key="'hetong'+index" :label="item.contractNo"
+                :value="item.contractNo" />
+            </el-select>
+            <el-button class="bg-bottom" type="primary" size="small" @click="cancelcopy()">取消复制
+       </el-button> -->
+         </el-col>
+    </el-row>
+      </div>
+      <ws-info-table>
+        <!--合同编号-->
+        <ws-form-item label="合同编号" span="1" prop="contractNo" class="readonly" required>
+          <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" maxlength="50" size="small" />
+        </ws-form-item>
+        <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          <el-radio v-model="deptBudgetList.transactionSubject" label="自营">自营</el-radio>
+          <el-radio v-model="deptBudgetList.transactionSubject" label="合营">合营</el-radio>
+        </ws-form-item>
+        <!--结算方式-->
+        <ws-form-item label="收购方" span="1" prop="buyer" class="readonly">
+          <!-- <ws-input v-model="deptBudgetList.buyer" placeholder="请输入买方名称" maxlength="100" size="small" /> -->
+          <!-- <el-autocomplete class="inline-input" v-model="deptBudgetList.buyer" :fetch-suggestions="querySearch1"
+            placeholder="请输入买方名称" @select="handleSelect"></el-autocomplete> -->
+             <el-select filterable  v-model="deptBudgetList.buyer" placeholder="请选择收购方名称" class="typeselect" 
+            @change="buyerSelect" filterable clearable>
+
+            <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="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 v-if="deptBudgetList.transactionSubject == '合营'" label="合营方" span="1" prop="seller" class="readonly">
+          <!-- <ws-input v-model="deptBudgetList.seller" placeholder="请输入卖方名称" maxlength="100" size="small" /> -->
+          <!-- <el-autocomplete class="inline-input" v-model="deptBudgetList.seller" :fetch-suggestions="querySearch2"
+             @select="handleSelect"></el-autocomplete>
+             -->
+            <el-select filterable  v-model="deptBudgetList.seller" placeholder="请选择合营方名称" class="typeselect" 
+            @change="sellerSelect" filterable clearable>
+
+            <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="deliveryDateStart">
+          <ws-date-picker v-model="deptBudgetList.deliveryDateStart" type="date" placeholder="请选择交货日期(起)"
+            value-format="yyyy-MM-dd" />
+        </ws-form-item>
+        <ws-form-item label="收购方电话" span="1" prop="contractNo">
+          <!-- <ws-input v-model.number="deptBudgetList.buyerPhone" placeholder="请输入买方电话" maxlength="100" size="small" /> -->
+          <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="deliveryDateEnd">
+          <ws-date-picker v-model="deptBudgetList.deliveryDateEnd" type="date" placeholder="请选择交货日期(止)"
+            value-format="yyyy-MM-dd" />
+        </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" 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="priceType">
+            <ws-select v-model="deptBudgetList.priceType" placeholder="请选择价格类型" @change="selectpriceType">
+              <ws-option v-for="item in priceTypeList" :key="item" :label="item" :value="item" />
+            </ws-select>
+          </ws-form-item>
+        <!--合同单价(元/吨)-->
+        <ws-form-item class="readonly" label="合同单价(元/吨)" span="1" prop="unitContractPrice" v-if="deptBudgetList.priceType == '定价收购'">
+          <ws-input @input="pricechange" v-model="deptBudgetList.unitContractPrice" placeholder="请输入合同单价"
+            maxlength="100" size="small" />
+        </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="totalContractPrice" v-if="deptBudgetList.priceType == '定价收购'">
+          <ws-input v-model="deptBudgetList.totalContractPrice" placeholder="请输入合同总价" maxlength="100" size="small" />
+        </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="signingDate">
+          <ws-date-picker v-model="deptBudgetList.signingDate" type="date" placeholder="请选择合同签订日期"
+            value-format="yyyy-MM-dd" />
+        </ws-form-item>
+
+        <ws-form-item label="最终实际成交量(吨)" span="1" prop="finalTradingVolume">
+          <ws-input v-model="deptBudgetList.finalTradingVolume" placeholder="请输入最终实际成交量" maxlength="100" size="small" />
+        </ws-form-item>
+      </ws-info-table>
+      <div class="wenzi">
+        <h3>货物信息</h3>
+      </div>
+      <!--货物信息-->
+
+      <ws-info-table>
+        <!--货名-->
+        <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
+          <ws-select v-model="deptBudgetList.contractGoodsInfo.goodsName" placeholder="" class="typeselect"
+            @change="selectgoodsName">
+            <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
+              :value="item.constValue" />
+          </ws-select>
+        </ws-form-item>
+
+        <!--水分(%)<=-->
+        <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.waterContent" placeholder="请输入水分占比" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--品级-->
+        <ws-form-item label="品级" span="1" prop="grade">
+          <ws-select v-model="deptBudgetList.contractGoodsInfo.grade" placeholder="" class="typeselect"
+            @change="selectgrade">
+            <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
+              :value="item.constValue" />
+          </ws-select>
+        </ws-form-item>
+
+        <!--杂质(%)<=-->
+        <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.impurity" placeholder="请输入杂质占比(%)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--容重(克/升)>=-->
+        <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.bulkDensity" placeholder="请输入容重" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--霉变粒(%)<=-->
+        <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.mildewGrain" placeholder="请输入霉变粒占比(%)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--热损伤(%)<=-->
+        <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.jiaorenli" placeholder="请输入输入热损伤占比(%)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+        <!--不完善粒(%)<=-->
+        <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
+          <ws-input v-model="deptBudgetList.contractGoodsInfo.imperfectGrain" placeholder="请输入不完善粒占比(%)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+      </ws-info-table>
+
+      <div class="wenzi">
+        <h3>流程信息</h3>
+      </div>
+      <!--流程信息-->
+
+      <ws-info-table>
+        <!--已付款(元)-->
+        <ws-form-item label="已付款(元)" span="1" prop="mildewGrain">
+          <ws-input v-model="deptBudgetList.contractProcessInfo.mildewGrain" placeholder="请输入已付款(元)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--已开发票(元)-->
+        <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+          <ws-input v-model="deptBudgetList.contractProcessInfo.goodsName" placeholder="请输入已开发票(元)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--费用支出(元)-->
+        <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+          <ws-input v-model="deptBudgetList.contractProcessInfo.waterContent" placeholder="请输入费用支出(元)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+
+        <!--未开发票(元)-->
+        <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+          <ws-input v-model="deptBudgetList.contractProcessInfo.impurity" placeholder="请输入未开发票(元)" maxlength="100"
+            size="small" />
+        </ws-form-item>
+        <!--双章原件回收情况-->
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+          <ws-select v-model="deptBudgetList.contractProcessInfo.grade" placeholder="" class="typeselect"
+            @change="selectChapterTwo">
+            <ws-option v-for="item in ChapterTwoList" :key="item.constKey" :label="item.constValue"
+              :value="item.constValue" />
+          </ws-select>
+        </ws-form-item>
+        <!--已完成发货量(吨)-->
+        <ws-form-item label="已完成发货量(吨)" span="1" prop="imperfectGrain">
+          <ws-input v-model="deptBudgetList.contractProcessInfo.imperfectGrain" placeholder="请输入已完成发货量(吨)"
+            maxlength="100" size="small" />
+        </ws-form-item>
+      </ws-info-table>
+
+      <div class="wenzi">
+        <h3>备注信息</h3>
+      </div>
+      <!--备注信息-->
+      <ws-input v-model="deptBudgetList.remarks" type="textarea" row="3" placeholder="请输入备注信息,不超过3000字"
+        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.buyContract.buyContractInfo.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 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,
+    getstafffind,
+    getcustomerinfo,
+    examineList
+  } from '@/model/contarct/index'
+  import {
+    getstaff,xialaNo,
+  } from '@/model/warehouse/index'
+  import {
+    regionData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
+  import {
+    dayjs,
+    fmoney,
+    EventBus
+  } from 'base-core-lib'
+  import WsUpload from '@/components/WsUpload'
+  import mapDrag from '@/components/mapdrag/mapdrag'
+import { isUndefined } from 'xe-utils/methods'
+
+  export default {
+    name: 'viewSpareMoney',
+    components: {
+      WsUpload,
+      mapDrag,
+    },
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        restaurants1: [],
+        restaurants2: [],
+        restaurants3: [],
+        restaurants4: [],
+        customerinfo:[],
+        type: '',
+        dialogVisible: false,
+        contractNo:'',
+        outContractNo:[],
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        options_: regionData,
+        selectedOptions: [],
+        newSelectedOptions: '请选择货源所在地',
+        selectedOptions1: [],
+        newSelectedOptions1: '请选择交货所在地区',
+        // 提交类型
+        submitType: true,
+        tableData: [{
+          date: '',
+          name: '',
+          address: ''
+        }],
+
+        packtypeList: [],
+        compId: localStorage.getItem('ws-pf_compId'),
+        rules: {
+          // contractNo: [
+          //   { required: true, message: '请输入合同编号', trigger: 'blur' },
+          //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' },
+          // ],
+        },
+        options: [],
+        staffList: [],
+        appendixIdsAdd: '',
+        size: 10,
+        unitList: [],
+        agreementList: [{
+            constValue: '采购合同',
+            constKey: '1'
+          },
+          {
+            constValue: '补充协议',
+            constKey: '2'
+          },
+        ],
+        contractNoList: [],
+        priceTypeList: ['定价收购', '随行就市'],
+        goodnameList: [],
+        value1: '袋装',
+        value2: '未回收',
+        gradeList: [],
+        ChapterTwoList: [],
+        agreementType: '',
+        deptBudgetList: {
+          deliverType: '1',
+          sourceGoods:'',
+          placeDelivery:'',
+          addressUrl: '',
+          sellerPhone:'',
+          buyer:localStorage.getItem('ws-pf_compName'),
+          buyerPhone:'',
+          personPhone:'',
+          personCharge:'',
+          personChargeKey:'',
+          finalTradingVolume: 0,
+          totalContractPrice: 0,
+          transactionSubject:'自营',
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          contractProcessInfo: {},
+        },
+        acceptanceCheck: {},
+        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: {},
+        feedbackLeaders:[],//发货反馈负责人
+      }
+    },
+    activated() {
+      this.selectedOptions = []
+      this.selectedOptions1 = []
+      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: {
+      selectpriceType(e) {
+        if (e == '随行就市') {
+          this.deptBudgetList.deliverType = '1'
+        }
+      },
+      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);
+      },
+      sellerSelect(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.sellerPhone=this.customerinfo[i].customerPhone
+          }
+        }
+      },
+      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
+          }
+        }
+      },
+      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]
+          console.log(data[4])
+          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
+      },
+      marker: function(item) {
+        this.deptBudgetList.warehousePositioning =
+          item.lnglat.lat + ',' + item.lnglat.lng
+      },
+      selectedAddress(e) {
+        this.deptBudgetList.warehousePositioning =
+          e.center.lat + ',' + e.center.lng
+      },
+      provinceChange(e) {
+        console.log(CodeToText[e])
+      },
+      blurMap() {
+        this.dialogVisible = false
+      },
+      focusMap() {
+        this.dialogVisible = true
+      },
+      dataFilter(val) {
+        this.deptBudgetList.personCharge = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+      selectstaff(e) {
+        // this.deptBudgetList.personPhone=''
+        // this.deptBudgetList.personChargeKey=''
+        // for (var i = 0; i < this.staffList.length; i++) {
+        //   if (e.indexOf(this.staffList[i].staffName)!=-1) {
+        //     if(this.deptBudgetList.personPhone){
+        //        this.deptBudgetList.personPhone= this.deptBudgetList.personPhone+','+ this.staffList[i].staffMobilePhone
+        //     }else{
+        //       this.deptBudgetList.personPhone=this.staffList[i].staffMobilePhone
+        //     }
+        //    if(this.deptBudgetList.personChargeKey){
+        //      this.deptBudgetList.personChargeKey= this.deptBudgetList.personChargeKey+','+  this.staffList[i].staffId
+        //    }else{
+        //      this.deptBudgetList.personChargeKey= this.staffList[i].staffId
+        //    }
+        //   }
+        // }
+        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)
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+      },
+      weightchange(e) {
+        if(this.deptBudgetList.unitContractPrice){
+          this.deptBudgetList.totalContractPrice = e * this.deptBudgetList.unitContractPrice
+        }
+        this.deptBudgetList.finalTradingVolume = e
+      },
+      pricechange(e) {
+        if(this.deptBudgetList.weight){
+          this.deptBudgetList.totalContractPrice = e * this.deptBudgetList.weight
+        }
+      },
+      returnsales() {
+        this.deptBudgetList =  {
+          deliverType: '1',
+          sourceGoods:'',
+          placeDelivery:'',
+          addressUrl: '',
+          sellerPhone:'',
+          personPhone:'',
+          personCharge:'',
+          personChargeKey:'',
+          finalTradingVolume: 0,
+          totalContractPrice: 0,
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          contractProcessInfo: {},
+        }
+        this.$router.push({
+          path: 'acquisitionContract'
+        })
+      },
+      loaddata() {
+        // 合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 0,
+          })
+          .toPromise()
+         .then((response) => {
+            this.outContractNo = response
+          })
+        // 包装方式
+        packList({
+            constId: 'CON1'
+          })
+          .toPromise()
+          .then((response) => {
+            this.packtypeList = response
+          })
+        // 验收方式
+        this.getUnitList()
+        // 货名
+        packList({
+            constId: 'CON2'
+          })
+          .toPromise()
+          .then((response) => {
+            this.goodnameList = response
+          })
+        // 品级
+        packList({
+            constId: 'CON3'
+          })
+          .toPromise()
+          .then((response) => {
+            this.gradeList = response
+          })
+        // 双章
+        packList({
+            constId: 'CON4'
+          })
+          .toPromise()
+          .then((response) => {
+            this.ChapterTwoList = response
+          })
+            // 发货反馈负责人
+           getstaff({
+            compId: localStorage.getItem('ws-pf_compId')
+          })
+          .toPromise()
+          .then((response) => {
+            this.feedbackLeaders = response
+            let _obj = []   //发货反馈负责人下拉列表第一个添加  "无需发货反馈(默认)"
+            _obj.staffName = "无需发货反馈(默认)"
+            _obj.staffMobilePhone = "(默认)"
+            this.feedbackLeaders.unshift(_obj)
+          })
+          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
+          })
+      },
+      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.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractNo.length < 5 ||
+          this.deptBudgetList.contractNo.length > 50
+        ) {
+          this.$message({
+            message: '合同编号长度不符合要求,请输入5到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.transactionSubject == '合营'){
+        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.transactionSubject == '合营'){
+        if (!this.deptBudgetList.sellerPhone) {
+          this.$message({
+            message: '请输入合营方电话!',
+            type: 'warning',
+          })
+          return
+        }
+       }
+        
+        // if (isNaN(this.deptBudgetList.sellerPhone)) {
+        //   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.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.deptBudgetList.priceType) {
+          this.$message({
+            message: '请选择价格类型',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.priceType == '定价收购') {
+          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 (!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 > 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 = 3
+            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',
+                  sourceGoods:'',
+                  placeDelivery:'',
+                  addressUrl: '',
+                  sellerPhone:'',
+                  personPhone:'',
+                  personCharge:'',
+                  personChargeKey:'',
+                  finalTradingVolume: 0,
+                  totalContractPrice: 0,
+                  contractGoodsInfo: {
+                    goodsName: '',
+                  },
+                  contractProcessInfo: {},
+                }
+                this.$router.push({
+                  path: 'acquisitionContract'
+                })
+              })
+          } else {
+            EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            return false
+          }
+        })
+      },
+      resetForm(deptBudgetList) {
+        this.$refs[deptBudgetList].resetFields()
+      },
+      //选择合同类型
+      selectType(e) {
+        for (var i = 0; i < this.invoiceList.length; i++) {
+          if (this.agreementList[i].constValue == e) {
+            this.deptBudgetList.agreementType = this.agreementList[i].constValue
+          }
+        }
+      },
+      addClick() {
+        this.unitList.push({
+          flag: 'add',
+          constValue: '',
+          constKey: '',
+        })
+      },
+      saveClick(item, index) {
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          this.$set(this.unitList, index, {
+            flag: 'check'
+          })
+        } else {
+          this.$set(this.unitList, index, {
+            flag: 'delete'
+          })
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        if (item.flag == 'add') {
+          item.constKey = Math.random() * 20
+          this.acceptanceCheck.compId = this.compId
+          this.acceptanceCheck.constKey = item.constKey
+          this.acceptanceCheck.constCode = 'TYPEYAN'
+          this.acceptanceCheck.constValue = item.constValue
+          this.acceptanceCheck.id = item.id
+          addxiala(this.acceptanceCheck)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        } else if (item.flag == 'check') {
+          this.acceptanceCheck.compId = this.compId
+          this.acceptanceCheck.constKey = item.constKey
+          this.acceptanceCheck.constCode = 'TYPEYAN'
+          this.acceptanceCheck.constValue = item.constValue
+          this.acceptanceCheck.id = item.id
+          editxiala(this.acceptanceCheck)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        }
+      },
+      selectChapterTwo(e) {
+        for (var i = 0; i < this.ChapterTwoList.length; i++) {
+          if (this.ChapterTwoList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+          }
+        }
+      },
+      selectunitList(e) {
+        for (var i = 0; i < this.unitList.length; i++) {
+          if (this.unitList[i].constValue == e) {
+            this.deptBudgetList.acceptanceMethodKey = this.unitList[i].constKey
+          }
+        }
+      },
+      selectgrade(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.gradeList[i].constKey
+            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.packingMethodKey = this.packtypeList[i].constKey
+          }
+        }
+      },
+      // 编辑
+      editClick(item, index) {
+        const map = JSON.parse(JSON.stringify(item))
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          map.flag = 'check'
+          this.$set(this.unitList, index, map)
+        } else {
+          map.flag = 'delete'
+          this.$set(this.unitList, index, map)
+        }
+      },
+      // 删除
+      deleteClick(item, index) {
+        if (Object.is(item.constKey, 1)) {
+          return
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        delxiala({
+            id: this.unitList[index].id
+          })
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+            this.pleaseChoose = ''
+          })
+      },
+    },
+  }
+</script>
+
+<style lang="scss" scoped>
+  .el-form {
+    padding: 0 15%;
+  }
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  .readonly {
+    position: relative;
+  }
+
+  .readonly:after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .bg {
+    background: #f6f7fc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__label {
+    width: 140px;
+    text-align: center;
+    background: #f0f2f6;
+    // border: 1px solid #cdd2dc;
+  }
+
+  // .button-container {
+  //   display: flex;
+  //   flex-wrap: nowrap;
+  //   justify-content: space-between;
+  //   align-items: center;
+  //   background-color: #fff;
+  //   width: 100%;
+  //   height: 50px;
+  //   padding: 0 10px;
+
+  //   &>div {
+  //     margin-left: 10px;
+  //     display: flex;
+  //     flex-wrap: nowrap;
+  //     flex-direction: row;
+
+  //     &>span {
+  //       line-height: 50px;
+  //     }
+  //   }
+
+  //   /deep/.auditFlow-box {
+  //     position: unset;
+  //     margin-left: 10px;
+
+  //     &/deep/.auditFlow-icon {
+  //       width: auto;
+  //       padding-right: 30px;
+  //     }
+
+  //     &/deep/.auditFlow-main {
+  //       position: absolute;
+  //     }
+  //   }
+  // }
+
+  // .box-app {
+  //   display: inline-block;
+  //   float: left;
+  //   margin-left: 30px;
+  //   line-height: 50px;
+  // }
+
+  /deep/.el-dialog {
+    .el-form-item {
+      margin-bottom: 0 !important;
+
+      .el-input--medium {
+        textarea {
+          min-height: 100px !important;
+        }
+      }
+    }
+  }
+
+  .collapse-bottom {
+    margin-bottom: 20px;
+  }
+
+  .input-main .textarea .el-textarea__inner {
+    width: 100%;
+    z-index: 1;
+  }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .wenzi h3 {
+    display: inline-block;
+    left: 10px;
+  }
+
+  .wenzi p {
+    display: inline-block;
+  }
+
+  .upload-demo {
+    margin-top: 10px;
+  }
+
+  .center {
+    width: 70%;
+    margin: 0 auto;
+  }
+
+  .el-form-item {
+    width: 50%;
+  }
+
+  .el-form-item__label {
+    text-align: center;
+  }
+
+  .ce {
+    width: 900px;
+    margin: 0 auto;
+  }
+
+  /*.crt-main .textarea /deep/ .el-form-item__label {*/
+  /*  height: 82px;*/
+  /*}*/
+  // 控制select为只读的时候显示样式
+
+  // .hide-sel {
+  //   .el-input__inner {
+  //     border: 0px;
+  //   }
+
+  //   .el-icon-arrow-up {
+  //     display: none;
+  //   }
+
+  //   .el-textarea__inner {
+  //     background-color: #fff !important;
+  //     border: 0;
+  //   }
+
+  //   .el-date-editor {
+  //     i {
+  //       display: none;
+  //     }
+  //   }
+
+  //   .is-disabled {
+  //     .el-input__inner:hover {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //     }
+
+  //     color: #606266;
+
+  //     .el-input__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+
+  //     .el-textarea__inner {
+  //       background-color: #fff !important;
+  //       border: 0;
+  //       color: #606266;
+  //     }
+  //   }
+  // }
+
+  // 控制select为只读的时候显示样式
+  /deep/.ws-class-table-col {
+    height: auto;
+    padding: 0px 2px;
+
+    /deep/.el-input__inner {
+      padding: 0px 2px;
+    }
+  }
+
+  /deep/.is-disabled {
+    .el-input__prefix,
+    .el-input__suffix {
+      display: none;
+    }
+
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff !important;
+      color: #000 !important;
+      font-size: 14px;
+      cursor: text;
+      padding: 0 !important;
+    }
+  }
+
+  .winseaview-view {
+    padding: 0 0 20px;
+  }
+
+  .container {
+    overflow: scroll;
+    height: 93vh;
+  }
+
+  /deep/.ws-info-table[data-v-850a44a6] .el-form-item .el-form-item__label {
+    width: 130px;
+  }
+
+  .el-textarea {
+    width: 101%;
+  }
+
+  // .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>

+ 1438 - 0
src/views/contractManagement/acquisitionContractEdit.vue

@@ -0,0 +1,1438 @@
+<!--销售合同-->
+<!--2019年5月30日 20:25:16 by jlx-->
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">修改合同信息</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />
+          返回</el-button>
+      </el-col>
+    </el-row>
+    <ws-form ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList">
+      <div class="remark">
+        <h3>基本信息</h3>
+        <p style="color: #8890b1">
+          &nbsp;&nbsp;注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>”
+          标记的条目提交后不可修改。
+        </p>
+      </div>
+      <ws-info-table>
+        <ws-form-item label="合同编号" span="1" prop="contractNo">
+          {{ deptBudgetList.contractNo }}
+        </ws-form-item>
+        <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          {{deptBudgetList.transactionSubject}}
+        </ws-form-item>
+        <ws-form-item class="readonly" label="收购方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        <!-- 交货方式 -->
+        <ws-form-item class="readonly" label="交货方式" span="1" prop="sourceGoods">
+          {{ deptBudgetList.deliverType1 }}
+        </ws-form-item>
+        <ws-form-item  v-if="deptBudgetList.transactionSubject == '合营'" class="readonly" label="合营方" span="1" prop="seller">{{ deptBudgetList.seller }}
+        </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="buyerPhone">
+          <ws-input v-model="deptBudgetList.buyerPhone" 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 v-if="deptBudgetList.transactionSubject == '合营'" label="合营方电话" span="1" prop="sellerPhone">
+          <ws-input v-model="deptBudgetList.sellerPhone" maxlength="100" size="small" placeholder="请输入合营方电话" />
+        </ws-form-item>
+        <!--价格类型-->
+          <ws-form-item label="价格类型" span="1" prop="priceType">          
+              {{ deptBudgetList.priceType }}
+          </ws-form-item>
+          <!-- 合同单价(元/吨) -->
+        <ws-form-item class="readonly" label="合同单价(元/吨)" span="1" prop="unitContractPrice" v-if="deptBudgetList.priceType == '定价收购'">
+          <span v-if="deptBudgetList.unitContractPrice != 'null'">{{
+            deptBudgetList.unitContractPrice
+          }}</span>
+        </ws-form-item>
+        <!-- 重量(吨) -->
+        <ws-form-item label="重量(吨)" span="1" prop="weight">
+          <ws-input v-model="deptBudgetList.weight" maxlength="100" size="small" placeholder="请输入重量(吨)" />
+        </ws-form-item>
+        <!-- 合同总价(元) -->
+        <ws-form-item label="合同总价(元)" span="1" prop="totalContractPrice" v-if="deptBudgetList.priceType == '定价收购'">
+          <ws-input v-model="deptBudgetList.totalContractPrice" maxlength="100" placeholder="请输入合同单价" size="small" />
+        </ws-form-item>
+        <!-- 溢短装(%) -->
+        <ws-form-item label="溢短装(%)" span="1" prop="overShort">
+          <ws-input v-model="deptBudgetList.overShort" maxlength="100" size="small" placeholder="请输入溢短装比例(%)" />
+        </ws-form-item>
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          <ws-date-picker v-model="deptBudgetList.signingDate" type="date" placeholder="请选择合同签订日期"
+            value-format="yyyy-MM-dd" />
+        </ws-form-item>
+
+        <!-- 最终实际交易量(吨) -->
+        <ws-form-item label="最终实际交易量(吨)" span="1" prop="totalContractPrice">
+          <ws-input v-model="deptBudgetList.finalTradingVolume" maxlength="100" placeholder="请输入最终实际交易量" size="small" />
+        </ws-form-item>
+        <ws-form-item label="结算单价(元/吨)" span="1" prop="settlementPrice" >
+          {{ deptBudgetList.settlementPrice?deptBudgetList.settlementPrice:'自动结算,不可编辑'}}
+        </ws-form-item>
+      </ws-info-table>
+      <base-card>
+        <!--货物信息-->
+        <div class="remark">
+          <h3>货物信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item class="readonly" label="货名" span="1" prop="waterContent">
+            {{ deptBudgetList.contractGoodsInfo.goodsName }}
+          </ws-form-item>
+          <ws-form-item label="水分(%)<=" span="1" prop="intendedShipId">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.waterContent" placeholder="请输入水分占比" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="品级" span="1" prop="grade" class="readonly">
+            {{ deptBudgetList.contractGoodsInfo.grade}}
+          </ws-form-item>
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.impurity" placeholder="请输入杂质占比(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.bulkDensity" placeholder="请输入容重" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain" class="result">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.mildewGrain" placeholder="请输入霉变粒占比(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.jiaorenli" placeholder="请输入输入热损伤占比(%)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain" class="result">
+            <ws-input v-model="deptBudgetList.contractGoodsInfo.imperfectGrain" placeholder="请输入不完善粒占比(%)"
+              maxlength="100" size="small" />
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>流程信息</h3>
+        </div>
+        <ws-info-table>
+          <ws-form-item label="已付款(元)" span="1" prop="mildewGrain">
+            <ws-input v-model="deptBudgetList.contractProcessInfo.mildewGrain" placeholder="请输入已付款(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="已开发票(元)" span="1" prop="goodsName">
+            <ws-input v-model="deptBudgetList.contractProcessInfo.goodsName" placeholder="请输入已开发票(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="费用支出(元)" span="1" prop="waterContent">
+            <ws-input v-model="deptBudgetList.contractProcessInfo.waterContent" placeholder="请输入费用支出(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+          <ws-form-item label="未开发票(元)" span="1" prop="impurity">
+            <ws-input v-model="deptBudgetList.contractProcessInfo.impurity" placeholder="请输入未开发票(元)" maxlength="100"
+              size="small" />
+          </ws-form-item>
+
+          <ws-form-item label="已完成发运量(吨)" span="1" prop="imperfectGrain" class="result">
+            <ws-input v-model="deptBudgetList.contractProcessInfo.imperfectGrain" maxlength="100" size="small" />
+          </ws-form-item>
+          <ws-form-item label="双章原件回收情况" span="1" prop="grade">
+            <ws-select v-model="deptBudgetList.contractProcessInfo.grade" placeholder="" class="typeselect"
+              @change="selectChapterTwo">
+              <ws-option v-for="item in ChapterTwoList" :key="item.constValue" :label="item.constValue"
+                :value="item.constValue" />
+            </ws-select>
+          </ws-form-item>
+        </ws-info-table>
+        <div class="remark">
+          <h3>备注信息</h3>
+        </div>
+        <ws-input v-model="deptBudgetList.remarks" type="textarea" row="3" placeholder="请输入备注信息,不超过200字"
+          maxlength="200" />
+        <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+          v-hasPermission="`contractManagement.buyContract.buyContractInfo.appl`" />
+      </base-card>
+    </ws-form>
+    <div v-if="dialogVisible" class="map">
+      <map-drag @marker="marker"  :editable="true" :isShowaddress='true' v-on:addressListen='getAddress' :type="type"></map-drag>
+    </div>
+    <div style="text-align: right; padding: 10px">
+      <el-button class="bg-bottom" type="primary" size="small" @click="submit()">提交</el-button>
+    </div>
+  </div>
+</template>
+<script>
+  import {
+    regionData,
+    CodeToText,
+    TextToCode
+  } from 'element-china-area-data'
+  import {
+    packList,
+    addList,
+    xiala,
+    addxiala,
+    editxiala,
+    delxiala,
+    examineList,
+    editInfo,
+    getstafffind
+  } from '@/model/contarct/index'
+  import WsUpload from '@/components/WsUpload'
+  import {
+    getstaff,
+  } from '@/model/warehouse/index'
+  import {
+    EventBus,
+    dayjs
+  } from 'base-core-lib'
+  import mapDrag from '@/components/mapdrag/mapdrag'
+  export default {
+    name: 'viewSpareMoney',
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    components: {
+      WsUpload,
+      mapDrag
+    },
+    data() {
+      return {
+        type: '',
+        dialogVisible: false,
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        size: 10,
+        // 提交类型
+        submitType: true,
+        tableData: [{
+          date: 1111,
+          name: 'qqqq',
+          address: 'errrtt'
+        }],
+        ruleDeptBudget: [],
+        deptBudgetList: {
+          contractProcessInfo: {},
+          contractGoodsInfo: {},
+          sourceGoods: '',
+          placeDelivery: '',
+          buyerPhone:'',
+        },
+        options_: regionData,
+        selectedOptions: [],
+        newSelectedOptions: '请选择货源所在地',
+        selectedOptions1: [],
+        newSelectedOptions1: '请选择交货所在地区',
+        mainReportAdd: {},
+        list: {},
+        unitList: [],
+        options: [],
+        staffList: [],
+        packtypeList: [],
+        goodnameList: [],
+        gradeList: [],
+        ChapterTwoList: [],
+        appendixIdsAdd: '',
+        pickerBeginDateBefore: {
+          disabledDate: (time) => {
+            return time.getTime() > Date.now()
+          },
+        },
+        acceptanceCheck: {},
+        compId: localStorage.getItem('ws-pf_compId'),
+        feedbackLeaders:[],//发货反馈负责人
+      }
+    },
+
+    activated() {
+      getstafffind({
+          roles: 'd6a5c8a52da544309259f91f75de1ec6'
+        })
+        .toPromise()
+        .then((response) => {
+          this.options = response
+          this.staffList = response
+        })
+      this.loaddata()
+      this.showType = this.isShow
+    },
+    methods: {
+       feedbackLeaderChange(e){
+        this.deptBudgetList.feedbackLeader = this.feedbackLeaders[e].staffName
+        this.deptBudgetList.feedbackLeaderPhone = this.feedbackLeaders[e].staffMobilePhone
+      },
+      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
+      },
+      dataFilter(val) {
+        this.deptBudgetList.personCharge = val
+        if (val) {
+          //val存在
+          this.options = this.staffList.filter((item) => {
+            if (
+              !!~item.staffName.indexOf(val) ||
+              !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+            ) {
+              return true
+            }
+          })
+        } else {
+          //val为空时,还原数组
+          this.options = this.staffList
+        }
+      },
+      selectstaff(e) {
+        for (var i = 0; i < this.staffList.length; i++) {
+          if (this.staffList[i].staffName == e) {
+            this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
+            this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+          }
+        }
+      },
+      handleChange(value) {
+        this.selectedOptions = value
+      },
+      handleChange1(value) {
+        this.selectedOptions1 = value
+      },
+      loaddata() {
+        // 数据
+        examineList({
+            id: this.$route.query.id
+          })
+          .toPromise()
+          .then((response) => {
+            if (response.weight) {
+              response.weight = String(response.weight)
+            }
+            if (response.overShort) {
+              response.overShort = String(response.overShort)
+            }
+            if (response.totalContractPrice) {
+              response.totalContractPrice = String(response.totalContractPrice)
+            }
+            if (response.unitContractPrice) {
+              response.unitContractPrice = String(response.unitContractPrice)
+            }
+            // var tmp = []
+            // tmp[0] = TextToCode[response.sourceProvince].code
+
+            // tmp[1] = TextToCode[response.sourceProvince][response.sourceCity].code
+
+            // if (tmp[0] == 810000 || tmp[0] == 820000) {
+            //   tmp[2] = null
+            // } else {
+            //   tmp[2] =
+            //     TextToCode[response.sourceProvince][response.sourceCity][
+            //       response.sourceArea
+            //     ].code
+            // }
+            // this.selectedOptions = tmp
+            // var tmp1 = []
+            // tmp1[0] = TextToCode[response.deliveryProvince].code
+            // tmp1[1] =
+            //   TextToCode[response.deliveryProvince][response.deliveryCity].code
+
+            // if (tmp1[0] == 810000 || tmp1[0] == 820000) {
+            //   tmp1[2] = null
+            // } else {
+            //   tmp1[2] =
+            //     TextToCode[response.deliveryProvince][response.deliveryCity][
+            //       response.deliveryArea
+            //     ].code
+            // }
+            // this.selectedOptions1 = tmp1
+            this.deptBudgetList = response
+           this.newSelectedOptions = response.sourceProvince+response.sourceCity+response.sourceArea
+           this.deptBudgetList.sourceGoods =  response.sourceGoods
+           this.newSelectedOptions1 = response.deliveryProvince+response.deliveryCity+response.deliveryArea
+           this.deptBudgetList.placeDelivery =  response.placeDelivery
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方自提'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方送货'
+            }else if (this.deptBudgetList.deliverType == 3) {
+              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
+          })
+             // 发货反馈负责人
+           getstaff({
+            compId: localStorage.getItem('ws-pf_compId')
+          }).toPromise()
+          .then((response) => {
+            this.feedbackLeaders = response
+              let _obj = []   //发货反馈负责人下拉列表第一个添加  "无需发货反馈(默认)"
+            _obj.staffName = '无需发货反馈(默认)'
+            _obj.staffMobilePhone = '(默认)'
+            this.feedbackLeaders.unshift(_obj)
+          })
+      },
+      addClick() {
+        this.unitList.push({
+          flag: 'add',
+          constValue: '',
+          constKey: '',
+        })
+      },
+      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)
+            }
+          })
+      },
+      // 关闭 dialog时 处理文件url 初始化upload组件
+      handleClose() {
+        this.dialogViewSpareMoney = false
+      },
+      handleExamine() {},
+      approve() {},
+      returnsales() {
+        this.$router.push({
+          path: 'acquisitionContract'
+        })
+      },
+      selectChapterTwo(e) {
+        for (var i = 0; i < this.ChapterTwoList.length; i++) {
+          if (this.ChapterTwoList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.ChapterTwoList[i].constKey
+          }
+        }
+      },
+      selectunitList(e) {
+        for (var i = 0; i < this.unitList.length; i++) {
+          if (this.unitList[i].constValue == e) {
+            this.deptBudgetList.packingMethodKey = this.unitList[i].constKey
+          }
+        }
+      },
+      selectgrade(e) {
+        for (var i = 0; i < this.gradeList.length; i++) {
+          if (this.gradeList[i].constValue == e) {
+            this.deptBudgetList.gradeKey = this.gradeList[i].constKey
+          }
+        }
+      },
+      selectpackingMethod(e) {
+        for (var i = 0; i < this.packtypeList.length; i++) {
+          if (this.packtypeList[i].constValue == e) {
+            this.deptBudgetList.acceptanceMethodKey =
+              this.packtypeList[i].constKey
+          }
+        }
+      },
+      saveClick(item, index) {
+        console.log(item)
+
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          this.$set(this.unitList, index, {
+            flag: 'check'
+          })
+        } else {
+          this.$set(this.unitList, index, {
+            flag: 'delete'
+          })
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        if (item.flag == 'add') {
+          item.constKey = Math.random() * 20
+          this.acceptanceCheck.compId = this.compId
+          this.acceptanceCheck.constKey = item.constKey
+          this.acceptanceCheck.constCode = 'TYPEYAN'
+          this.acceptanceCheck.constValue = item.constValue
+          this.acceptanceCheck.id = item.id
+          addxiala(this.acceptanceCheck)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        } else if (item.flag == 'check') {
+          this.acceptanceCheck.compId = this.compId
+          this.acceptanceCheck.constKey = item.constKey
+          this.acceptanceCheck.constCode = 'TYPEYAN'
+          this.acceptanceCheck.constValue = item.constValue
+          this.acceptanceCheck.id = item.id
+          editxiala(this.acceptanceCheck)
+            .toPromise()
+            .then((response) => {
+              this.getUnitList()
+            })
+        }
+      },
+      // 编辑
+      editClick(item, index) {
+        const map = JSON.parse(JSON.stringify(item))
+        if (Object.is(item.id, 1)) {
+          return
+        }
+        if (Object.is(this.unitList[index].flag, 'delete')) {
+          map.flag = 'check'
+          this.$set(this.unitList, index, map)
+        } else {
+          map.flag = 'delete'
+          this.$set(this.unitList, index, map)
+        }
+      },
+      // 删除
+      deleteClick(item, index) {
+        if (Object.is(item.constKey, 1)) {
+          return
+        }
+        if (!item.constValue) {
+          this.unitList.splice(index, 1)
+          return
+        }
+        delxiala({
+            id: this.unitList[index].id
+          })
+          .toPromise()
+          .then((response) => {
+            this.getUnitList()
+            this.pleaseChoose = ''
+          })
+      },
+      submit() {
+        if (!this.deptBudgetList.contractNo) {
+          this.$message({
+            message: '合同编号不能为空',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.contractNo.length < 5 ||
+          this.deptBudgetList.contractNo.length > 50
+        ) {
+          this.$message({
+            message: '合同编号长度不符合要求,请输入5到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.transactionSubject == '合营'){
+        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.transactionSubject == '合营'){
+        if (!this.deptBudgetList.sellerPhone) {
+          this.$message({
+            message: '请输入合营方电话!',
+            type: 'warning',
+          })
+          return
+        }
+       }
+        
+        // if (isNaN(this.deptBudgetList.sellerPhone)) {
+        //   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.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.deptBudgetList.priceType) {
+          this.$message({
+            message: '请选择价格类型',
+            type: 'warning',
+          })
+          return
+        }
+        if (this.deptBudgetList.priceType == '定价收购') {
+          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 (!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 > 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 = 3
+                editInfo(this.deptBudgetList)
+                  .toPromise()
+                  .then((response) => {
+                    this.$message.success('编辑成功')
+                    this.$router.push({
+                      path: 'acquisitionContract'
+                    })
+                  })
+              } else {
+                EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+                return false
+              }
+            })
+          })
+      },
+    },
+  }
+</script>
+<style lang="scss" scoped>
+  .el-form {
+    padding: 0 15%;
+  }
+
+  /deep/.ws-info-table .el-form-item {
+    border-right: 1px solid #cdd2dc;
+    border-bottom: 1px solid #cdd2dc;
+  }
+
+  .readonly {
+    position: relative;
+  }
+
+  .readonly:after {
+    content: '*';
+    color: #ff2727;
+    position: absolute;
+    right: 8px;
+    z-index: 10;
+    top: 21%;
+    font-size: 20px;
+  }
+
+  .title {
+    position: relative;
+  }
+
+  .title::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .el-button--primary {
+    background-color: #5878e8;
+    border-color: #5878e8;
+  }
+
+  .el-col {
+    background: #f6f7fc;
+  }
+
+  /deep/.ws-info-table .el-form-item .el-form-item__content {
+    padding: 0 25px;
+    border-left: 1px solid #cdd2dc;
+    background: #fafbfc;
+    color: #8890B1;
+  }
+
+  /deep/.el-form-item.is-success .el-input__inner,
+  /deep/.el-cascader .el-input .el-input__inner,
+  /deep/.el-textarea__inner {
+    color: #8890B1;
+  }
+
+  /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 .el-form-item .el-form-item__label {
+    width: 130px;
+  }
+
+  .el-textarea {
+    width: 101%;
+  }
+
+  /deep/.iconclose:before {
+    display: none;
+  }
+
+  /deep/.winsea-card .card__header {
+    font-size: 14px;
+    color: #409eff;
+    padding: 0 0 20px 10px;
+    position: relative;
+    display: none;
+  }
+
+  // .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>

+ 677 - 0
src/views/contractManagement/acquisitionContractExamine.vue

@@ -0,0 +1,677 @@
+<!--采购合同查看-->
+<!--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="transactionSubject" class="readonly">
+          {{deptBudgetList.transactionSubject}}
+        </ws-form-item>
+        <ws-form-item label="收购方" span="1" prop="buyer">
+          {{ deptBudgetList.buyer }}
+        </ws-form-item>
+        
+        <ws-form-item label="交货方式" span="1" prop="deliverType1">{{ deptBudgetList.deliverType1 }}
+        </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营方" span="1" prop="seller">{{ deptBudgetList.seller }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(起)" span="1" prop="deliveryDateStart">
+          {{ deptBudgetList.deliveryDateStart }}
+        </ws-form-item>
+        <ws-form-item label="收购方电话" span="1" prop="buyerPhone">{{ deptBudgetList.buyerPhone }}
+        </ws-form-item>
+        <ws-form-item label="交货日期(止)" span="1" prop="deliveryDateEnd">
+          {{ deptBudgetList.deliveryDateEnd }}
+        </ws-form-item>
+        <ws-form-item v-if="deptBudgetList.transactionSubject == '合营'" label="合营方电话" span="1" prop="sellerPhone">
+          {{ deptBudgetList.sellerPhone }}
+        </ws-form-item>
+        <ws-form-item label="价格类型" span="1" prop="priceType">
+          {{ deptBudgetList.priceType }}
+        </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="weight">
+          {{ deptBudgetList.weight }}
+        </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="overShort">
+          {{ deptBudgetList.overShort }}
+        </ws-form-item>
+        <ws-form-item label="签订日期" span="1" prop="signingDate">
+          {{ deptBudgetList.signingDate }}
+        </ws-form-item>
+        <ws-form-item label="最终实际交易量(吨)" span="1" prop="finalTradingVolume">
+          {{ deptBudgetList.finalTradingVolume }}
+        </ws-form-item>
+        <ws-form-item label="结算单价(元/吨)" span="1" prop="settlementPrice" >
+          {{ deptBudgetList.settlementPrice?deptBudgetList.settlementPrice:'自动结算,不可编辑'}}
+        </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="imperfectGrain" class="result">
+          {{ deptBudgetList.contractProcessInfo.imperfectGrain }}
+        </ws-form-item>
+        <ws-form-item label="双章原件回收情况" span="1" prop="grade">{{ deptBudgetList.contractProcessInfo.grade }}
+        </ws-form-item>
+      </ws-info-table>
+      <div class="remark">
+        <h3>备注信息</h3>
+      </div>
+    <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" />
+      <el-table class="wenzi" :data="taskhistories" style="width: 100%">
+        <el-table-column prop="operatorMajorRoleName" label="审核人">
+          <template scope="scope">
+            {{scope.row.operatorMajorRoleName}}{{scope.row.operatorName}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="inOutTaskNo" label="审核结果">
+          <template scope="scope">
+            <span v-if='scope.row.approved'>通过</span>
+            <span v-if='!scope.row.approved'>驳回</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="endTime" label="审核时间"></el-table-column>
+        <el-table-column prop="auditMind" label="审核意见"></el-table-column>
+      </el-table>
+    </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'
+  export default {
+    name: 'viewSpareMoney',
+    watch: {
+      vesselId(val) {
+        this.getVesselData()
+      },
+      isShow(val) {
+        this.showType = val
+      },
+    },
+    data() {
+      return {
+        //弹出框
+        dialogViewSpareMoney: false,
+        dialogApproveFormVisible: false,
+        // 船舶类型
+        monetaryKey: null,
+        // 表格显示数据
+        tableDate: [],
+        // 是否显示
+        showType: true,
+        // 年
+        year: '',
+        status: '',
+        // 提交类型
+        submitType: true,
+        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 = '对方送货'
+            }
+            else if (this.deptBudgetList.deliverType == 3) {
+              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.push({
+          path: 'acquisitionContract'
+        })
+      },
+    },
+  }
+</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>

+ 166 - 100
src/views/contractManagement/component/routers/route.js

@@ -24,7 +24,7 @@ const contractManagementRouter = {
         module: 'contractManagement.buyContract',
         permissicon: [],
         keepAlive: true,
-        _title:'现货采购合同'
+        _title:'采购合同'
       }
     },
     // 现货采购合同费用
@@ -39,7 +39,7 @@ const contractManagementRouter = {
               module: 'contractManagement.buyContract',
               permissicon: [],
               keepAlive: true,
-              _title:'现货采购合同费用'
+              _title:'采购合同费用'
             },
             hidden: true
     },
@@ -55,7 +55,7 @@ const contractManagementRouter = {
         module: 'contractManagement.buyContract.buyContractInfo.view',
         permissicon: [],
         keepAlive: true,
-        _title:'现货采购合同查看'
+        _title:'采购合同查看'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
@@ -72,7 +72,7 @@ const contractManagementRouter = {
         module: 'contractManagement.buyContract.buyContractInfo.edit',
         permissicon: [],
         keepAlive: true,
-        _title:'现货采购合同编辑'
+        _title:'采购合同编辑'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
@@ -89,78 +89,144 @@ const contractManagementRouter = {
         module: 'contractManagement.buyContract.buyContractInfo.add',
         permissicon: [],
         keepAlive: true,
-        _title:'现货采购合同添加'
+        _title:'采购合同添加'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
     },
-
-    // 期货采购合同
+    // 收购合同
     {
-      path: 'futuresPurchaseContract',
+      path: 'acquisitionContract',
       component: () =>
-        import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/futuresPurchaseContract'),
-      name: 'futuresPurchaseContract',
+        import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/acquisitionContract'),
+      name: 'acquisitionContract',
       meta: {
-        title: 'futuresPurchaseContract',
+        title: 'acquisitionContract',
         shortcutEntrance: 'contractManagement',
         module: 'contractManagement.buyContract',
         permissicon: [],
         keepAlive: true,
-        _title:'期货采购合同'
+        _title:'购合同'
       }
     },
-    //期货采购合同查看
+    //购合同查看
     {
-      path: 'futuresPurchaseContractExamine',
+      path: 'acquisitionContractExamine',
       component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresPurchaseContractExamine'),
-      name: 'futuresPurchaseContractExamine',
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractExamine'),
+      name: 'acquisitionContractExamine',
       meta: {
-        title: 'futuresPurchaseContractExamine',
+        title: 'acquisitionContractExamine',
         shortcutEntrance: 'contractManagement',
         module: 'contractManagement.buyContract.buyContractInfo.view',
         permissicon: [],
         keepAlive: true,
-        _title:'期货采购合同查看'
+        _title:'购合同查看'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
     },
-    //期货采购合同编辑
+    //购合同编辑
     {
-      path: 'futuresPurchaseContractEdit',
+      path: 'acquisitionContractEdit',
       component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresPurchaseContractEdit'),
-      name: 'futuresPurchaseContractEdit',
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractEdit'),
+      name: 'acquisitionContractEdit',
       meta: {
-        title: 'futuresPurchaseContractEdit',
+        title: 'acquisitionContractEdit',
         shortcutEntrance: 'contractManagement',
         module: 'contractManagement.buyContract.buyContractInfo.edit',
         permissicon: [],
         keepAlive: true,
-        _title:'期货采购合同编辑'
+        _title:'购合同编辑'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
     },
-    //期货采购合同添加
+    //购合同添加
     {
-      path: 'futuresPurchaseContractAdd',
+      path: 'acquisitionContractAdd',
       component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresPurchaseContractAdd'),
-      name: 'futuresPurchaseContractAdd',
+        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/acquisitionContractAdd'),
+      name: 'acquisitionContractAdd',
       meta: {
-        title: 'futuresPurchaseContractAdd',
+        title: 'acquisitionContractAdd',
         shortcutEntrance: 'contractManagement',
         module: 'contractManagement.buyContract.buyContractInfo.add',
         permissicon: [],
         keepAlive: true,
-        _title:'期货采购合同添加'
+        _title:'购合同添加'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
     },
+
+    // 期货采购合同
+    // {
+    //   path: 'futuresPurchaseContract',
+    //   component: () =>
+    //     import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/futuresPurchaseContract'),
+    //   name: 'futuresPurchaseContract',
+    //   meta: {
+    //     title: 'futuresPurchaseContract',
+    //     shortcutEntrance: 'contractManagement',
+    //     module: 'contractManagement.buyContract',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'期货采购合同'
+    //   }
+    // },
+    //期货采购合同查看
+    // {
+    //   path: 'futuresPurchaseContractExamine',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresPurchaseContractExamine'),
+    //   name: 'futuresPurchaseContractExamine',
+    //   meta: {
+    //     title: 'futuresPurchaseContractExamine',
+    //     shortcutEntrance: 'contractManagement',
+    //     module: 'contractManagement.buyContract.buyContractInfo.view',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'期货采购合同查看'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    //   hidden: true
+    // },
+    //期货采购合同编辑
+    // {
+    //   path: 'futuresPurchaseContractEdit',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresPurchaseContractEdit'),
+    //   name: 'futuresPurchaseContractEdit',
+    //   meta: {
+    //     title: 'futuresPurchaseContractEdit',
+    //     shortcutEntrance: 'contractManagement',
+    //     module: 'contractManagement.buyContract.buyContractInfo.edit',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'期货采购合同编辑'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    //   hidden: true
+    // },
+    // //期货采购合同添加
+    // {
+    //   path: 'futuresPurchaseContractAdd',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresPurchaseContractAdd'),
+    //   name: 'futuresPurchaseContractAdd',
+    //   meta: {
+    //     title: 'futuresPurchaseContractAdd',
+    //     shortcutEntrance: 'contractManagement',
+    //     module: 'contractManagement.buyContract.buyContractInfo.add',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'期货采购合同添加'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    //   hidden: true
+    // },
      //现货销售合同费用
      {
         path: 'salesContractcost',
@@ -173,7 +239,7 @@ const contractManagementRouter = {
          module: 'contractManagement.salesContract',
          permissicon: [],
          keepAlive: true,
-         _title:'期货销售合同费用'
+         _title:'销售合同费用'
         // module: 'procurement.sparepart.applDetail'
       },
        hidden: true
@@ -190,7 +256,7 @@ const contractManagementRouter = {
         module: 'contractManagement.salesContract',
         permissicon: [],
         keepAlive: true,
-        _title:'现货销售合同'
+        _title:'销售合同'
         // module: 'procurement.sparepart.applDetail'
       }
     },
@@ -206,7 +272,7 @@ const contractManagementRouter = {
         module: 'contractManagement.salesContract.salesContractInfo.view',
         permissicon: [],
         keepAlive: true,
-        _title:'现货销售合同查看'
+        _title:'销售合同查看'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
@@ -223,7 +289,7 @@ const contractManagementRouter = {
         module: 'contractManagement.salesContract.salesContractInfo.edit',
         permissicon: [],
         keepAlive: true,
-        _title:'现货销售合同编辑'
+        _title:'销售合同编辑'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
@@ -240,79 +306,79 @@ const contractManagementRouter = {
         module: 'contractManagement.salesContract.salesContractInfo.add',
         permissicon: [],
         keepAlive: true,
-        _title:'现货销售合同添加'
+        _title:'销售合同添加'
         // module: 'procurement.sparepart.applDetail'
       },
       hidden: true
     },
 
     //期货销售合同
-    {
-      path: 'futuresSalesContract',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresSalesContract'),
-      name: 'futuresSalesContract',
-      meta: {
-        title: 'futuresSalesContract',
-        shortcutEntrance: 'contractManagement',
-        module: 'contractManagement.salesContract',
-        permissicon: [],
-        keepAlive: true,
-        _title:'期货销售合同'
-        // module: 'procurement.sparepart.applDetail'
-      }
-    },
+    // {
+    //   path: 'futuresSalesContract',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresSalesContract'),
+    //   name: 'futuresSalesContract',
+    //   meta: {
+    //     title: 'futuresSalesContract',
+    //     shortcutEntrance: 'contractManagement',
+    //     module: 'contractManagement.salesContract',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'期货销售合同'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   }
+    // },
     //期货销售合同查看
-    {
-      path: 'futuresSalesContractExamine',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresSalesContractExamine'),
-      name: 'futuresSalesContractExamine',
-      meta: {
-        title: 'futuresSalesContractExamine',
-        shortcutEntrance: 'contractManagement',
-        module: 'contractManagement.salesContract.salesContractInfo.view',
-        permissicon: [],
-        keepAlive: true,
-        _title:'期货销售合同查看'
-        // module: 'procurement.sparepart.applDetail'
-      },
-      hidden: true
-    },
-    //期货销售合同编辑
-    {
-      path: 'futuresSalesContractEdit',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresSalesContractEdit'),
-      name: 'futuresSalesContractEdit',
-      meta: {
-        title: 'futuresSalesContractEdit',
-        shortcutEntrance: 'contractManagement',
-        module: 'contractManagement.salesContract.salesContractInfo.edit',
-        permissicon: [],
-        keepAlive: true,
-        _title:'期货销售合同编辑'
-        // module: 'procurement.sparepart.applDetail'
-      },
-      hidden: true
-    },
-    //期货销售合同添加
-    {
-      path: 'futuresSalesContractAdd',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresSalesContractAdd'),
-      name: 'futuresSalesContractAdd',
-      meta: {
-        title: 'futuresSalesContractAdd',
-        shortcutEntrance: 'contractManagement',
-        module: 'contractManagement.salesContract.salesContractInfo.add',
-        permissicon: [],
-        keepAlive: true,
-        _title:'期货销售合同添加'
-        // module: 'procurement.sparepart.applDetail'
-      },
-      hidden: true
-    },
+    // {
+    //   path: 'futuresSalesContractExamine',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresSalesContractExamine'),
+    //   name: 'futuresSalesContractExamine',
+    //   meta: {
+    //     title: 'futuresSalesContractExamine',
+    //     shortcutEntrance: 'contractManagement',
+    //     module: 'contractManagement.salesContract.salesContractInfo.view',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'期货销售合同查看'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    //   hidden: true
+    // },
+    // //期货销售合同编辑
+    // {
+    //   path: 'futuresSalesContractEdit',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresSalesContractEdit'),
+    //   name: 'futuresSalesContractEdit',
+    //   meta: {
+    //     title: 'futuresSalesContractEdit',
+    //     shortcutEntrance: 'contractManagement',
+    //     module: 'contractManagement.salesContract.salesContractInfo.edit',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'期货销售合同编辑'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    //   hidden: true
+    // },
+    // //期货销售合同添加
+    // {
+    //   path: 'futuresSalesContractAdd',
+    //   component: () =>
+    //     import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/futuresSalesContractAdd'),
+    //   name: 'futuresSalesContractAdd',
+    //   meta: {
+    //     title: 'futuresSalesContractAdd',
+    //     shortcutEntrance: 'contractManagement',
+    //     module: 'contractManagement.salesContract.salesContractInfo.add',
+    //     permissicon: [],
+    //     keepAlive: true,
+    //     _title:'期货销售合同添加'
+    //     // module: 'procurement.sparepart.applDetail'
+    //   },
+    //   hidden: true
+    // },
 
     //点价确认单
     {

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

@@ -158,7 +158,7 @@
       </el-table-column>
       <el-table-column prop="address" label="操作" width="160">
         <template slot-scope="scope">
-           <img width="16" height="17" style="
+           <!-- <img width="16" height="17" style="
                 vertical-align: text-top;
                 position: relative;
                 top: -1px;
@@ -166,7 +166,7 @@
               "  src="../../../public/img/daichu.png"
                v-hasPermission="
               `contractManagement.nonContract.nonContractInfo.view`"
-             @click="handlecost(scope.row)" alt="" />
+             @click="handlecost(scope.row)" alt="" /> -->
              
           <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
             src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="

+ 22 - 3
src/views/contractManagement/purchaseContractAdd.vue

@@ -76,15 +76,24 @@
         <ws-form-item label="合同编号" span="1" prop="contractNo" class="readonly" required v-show="deptBudgetList.agreementType =='采购合同'">
           <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" maxlength="50" size="small" />
         </ws-form-item>
-
+        <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          <el-radio v-model="deptBudgetList.transactionSubject" label="自营">自营</el-radio>
+          <el-radio v-model="deptBudgetList.transactionSubject" label="合营">合营</el-radio>
+        </ws-form-item>
         <!--结算方式-->
         <ws-form-item label="结算方式" span="1" prop="settlementMethod">
           <ws-input v-model="deptBudgetList.settlementMethod" placeholder="请输入结算方式" maxlength="100" size="small" />
         </ws-form-item>
         <ws-form-item label="买方" span="1" prop="buyer" class="readonly">
           <!-- <ws-input v-model="deptBudgetList.buyer" placeholder="请输入买方名称" maxlength="100" size="small" /> -->
-          <el-autocomplete class="inline-input" v-model="deptBudgetList.buyer" :fetch-suggestions="querySearch1"
-            placeholder="请输入买方名称" @select="handleSelect"></el-autocomplete>
+          <!-- <el-autocomplete class="inline-input" v-model="deptBudgetList.buyer" :fetch-suggestions="querySearch1"
+            placeholder="请输入买方名称" @select="handleSelect"></el-autocomplete> -->
+             <el-select filterable  v-model="deptBudgetList.buyer" placeholder="请选择买方名称" class="typeselect" 
+            @change="buyerSelect" filterable clearable>
+
+            <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="seller" class="readonly">
           <el-radio v-model="deptBudgetList.deliverType" label="1">我方自提</el-radio>
@@ -520,6 +529,7 @@ import { isUndefined } from 'xe-utils/methods'
           personChargeKey:'',
           finalTradingVolume: 0,
           totalContractPrice: 0,
+          transactionSubject:'自营',
           contractGoodsInfo: {
             goodsName: '',
           },
@@ -694,6 +704,15 @@ import { isUndefined } from 'xe-utils/methods'
           }
         }
       },
+      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.buyPhone=this.customerinfo[i].customerPhone
+          }
+        }
+      },
       getAddress(data) {
         console.log('getAddress', data)
         if (data[4] == 'source') {

+ 6 - 0
src/views/contractManagement/purchaseContractEdit.vue

@@ -27,6 +27,9 @@
         <ws-form-item label="合同编号" v-if="deptBudgetList.agreementType=='采购合同'" span="1" prop="contractNo">
           {{ deptBudgetList.contractNo }}
         </ws-form-item>
+        <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          {{deptBudgetList.transactionSubject}}
+        </ws-form-item>
         <ws-form-item label="关联合同" v-if="deptBudgetList.agreementType=='补充协议'" span="1" prop="agreementNo">
           {{ deptBudgetList.agreementNo }}
         </ws-form-item>
@@ -204,6 +207,9 @@
         <ws-form-item class="readonly" label="结算重量方式" span="1" prop="settlementWeightMethod" v-if="deptBudgetList.deliverType==1">
           {{ deptBudgetList.settlementWeightMethod==1?'按出库重量结算':'按入库重量结算' }}
         </ws-form-item>
+        <ws-form-item label="结算单价(元/吨)" span="1" prop="settlementPrice" >
+          {{ deptBudgetList.settlementPrice?deptBudgetList.settlementPrice:'自动结算,不可编辑'}}
+        </ws-form-item>
       </ws-info-table>
       <base-card>
         <!--货物信息-->

+ 6 - 0
src/views/contractManagement/purchaseContractExamine.vue

@@ -52,6 +52,9 @@
         <ws-form-item label="合同编号" v-if="deptBudgetList.agreementType=='采购合同'" span="1" prop="contractNo">
           {{ deptBudgetList.contractNo }}
         </ws-form-item>
+        <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          {{deptBudgetList.transactionSubject}}
+        </ws-form-item>
         <ws-form-item label="关联合同" v-if="deptBudgetList.agreementType=='补充协议'" span="1" prop="agreementNo">
           {{ deptBudgetList.agreementNo }}
         </ws-form-item>
@@ -132,6 +135,9 @@
         <ws-form-item class="readonly" label="结算重量方式" span="1" prop="settlementWeightMethod" v-if="deptBudgetList.deliverType==1">
           {{ deptBudgetList.settlementWeightMethod==1?'按出库重量结算':'按入库重量结算' }}
         </ws-form-item>
+        <ws-form-item label="结算单价(元/吨)" span="1" prop="settlementPrice" >
+          {{ deptBudgetList.settlementPrice?deptBudgetList.settlementPrice:'自动结算,不可编辑'}}
+        </ws-form-item>
       </ws-info-table>
       <!--面试信息-->
       <div class="remark">

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

@@ -163,14 +163,14 @@
       </el-table-column>
       <el-table-column prop="address" label="操作" width="160">
         <template slot-scope="scope">
-          <img width="16" height="17" style="
+          <!-- <img width="16" height="17" style="
                 vertical-align: text-top;
                 position: relative;
                 top: -1px;
                 margin: 0 6px; " 
                v-hasPermission="
               `contractManagement.nonContract.nonContractInfo.view`" src="../../../public/img/daichu.png"
-             @click="handlecost(scope.row)" alt="" />
+             @click="handlecost(scope.row)" alt="" /> -->
           <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
             src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
               `contractManagement.salesContract.salesContractInfo.view`

+ 35 - 2
src/views/contractManagement/salesContractAdd.vue

@@ -44,6 +44,10 @@
             <ws-input v-model="deptBudgetList.contractNo" placeholder="请输入合同编号" maxlength="50" size="small"
               :rules="ruleDeptBudget" />
           </ws-form-item>
+          <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          <el-radio v-model="deptBudgetList.transactionSubject" label="自营">自营</el-radio>
+          <el-radio v-model="deptBudgetList.transactionSubject" label="合营">合营</el-radio>
+        </ws-form-item>
           <!--关联合同-->
           <ws-form-item prop="agreementNo" label="关联合同" span="1" v-if="deptBudgetList.agreementType == '补充协议'">
             <ws-select v-model="deptBudgetList.agreementNo" placeholder="请选择编号" @change="selectRelation">
@@ -75,8 +79,11 @@
           <!--卖方-->
           <ws-form-item label="卖方" span="1" prop="seller" class="readonly">
             <!-- <ws-input v-model="deptBudgetList.seller" placeholder="请输入卖方名称" maxlength="100" size="small" /> -->
-            <el-autocomplete class="inline-input" v-model="deptBudgetList.seller" :fetch-suggestions="querySearch2"
-              placeholder="请输入卖方名称" @select="handleSelect"></el-autocomplete>
+               <el-select  v-model="deptBudgetList.seller" placeholder="请选择卖方名称" class="typeselect" filterable clearable
+           @select="sellerSelect">
+            <el-option v-for="item in customerinfo" :key="item.customerName"  :label="item.customerName"
+              :value="item.customerName" />
+              </el-select>
           </ws-form-item>
           <!--结算方式-->
           <ws-form-item label="结算方式" span="1" prop="settlementMethod">
@@ -117,6 +124,15 @@
                 :value="item.constValue" />
             </ws-select>
           </ws-form-item>
+          <ws-form-item label="中转公司" span="1" prop="buyer" class="readonly">
+            <!-- <ws-input v-model="deptBudgetList.buyer" placeholder="请输入买方名称" maxlength="100" size="small" /> -->
+            <!-- <el-autocomplete class="inline-input" v-model="deptBudgetList.buyer" :fetch-suggestions="querySearch1"
+              placeholder="请输入买方名称" @select="handleSelect"></el-autocomplete> -->
+              <el-select  v-model="deptBudgetList.transitCompany" placeholder="无" class="typeselect" filterable clearable>
+            <el-option v-for="item in customerinfo" :key="item.customerName"  :label="item.customerName"
+              :value="item.customerName" />
+              </el-select>
+          </ws-form-item>
           <!--重量(吨)-->
           <ws-form-item label="重量(吨)" span="1" prop="weight">
             <ws-input @input="weightchange" v-model="deptBudgetList.weight" placeholder="请输入重量(吨)" maxlength="100"
@@ -478,6 +494,7 @@
             goodsName: '',
           },
           buyerPhone:'',
+          transactionSubject:'自营',
           contractProcessInfo: {},
           addressUrl: '',
           sourceGoods: '',
@@ -593,6 +610,15 @@
           }
         }
       },
+      sellerSelect(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.sellerPhone=this.customerinfo[i].customerPhone
+          }
+        }
+      },
       querySearch1(queryString, cb) {
         var restaurants1 = this.restaurants1;
         var results = queryString ? restaurants1.filter(this.createFilter(queryString)) : restaurants1;
@@ -931,6 +957,13 @@
           })
           return
         }
+        if (this.deptBudgetList.transactionSubject=='合营'&&!this.deptBudgetList.transitCompany) {
+          this.$message({
+            message: '中转公司不能为空!',
+            type: 'warning',
+          })
+          return
+        }
         if(this.deptBudgetList.deliverType == '2'){
            if (!this.deptBudgetList.feedbackLeader){
           this.$message({

+ 9 - 0
src/views/contractManagement/salesContractEdit.vue

@@ -36,6 +36,9 @@
             </div>
             <span class="unchangeable">*</span>
           </ws-form-item>
+          <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          {{deptBudgetList.transactionSubject}}
+        </ws-form-item>
           <!--关联合同-->
           <ws-form-item prop="agreementNo" label="关联合同" span="1" v-if="deptBudgetList.agreementType == '补充协议'">
              <div class="unchanged">
@@ -104,6 +107,9 @@
                 :value="item.constValue" />
             </ws-select>
           </ws-form-item>
+          <ws-form-item label="中转公司" span="1" prop="buyer" class="readonly">
+            {{deptBudgetList.transitCompany}}
+          </ws-form-item>
           <!--卖方电话-->
           <ws-form-item label="卖方电话" span="1" prop="contractNo">
             <ws-input v-model="deptBudgetList.sellerPhone" placeholder="请输入卖方电话" maxlength="100" size="small" />
@@ -246,6 +252,9 @@
             <ws-date-picker v-model="deptBudgetList.collectionDeadline" type="date" placeholder="请选择收款截止日期"
               value-format="yyyy-MM-dd" />
           </ws-form-item>
+           <ws-form-item label="结算单价(元/吨)" span="1" prop="settlementPrice" >
+          {{ deptBudgetList.settlementPrice?deptBudgetList.settlementPrice:'自动结算,不可编辑'}}
+        </ws-form-item>
         </ws-info-table>
       </ws-form>
     </div>

+ 15 - 0
src/views/contractManagement/salesContractExamine.vue

@@ -57,6 +57,11 @@
               {{ deptBudgetList.contractNo }}
             </div>
           </ws-form-item>
+          <ws-form-item label="交易主体" span="1" prop="transactionSubject" class="readonly">
+          <div class="unchanged">
+              {{deptBudgetList.transactionSubject}}
+            </div>
+        </ws-form-item>
           <ws-form-item label="关联合同" v-if="deptBudgetList.agreementType=='补充协议'" span="1" prop="agreementNo">
             <div class="unchanged">
               {{ deptBudgetList.agreementNo }}
@@ -111,6 +116,11 @@
               {{ deptBudgetList.packingMethod }}
             </div>
           </ws-form-item>
+          <ws-form-item label="中转公司" span="1" prop="buyer" class="readonly">
+            <div class="unchanged">
+              {{deptBudgetList.transitCompany}}
+            </div>
+          </ws-form-item>
           <ws-form-item label="卖方电话" span="1" prop="sellerPhone">
             <div class="unchanged">
               {{ deptBudgetList.sellerPhone }}
@@ -211,6 +221,11 @@
               {{ deptBudgetList.finalTradingVolume }}
             </div>
           </ws-form-item>
+           <ws-form-item label="结算单价(元/吨)" span="1" prop="settlementPrice" >
+           <div class="unchanged">
+              {{ deptBudgetList.settlementPrice?deptBudgetList.settlementPrice:'自动结算,不可编辑'}}
+            </div>
+        </ws-form-item>
         </ws-info-table>
 
         <!--货物信息-->

+ 31 - 31
src/views/customer/component/router/route.js

@@ -1,33 +1,33 @@
 import Layout from '@/layout/index';
 
-const customerRouter = {
-    path: '/customer',
-    component: Layout,
-    redirect: { name: 'customerList' },
-    name: 'customerList',
-    alwaysShow: true, // will always show the root menu
-    meta: {
-      title: 'customerList',
-      module: 'customerManagement.customer.customerInfo',
-      icon: '-kehuguanli'
-    },
-    children: [
-      {
-        path: 'customerList',
-        component: () =>
-          import(/* webpackChunkName: "applDetail" */ '@/views/customer/customerList'),
-        name: 'customerList',
-        meta: {
-          title: 'customerList',
-          shortcutEntrance: 'customerList',
-          module: 'customerManagement.customer.customerInfo',
-          permissicon: [],
-          keepAlive: true,
-          _title:'客户管理'
-          // module: 'procurement.sparepart.applDetail'
-        },
-         hidden: true
-      },
-  ],
-};
-export default customerRouter;  
+// const customerRouter = {
+//     path: '/customer',
+//     component: Layout,
+//     redirect: { name: 'customerList' },
+//     name: 'customerList',
+//     alwaysShow: true, // will always show the root menu
+//     meta: {
+//       title: 'customerList',
+//       module: 'customerManagement.customer.customerInfo',
+//       icon: '-kehuguanli'
+//     },
+//     children: [
+//       {
+//         path: 'customerList',
+//         component: () =>
+//           import(/* webpackChunkName: "applDetail" */ '@/views/customer/customerList'),
+//         name: 'customerList',
+//         meta: {
+//           title: 'customerList',
+//           shortcutEntrance: 'customerList',
+//           module: 'customerManagement.customer.customerInfo',
+//           permissicon: [],
+//           keepAlive: true,
+//           _title:'客户管理'
+//           // module: 'procurement.sparepart.applDetail'
+//         },
+//          hidden: true
+//       },
+//   ],
+// };
+// export default customerRouter;  

+ 68 - 14
src/views/houseSelfCollect/inspectionManagementNew.vue

@@ -3,8 +3,8 @@
   <div style='overflow-y:scroll;'>
     <BaseHeaderLayout :leftSpan="16">
       <template slot="left">
-        <el-button @click='warehousetypechange(1)' :type="serviceManagementType == 1 ? 'primary' : ''">贸易入库</el-button>
-        <el-button @click='warehousetypechange(3)' :type="serviceManagementType == 3 ? 'primary' : ''">收购入库</el-button>
+        <el-button v-if='this.zjJurisdiction' @click='warehousetypechange(1)' :type="serviceManagementType == 1 ? 'primary' : ''">贸易入库</el-button>
+        <el-button v-if='this.qyJurisdiction' @click='warehousetypechange(3)' :type="serviceManagementType == 3 ? 'primary' : ''">收购入库</el-button>
       </template>
       <template slot="right">
         <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
@@ -54,7 +54,7 @@
                 </el-checkbox>
               </div>
               <ws-info-table>
-                <ws-form-item v-if='serviceManagementType == 1' label="任务编号" span="1" prop="inOutTaskNo">
+                <ws-form-item v-if='serviceManagementType == 3 && qyJurisdiction&&statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"||serviceManagementType == 1' label="任务编号" span="1" prop="inOutTaskNo">
                   <el-select :disabled='recheck' filterable clearable v-model="deptBudgetList.inOutTaskNo"
                     placeholder="请选择任务编号" class="typeselect" @change="contractNoChange">
                     <el-option v-for="item in taskNolist" :key="'renwu' + item.inOutTaskNo" :label="item.inOutTaskNo"
@@ -65,6 +65,11 @@
                   <ws-input v-model="deptBudgetList.qualityNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
                     size="small" />
                 </ws-form-item>
+                <ws-form-item v-if='serviceManagementType == 3 && qyJurisdiction&&statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"' label="合同编号"
+                  span="1" prop="contractNo">
+                  <ws-input v-model="deptBudgetList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
+                    size="small" />
+                </ws-form-item>
                 <ws-form-item v-if='serviceManagementType == 3 && zjJurisdiction&&statusTypetext == "初检"||serviceManagementType == 3 && statusTypetext != "初检"' label="购粮性质" span="1"
                   prop="natureOfGrainPurchase">
                   <ws-input v-model="deptBudgetList.natureOfGrainPurchase" placeholder="请输入购粮性质" maxlength="10"
@@ -116,7 +121,7 @@
                     <el-option v-for="item in options2" :key="item.constKey" :label="item.carNo" :value="item.carNo" />
                   </el-select>
                   <el-select :disabled="disabled2" v-if="carNumberList.length > 0 && serviceManagementType == 3"
-                    filterable clearable  v-model="deptBudgetList.carNo"
+                    filterable clearable :allow-create="true"  v-model="deptBudgetList.carNo"
                     placeholder="请选择车牌号" class="typeselect" @change="carChange($event, 1)">
                     <el-option v-for="item in carNumberList" :key="item.constKey" :label="item.carNo"
                       :value="item.carNo" />
@@ -537,6 +542,7 @@ export default {
     return {
       timer: '',
       refresh: 60,
+      taskflag:2,
       //分页
       currentPage: 1,
       cost: '',
@@ -679,6 +685,7 @@ export default {
     //获取钎样员权限
     this.qyJurisdiction = getHp('acquisitionManagement.acquisitionQuality.qview')
     this.zjJurisdiction= getHp('acquisitionManagement.acquisitionQuality.initial')
+    
     console.log(111111111)
     console.log(this.qyJurisdiction)
     //获取质检员权限
@@ -707,6 +714,7 @@ export default {
         this.warehouseNameChange(_WarehouseName.value)
       }
     }
+    
   },
   // activated() {
 
@@ -734,8 +742,10 @@ export default {
         if (this.serviceManagementType == 3) {
         if(this.statusTypetext=='初检'){
           this.statusType = 0
-        }else{
+        }else if(this.statusTypetext=='复检'){
           this.statusType = 1
+        }else{
+          this.statusType = 2
         }
       }
         getinspectList({
@@ -765,8 +775,10 @@ export default {
             if (this.serviceManagementType == 3) {
               if(this.statusTypetext=='初检'){
                 this.statusType = 0
-              }else{
+              }else if(this.statusTypetext=='复检'){
                 this.statusType = 1
+              }else{
+                this.statusType = 2
               }
             }
             getinspectList({
@@ -1389,8 +1401,10 @@ export default {
       if (this.serviceManagementType == 3) {
         if(this.statusTypetext=='初检'){
           this.statusType = 0
-        }else{
+        }else if(this.statusTypetext=='复检'){
           this.statusType = 1
+        }else{
+          this.statusType = 2
         }
       }
       getinspectList({
@@ -2601,17 +2615,23 @@ export default {
               this.deptBudgetList.warehouseName = this.warehouseName
               this.deptBudgetList.serviceManagementType = this.serviceManagementType
               this.deptBudgetList.compId = localStorage.getItem('ws-pf_compId')
-              
               this.deptBudgetList.inOutFlag = 2
               this.deptBudgetList.pcFlag = 1
               this.deptBudgetList.statusFlag = 1
               if (this.serviceManagementType==3&&this.statusTypetext=='初检') {
                 this.deptBudgetList.brazer = this.qyJurisdiction&&!this.zjJurisdiction ? 1 : 0
               }
-              
+              if(this.deptBudgetList.id){
+                  var zjid=JSON.parse(JSON.stringify(this.deptBudgetList.id))
+                  var kid=JSON.parse(JSON.stringify(this.deptBudgetList.warehouseInOutId))
+                }
               if (this.statusTypetext == '初检') {
                 this.deptBudgetList.agent =
                 localStorage.getItem('ws-pf_staffName')
+                
+                if(this.deptBudgetList.id){
+                  this.deptBudgetList.id=kid
+                }
                 addstorageputList(this.deptBudgetList)
                   .toPromise()
                   .then((response) => {
@@ -2721,6 +2741,10 @@ export default {
                         // this.$message.warning(response)
                       })
                     }else{
+                      this.deptBudgetList.id=zjid
+                      if (this.serviceManagementType==3) {
+                        this.deptBudgetList.statusFlag = this.qyJurisdiction&&!this.zjJurisdiction ? 7 : 1
+                      }
                       getinspectEdit(this.deptBudgetList)
                       .toPromise()
                       .then((response) => {
@@ -2784,6 +2808,7 @@ export default {
                 getinspectEdit(this.deptBudgetList)
                   .toPromise()
                   .then((response) => {
+                    this.deptBudgetList.id=kid
                     addstorageputList(this.deptBudgetList)
                       .toPromise()
                       .then((response) => {
@@ -2851,10 +2876,15 @@ export default {
                       .catch((response) => { })
                   })
               } else if (this.statusTypetext == '确认') {
+                if (this.serviceManagementType==3) {
+                  this.deptBudgetList.statusFlag = 2
+                }
                 this.deptBudgetList.flag = 2
                 getinspectEdit(this.deptBudgetList)
                   .toPromise()
                   .then((response) => {
+                    this.deptBudgetList.id=kid
+                    this.deptBudgetList.statusFlag = 1
                     addstorageputList(this.deptBudgetList)
                       .toPromise()
                       .then((response) => {
@@ -3020,8 +3050,16 @@ export default {
               }
             }
           }
+          if(this.qyJurisdiction&&!this.zjJurisdiction){
+              this.serviceManagementType=3
+              this.taskflag=3
+            }
+            if(this.zjJurisdiction){
+              this.serviceManagementType=1
+              this.taskflag=2
+            }
           getReceiptTaskNo({
-            flag: 2,
+            flag: this.taskflag,
             warehouseName: this.warehouseName,
             agentKey: localStorage.getItem('ws-pf_userId'),
           })
@@ -3041,10 +3079,23 @@ export default {
       this.serviceManagementType = status
       if (status == 3) {
         //   //解决冲突别解决没了(注意)
+        this.taskflag=3
         this.outType = '他运'
       } else {
+        this.taskflag=2
         this.outType = ''
       }
+      console.log(this.taskflag,22222222)
+      getReceiptTaskNo({
+            flag: this.taskflag,
+            warehouseName: this.warehouseName,
+            agentKey: localStorage.getItem('ws-pf_userId'),
+          })
+            .toPromise()
+            .then((response) => {
+              console.log(response,1111111111111111)
+              this.taskNolist = response
+      })
       this.getList()
     },
     // 默认按钮暂时不用
@@ -3192,8 +3243,9 @@ export default {
           this.WAREHOUSE[1].payname = this.warehouseList[i].value
           this.warehouseList[i].compId = localStorage.getItem('ws-pf_compId')
           localStorage.setItem('houseSelfCollect_house1', JSON.stringify(this.warehouseList[i]))
+          console.log(this.taskflag,'仓库选择')
           getReceiptTaskNo({
-            flag: 2,
+            flag: this.taskflag,
             warehouseName: this.warehouseName,
             agentKey: localStorage.getItem('ws-pf_userId'),
           })
@@ -3281,7 +3333,7 @@ export default {
       console.log(this.positionInfos)
       if (this.warehouseName) {
         getReceiptTaskNo({
-          flag: 2,
+          flag: this.taskflag,
           warehouseName: this.warehouseName,
           agentKey: localStorage.getItem('ws-pf_userId'),
         })
@@ -3365,7 +3417,7 @@ export default {
       this.multiSelector1 = []
       getinspectcontractno({
         compId: localStorage.getItem('ws-pf_compId'),
-        warehouseName: this.warehouseName
+        warehouseName: this.warehouseName,
       }).toPromise()
         .then((response) => {
           if (response.contractManagementInfoList) {
@@ -3381,8 +3433,10 @@ export default {
       if (this.serviceManagementType == 3) {
         if(this.statusTypetext=='初检'){
           this.statusType = 0
-        }else{
+        }else if(this.statusTypetext=='复检'){
           this.statusType = 1
+        }else{
+          this.statusType = 2
         }
       }
       getinspectList({

+ 9 - 0
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -75,6 +75,11 @@
                   <ws-input v-model="weighingList.moveTaskNo" placeholder="自动获取,不可编辑" maxlength="100" size="small"
                     disabled />
                 </ws-form-item>
+                <ws-form-item v-if="tpyeNo == 1" label="已完成量(吨)" span="1" prop="tips">
+                    <ws-input v-model="weighingList.donecount" placeholder="自动获取,不可编辑" maxlength="100" disabled
+                          size="small" />
+                          <!-- {{}} -->
+                </ws-form-item>
                 <ws-form-item label="客户" span="1" prop="customer" v-if="inWarehouseType == 3">
                   <ws-input v-model="weighingList.customer" placeholder="自动获取,不可编辑" maxlength="100" disabled
                     size="small" />
@@ -956,6 +961,7 @@
           if (this.mList.length != 0) {
             this.setCurrent(this.mList[0])
             this.weighingList = this.mList[0]
+            this.weighingList.donecount=this.mList[0].completedQuantity+'/'+this.mList[0].weight
             this.carWeightInfo = {
               carNumber: this.mList[0].carNumber,
               type: this.information,
@@ -970,6 +976,7 @@
           if (this.pList.length != 0) {
             this.setCurrent(this.pList[0])
             this.weighingList = this.pList[0]
+            this.weighingList.donecount=this.mList[0].completedQuantity+'/'+this.mList[0].weight
             this.weighingList.inOutType = this.pList[0].qualityInspectionManagement.inOutType
             this.weighingList.inOutTypeKey = this.pList[0].qualityInspectionManagement.inOutTypeKey
             this.weighingList.deductionAmount = this.pList[0].qualityInspectionManagement.deductionAmount
@@ -1222,7 +1229,9 @@
             type: this.information,
             weight: val.grossWeight,
           }
+          
           this.weighingList = val
+          this.weighingList.donecount=this.weighingList.completedQuantity+'/'+this.weighingList.weight
           if (val.qualityInspectionManagement) {
             this.weighingList.boxNo = val.qualityInspectionManagement.boxNo
             this.weighingList.boxNoOther = val.qualityInspectionManagement.boxNoOther

+ 10 - 1
src/views/outboundManagement/weighingManagementNew.vue

@@ -92,11 +92,17 @@
                         <ws-input v-model="weighingList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
                           size="small" />
                       </ws-form-item>
+                      
                       <ws-form-item label="移库编号" span="1" prop="moveTaskNo" v-show="inWarehouseType == 1"
                         v-if="!weighingList.contractNo && tpyeNo == 1">
                         <ws-input v-model="weighingList.moveTaskNo" placeholder="自动获取,不可编辑" maxlength="100" size="small"
                           disabled />
                       </ws-form-item>
+                      <ws-form-item v-if="tpyeNo == 1" label="已完成量(吨)" span="1" prop="tips">
+                        <ws-input v-model="weighingList.donecount" placeholder="自动获取,不可编辑" maxlength="100" disabled
+                          size="small" />
+                          <!-- {{}} -->
+                      </ws-form-item>
                       <ws-form-item v-if="tpyeNo == 1" label="提示" span="1" prop="tips">
                         <ws-input v-model="weighingList.tips" placeholder="自动获取,不可编辑" maxlength="100" disabled
                           size="small" />
@@ -375,7 +381,8 @@
     delelteWeighing,
     newSubmit,
     getInfo,
-    gettask
+    gettask,
+    getweight
   } from '@/model/outboundManagement/index'
   import {
     pullDown,
@@ -1892,6 +1899,7 @@
        
         for (let i = 0; i < this.taskNolist.length; i++) {
           if (this.taskNolist[i].inOutTaskNo == e) {
+            this.weighingList.donecount=this.taskNolist[i].completedQuantity+'/'+this.taskNolist[i].weight
             //  this.weighingList.number = this.taskNolist[i].inOutTaskNo
             // this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
             this.weighingList.numberLetter = 'XSCK'
@@ -1942,6 +1950,7 @@
         // if (!data) return
         for (var i = 0; i < this.outContractNo.length; i++) {
           if (this.outContractNo[i].contractNo == this.weighingList.contractNo) {
+            
             this.weighingList.goodsName = this.outContractNo[i].goodsName
             if (this.weighingList.goodsName == '玉米(潮粮)') {
               this.weighingList.type = '潮粮'

+ 59 - 8
src/views/profitable/cashout.vue

@@ -57,10 +57,13 @@
             </el-input>
           </el-form-item>
           <el-form-item label-width='100px' label="附件">
-          <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
-            :on-success="handlefujian" :on-remove="handleRemove" class="photo2" accept="image/jpg,image/jpeg,image/png">
+            <ws-upload ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" 
+       />
+          <!-- <el-upload ref='uploadfiles' :file-list='dataList' action="https://www.zthymaoyi.com/upload/admin" :on-preview="Previewf"
+            :on-success="handlefujian" :on-remove="handleRemove" class="photo2" >
             <i class="el-icon-plus"></i>
-          </el-upload>
+          </el-upload> -->
         </el-form-item>
         </el-form>
         <div v-if='deptBudgetList.purpose=="合同费用"&&deptBudgetList.type=="非粮款"||deptBudgetList.purpose=="库点费用"' class='expensetitle'>费用分配</div>
@@ -153,9 +156,12 @@
   </div>
 </template>
 <script>
+  import WsUpload from '@/components/WsUpload'
   import {setexpense,getcontract,getwarehouse,addexenseinfo,getwarehousingorder,getexpensecount} from '@/model/profitable/index'
   export default {
-    components: {},
+    components: {
+      WsUpload,
+    },
     data() {
       return {
         value: [],
@@ -166,6 +172,7 @@
         mode:'全部分配',
         moneys:'按重量自动分配',
         dataList:[],
+        compId:localStorage.getItem('ws-pf_compId'),
         goodsList:[],
         disabled:false,
         warecontractList:[],
@@ -180,6 +187,7 @@
         goodsourcelist:[],
         signingDate:'',
         datelist:[],
+        size:9,
         modeList:[{key:1,value:'全部分配'},{key:2,value:'部分分配'},{key:3,value:'暂不分配'}],
         wareList:[{key:1,value:'指定仓库'},{key:2,value:'全部仓库'}],
         datesList:[{key:1,value:'固定日期'},{key:2,value:'指定日期'}],
@@ -225,6 +233,38 @@
       }
     },
     methods: {
+      Previewf(file) {
+      console.log(file);
+      // window.open(file.response)
+      if (file) {
+        const addTypeArray = file.name.split(".");
+        const addType = addTypeArray[addTypeArray.length - 1];
+        console.log(addType);
+        if (addType === "pdf") {
+          let routeData = this.$router.resolve({
+            path: "/insurancePdf",
+            query: { url: file.response, showBack: false },
+          });
+          window.open(routeData.href, "_blank");
+        }
+        //".rar, .zip, .doc, .docx, .xls, .txt, .pdf, .jpg,  .png, .jpeg,"
+        else if (addType === "doc" || addType === "docx" || addType === "xls") {
+          window.open(
+            "http://view.officeapps.live.com/op/view.aspx?src=" + file.response
+          );
+        } else if (addType === "txt") {
+          window.open(file.response);
+        } else if (["png", "jpg", "jpeg"].includes(addType)) {
+          window.open(file.response);
+        } else if (addType === "rar" || addType === "zip") {
+          this.$message({
+            message: "该文件类型暂不支持预览",
+            type: "warning",
+          });
+           return false;
+        }
+      }
+    },
       selectwarehouse(e){
         for (let i = 0; i < this.warehouseList.length; i++) {
           if(this.warehouseList[i].warehouseName==e){
@@ -377,6 +417,17 @@
           
         }
       },
+      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()
+          })
+      },
       // 获取当前年月日
 			getdate() {
 				var date = new Date()
@@ -436,7 +487,7 @@
         }
         this.deptBudgetList.totalDistribution=this.amount
         // this.MathRand()
-console.log(this.Num,11111111111)
+// console.log(this.Num,11111111111)
         if(this.deptBudgetList.purpose=='合同费用'){
           this.deptBudgetList.expensesPurpose=1
           this.deptBudgetList.costNo='HTF'+this.getdate()+this.Num
@@ -581,7 +632,7 @@ console.log(this.Num,11111111111)
           })
           return
         }
-        this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
+        // this.deptBudgetList.addressUrl=this.paymentScreenshot.toString()
         this.$confirm('确定提交请款信息', '提示', {
             confirmButtonText: '确定',
             cancelButtonText: '取消',
@@ -756,7 +807,7 @@ console.log(this.Num,11111111111)
   line-height:100px;
 }
 /deep/.el-upload-list--picture-card .el-upload-list__item{
-  width: 100px;
-  height:100px;
+  width: 110px;
+  height:140px;
 }
 </style>

+ 5 - 1
src/views/taskManagement/tranManagementWarehouseInOutTask.vue

@@ -238,9 +238,13 @@
             type: 9
           },
           {
-            value: '退库',
+            value: '收购入库',
             type: 10
           },
+          {
+            value: '退库',
+            type: 11
+          },
         ],
         contractType: 2,
         taskTypeList: [{

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

@@ -200,7 +200,7 @@
 					</el-form-item>
 					<!--重量(吨)-->
 					<el-form-item label="重量(吨)">
-						<el-input  @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
+						<el-input :disabled='dataList1.inOutType=="收购入库"' @input="weightchange" v-model="dataList1.weight" placeholder="请输入重量(吨)"
 							maxlength="120" size="small" class="huom" />
 					</el-form-item>
 					<!-- 品级 -->
@@ -871,6 +871,9 @@
 				if (this.dataList1.taskTypeKey != 3) {
 					for (let i = 0; i < this.contractNoList1.length; i++) {
 						if (this.contractNoList1[i].contractNo == e) {
+							if(this.dataList1.inOutType=='收购入库'){
+								this.dataList1.weight=this.contractNoList1[i].weight
+							}
 							this.inOutType=this.contractNoList1[i].inOutType
 							if(this.contractNoList1[i].priceType == '随行就市'){
 								this.Pricetype = false
@@ -1634,8 +1637,11 @@
 			},
 			selectstorageType1(e) {
 				switch (e) {
+					case '收购入库':
+						this.flag = 9
+						break
 					case '采购入库':
-						this.flag = 0
+						this.flag = 8
 						break
 					case '暂存入库':
 						this.flag = 0

+ 45 - 18
src/views/taskManagement/tranManagementWarehouseInOutTaskEdit.vue

@@ -55,6 +55,7 @@
               class="ziti1"
               v-show="
                 dataList.inOutType == '采购入库' ||
+                dataList.inOutType == '收购入库' ||
                 dataList.inOutType == '暂存入库' ||
                 dataList.inOutType == '贸易服务入库' ||
                 dataList.inOutType == '退库'
@@ -348,7 +349,7 @@
           <!-- 入库类型 -->
           <el-form-item label="入库类型">
             <el-select
-              :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4"
+              :disabled="dataList.taskTypeKey == 3 || dataList.taskTypeKey == 4||dataList1.inOutType=='收购入库'"
               v-model="dataList1.inOutType"
               placeholder="请选择入库类型"
               class="typeselect"
@@ -374,6 +375,7 @@
           <!-- 合同编号 -->
           <el-form-item v-if="dataList1.taskTypeKey != 3" label="合同编号">
             <el-select
+            :disabled="dataList1.inOutType=='收购入库'"
               @change="changecontract1"
               v-model="dataList1.contractNo"
               placeholder="请输入合同编号"
@@ -832,6 +834,7 @@ export default {
       deptBudgetList1: [],
       gradeList: [],
       deletetask: false,
+      
       rules: {
         netWeight: [
           {
@@ -1713,6 +1716,25 @@ export default {
       var Rand = Math.random()
       return Min + Math.round(Rand * Range)
     },
+    getcontract(flag){
+      xialaNo({
+                compId: this.compId,
+                flag:flag
+              })
+                .toPromise()
+                .then((response) => {
+                  this.contractNoList = response
+                  for (let i = 0; i < this.contractNoList.length; i++) {
+                    if (this.contractNoList[i].contractNo == this.dataList.contractNo) {
+                      if (this.contractNoList[i].priceType == '随行就市') {
+                        this.Pricetype = false
+                      } else {
+                        this.Pricetype = true
+                      }
+                    }
+                  }
+                })
+    },
     getList() {
       this.inOutFlag = this.$route.query.inOutFlag
       if (this.$route.query.relevanceId) {
@@ -1723,7 +1745,6 @@ export default {
               console.log(122222)
               this.dataList = response[0]
               this.dataList1 = response[1]
-
               // console.log(this.dataList1.inOutTaskNo, '入库任务')
             } else {
               if (response[0].taskTypeKey == 3) {
@@ -1742,6 +1763,27 @@ export default {
                 // this.dataList = response[0]
               }
             }
+            if(this.dataList.taskTypeKey==1){
+                if(this.dataList.inOutType=='采购出库'){
+                  this.getcontract(0)
+                }else{
+                  this.getcontract(1)
+                }
+              }else if(this.dataList.taskTypeKey==2){
+                if(this.dataList1.inOutType=='收购入库'){
+                  this.getcontract(9)
+                }else if(this.dataList1.inOutType=='采购入库'){
+                  this.getcontract(8)
+                }else if(this.dataList1.inOutType=='暂存入库'||this.dataList1.inOutType=='贸易服务入库'){
+                  this.getcontract(0)
+                }else if(this.dataList1.inOutType=='退库'){
+                  this.getcontract(2)
+                }
+              }else if(this.dataList.taskTypeKey==3){
+                this.getcontract(1)
+              }else if(this.dataList.taskTypeKey==4){
+                this.getcontract(2)
+              }
             this.goods = ''
             if (this.dataList.sourceRelationInfoList) {
               for (let i = 0;i < this.dataList.sourceRelationInfoList.length;i++) {
@@ -1859,22 +1901,7 @@ export default {
         .then((response) => {
           this.storageType1 = response
         })
-      xialaNo({
-        compId: this.compId,
-      })
-        .toPromise()
-        .then((response) => {
-          this.contractNoList = response
-          for (let i = 0; i < this.contractNoList.length; i++) {
-            if (this.contractNoList[i].contractNo == this.dataList.contractNo) {
-              if (this.contractNoList[i].priceType == '随行就市') {
-                this.Pricetype = false
-              } else {
-                this.Pricetype = true
-              }
-            }
-          }
-        })
+      
       // //临时仓库入库类型
       // pullDown({ constId: 'WARE1' })
       //   .toPromise()

+ 8 - 3
src/views/warehousenew/warehousingOrder.vue

@@ -85,13 +85,18 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="goodsSource" label="货源" width="80"></el-table-column>
+        <el-table-column prop="contractNo" label="合同编号" width="80"></el-table-column>
+        <el-table-column prop="goodsSource" label="货源" width="80">
+           <template scope="scope">
+             <span style='color:#66b1ff;' @click='lookcustomer(scope.row)'>{{scope.row.goodsSource}}</span>
+            </template>
+        </el-table-column>
         <el-table-column prop="deliveryWarehouse" label="发货库" width="80"></el-table-column>
-        <el-table-column prop="customer" label="客户" width="100">
+        <!-- <el-table-column prop="customer" label="客户" width="100">
            <template scope="scope">
              <span @click='lookcustomer(scope.row)'>{{scope.row.customer}}</span>
             </template>
-        </el-table-column>
+        </el-table-column> -->
         <el-table-column prop="goodsName" label="货名" width="60">
         </el-table-column>
         <el-table-column prop="inWarehouseWeight1"  width="140" class="table_td" label="入库重量(吨)">