huangfuli 3 anni fa
parent
commit
7ad6579633

+ 854 - 889
src/views/contractManagement/futuresPurchaseContract.vue

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

+ 855 - 890
src/views/contractManagement/futuresSalesContract.vue

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

+ 861 - 896
src/views/contractManagement/purchaseContract.vue

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

+ 910 - 946
src/views/contractManagement/salesContract.vue

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

+ 362 - 391
src/views/houseSelfCollect/inspectionManagement.vue

@@ -1,415 +1,386 @@
 <!--质检管理-->
 <!--质检管理-->
 <template>
 <template>
-  <div>
-    <BaseHeaderLayout :leftSpan="16">
-      <template slot="left">
-        <ws-button type="primary" @click="inspectInfo(1)" v-hasPermission="`acquisitionManagement.acquisitionQuality.add`">添加</ws-button>
-      </template>
-      <template slot="right">
-        <ws-select
-          v-model="warehouseName"
-          placeholder=""
-          @change="warehouseNameChange"
-          :value="searchType"
-          style="margin: 0 10px"
-        >
-          <ws-option
-            v-for="item in warehouseList"
-            :key="item.value"
-            :label="item.value"
-            :value="item.value"
-            style="color: #8890b1"
-          />
-        </ws-select>
-        <div></div>
-        <ws-input
-          v-model="searchKeyWord"
-          placeholder="可按编号、客户名、车牌号查找"
-          clearable
-          maxlength="500"
-          type="input"
-        >
-        </ws-input>
-        <ws-button class="find" type="primary" @click="find()"
-          ><img
-            width="16"
-            height="16"
-            style="
+	<div>
+		<BaseHeaderLayout :leftSpan="16">
+			<template slot="left">
+				<ws-button type="primary" @click="inspectInfo(1)"
+					v-hasPermission="`acquisitionManagement.acquisitionQuality.add`">添加</ws-button>
+			</template>
+			<template slot="right">
+				<ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
+					style="margin: 0 10px">
+					<ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
+						style="color: #8890b1" />
+				</ws-select>
+				<div></div>
+				<ws-input v-model="searchKeyWord" placeholder="可按编号、客户名、车牌号查找" clearable maxlength="500" type="input">
+				</ws-input>
+				<ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
               vertical-align: text-top;
               vertical-align: text-top;
               position: relative;
               position: relative;
               top: 0px;
               top: 0px;
               
               
-            "
-            src="../../../public/img/sousuo.png"
-            alt=""
-        /></ws-button>
-      </template>
-    </BaseHeaderLayout>
-    <el-table
-      :data="inspect"
-      style="width: 100%; margin-top: 20px"
-      ref="inspect"
-      border
-      height="780"
-    >
-      <el-table-column type="index" label="序号" width="50">
-        <template scope="scope">
-          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
-          <span v-else>{{ scope.$index + 1 }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        prop="qualityNo"
-        width="120"
-        label="编号"
-      ></el-table-column>
-      <el-table-column prop="customerName" label="客户"></el-table-column>
-      <el-table-column prop="carNumber" label="车牌号"></el-table-column>
-      <el-table-column prop="goodsName" label="货名"></el-table-column>
-      <el-table-column prop="waterContent" label="水分(%)" width="120">
-        <template scope="scope">
-          <span class="water-left">{{scope.row.waterContent}}</span> 
-          <span class="water-line">|</span> 
-          <span class="water-right">{{scope.row.reWaterContent ? scope.row.reWaterContent : '未复检' }}</span> 
-        </template>
-      </el-table-column>
-       <el-table-column prop="buckleMiscellaneous" label="扣杂"  width="120">
-         <template scope="scope">
-           <div v-if="scope.row.paramType == 1">
-           <span class="water-left">{{scope.row.buckleMiscellaneous}} </span> 
-          <span class="water-line">|</span> 
-          <span class="water-right">{{scope.row.reBuckleMiscellaneous ? scope.row.reBuckleMiscellaneous : '未复检'}}</span> 
-         </div>
-        </template>
-       </el-table-column>
-       <el-table-column prop="type" label="类型"></el-table-column>
-      <el-table-column
-        prop="tidalGrainPrice"
-        label="单价(元/公斤)"
-        width="120px"
-      >
-      <template scope="scope">
-          <span v-if="scope.row.type == '潮粮'">{{ scope.row.tidalGrainPrice }}</span>
-          <span v-else>{{ scope.row.dryGrainPrice }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column prop="binNumber" label="仓位号"></el-table-column>
-      <el-table-column prop="storageTagNo" label="囤位号"></el-table-column>
-      <el-table-column prop="qualityInspector" label="质检员" width="100px">
-          <template scope="scope">
-            <span>{{scope.row.qualityInspector}}</span>
-            <span v-if="scope.row.reInspector && scope.row.qualityInspector != scope.row.reInspector">,{{scope.row.reInspector}}</span>
-          </template>
+            " src="../../../public/img/sousuo.png" alt="" /></ws-button>
+			</template>
+		</BaseHeaderLayout>
+		<el-table :data="inspect" style="width: 100%; margin-top: 20px" ref="inspect" border height="780">
+			<el-table-column type="index" label="序号" width="50">
+				<template scope="scope">
+					<span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+					<span v-else>{{ scope.$index + 1 }}</span>
+				</template>
+			</el-table-column>
+			<el-table-column prop="qualityNo" width="100" label="编号"></el-table-column>
+			<el-table-column prop="customerName" label="客户"></el-table-column>
+			<el-table-column prop="carNumber" label="车牌号"></el-table-column>
+			<el-table-column prop="goodsName" label="货名"></el-table-column>
+			<el-table-column prop="waterContent" label="水分(%)" width="120">
+				<template scope="scope">
+					<span class="water-left">{{scope.row.waterContent}}</span>
+					<span class="water-line">|</span>
+					<span class="water-right">{{scope.row.reWaterContent ? scope.row.reWaterContent : '未复检' }}</span>
+				</template>
+			</el-table-column>
+			<el-table-column prop="buckleMiscellaneous" label="扣杂" width="120">
+				<template scope="scope">
+					<div v-if="scope.row.paramType == 1">
+						<span class="water-left">{{scope.row.buckleMiscellaneous}} </span>
+						<span class="water-line">|</span>
+						<span
+							class="water-right">{{scope.row.reBuckleMiscellaneous ? scope.row.reBuckleMiscellaneous : '未复检'}}</span>
+					</div>
+				</template>
+			</el-table-column>
+			<el-table-column prop="type" label="类型"></el-table-column>
+			<el-table-column prop="tidalGrainPrice" label="单价(元/公斤)" width="120px">
+				<template scope="scope">
+					<span v-if="scope.row.type == '潮粮'">{{ scope.row.tidalGrainPrice }}</span>
+					<span v-else>{{ scope.row.dryGrainPrice }}</span>
+				</template>
+			</el-table-column>
+			<el-table-column prop="binNumber" label="仓位号"></el-table-column>
+			<el-table-column prop="storageTagNo" label="囤位号"></el-table-column>
+			<el-table-column prop="qualityInspector" label="质检员" width="120px">
+				<template scope="scope">
+					<span>{{scope.row.qualityInspector}}</span>
+					<span
+						v-if="scope.row.reInspector && scope.row.qualityInspector != scope.row.reInspector">,{{scope.row.reInspector}}</span>
+				</template>
 
 
 
 
 
 
-      </el-table-column>
-      <el-table-column prop="updateDate" label="质检时间"  width="90px"></el-table-column>
-      <el-table-column prop="status" label="状态">
-        <template slot-scope="scope">
-          <span v-if='scope.row.confirm=="1"'>
-            已确认
-          </span>
-          <span v-else>
-            {{scope.row.status}}
-          </span>
-          </template>
-      </el-table-column>
-      <el-table-column width="500" label="操作">
-        <template slot-scope="scope">
-           <el-button @click="inspectInfo(scope.row, 2)" v-hasPermission="`acquisitionManagement.acquisitionQuality.view`">查看</el-button>
-          <el-button @click="inspectInfo(scope.row, 3)" v-if="scope.row.status=='已初检'&& scope.row.confirm!='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`">初检</el-button>
-          <div v-show="scope.row.confirm !='1' && scope.row.status == '已复检'" style="display: inline-block;">
-           <el-button @click="inspectInfo(scope.row, 5)" v-hasPermission="`acquisitionManagement.acquisitionQuality.con`">确认</el-button></div>
-           <el-button @click="inspectInfo(scope.row, 4)" v-if="scope.row.confirm !='1'" v-hasPermission="`acquisitionManagement.acquisitionQuality.again`">复检</el-button>
-          <div  style="display: inline-block;" v-if="scope.row.weighingManagement&&scope.row.weighingManagement.status=='已质检'">
-            <el-button @click="del(scope.row)" type="danger" v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
-          </div>
-          <el-button @click="print(scope.row)" v-hasPermission="`acquisitionManagement.acquisitionQuality.print`">打印</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-     <el-dialog
-      width="70%"
-      class="table-content"
-      center
-      :visible.sync="isShowPrint"
-      title="粮食质检单"
-    >
-    <!-- <inspectInfoPrint :printData="printData"></inspectInfoPrint> -->
-    <inspectInfoPrint :printData="printData" ref="saveImg"></inspectInfoPrint>
-    <div style="text-align:center">
-          <el-button type="primary" @click="closePrint">关闭</el-button>
-          <el-button type="primary" @click="printSmall">打印小票</el-button>
-          <el-button type="primary" @click="printBig">打印单据</el-button>
-        </div>
-    </el-dialog>
-    <div style="text-align: center">
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="currentPage"
-        :page-size="deptCircularPage.pageSize"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="deptBudgetTotal"
-      >
-      </el-pagination>
-    </div>
-  </div>
+			</el-table-column>
+			<el-table-column prop="updateDate" label="质检时间" width="90px"></el-table-column>
+			<el-table-column prop="status" label="状态">
+				<template slot-scope="scope">
+					<span v-if='scope.row.confirm=="1"'>
+						已确认
+					</span>
+					<span v-else>
+						{{scope.row.status}}
+					</span>
+				</template>
+			</el-table-column>
+			<el-table-column width="410" label="操作">
+				<template slot-scope="scope">
+					<el-button @click="inspectInfo(scope.row, 2)"
+						v-hasPermission="`acquisitionManagement.acquisitionQuality.view`">查看</el-button>
+					<el-button @click="inspectInfo(scope.row, 3)"
+						v-if="scope.row.status=='已初检'&& scope.row.confirm!='1'"
+						v-hasPermission="`acquisitionManagement.acquisitionQuality.initial`">初检</el-button>
+					<div v-show="scope.row.confirm !='1' && scope.row.status == '已复检'" style="display: inline-block;">
+						<el-button @click="inspectInfo(scope.row, 5)"
+							v-hasPermission="`acquisitionManagement.acquisitionQuality.con`">确认</el-button>
+					</div>
+					<el-button @click="inspectInfo(scope.row, 4)" v-if="scope.row.confirm !='1'"
+						v-hasPermission="`acquisitionManagement.acquisitionQuality.again`">复检</el-button>
+					<div style="display: inline-block;"
+						v-if="scope.row.weighingManagement&&scope.row.weighingManagement.status=='已质检'">
+						<el-button @click="del(scope.row)" type="danger"
+							v-hasPermission="`acquisitionManagement.acquisitionQuality.delete`">删除</el-button>
+					</div>
+					<el-button @click="print(scope.row)"
+						v-hasPermission="`acquisitionManagement.acquisitionQuality.print`">打印</el-button>
+				</template>
+			</el-table-column>
+		</el-table>
+		 <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食质检单">
+			<!-- <inspectInfoPrint :printData="printData"></inspectInfoPrint> -->
+			<inspectInfoPrint :printData="printData" ref="saveImg"></inspectInfoPrint>
+			<div style="text-align:center">
+				<el-button type="primary" @click="closePrint">关闭</el-button>
+				<el-button type="primary" @click="printSmall">打印小票</el-button>
+				<el-button type="primary" @click="printBig">打印单据</el-button>
+			</div>
+		</el-dialog>
+		<div style="text-align: center">
+			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+				:current-page="currentPage" :page-size="deptCircularPage.pageSize"
+				layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+			</el-pagination>
+		</div>
+	</div>
 </template>
 </template>
 <script>
 <script>
-import {
-  selectWarehouseSelf,
-  getinspectList,
-  getinspectDelete,
-  getinspectLook,
-} from '@/model/houseSelfCollect/index'
-import inspectInfoPrint from './component/inspectInfoPrint.vue'
-export default {
-  components: {inspectInfoPrint},
-  watch: {},
-  data() {
-    return {
-      //分页
-      currentPage: 1,
-      pageSize: 10,
-      deptCircularPage: {},
-      deptBudgetTotal: 0,
+	import {
+		selectWarehouseSelf,
+		getinspectList,
+		getinspectDelete,
+		getinspectLook,
+	} from '@/model/houseSelfCollect/index'
+	import inspectInfoPrint from './component/inspectInfoPrint.vue'
+	export default {
+		components: {
+			inspectInfoPrint
+		},
+		watch: {},
+		data() {
+			return {
+				//分页
+				currentPage: 1,
+				pageSize: 10,
+				deptCircularPage: {},
+				deptBudgetTotal: 0,
 
 
-      searchKeyWord: '',
-      taskTypeList: [],
-      searchType: 0,
-      warehouseName: '',
-      inspect: [],
-      warehouseList1:[],
-      warehouseList: [],
-      cangid: '', //仓库id
-      warehouseCount: '',
-      warehouseNo: '',
-      isShowPrint: false,
-      printData: {},
-      deductWeight:'',//扣重比
-      saleLimit:''
-    }
-  },
-  activated() {
-    this.selectWarehouse()
-  },
-  methods: {
-    printSmall() {
-      window.open('../../../static/inspection.html?type=1&dataList=' +JSON.stringify(this.printData))
-      },
-      printBig() {
-         window.open('../../../static/inspection.html?type=2&dataList=' +JSON.stringify(this.printData))
-      },
-     closePrint(){
-        this.isShowPrint = false
-        this.$router.push({path:'inspectionManagement'})
-      },
-    find() {
-      this.getList()
-    },
-    inspectInfo(row, index) {
-      for(let i = 0 ; i < this.warehouseList.length ; i++){
-        if(this.WAREHOUSE[1].payname == this.warehouseList[i].value){
-          this.cangid = this.warehouseList[i].id
-        }
-      }
-      //添加,编辑,查看
-      this.$router.push({
-        path: 'inspectInfo',
-        query: {
-          type: index,
-          cangid: this.cangid,
-          id: row.id,
-          warehouseName: this.warehouseName,
-          count: this.warehouseCount,
-          warehouseNo: this.warehouseNo
-        },
-      })
-    },
-    warehouseNameChange(e) {
-      // console.log(e)
-      for(let i = 0 ; i < this.warehouseList.length; i++){
-        if(this.warehouseList[i].value == e){
-           this.warehouseName = this.warehouseList[i].value
-          this.warehouseCount = this.warehouseList[i].count
-          this.warehouseNo = this.warehouseList[i].No
-          this.cangid = this.warehouseList[i].id
-          this.WAREHOUSE[1].payname = this.warehouseList[i].value
-        }
-      }
-      for(let i = 0 ; i < this.warehouseList1.length; i++){
-        if(this.warehouseList1[i].warehouseName == e){
-           sessionStorage.setItem('houseSelfCollect_house',JSON.stringify(this.warehouseList[i]))
-        }
-      }
-      this.getList()
-    },
-    del(row) {
-      //删除
-      this.$confirm('确定删除质检信息?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-      })
-        .then(() => {
-          getinspectDelete({
-            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
-        })
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
-    selectWarehouse(){
-       selectWarehouseSelf({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-      })
-        .toPromise()
-        .then((response) => {
-          this.warehouseList1=response
-          this.warehouseList = []
-          let _wareHouse = sessionStorage.getItem('houseSelfCollect_house')
-          _wareHouse = JSON.parse(_wareHouse)
-          for (let i = 0; i < response.length; i++) {
-            this.warehouseList.push({
-              value: response[i].warehouseName,
-              id: response[i].id,
-              count: response[i].count,
-              No:response[i].commonWarehouseNo
-            })  
-            if (_wareHouse) {
-            this.cangid = _wareHouse.id
-            this.warehouseName = _wareHouse.warehouseName
-             this.warehouseNo =_wareHouse.commonWarehouseNo
-             this.warehouseCount = _wareHouse.count
-          } else {
-            if (this.cangid&&this.cangid == response[i].id) {
-              this.warehouseName = response[i].warehouseName
-              this.warehouseCount =  response[i].count
-              this.warehouseNo =  response[i].commonWarehouseNo
-            } 
-            if(this.warehouseList.length > 0 && !this.cangid){
-              this.warehouseName = this.warehouseList[0].value
-              this.warehouseCount =  this.warehouseList[0].count
-              this.warehouseNo =  this.warehouseList[0].No
-              this.cangid =  this.warehouseList[0].id
-              this.WAREHOUSE[1].payname = this.warehouseList[0].value
-            }
-          }
-          }
-          this.getList()
-        })
-    },
-    getList() {
-      getinspectList({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-        currentPage: this.currentPage,
-        pageSize: this.pageSize,
-        searchKeyWord: (this.searchKeyWord).toUpperCase(),
-        warehouseName: this.warehouseName,
-        managementType:1
-      })
-        .toPromise()
-        .then((response) => {
-          console.log(response)
-          this.inspect = response.records
-          this.deptBudgetTotal = response.total
-        })
-    },
-    print(row) {
-      
-      getinspectLook({
-        id: row.id,
-      })
-        .toPromise()
-        .then((response) => {
-          this.isShowPrint = true
-          this.printData = response
-          // window.location.href="../../../static/inspection.html?dataList="+JSON.stringify(response)
-        })
-    },
-  },
-}
+				searchKeyWord: '',
+				taskTypeList: [],
+				searchType: 0,
+				warehouseName: '',
+				inspect: [],
+				warehouseList1: [],
+				warehouseList: [],
+				cangid: '', //仓库id
+				warehouseCount: '',
+				warehouseNo: '',
+				isShowPrint: false,
+				printData: {},
+				deductWeight: '', //扣重比
+				saleLimit: ''
+			}
+		},
+		activated() {
+			this.selectWarehouse()
+		},
+		methods: {
+			printSmall() {
+				window.open('../../../static/inspection.html?type=1&dataList=' + JSON.stringify(this.printData))
+			},
+			printBig() {
+				window.open('../../../static/inspection.html?type=2&dataList=' + JSON.stringify(this.printData))
+			},
+			closePrint() {
+				this.isShowPrint = false
+				this.$router.push({
+					path: 'inspectionManagement'
+				})
+			},
+			find() {
+				this.getList()
+			},
+			inspectInfo(row, index) {
+				for (let i = 0; i < this.warehouseList.length; i++) {
+					if (this.WAREHOUSE[1].payname == this.warehouseList[i].value) {
+						this.cangid = this.warehouseList[i].id
+					}
+				}
+				//添加,编辑,查看
+				this.$router.push({
+					path: 'inspectInfo',
+					query: {
+						type: index,
+						cangid: this.cangid,
+						id: row.id,
+						warehouseName: this.warehouseName,
+						count: this.warehouseCount,
+						warehouseNo: this.warehouseNo
+					},
+				})
+			},
+			warehouseNameChange(e) {
+				// console.log(e)
+				for (let i = 0; i < this.warehouseList.length; i++) {
+					if (this.warehouseList[i].value == e) {
+						this.warehouseName = this.warehouseList[i].value
+						this.warehouseCount = this.warehouseList[i].count
+						this.warehouseNo = this.warehouseList[i].No
+						this.cangid = this.warehouseList[i].id
+						this.WAREHOUSE[1].payname = this.warehouseList[i].value
+					}
+				}
+				for (let i = 0; i < this.warehouseList1.length; i++) {
+					if (this.warehouseList1[i].warehouseName == e) {
+						sessionStorage.setItem('houseSelfCollect_house', JSON.stringify(this.warehouseList[i]))
+					}
+				}
+				this.getList()
+			},
+			del(row) {
+				//删除
+				this.$confirm('确定删除质检信息?', '提示', {
+						confirmButtonText: '确定',
+						cancelButtonText: '取消',
+						type: 'warning',
+					})
+					.then(() => {
+						getinspectDelete({
+								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
+					})
+			},
+			handleSizeChange(val) {
+				console.log(`每页 ${val} 条`)
+				this.pageSize = val
+				this.getList()
+			},
+			handleCurrentChange(val) {
+				this.currentPage = val
+				console.log(`当前页: ${val}`)
+				this.getList()
+			},
+			selectWarehouse() {
+				selectWarehouseSelf({
+						compId: sessionStorage.getItem('ws-pf_compId'),
+					})
+					.toPromise()
+					.then((response) => {
+						this.warehouseList1 = response
+						this.warehouseList = []
+						let _wareHouse = sessionStorage.getItem('houseSelfCollect_house')
+						_wareHouse = JSON.parse(_wareHouse)
+						for (let i = 0; i < response.length; i++) {
+							this.warehouseList.push({
+								value: response[i].warehouseName,
+								id: response[i].id,
+								count: response[i].count,
+								No: response[i].commonWarehouseNo
+							})
+							if (_wareHouse) {
+								this.cangid = _wareHouse.id
+								this.warehouseName = _wareHouse.warehouseName
+								this.warehouseNo = _wareHouse.commonWarehouseNo
+								this.warehouseCount = _wareHouse.count
+							} else {
+								if (this.cangid && this.cangid == response[i].id) {
+									this.warehouseName = response[i].warehouseName
+									this.warehouseCount = response[i].count
+									this.warehouseNo = response[i].commonWarehouseNo
+								}
+								if (this.warehouseList.length > 0 && !this.cangid) {
+									this.warehouseName = this.warehouseList[0].value
+									this.warehouseCount = this.warehouseList[0].count
+									this.warehouseNo = this.warehouseList[0].No
+									this.cangid = this.warehouseList[0].id
+									this.WAREHOUSE[1].payname = this.warehouseList[0].value
+								}
+							}
+						}
+						this.getList()
+					})
+			},
+			getList() {
+				getinspectList({
+						compId: sessionStorage.getItem('ws-pf_compId'),
+						currentPage: this.currentPage,
+						pageSize: this.pageSize,
+						searchKeyWord: (this.searchKeyWord).toUpperCase(),
+						warehouseName: this.warehouseName,
+						managementType: 1
+					})
+					.toPromise()
+					.then((response) => {
+						console.log(response)
+						this.inspect = response.records
+						this.deptBudgetTotal = response.total
+					})
+			},
+			print(row) {
+
+				getinspectLook({
+						id: row.id,
+					})
+					.toPromise()
+					.then((response) => {
+						this.isShowPrint = true
+						this.printData = response
+						// window.location.href="../../../static/inspection.html?dataList="+JSON.stringify(response)
+					})
+			},
+		},
+	}
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-/deep/.el-dialog__header {
-  text-align: center !important;
-  padding: 10px 0 !important;
-  height: auto !important;
-}
+	/deep/.el-dialog__header {
+		text-align: center !important;
+		padding: 10px 0 !important;
+		height: auto !important;
+	}
+
+	/deep/.el-dialog__title {
+		font-size: 24px !important;
+	}
+
+	.title {
+		font-size: 20px;
+		font-weight: 600;
+		margin: 20px 0 0 20px;
+	}
 
 
-/deep/.el-dialog__title {
-  font-size: 24px !important;
-}
+	.tit {
+		font-size: 16px;
+		font-weight: 600;
+		margin: 20px;
+	}
 
 
-.title {
-  font-size: 20px;
-  font-weight: 600;
-  margin: 20px 0 0 20px;
-}
+	.ws-info-table {
+		border: none;
+	}
 
 
-.tit {
-  font-size: 16px;
-  font-weight: 600;
-  margin: 20px;
-}
+	.ws-info-table .el-form-item {
+		width: 50%;
+		border: none;
+	}
 
 
-.ws-info-table {
-  border: none;
-}
+	/deep/.ws-info-table .el-form-item .el-form-item__label {
+		width: 30%;
+		text-align: center;
+		background: #ffffff;
+		color: #8890b1;
+	}
 
 
-.ws-info-table .el-form-item {
-  width: 50%;
-  border: none;
-}
+	/deep/.ws-info-table .el-form-item .el-form-item__content {
+		border: none;
+	}
 
 
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  width: 30%;
-  text-align: center;
-  background: #ffffff;
-  color: #8890b1;
-}
+	/deep/.el-table .el-table__header .cell,
+	.el-table .el-table__body .cell {
+		text-align: center;
+	}
 
 
-/deep/.ws-info-table .el-form-item .el-form-item__content {
-  border: none;
-}
+	/deep/.el-table--enable-row-transition .el-table__body td {
+		text-align: center;
+	}
 
 
-/deep/.el-table .el-table__header .cell,
-.el-table .el-table__body .cell {
-  text-align: center;
-}
+	/deep/.el-dialog__body {
+		padding: 20px !important;
+	}
 
 
-/deep/.el-table--enable-row-transition .el-table__body td {
-  text-align: center;
-}
-/deep/.el-dialog__body {
-  padding: 20px !important;
-}
-.water-left,.water-right{
-  width: 45%;
-  display: inline-block;
-}
+	.water-left,
+	.water-right {
+		width: 45%;
+		display: inline-block;
+	}
 </style>
 </style>

+ 6 - 6
src/views/houseSelfCollect/paymentManagement.vue

@@ -100,11 +100,11 @@
           <span v-else>{{ scope.$index + 1 }}</span>
           <span v-else>{{ scope.$index + 1 }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column class="table_td" prop="paymentNo" width="150" label="编号"></el-table-column>
+      <el-table-column class="table_td" prop="paymentNo" width="100" label="编号"></el-table-column>
       <el-table-column class="table_td" prop="customerName" label="客户"></el-table-column>
       <el-table-column class="table_td" prop="customerName" label="客户"></el-table-column>
       <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
       <el-table-column class="table_td" prop="carNo" label="车牌号"></el-table-column>
-      <el-table-column class="table_td" prop="goodsName" label="货名"></el-table-column>
-      <el-table-column class="table_td" width="80" prop="type" label="类型"></el-table-column>
+      <el-table-column class="table_td" prop="goodsName" width="60" label="货名"></el-table-column>
+      <el-table-column class="table_td" prop="type" width="60" label="类型"></el-table-column>
       <el-table-column class="table_td" prop="tidalGrainPrice" width="140" label="净重单价(元/公斤)"></el-table-column>
       <el-table-column class="table_td" prop="tidalGrainPrice" width="140" label="净重单价(元/公斤)"></el-table-column>
       <el-table-column class="table_td" prop="unitDeduction" width="130" label="扣单价(元/公斤)"></el-table-column>
       <el-table-column class="table_td" prop="unitDeduction" width="130" label="扣单价(元/公斤)"></el-table-column>
       <el-table-column class="table_td" prop="solidGrainPrice" width="140" label="纯重单价(元/公斤)"></el-table-column>
       <el-table-column class="table_td" prop="solidGrainPrice" width="140" label="纯重单价(元/公斤)"></el-table-column>
@@ -116,14 +116,14 @@
           <div @click="showPayImg(scope.row)">{{ scope.row.amountEdPayable }}</div>
           <div @click="showPayImg(scope.row)">{{ scope.row.amountEdPayable }}</div>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column class="table_td" prop="updateDate" label="更新时间" width="140"></el-table-column>
-      <el-table-column class="table_td" prop="status" label="状态">
+      <el-table-column class="table_td" prop="updateDate" label="更新时间" width="90"></el-table-column>
+      <el-table-column class="table_td" prop="status" width="100" label="状态">
         <template scope="scope">
         <template scope="scope">
           <span v-if="scope.row.approveStatus">{{ scope.row.approveStatus }}</span>
           <span v-if="scope.row.approveStatus">{{ scope.row.approveStatus }}</span>
           <span v-else>{{ scope.row.status }}</span>
           <span v-else>{{ scope.row.status }}</span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column class="table_td" prop="collectionEdPayable" label="操作" width="350">
+      <el-table-column class="table_td" prop="collectionEdPayable" label="操作" width="200">
         <template scope="scope">
         <template scope="scope">
           <span v-hasPermission="`acquisitionManagement.acquisitionPay.add`">
           <span v-hasPermission="`acquisitionManagement.acquisitionPay.add`">
             <el-button
             <el-button

+ 389 - 415
src/views/houseSelfCollect/weighingManagement.vue

@@ -1,432 +1,406 @@
 <!--检斤管理-->
 <!--检斤管理-->
 <template>
 <template>
-  <div>
-    <BaseHeaderLayout :leftSpan="16">
-      <template slot="left"> </template>
-      <template slot="right">
-        <ws-select
-          v-model="warehouseName"
-          placeholder=""
-          @change="warehouseNameChange"
-          :value="searchType"
-          style="margin: 0 10px"
-        >
-          <ws-option
-            v-for="item in warehouseList"
-            :key="item.value"
-            :label="item.value"
-            :value="item.value"
-            style="color: #8890b1"
-          />
-        </ws-select>
-        <div></div>
-        <ws-input
-          v-model="searchKeyWord"
-          placeholder="可按编号、客户名、车牌号查找"
-          clearable
-          maxlength="500"
-          type="input"
-        ></ws-input>
-        <ws-button class="find" type="primary" @click="find()"
-          ><img
-            width="16"
-            height="16"
-            style="
+	<div>
+		<BaseHeaderLayout :leftSpan="16">
+			<template slot="left"> </template>
+			<template slot="right">
+				<ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
+					style="margin: 0 10px">
+					<ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
+						style="color: #8890b1" />
+				</ws-select>
+				<div></div>
+				<ws-input v-model="searchKeyWord" placeholder="可按编号、客户名、车牌号查找" clearable maxlength="500" type="input">
+				</ws-input>
+				<ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
               vertical-align: text-top;
               vertical-align: text-top;
               position: relative;
               position: relative;
               top: 0px;
               top: 0px;
-            "
-            src="../../../public/img/sousuo.png"
-            alt=""
-        /></ws-button>
-      </template>
-    </BaseHeaderLayout>
-    <el-table
-      :data="weighingList"
-      style="width: 100%; margin-top: 20px"
-      ref="weighingList"
-      border
-      height="780"
-    >
-      <el-table-column type="index" label="序号" width="50">
-        <template scope="scope">
-          <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
-          <span v-else>{{ scope.$index + 1 }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column prop="number" width="120" label="编号"></el-table-column>
-      <el-table-column prop="customer" label="客户"></el-table-column>
-      <el-table-column prop="carNumber" label="车牌号"></el-table-column>
-      <el-table-column prop="goodsName" label="货名"></el-table-column>
-      <el-table-column prop="type" label="类型"></el-table-column>
-      <el-table-column
-        prop="grossWeight"
-        label="毛重(公斤)"
-      ></el-table-column>
-      <el-table-column prop="tare" label="皮重(公斤)"></el-table-column>
-       <el-table-column prop="buckleMiscellaneous" label="扣杂(公斤)"></el-table-column>
-        <el-table-column prop="netWeight" label="净重(公斤)"></el-table-column>
-      <el-table-column prop="binNumber" label="仓位号"></el-table-column>
-      <el-table-column prop="storageNumber" label="囤位号"></el-table-column>
-      <el-table-column prop="secretaryWeigher" label="司称员">
-       <template slot-scope="scope">
-         <div v-if="scope.row.secretaryWeigher == scope.row.skinInspector">{{scope.row.skinInspector}}</div>
-         <div v-else>{{scope.row.secretaryWeigher}}<span v-if="scope.row.skinInspector">,{{scope.row.skinInspector}}</span></div>
-       </template> 
-      </el-table-column>
-      <el-table-column
-        prop="suqualityTestingDate"
-        label="称重时间"
-      >
-        <template slot-scope="scope">
-          <div
-            v-if="
+            " src="../../../public/img/sousuo.png" alt="" /></ws-button>
+			</template>
+		</BaseHeaderLayout>
+		<el-table :data="weighingList" style="width: 100%; margin-top: 20px" ref="weighingList" border height="780">
+			<el-table-column type="index" label="序号" width="50">
+				<template scope="scope">
+					<span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+					<span v-else>{{ scope.$index + 1 }}</span>
+				</template>
+			</el-table-column>
+			<el-table-column prop="number" width="150" label="编号"></el-table-column>
+			<el-table-column prop="customer" label="客户"></el-table-column>
+			<el-table-column prop="carNumber" label="车牌号"></el-table-column>
+			<el-table-column prop="goodsName" label="货名"></el-table-column>
+			<el-table-column prop="type" label="类型"></el-table-column>
+			<el-table-column prop="grossWeight" label="毛重(公斤)"></el-table-column>
+			<el-table-column prop="tare" label="皮重(公斤)"></el-table-column>
+			<el-table-column prop="buckleMiscellaneous" label="扣杂(公斤)"></el-table-column>
+			<el-table-column prop="netWeight" label="净重(公斤)"></el-table-column>
+			<el-table-column prop="binNumber" label="仓位号"></el-table-column>
+			<el-table-column prop="storageNumber" label="囤位号"></el-table-column>
+			<el-table-column prop="secretaryWeigher" label="司称员">
+				<template slot-scope="scope">
+					<div v-if="scope.row.secretaryWeigher == scope.row.skinInspector">{{scope.row.skinInspector}}</div>
+					<div v-else>{{scope.row.secretaryWeigher}}<span
+							v-if="scope.row.skinInspector">,{{scope.row.skinInspector}}</span></div>
+				</template>
+			</el-table-column>
+			<el-table-column prop="suqualityTestingDate" label="称重时间" width="90">
+				<template slot-scope="scope">
+					<div v-if="
               scope.row.status == '已称毛重'
               scope.row.status == '已称毛重'
-            "
-            > {{scope.row.grossDate}}</div
-          >
-         <div
-            v-if="
+            "> {{scope.row.grossDate}}</div>
+					<div v-if="
               scope.row.status == '已称皮重'
               scope.row.status == '已称皮重'
-            "
-            > {{scope.row.tareDate}}</div
-          >
-        </template></el-table-column>
-      <el-table-column prop="status" label="状态"></el-table-column>
-      <el-table-column width="300" prop="contractNo1" label="操作">
-        <template slot-scope="scope">
-          <el-button @click="weightCheck(scope.row, 1)" v-if=" scope.row.status == '已称毛重' || scope.row.status == '已质检' " v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`" >毛重</el-button >
-          <!-- scope.row.paymentManagement.status == '待结算' && -->
-          <el-button :disabled = "scope.row.allow == 2" @click="weightCheck(scope.row, 2)"  v-if=" (scope.row.status == '已称毛重' || scope.row.status == '已称皮重') " v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`">皮重</el-button>
-          <el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' ||scope.row.status == '已称毛重'" v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button >
-        </template>
-      </el-table-column>
-    </el-table>
-    <div style="text-align: center">
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :current-page="currentPage"
-        :page-size="deptCircularPage.pageSize"
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="deptBudgetTotal"
-      >
-      </el-pagination>
-    </div>
-    <el-dialog
-      width="70%"
-      class="table-content"
-      center
-      :visible.sync="isShowPrint"
-      title="粮食检斤单"
-    >
-      <weightCheckPrint :tableData="dialogData"></weightCheckPrint>
-      <div style="text-align:center">
-      <el-button type="primary" @click="isShowPrint = false">关闭</el-button>
-      <el-button type="primary" @click="printSmall">打印小票</el-button>
-      <el-button type="primary" @click="printBig">打印单据</el-button>
-      </div>
-    </el-dialog>
-  </div>
+            "> {{scope.row.tareDate}}</div>
+				</template>
+			</el-table-column>
+			<el-table-column prop="status" label="状态"></el-table-column>
+			<el-table-column width="300" prop="contractNo1" label="操作">
+				<template slot-scope="scope">
+					<el-button @click="weightCheck(scope.row, 1)"
+						v-if=" scope.row.status == '已称毛重' || scope.row.status == '已质检' "
+						v-hasPermission="`acquisitionManagement.acquisitionWeight.mao`">毛重</el-button>
+					<!-- scope.row.paymentManagement.status == '待结算' && -->
+					<el-button :disabled="scope.row.allow == 2" @click="weightCheck(scope.row, 2)"
+						v-if=" (scope.row.status == '已称毛重' || scope.row.status == '已称皮重') "
+						v-hasPermission="`acquisitionManagement.acquisitionWeight.weight`">皮重</el-button>
+					<el-button @click="print(scope.row)" v-if="scope.row.status == '已称皮重' ||scope.row.status == '已称毛重'"
+						v-hasPermission="`acquisitionManagement.acquisitionWeight.print`">打印</el-button>
+				</template>
+			</el-table-column>
+		</el-table>
+		<div style="text-align: center">
+			<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
+				:current-page="currentPage" :page-size="deptCircularPage.pageSize"
+				layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
+			</el-pagination>
+		</div>
+		<el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单">
+			<weightCheckPrint :tableData="dialogData"></weightCheckPrint>
+			<div style="text-align:center">
+				<el-button type="primary" @click="isShowPrint = false">关闭</el-button>
+				<el-button type="primary" @click="printSmall">打印小票</el-button>
+				<el-button type="primary" @click="printBig">打印单据</el-button>
+			</div>
+		</el-dialog>
+	</div>
 </template>
 </template>
 <script>
 <script>
-import {
-  getweighingList,
-  selectWarehouseSelf,
-  getPrint
-} from '@/model/houseSelfCollect/index'
-import weightCheckPrint from './component/weightCheckPrint.vue'
+	import {
+		getweighingList,
+		selectWarehouseSelf,
+		getPrint
+	} from '@/model/houseSelfCollect/index'
+	import weightCheckPrint from './component/weightCheckPrint.vue'
 
 
-export default {
-  components: {
-    weightCheckPrint
-  },
-  watch: {},
-  data() {
-    return {
-      //分页
-      currentPage: 1,
-      pageSize: 10,
-      deptCircularPage: {},
-      deptBudgetTotal: 0,
-      paymentForm: false,
-      paymentForm1: false,
-      weighingList: [],
-      searchKeyWord: '',
-      searchType: [],
-      warehouseName: '',
-      value1: '', //选择时间
-      warehouseList: [],
-      warehouseId: '',
-      cangid: '',
-      monitorUrl1: '',
-      monitorUrl2: '',
-      isShowPrint:false,//打印弹出
-      dialogData:{
-        qualityInspectionManagement:{},
-      },
-      purchasePriceList:[],
-      allowEdit:'0',
-      disabled:false
-    }
-  },
-  activated() {
-    this.selectWarehouse()
-   
-  },
-  methods: {
-     printSmall() {
-       window.open('../../../../static/weightCheck.html?type=1&tableData=' +JSON.stringify(this.dialogData))
-    },
-    printBig() {
-      window.open( '../../../../static/weightCheck.html?type=2&tableData=' +JSON.stringify(this.dialogData))
-    },
-    print(row) {
-       getPrint({
-      id:row.id
-      })
-        .toPromise()
-        .then((response) => {
-           this.dialogData = response
-           this.isShowPrint = true
-        })
-        .catch((response) => {
-          // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-        })
-    },
-    warehouseNameChange(e) {
-      // this.warehouseName = e
-      for (let i = 0; i < this.warehouseList.length; i++) {
-        if (this.warehouseList[i].value == e) {
-          this.warehouseId = this.warehouseList[i].warehouseId
-          this.cangid = this.warehouseList[i].warehouseId
-          this.allowEdit = this.warehouseList[i].allowEdit
-          this.WAREHOUSE[2].payname = this.warehouseList[i].value
-          this.common.name  =  this.warehouseList[i].value
-          this.monitorUrl1 =  this.warehouseList[i].monitorUrl1
-          this.monitorUrl2 =  this.warehouseList[i].monitorUrl2
-          sessionStorage.setItem('ck',e)
-        }
-      }
+	export default {
+		components: {
+			weightCheckPrint
+		},
+		watch: {},
+		data() {
+			return {
+				//分页
+				currentPage: 1,
+				pageSize: 10,
+				deptCircularPage: {},
+				deptBudgetTotal: 0,
+				paymentForm: false,
+				paymentForm1: false,
+				weighingList: [],
+				searchKeyWord: '',
+				searchType: [],
+				warehouseName: '',
+				value1: '', //选择时间
+				warehouseList: [],
+				warehouseId: '',
+				cangid: '',
+				monitorUrl1: '',
+				monitorUrl2: '',
+				isShowPrint: false, //打印弹出
+				dialogData: {
+					qualityInspectionManagement: {},
+				},
+				purchasePriceList: [],
+				allowEdit: '0',
+				disabled: false
+			}
+		},
+		activated() {
+			this.selectWarehouse()
 
 
-      this.getList()
-    },
-    weightCheck(row, num) {
-      this.$router.push({
-        path: 'weightCheck',
-        query: {
-          tpyeNo: num,
-          id: row.id,
-          number: row.number,
-          binNumber: row.binNumber,
-          customer: row.customer,
-          storageNumber: row.storageNumber,
-          carNumber: row.carNumber,
-          goodsName: row.goodsName,
-          grossWeight: row.grossWeight,
-          tare: row.tare,
-          netWeight: row.netWeight,
-          relationId: row.relationId,
-          warehouseId: this.warehouseId,
-          monitorUrl1: this.monitorUrl1,
-          monitorUrl2: this.monitorUrl2,
-          allowEdit:this.allowEdit,
-          cangid:this.cangid,
-          paramType:row.qualityInspectionManagement.paramType
-        },
-      })
-    },
-    find() {
-      this.getList()
-    },
-    handleSizeChange(val) {
-      console.log(`每页 ${val} 条`)
-      this.pageSize = val
-      this.getList()
-    },
-    handleCurrentChange(val) {
-      this.currentPage = val
-      console.log(`当前页: ${val}`)
-      this.getList()
-    },
-    selectWarehouse(){
-      let _wareHouse = sessionStorage.getItem('houseSelfCollect_house')
-      _wareHouse = JSON.parse(_wareHouse)
-      selectWarehouseSelf({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-      })
-        .toPromise()
-        .then((response) => {
-          this.warehouseList = []
-          
-          for (let i = 0; i < response.length; i++) {
-            this.warehouseList.push({
-              value: response[i].warehouseName,
-              warehouseId: response[i].id,
-              allowEdit:response[i].allowEdit,
-              monitorUrl1:response[i].monitorUrl1,
-              monitorUrl2:response[i].monitorUrl2
-            })
-             if (_wareHouse) {
-            
-            this.cangid = _wareHouse.id
-            this.warehouseName = _wareHouse.warehouseName
-            this.common.name=_wareHouse.warehouseName
-            this.warehouseId=_wareHouse.id
-            this.warehouseNo =_wareHouse.commonWarehouseNo
-            this.monitorUrl1=_wareHouse.monitorUrl1
-            this.allowEdit = _wareHouse.allowEdit
-            this.monitorUrl2=_wareHouse.monitorUrl2
-          } else {
-            if (this.cangid&&this.cangid == response[i].id) {
-              this.warehouseName = response[i].warehouseName
-              this.allowEdit = response[i].allowEdit
-              this.common.name = response[i].warehouseName
-              this.warehouseId =  response[i].id
-              this.warehouseNo =  response[i].commonWarehouseNo
-              this.monitorUrl1 =  response[i].monitorUrl1
-              this.monitorUrl2 =  response[i].monitorUrl2
-            }
-         
-           if(this.warehouseList.length > 0 && !this.cangid){
-            this.warehouseName = this.warehouseList[0].value
-            this.allowEdit =this.warehouseList[0].allowEdit
-            this.cangid =  this.warehouseList[0].warehouseId
-            this.warehouseId =  this.warehouseList[0].warehouseId
-            this.WAREHOUSE[1].payname = this.warehouseList[0].value
-            this.common.name  =  this.warehouseList[0].value
-            this.monitorUrl1 =  this.warehouseList[0].monitorUrl1
-            this.monitorUrl2 =  this.warehouseList[0].monitorUrl2
-            } 
-          }
-          }
-           sessionStorage.setItem('ck',this.common.name)
-           console.log(this.warehouseList)
-         this.getList()
-        })
-    },
-    getList() {
-        getweighingList({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-        currentPage: this.currentPage,
-        pageSize: this.pageSize,
-        searchKeyWord: this.searchKeyWord,
-        warehouseName: this.warehouseName,
-        managementType:1
-      })
-        .toPromise()
-        .then((response) => {
-          for(let i = 0 ; i < response.records.length ; i++){
-            if(response.records[i].paymentManagement){
-              if(response.records[i].paymentManagement.approveStatus || response.records[i].paymentManagement.status != '待结算'){
-                  response.records[i].allow = 2
-              }
-            }else{
-              response.records[i].allow = 1
-            }  
-          }
-          this.weighingList = response.records
-          this.common.commonWeighingList  = response.records
-          this.deptBudgetTotal = response.total
-        })
-        .catch((response) => {
-          // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-        })
-    },
-  },
-}
+		},
+		methods: {
+			printSmall() {
+				window.open('../../../../static/weightCheck.html?type=1&tableData=' + JSON.stringify(this.dialogData))
+			},
+			printBig() {
+				window.open('../../../../static/weightCheck.html?type=2&tableData=' + JSON.stringify(this.dialogData))
+			},
+			print(row) {
+				getPrint({
+						id: row.id
+					})
+					.toPromise()
+					.then((response) => {
+						this.dialogData = response
+						this.isShowPrint = true
+					})
+					.catch((response) => {
+						// EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+					})
+			},
+			warehouseNameChange(e) {
+				// this.warehouseName = e
+				for (let i = 0; i < this.warehouseList.length; i++) {
+					if (this.warehouseList[i].value == e) {
+						this.warehouseId = this.warehouseList[i].warehouseId
+						this.cangid = this.warehouseList[i].warehouseId
+						this.allowEdit = this.warehouseList[i].allowEdit
+						this.WAREHOUSE[2].payname = this.warehouseList[i].value
+						this.common.name = this.warehouseList[i].value
+						this.monitorUrl1 = this.warehouseList[i].monitorUrl1
+						this.monitorUrl2 = this.warehouseList[i].monitorUrl2
+						sessionStorage.setItem('ck', e)
+					}
+				}
+
+				this.getList()
+			},
+			weightCheck(row, num) {
+				this.$router.push({
+					path: 'weightCheck',
+					query: {
+						tpyeNo: num,
+						id: row.id,
+						number: row.number,
+						binNumber: row.binNumber,
+						customer: row.customer,
+						storageNumber: row.storageNumber,
+						carNumber: row.carNumber,
+						goodsName: row.goodsName,
+						grossWeight: row.grossWeight,
+						tare: row.tare,
+						netWeight: row.netWeight,
+						relationId: row.relationId,
+						warehouseId: this.warehouseId,
+						monitorUrl1: this.monitorUrl1,
+						monitorUrl2: this.monitorUrl2,
+						allowEdit: this.allowEdit,
+						cangid: this.cangid,
+						paramType: row.qualityInspectionManagement.paramType
+					},
+				})
+			},
+			find() {
+				this.getList()
+			},
+			handleSizeChange(val) {
+				console.log(`每页 ${val} 条`)
+				this.pageSize = val
+				this.getList()
+			},
+			handleCurrentChange(val) {
+				this.currentPage = val
+				console.log(`当前页: ${val}`)
+				this.getList()
+			},
+			selectWarehouse() {
+				let _wareHouse = sessionStorage.getItem('houseSelfCollect_house')
+				_wareHouse = JSON.parse(_wareHouse)
+				selectWarehouseSelf({
+						compId: sessionStorage.getItem('ws-pf_compId'),
+					})
+					.toPromise()
+					.then((response) => {
+						this.warehouseList = []
+
+						for (let i = 0; i < response.length; i++) {
+							this.warehouseList.push({
+								value: response[i].warehouseName,
+								warehouseId: response[i].id,
+								allowEdit: response[i].allowEdit,
+								monitorUrl1: response[i].monitorUrl1,
+								monitorUrl2: response[i].monitorUrl2
+							})
+							if (_wareHouse) {
+
+								this.cangid = _wareHouse.id
+								this.warehouseName = _wareHouse.warehouseName
+								this.common.name = _wareHouse.warehouseName
+								this.warehouseId = _wareHouse.id
+								this.warehouseNo = _wareHouse.commonWarehouseNo
+								this.monitorUrl1 = _wareHouse.monitorUrl1
+								this.allowEdit = _wareHouse.allowEdit
+								this.monitorUrl2 = _wareHouse.monitorUrl2
+							} else {
+								if (this.cangid && this.cangid == response[i].id) {
+									this.warehouseName = response[i].warehouseName
+									this.allowEdit = response[i].allowEdit
+									this.common.name = response[i].warehouseName
+									this.warehouseId = response[i].id
+									this.warehouseNo = response[i].commonWarehouseNo
+									this.monitorUrl1 = response[i].monitorUrl1
+									this.monitorUrl2 = response[i].monitorUrl2
+								}
+
+								if (this.warehouseList.length > 0 && !this.cangid) {
+									this.warehouseName = this.warehouseList[0].value
+									this.allowEdit = this.warehouseList[0].allowEdit
+									this.cangid = this.warehouseList[0].warehouseId
+									this.warehouseId = this.warehouseList[0].warehouseId
+									this.WAREHOUSE[1].payname = this.warehouseList[0].value
+									this.common.name = this.warehouseList[0].value
+									this.monitorUrl1 = this.warehouseList[0].monitorUrl1
+									this.monitorUrl2 = this.warehouseList[0].monitorUrl2
+								}
+							}
+						}
+						sessionStorage.setItem('ck', this.common.name)
+						console.log(this.warehouseList)
+						this.getList()
+					})
+			},
+			getList() {
+				getweighingList({
+						compId: sessionStorage.getItem('ws-pf_compId'),
+						currentPage: this.currentPage,
+						pageSize: this.pageSize,
+						searchKeyWord: this.searchKeyWord,
+						warehouseName: this.warehouseName,
+						managementType: 1
+					})
+					.toPromise()
+					.then((response) => {
+						for (let i = 0; i < response.records.length; i++) {
+							if (response.records[i].paymentManagement) {
+								if (response.records[i].paymentManagement.approveStatus || response.records[i]
+									.paymentManagement.status != '待结算') {
+									response.records[i].allow = 2
+								}
+							} else {
+								response.records[i].allow = 1
+							}
+						}
+						this.weighingList = response.records
+						this.common.commonWeighingList = response.records
+						this.deptBudgetTotal = response.total
+					})
+					.catch((response) => {
+						// EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+					})
+			},
+		},
+	}
 </script>
 </script>
 <style lang="scss" scoped>
 <style lang="scss" scoped>
-.title {
-  font-size: 20px;
-  font-weight: 600;
-  margin: 20px;
-}
-.ws-info-table {
-  border: none;
-}
-.ws-info-table .el-form-item {
-  width: 50%;
-  border: none;
-}
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  width: 30%;
-  text-align: center;
-  background: #ffffff;
-  color: #8890b1;
-}
-/deep/.ws-info-table .el-form-item .el-form-item__content {
-  border: none;
-}
-/deep/.el-table .el-table__header .cell,
-.el-table .el-table__body .cell {
-  text-align: center;
-}
-/deep/.el-table--enable-row-transition .el-table__body td {
-  text-align: center;
-}
-.formItem {
-  width: 51% !important;
-}
-/deep/.el-dialog__title {
-  font-size: 24px !important;
-}
-/deep/.el-dialog__header {
-  text-align: center !important;
-  padding: 10px 0 !important;
-  height: auto !important;
-}
-.number {
-  text-align: right;
-  margin: 0 0 10px 0;
-}
-table,
-table tr th,
-table tr td {
-  border: 2px solid #333333;
-  padding: 5px 0;
-}
+	.title {
+		font-size: 20px;
+		font-weight: 600;
+		margin: 20px;
+	}
+
+	.ws-info-table {
+		border: none;
+	}
+
+	.ws-info-table .el-form-item {
+		width: 50%;
+		border: none;
+	}
+
+	/deep/.ws-info-table .el-form-item .el-form-item__label {
+		width: 30%;
+		text-align: center;
+		background: #ffffff;
+		color: #8890b1;
+	}
+
+	/deep/.ws-info-table .el-form-item .el-form-item__content {
+		border: none;
+	}
+
+	/deep/.el-table .el-table__header .cell,
+	.el-table .el-table__body .cell {
+		text-align: center;
+	}
+
+	/deep/.el-table--enable-row-transition .el-table__body td {
+		text-align: center;
+	}
+
+	.formItem {
+		width: 51% !important;
+	}
+
+	/deep/.el-dialog__title {
+		font-size: 24px !important;
+	}
+
+	/deep/.el-dialog__header {
+		text-align: center !important;
+		padding: 10px 0 !important;
+		height: auto !important;
+	}
+
+	.number {
+		text-align: right;
+		margin: 0 0 10px 0;
+	}
+
+	table,
+	table tr th,
+	table tr td {
+		border: 2px solid #333333;
+		padding: 5px 0;
+	}
+
+	table {
+		width: 100%;
+		min-height: 25px;
+		line-height: 25px;
+		text-align: center;
+		border-collapse: collapse;
+		border: 3px solid #333333;
+	}
+
+	.col-bgc {
+		background: #f6f7fb;
+	}
+
+	.bottom-row1 {
+		display: flex;
+		margin: 10px 0;
+	}
+
+	.bottom-row2 {
+		display: flex;
+		margin: 10px 0;
+
+		.left {
+			img {
+				width: 41px;
+				height: 41px;
+				margin-right: 118px;
+			}
+		}
+
+		.config {
+			margin-top: 20px;
+			margin-right: 240px;
+		}
 
 
-table {
-  width: 100%;
-  min-height: 25px;
-  line-height: 25px;
-  text-align: center;
-  border-collapse: collapse;
-  border: 3px solid #333333;
-}
-.col-bgc {
-  background: #f6f7fb;
-}
-.bottom-row1 {
-  display: flex;
-  margin: 10px 0;
-}
+		.autograph {
+			margin-top: 20px;
+		}
+	}
 
 
-.bottom-row2 {
-  display: flex;
-  margin: 10px 0;
+	.bottom-row3 {
+		margin: 10px 0;
+	}
 
 
-  .left {
-    img {
-      width: 41px;
-      height: 41px;
-      margin-right: 118px;
-    }
-  }
-  .config {
-    margin-top: 20px;
-    margin-right: 240px;
-  }
-  .autograph{
-    margin-top: 20px;
-  }
-}
-.bottom-row3 {
-  margin: 10px 0;
-}
-.bottom-row4 {
-  margin-top: 50px;
-  text-align: center;
-}
+	.bottom-row4 {
+		margin-top: 50px;
+		text-align: center;
+	}
 </style>
 </style>

+ 1 - 0
src/views/outboundManagement/collectionManagement.vue

@@ -157,6 +157,7 @@
       <el-table-column
       <el-table-column
         class="table_td"
         class="table_td"
         prop="collectionDate"
         prop="collectionDate"
+        width="90"
         label="收款时间"
         label="收款时间"
       ></el-table-column>
       ></el-table-column>
       <el-table-column
       <el-table-column

+ 1 - 1
src/views/outboundManagement/weighingManagement.vue

@@ -39,7 +39,7 @@
 			<el-table-column prop="binNumber" label="仓位号"></el-table-column>
 			<el-table-column prop="binNumber" label="仓位号"></el-table-column>
 			<el-table-column prop="storageNumber" label="囤位号"></el-table-column>
 			<el-table-column prop="storageNumber" label="囤位号"></el-table-column>
 			<el-table-column prop="secretaryWeigher" label="司称员"></el-table-column>
 			<el-table-column prop="secretaryWeigher" label="司称员"></el-table-column>
-			<el-table-column prop="grossDate" label="称重时间">
+			<el-table-column prop="grossDate"  width="140" label="称重时间">
 				<template slot-scope="scope">
 				<template slot-scope="scope">
 					{{scope.row.grossDate}}
 					{{scope.row.grossDate}}
 					<span v-if="scope.row.grossDate == null">
 					<span v-if="scope.row.grossDate == null">

+ 1 - 1
src/views/statisticalReport/stockSaleOutReportList.vue

@@ -90,7 +90,7 @@
 				</el-table-column>
 				</el-table-column>
 				<el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)">
 				<el-table-column class="table_td" prop="amountIngReceivable" label="应收金额(元)">
 					<template slot-scope="scope">
 					<template slot-scope="scope">
-						<span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable }}</span>
+						<span v-if="scope.row.returnFlag == null">{{scope.row.amountIngReceivable.toFixed(2) }}</span>
 					</template>
 					</template>
 				</el-table-column>
 				</el-table-column>
 			</el-table>
 			</el-table>

+ 3 - 3
src/views/taskManagement/tranManagementTransport.vue

@@ -86,7 +86,7 @@
         </el-table-column>
         </el-table-column>
         <el-table-column prop="taskNo" label="运输任务编号" width="140"></el-table-column>
         <el-table-column prop="taskNo" label="运输任务编号" width="140"></el-table-column>
         <el-table-column prop="contractNo" label="合同编号" width="160"></el-table-column>
         <el-table-column prop="contractNo" label="合同编号" width="160"></el-table-column>
-        <el-table-column prop=" weight" class="table_td" label="货物(吨数)">
+        <el-table-column prop=" weight" class="table_td" label="货物(吨数)" width="130"> 
           <template slot-scope="scope">{{ scope.row.goodsName }}({{ scope.row.weight }})</template>
           <template slot-scope="scope">{{ scope.row.goodsName }}({{ scope.row.weight }})</template>
         </el-table-column>
         </el-table-column>
         <el-table-column prop="tranType" class="table_td" label="运输方式" width="120"></el-table-column>
         <el-table-column prop="tranType" class="table_td" label="运输方式" width="120"></el-table-column>
@@ -105,7 +105,7 @@
           </template>
           </template>
         </el-table-column>
         </el-table-column>
 
 
-        <el-table-column prop="status" label="状态">
+        <el-table-column prop="status" label="状态" width="100">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <el-popover
             <el-popover
               placement="left"
               placement="left"
@@ -148,7 +148,7 @@
             />
             />
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column prop="seller" label="操作" width="300">
+        <el-table-column prop="seller" label="操作" width="160">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <div
             <div
               class="record"
               class="record"

+ 4 - 4
src/views/taskManagement/tranManagementWarehouseInOutTask.vue

@@ -39,8 +39,8 @@
             <span v-else>{{ scope.$index + 1 }}</span>
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column prop="inOutTaskNo" label="任务编号"></el-table-column>
-        <el-table-column prop="contractNo" label="合同编号" width="80">
+        <el-table-column prop="inOutTaskNo" label="任务编号" width="160"></el-table-column>
+        <el-table-column prop="contractNo" label="合同编号" width="160">
           <!-- <template scope="scope">
           <!-- <template scope="scope">
             <div
             <div
               v-if="
               v-if="
@@ -66,7 +66,7 @@
         <el-table-column prop="weight" class="table_td" label="重量(吨)"></el-table-column>
         <el-table-column prop="weight" class="table_td" label="重量(吨)"></el-table-column>
         <el-table-column prop="predictDate" class="table_td" label="预计日期"></el-table-column>
         <el-table-column prop="predictDate" class="table_td" label="预计日期"></el-table-column>
         <el-table-column prop="publisher" class="table_td" label="发布者"></el-table-column>
         <el-table-column prop="publisher" class="table_td" label="发布者"></el-table-column>
-        <el-table-column prop="taskStatus" label="状态">
+        <el-table-column prop="taskStatus" label="状态" width="90">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <template>
             <template>
               <span slot="reference">
               <span slot="reference">
@@ -82,7 +82,7 @@
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column prop="establishDate" class="table_td" label="创建时间"></el-table-column>
         <el-table-column prop="establishDate" class="table_td" label="创建时间"></el-table-column>
-        <el-table-column prop="seller" label="操作" width="300">
+        <el-table-column prop="seller" label="操作" width="180">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <span class="corles" @click="nocomplete(scope.row)" v-hasPermission="
             <span class="corles" @click="nocomplete(scope.row)" v-hasPermission="
                 `warehouseManagement.warehouse.warehouseInfoTask.View`
                 `warehouseManagement.warehouse.warehouseInfoTask.View`

+ 2 - 2
src/views/tranManagement/tranManagementReceivingFeedback.vue

@@ -92,7 +92,7 @@
             <span v-else>{{ scope.$index + 1 }}</span>
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column class="table_td" prop="processNo" label="运输任务编号">
+        <el-table-column class="table_td" prop="processNo" label="运输任务编号" width="140">
         </el-table-column>
         </el-table-column>
         <el-table-column prop="tranType" label="运输方式"> </el-table-column>
         <el-table-column prop="tranType" label="运输方式"> </el-table-column>
         <el-table-column class="table_td" prop="goodsName" label="货名">
         <el-table-column class="table_td" prop="goodsName" label="货名">
@@ -170,7 +170,7 @@
         </el-table-column>
         </el-table-column>
         <el-table-column class="table_td" label="接单时间" prop="createDate" width="90">
         <el-table-column class="table_td" label="接单时间" prop="createDate" width="90">
         </el-table-column>
         </el-table-column>
-        <el-table-column prop="seller" label="操作" width="200">
+        <el-table-column prop="seller" label="操作" width="160">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <template v-if="scope.row.receivingStatus != '已完货'">
             <template v-if="scope.row.receivingStatus != '已完货'">
               <div class="record" @click="trainSee(scope.row)">查看</div>
               <div class="record" @click="trainSee(scope.row)">查看</div>

+ 2 - 2
src/views/tranManagement/tranManagementTransporHairRespond.vue

@@ -92,7 +92,7 @@
             <span v-else>{{ scope.$index + 1 }}</span>
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
-        <el-table-column prop="processNo" label="运输任务编号">
+        <el-table-column prop="processNo" label="运输任务编号" width="140">
         </el-table-column>
         </el-table-column>
         <el-table-column prop="tranType" label="运输方式"> </el-table-column>
         <el-table-column prop="tranType" label="运输方式"> </el-table-column>
         <el-table-column prop="goodsName" label="货名"> </el-table-column>
         <el-table-column prop="goodsName" label="货名"> </el-table-column>
@@ -165,7 +165,7 @@
         </el-table-column>
         </el-table-column>
         <el-table-column prop="createDate" class="table_td" label="接单时间" width="90">
         <el-table-column prop="createDate" class="table_td" label="接单时间" width="90">
         </el-table-column>
         </el-table-column>
-        <el-table-column prop="seller" label="操作" width="200">
+        <el-table-column prop="seller" label="操作" width="160">
           <template slot-scope="scope">
           <template slot-scope="scope">
             <template v-if="scope.row.feedbackStatus != '已完货'">
             <template v-if="scope.row.feedbackStatus != '已完货'">
               <div class="record" @click="trainSee(scope.row)">查看</div>
               <div class="record" @click="trainSee(scope.row)">查看</div>