Browse Source

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

qukaidi 3 years ago
parent
commit
fb96d54fea

+ 7 - 0
src/api/wel.js

@@ -104,3 +104,10 @@ export const frequency = (query) => {
     params: query
   })
 }
+export const businessStatisticsFrequency = (query) => {
+  return request({
+    url: '/api/blade-system/dict-biz/dictionary?code=business_statistics',
+    method: 'get',
+    params: query
+  })
+}

+ 1618 - 0
src/views/agreementManagement/agreementTask/index.vue

@@ -0,0 +1,1618 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      :inline="true"
+      v-show="showSearch"
+      label-width="88px"
+    >
+      <el-row>
+        <el-form-item label="客户名称" prop="fCorpid">
+          <el-select
+            v-model="queryParams.fCorpid"
+            filterable
+            remote
+            clearable
+            style="width: 200px"
+            @keyup.enter.native="handleQuery"
+            :remote-method="corpsRemoteMethod"
+            placeholder="请输入客户名称"
+          >
+            <el-option
+              v-for="(dict, index) in fMblnoOptions"
+              :key="index.fId"
+              :label="dict.fName"
+              :value="dict.fId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="制单部门" prop="fDeptid">
+          <el-input
+            v-model="queryParams.fDeptid"
+            placeholder="请输入制单部门"
+            clearable
+            size="small"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="有效期起" prop="fBegindate">
+          <el-date-picker
+            clearable
+            size="small"
+            style="width: 200px"
+            v-model="queryParams.fBegindate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择有效期起"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="有效期至" prop="fEnddate">
+          <el-date-picker
+            clearable
+            size="small"
+            style="width: 200px"
+            v-model="queryParams.fEnddate"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择有效期至"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="协议编号" prop="fContractno">
+          <el-input
+            v-model="queryParams.fContractno"
+            placeholder="请输入协议编号"
+            clearable
+            size="small"
+            @keyup.enter.native="handleQuery"
+          />
+        </el-form-item>
+        <el-form-item label="作业费类型" prop="fTaskType" label-width="90px">
+          <el-select
+            v-model="queryParams.fTaskType"
+            clearable
+            placeholder="请选择作业费类型"
+            :disabled="browseStatus"
+          >
+            <el-option label="车队作业费" value="1" />
+            <el-option label="劳务作业费" value="2" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="商品类别" prop="tPackages">
+          <el-select
+            v-model="queryParams.tPackages"
+            clearable
+            placeholder="请选择商品类别"
+            :disabled="browseStatus"
+          >
+            <el-option
+              v-for="(dict, index) in fTypeidOptions"
+              :key="index.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+              style="width: 200px"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="费用类型" prop="fDc">
+          <el-select
+            v-model="queryParams.fDc"
+            clearable
+            placeholder="请选择费用类型"
+            style="width: 200px"
+            :disabled="browseStatus"
+          >
+            <el-option label="收" value="D"></el-option>
+            <el-option label="付" value="C"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button
+            type="cyan"
+            icon="el-icon-search"
+            size="mini"
+            @click="handleQuery"
+            >搜索</el-button
+          >
+          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+            >重置</el-button
+          >
+        </el-form-item>
+      </el-row>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd()"
+          v-hasPermi="['agreement:agreementTask:add']"
+          >新增
+        </el-button>
+      </el-col>
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="success"-->
+      <!--          icon="el-icon-edit"-->
+      <!--          size="mini"-->
+      <!--          :disabled="single"-->
+      <!--          @click="handleUpdate"-->
+      <!--          v-hasPermi="['agreement:agreementTask:edit']"-->
+      <!--        >修改-->
+      <!--        </el-button>-->
+      <!--      </el-col>-->
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="danger"-->
+      <!--          icon="el-icon-delete"-->
+      <!--          size="mini"-->
+      <!--          :disabled="multiple"-->
+      <!--          @click="handleDelete"-->
+      <!--          v-hasPermi="['agreement:agreementTask:remove']"-->
+      <!--        >删除-->
+      <!--        </el-button>-->
+      <!--      </el-col>-->
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['agreement:agreementTask:export']"
+          >导出
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          icon="el-icon-download"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate(null, 2)"
+          v-hasPermi="['agreement:agreementStorage:export']"
+          >复制新增
+        </el-button>
+      </el-col>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
+    </el-row>
+    <el-table
+      v-loading="loading"
+      :data="agreementList"
+      @selection-change="handleSelectionChange"
+      border
+    >
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column type="index" label="行号" align="center" fixed />
+      <el-table-column
+        label="客户名称"
+        sortable
+        align="center"
+        prop="fCorpid"
+        fixed
+        width="220"
+      />
+      <el-table-column
+        label="作业费类型"
+        sortable
+        align="center"
+        prop="fTaskType"
+        fixed
+        width="120"
+      >
+        <template slot-scope="scope">
+          <span v-if="scope.row.fTaskType === 1">车队作业费</span>
+          <span v-if="scope.row.fTaskType === 2">劳务作业费</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="商品类别"
+        sortable
+        align="center"
+        prop="tPackages"
+        fixed
+        width="100"
+        :formatter="tPackagesFormat"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+      <el-table-column
+        label="费用类型"
+        sortable
+        align="center"
+        prop="fDc"
+        fixed
+        width="100"
+      >
+        <template slot-scope="scope">
+          <span v-if="scope.row.fDc === 'D'">收</span>
+          <span v-if="scope.row.fDc === 'C'">付</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="业务类型"
+        sortable
+        align="center"
+        prop="fBilltypeName"
+        fixed
+        width="120"
+        show-overflow-tooltip
+      />
+
+      <el-table-column
+        label="协议编号"
+        sortable
+        align="center"
+        prop="fContractno"
+        show-overflow-tooltip
+        width="120"
+      />
+      <!--      <el-table-column label="费用名称" align="center" prop="fFeeid"/>-->
+      <el-table-column
+        label="有效期起"
+        sortable
+        align="center"
+        prop="fBegindate"
+        width="180"
+      >
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.fBegindate, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="有效期至"
+        sortable
+        align="center"
+        prop="fEnddate"
+        width="180"
+      >
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.fEnddate, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <!--      <el-table-column label="状态" align="center" prop="fId" />-->
+      <el-table-column label="是否启用" align="center" prop="fStatus">
+        <template slot-scope="scope">
+          <el-switch
+            v-model="scope.row.fStatus"
+            active-value="0"
+            inactive-value="1"
+            @change="handleStatusChange(scope.row)"
+          ></el-switch>
+        </template>
+      </el-table-column>
+      <el-table-column label="状态" align="center" prop="fBillstatus">
+        <template slot-scope="scope">
+          <span v-if="scope.row.fBillstatus == '1'">保存</span>
+          <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>
+          <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>
+          <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>
+          <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>
+          <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        min-width="250px"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="speed_s(scope.row, 0)"
+            v-hasPermi="['agreement:agreementTask:remove']"
+            >查看
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-if="scope.row.fBillstatus <= 3"
+            v-hasPermi="['agreement:agreementTask:edit']"
+            >修改
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-if="scope.row.fBillstatus <= 3"
+            v-hasPermi="['agreement:agreementTask:remove']"
+            >删除
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="speed(scope.row, 1)"
+            v-if="
+              scope.row.fBillstatus === '4' || scope.row.fBillstatus === '5'
+            "
+            v-hasPermi="['agreement:agreementTask:remove']"
+            >审批进度
+          </el-button>
+        </template>
+      </el-table-column>
+      <!--      <el-table-column label="业务编号" align="center" prop="fBillno" />-->
+      <!--      <el-table-column label="制单部门" align="center" prop="fDeptid" />-->
+      <!--      <el-table-column label="结算方式" align="center" prop="fStltypeid" :formatter="fStltypeidFormat" />-->
+      <!--      <el-table-column label="费用类型" align="center" prop="fFeetypeid" />-->
+      <!--      <el-table-column label="货物类别" align="center" prop="tPackages" :formatter="tPackagesFormat" />-->
+      <!--      <el-table-column label="贸易方式" align="center" prop="fTrademodeid" :formatter="fTrademodeidFormat" />-->
+      <!--      <el-table-column label="免堆天数" align="center" prop="fFreedays" />-->
+      <!--      <el-table-column label="备注" align="center" prop="remark" />-->
+    </el-table>
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+    <!-- 添加或修改作业费对话框 -->
+    <el-dialog
+      v-dialogDrag
+      :fullscreen="dialogFull"
+      :title="title"
+      :visible.sync="open"
+      :show-close="Xbutton"
+      width="65%"
+      append-to-body
+      :before-close="handleClose"
+      :close-on-click-modal="false"
+      :close-on-press-escape="false"
+    >
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+          <span class="el-dialog__title">
+            <span
+              style="
+                display: inline-block;
+                width: 3px;
+                height: 20px;
+                margin-right: 5px;
+                float: left;
+                margin-top: 2px;
+              "
+            ></span>
+          </span>
+          <div class="avue-crud__dialog__menu enlarge" @click="full">
+            <i
+              style="
+                cursor: pointer;
+                display: block;
+                width: 12px;
+                height: 12px;
+                border: 1px solid #909399;
+                border-top: 3px solid #909399;
+                margin-top: -3px;
+              "
+            ></i>
+          </div>
+        </div>
+      </template>
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="80px"
+        style="display: flex; flex-wrap: wrap"
+      >
+        <el-form-item label="客户名称" prop="fCorpid">
+          <el-select
+            v-model="form.fCorpid"
+            filterable
+            remote
+            clearable
+            :disabled="browseStatus"
+            style="width: 200px"
+            @keyup.enter.native="handleQuery"
+            :remote-method="corpsRemoteMethod"
+            placeholder="请输入客户名称"
+          >
+            <el-option
+              v-for="(dict, index) in fMblnoOptions"
+              :key="index.fId"
+              :label="dict.fName"
+              :value="dict.fId"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="制单部门">
+          <el-input
+            v-model="deptName"
+            :disabled="true"
+            placeholder="请输入制单部门"
+            style="width: 200px"
+          />
+        </el-form-item>
+        <el-form-item label="有效期起" prop="fBegindate">
+          <el-date-picker
+            clearable
+            size="small"
+            style="width: 200px"
+            v-model="form.fBegindate"
+            type="date"
+            :disabled="browseStatus"
+            value-format="timestamp"
+            placeholder="选择有效期起"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="有效期至" prop="fEnddate">
+          <el-date-picker
+            clearable
+            size="small"
+            style="width: 200px"
+            v-model="form.fEnddate"
+            type="date"
+            :disabled="browseStatus"
+            value-format="timestamp"
+            placeholder="选择有效期至"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="协议编号" prop="fContractno">
+          <el-input
+            v-model="form.fContractno"
+            placeholder="请输入协议编号"
+            :disabled="browseStatus"
+            style="width: 200px"
+          />
+        </el-form-item>
+        <el-form-item label="商品类别" prop="tPackages">
+          <el-select
+            v-model="form.tPackages"
+            placeholder="请选择商品类别"
+            :disabled="browseStatus"
+            multiple
+          >
+            <el-option
+              v-for="(dict, index) in fTypeidOptions"
+              :key="index.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+              style="width: 210px"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="作业费类型" prop="fTaskType" label-width="90px">
+          <el-select
+            v-model="form.fTaskType"
+            placeholder="请选择作业费类型"
+            :disabled="browseStatus"
+          >
+            <el-option label="车队作业费" value="1" />
+            <el-option label="劳务作业费" value="2" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="费用类型" prop="fDc">
+          <el-select
+            v-model="form.fDc"
+            @change="changefDc"
+            placeholder="请选择费用类型"
+            :disabled="browseStatus"
+          >
+            <el-option label="收" value="D"></el-option>
+            <el-option label="付" value="C"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="业务类型" prop="fBilltype">
+          <el-select
+            v-model="form.fBilltype"
+            placeholder="请选择业务类型"
+            clearable
+            :disabled="browseStatus"
+            style="width: 200px"
+            size="small"
+            multiple
+            @keyup.enter.native="handleQuery"
+          >
+            <el-option
+              v-for="(dict, index) in options"
+              :key="index.key"
+              :label="dict.name"
+              :value="dict.key"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <el-button
+        @click="confirmCharge"
+        :disabled="stop"
+        v-if="form.fBillstatus < 4"
+        type="primary"
+        >请 核</el-button
+      >
+      <el-button
+        @click="revokeCharge"
+        v-if="form.fBillstatus === '6'"
+        type="danger"
+        >撤销请核</el-button
+      >
+      <el-button
+        @click="revocationApproval('f_billstatus')"
+        :disabled="tablefilter"
+        v-if="form.fBillstatus === '4' && operator === lander"
+        type="danger"
+        >撤销审批</el-button
+      >
+      <div class="dialogTableTitle flex a-center jlr">
+        <h2>作业费明细</h2>
+        <el-button @click="getList_s" :disabled="browseStatus">新增</el-button>
+      </div>
+      <el-table v-loading="loading_s" :data="agreementitemsList" border>
+        <el-table-column label="行号" align="center" type="index" />
+        <el-table-column
+          prop="fFeeid"
+          header-align="center"
+          align="center"
+          width="160px"
+          show-overflow-tooltip
+          label="费用名称"
+        >
+          <template slot-scope="scope">
+            <el-select
+              v-model="scope.row.fFeeid"
+              filterable
+              :disabled="browseStatus"
+              remote
+              :remote-method="fWRemoteMethod"
+              placeholder="费用名称"
+              style="width: 100%"
+            >
+              <el-option
+                v-for="(dict, index) in fWbuOptions"
+                :key="index.fId"
+                :label="dict.fName"
+                :value="dict.fId"
+              ></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+          prop="fFeeunitid"
+          header-align="center"
+          align="center"
+          width="130px"
+          label="计价单位"
+        >
+          <template slot-scope="scope">
+            <el-select
+              v-model="scope.row.fFeeunitid"
+              placeholder="请选择计价单位"
+              @change="changeFeeUnit(scope.row)"
+              clearable
+              :disabled="browseStatus"
+            >
+              <el-option
+                v-for="(dict, index) in jFeetunitOptions"
+                :key="index.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              />
+            </el-select>
+          </template>
+        </el-table-column>
+
+        <el-table-column label="单价" align="center" width="120">
+          <el-input
+            slot-scope="scope"
+            v-model="scope.row.fPrice"
+            placeholder="请输入单价"
+            oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+            :disabled="browseStatus"
+            clearable
+            size="small"
+          />
+        </el-table-column>
+        <el-table-column label="录入人" align="center" width="120">
+          <el-input
+            slot-scope="scope"
+            v-model="scope.row.createBy"
+            :disabled="true"
+            placeholder="默认录入人"
+            clearable
+            size="small"
+          />
+        </el-table-column>
+        <el-table-column label="录入时间" align="center" width="120">
+          <el-input
+            slot-scope="scope"
+            v-model="scope.row.createTime"
+            placeholder="默认录入时间"
+            :disabled="true"
+            clearable
+            size="small"
+          />
+        </el-table-column>
+        <el-table-column label="备注" align="center" width="120">
+          <el-input
+            slot-scope="scope"
+            v-model="scope.row.remark"
+            placeholder="请输入备注"
+            :disabled="browseStatus"
+            clearable
+            size="small"
+          />
+        </el-table-column>
+        <el-table-column
+          label="操作"
+          align="center"
+          class-name="small-padding fixed-width"
+        >
+          <template slot-scope="scope">
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              :disabled="browseStatus"
+              @click.native.prevent="
+                deleteRow(scope.$index, agreementitemsList)
+              "
+              >删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div slot="footer" class="dialog-footer">
+        <el-button
+          v-if="approvalProhibit"
+          @click="immediateApproval('f_billstatus')"
+          >审批</el-button
+        >
+        <el-button
+          v-if="form.fBillstatus > 2"
+          @click="viewAudit('f_billstatus')"
+          >查看审批</el-button
+        >
+        <el-button
+          type="primary"
+          @click="submitForm"
+          :disabled="determine || browseStatus"
+          >保 存</el-button
+        >
+        <el-button v-if="cancelButton === true" @click="cancel"
+          >取 消</el-button
+        >
+        <el-button v-if="cancelButton === false" @click="homePage"
+          >取 消</el-button
+        >
+        <add-or-update
+          v-if="addOrUpdateVisible"
+          ref="addOrUpdate"
+          @refreshDataList="getDataList"
+        ></add-or-update>
+        <approval-comments
+          v-if="addOrUpdateVisib"
+          ref="ApprovalComments"
+          @refreshDataList="returnData"
+        ></approval-comments>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+// import moment from "moment";
+// import {
+//   listAgreement,
+//   getAgreement,
+//   delAgreement,
+//   addAgreement,
+//   exportAgreement,
+//   listAgreementitems,
+//   queryUserVal,
+//   updateAgreements,
+//   collecTask,
+//   backCharge,
+//   revocation,
+// } from "@/api/agreement/agreement";
+// import { listCorps } from "@/api/basicdata/corps";
+// import { listGoods } from "@/api/basicdata/goods";
+// import { listFees } from "@/api/basicdata/fees";
+// import AddOrUpdate from "@/views/viewApproval";
+// import ApprovalComments from "@/views/startApproval";
+// import Global from "@/layout/components/global.js";
+import Vue from "vue";
+Vue.directive("dialogDrag", {
+  bind(el, binding, vnode, oldVnode) {
+    const dialogHeaderEl = el.querySelector(".el-dialog__header");
+    const dragDom = el.querySelector(".el-dialog");
+    const enlarge = el.querySelector(".enlarge");
+    dialogHeaderEl.style.cursor = "move";
+
+    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
+    const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
+    if (enlarge) {
+      enlarge.onclick = (e) => {
+        dragDom.style.top = "0px";
+        dragDom.style.left = "0px";
+      };
+    }
+    dialogHeaderEl.onmousedown = (e) => {
+      // 鼠标按下,计算当前元素距离可视区的距离
+      const disX = e.clientX - dialogHeaderEl.offsetLeft;
+      const disY = e.clientY - dialogHeaderEl.offsetTop;
+
+      // 获取到的值带px 正则匹配替换
+      let styL, styT;
+
+      // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
+      if (sty.left.includes("%")) {
+        styL =
+          +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
+        styT =
+          +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
+      } else {
+        styL = +sty.left.replace(/\px/g, "");
+        styT = +sty.top.replace(/\px/g, "");
+      }
+
+      document.onmousemove = function (e) {
+        // 通过事件委托,计算移动的距离
+        const l = e.clientX - disX;
+        const t = e.clientY - disY;
+
+        // 移动当前元素
+
+        if (t + styT >= 0) {
+          dragDom.style.top = `${t + styT}px`;
+        }
+        dragDom.style.left = `${l + styL}px`;
+        // 将此时的位置传出去
+        // binding.value({x:e.pageX,y:e.pageY})
+      };
+
+      document.onmouseup = function (e) {
+        document.onmousemove = null;
+        document.onmouseup = null;
+      };
+    };
+  },
+});
+
+export default {
+  name: "Agreement",
+  components: {
+    AddOrUpdate,
+    ApprovalComments,
+  },
+  data() {
+    return {
+      options: [
+        {
+          name: "出库",
+          key: "SJCK",
+        },
+        {
+          name: "入库",
+          key: "SJRK",
+        },
+        {
+          name: "调拨",
+          key: "CKDB",
+        },
+      ],
+      //全屏放大
+      dialogFull: false,
+      addOrEdid: 1,
+      idCopy: "",
+      stop: false,
+      lander: "",
+      operator: "",
+      dataList: "",
+      // 遮罩层
+      loading: true,
+      determine: false,
+      cancelButton: true,
+      approvalProhibit: false,
+      loading_s: false,
+      Xbutton: true,
+      browseStatus: false,
+      addOrUpdateVisible: false,
+      addOrUpdateVisib: false,
+      tablefilter: false,
+      // 计价单位
+      jFeetunitOptions: [
+        /*{ dictLabel: "件数", dictValue: "1" },
+        { dictLabel: "毛重", dictValue: "2" },
+        { dictLabel: "净重", dictValue: "3" },
+        { dictLabel: "尺码", dictValue: "4" },
+        { dictLabel: "固定", dictValue: "5" },*/
+      ],
+      goodsOptions: [],
+      fTypeidOptions: [],
+      // 选中数组
+      ids: [],
+      deptName: "",
+      // 客户(客户数据)
+      fMblnoOptions: [],
+      fFeeunitidOptions: [],
+      fWbuOptions: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 仓储费表格数据
+      agreementList: [],
+      // 弹出层标题
+      title: "",
+      open: false,
+      // 结算方式,也可以从表t_stltypes中下拉选择,存储id,显示name字典
+      fStltypeidOptions: [],
+      // 货物类别,存储t_packages,f_id 显示名称,可以多选t_packages 中的no或 name,模糊查找选择后,存储f_id,显示name字典
+      tPackagesOptions: [],
+      // 贸易方式,对应t_trademodels 字典
+      fTrademodeidOptions: [],
+      // 仓储费明细表表格数据
+      agreementitemsList: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        fBillno: null,
+        fDeptid: null,
+        fContractno: null,
+        fCorpid: null,
+        fStltypeid: null,
+        fGoodsid: null,
+        fFeetypeid: null,
+        tPackages: null,
+        fTrademodeid: null,
+        fFreedays: null,
+        fBegindate: null,
+        fEnddate: null,
+        fBillstatus: null,
+        fTaskType: null,
+        fDc: null,
+      },
+      // 表单参数
+      form: {
+        fTaskType: "1",
+        fDc: "D",
+        fBilltype: "",
+      },
+      // 表单校验
+      rules: {
+        fBillno: [
+          {
+            required: true,
+            message: " ",
+            trigger: "blur",
+          },
+        ],
+        fCorpid: [{ required: true, message: " ", trigger: "blur" }],
+        tPackages: [{ required: true, message: " ", trigger: "blur" }],
+        fBegindate: [{ required: true, message: " ", trigger: "blur" }],
+        fEnddate: [{ required: true, message: " ", trigger: "blur" }],
+      },
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("data_settlement_method").then((response) => {
+      this.fStltypeidOptions = response.data;
+    });
+    this.getDicts("data_package_unit").then((response) => {
+      this.tPackagesOptions = response.data;
+    });
+    this.getDicts("data_trademodes").then((response) => {
+      this.fTrademodeidOptions = response.data;
+    });
+    this.getDicts("data_goods_category").then((response) => {
+      this.fTypeidOptions = response.data;
+    });
+    this.getDicts("data_unitfees").then((response) => {
+      this.jFeetunitOptions = response.data;
+    });
+    let queryParams = { pageNum: 1, type: 1 };
+    listCorps(queryParams).then((response) => {
+      this.fMblnoOptions = response.rows;
+    });
+    this.register();
+  },
+  activated() {
+    this.adoPt();
+  },
+  methods: {
+    full() {
+      this.dialogFull = !this.dialogFull;
+    },
+    changefDc() {
+      if (this.form.fDc === "D") {
+        let queryParams = { pageNum: 1, pageSize: 10, fDc: "D" };
+        listFees(queryParams).then((response) => {
+          this.fWbuOptions = response.rows;
+        });
+      } else if (this.form.fDc === "C") {
+        let queryParams = { pageNum: 1, pageSize: 10, fDc: "C" };
+        listFees(queryParams).then((response) => {
+          this.fWbuOptions = response.rows;
+        });
+      }
+      if (this.agreementitemsList.length) {
+        this.$message.error("请重新选择费用名称");
+        for (let item in this.agreementitemsList) {
+          this.agreementitemsList[item].fFeeid = "";
+        }
+      }
+    },
+    // 默认录入人
+    register() {
+      queryUserVal().then((response) => {
+        this.lander = response.user.userName;
+      });
+    },
+    immediateApproval(status) {
+      this.addOrUpdateVisib = true;
+      this.$nextTick(() => {
+        this.$refs.ApprovalComments.init(this.approval.billId, status, 320);
+      });
+    },
+    adoPt() {
+      this.tablefilter = true;
+      this.approval = this.$route.query.data;
+      if (this.approval) {
+        this.cancelButton = false;
+        this.determine = true;
+        this.Xbutton = false;
+        this.tablefilter = true;
+        this.browseStatus = true;
+        this.approval = JSON.parse(this.approval);
+        this.approvalProhibit = true;
+        this.pass = {
+          fAmtdr: "", //应收合计
+          fAmtcr: "", //应付合计
+          fMblno: "", //提单号
+          fName: "", //货权方
+          fFeesName: "", //结算单位
+          fCorpid: "", //结算单位ID
+        };
+        getAgreement(this.approval.billId).then((response) => {
+          if (response.data.dept) {
+            this.deptName = response.data.dept.deptName
+              ? response.data.dept.deptName
+              : null;
+          }
+          this.form = response.data.tWarehouseAgreement;
+          this.$set(this.form, "fEnddate", Date.parse(this.form.fEnddate));
+          this.$set(this.form, "fBegindate", Date.parse(this.form.fBegindate));
+          this.agreementitemsList = response.data.tWarehouseAgreementitems;
+          for (let item in this.agreementitemsList) {
+            this.$set(
+              this.agreementitemsList[item],
+              "fFeeunitid",
+              this.agreementitemsList[item].fFeeunitid + ""
+            );
+          }
+          this.fWbuOptions = response.data.feesList;
+          this.open = true;
+          this.title = "修改作业费";
+        });
+      }
+    },
+    viewAudit(status) {
+      this.addOrUpdateVisible = true;
+      this.addOrUpdateVisib = false;
+      let id = "448";
+      let actId = "110";
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(this.form.fId, 320, status);
+      });
+    },
+    returnData() {
+      this.open = false;
+      this.addOrUpdateVisib = false;
+      this.homePage();
+    },
+    getDataList() {
+      this.addOrUpdateVisible = false;
+    },
+    homePage() {
+      let view = {
+        fullPath: "/agreement/agreementTask",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "AgreementTask",
+        params: Object,
+        path: "/agreement/agreementTask",
+        query: Object,
+        title: "作业费协议",
+      };
+      this.$router.push({ path: "/index" });
+      this.$store
+        .dispatch("tagsView/delView", view)
+        .then(({ visitedViews }) => {
+          if (this.isActive(view)) {
+            this.toLastView(visitedViews, view);
+          }
+        });
+      Global.$emit("removeCache", "closeSelectedTag", view);
+    },
+    /** 创建仓储费明细表列表 */
+    getList_s() {
+      queryUserVal().then((response) => {
+        this.agreementitemsList.push({
+          //行号
+          fLineno: "",
+          //计价单位
+          fFeeunitid: "",
+          //费用名称
+          fFeeid: "",
+          //开始天数
+          fFromdays: "",
+          //结束天数
+          fEndays: "",
+          //单价
+          fPrice: "",
+          //录入人
+          createBy: response.user.userName,
+          //创建时间
+          createTime: moment(Date.parse(new Date())).format(
+            "YYYY-MM-DD HH:mm:ss"
+          ),
+        });
+        if (response.dept) {
+          this.deptName = response.dept.deptName
+            ? response.dept.deptName
+            : null;
+        }
+        this.form.fDeptid = response.dept.deptId;
+        this.agreementitemsList.createBy = response.user.userName;
+      });
+    },
+    speed_s(row, res) {
+      this.stop = true;
+      this.determine = true;
+      this.tablefilter = true;
+      this.browseStatus = true;
+      this.approvalProhibit = false;
+      const fId = row.fId || this.ids;
+      getAgreement(fId).then((response) => {
+        if (response.data.dept) {
+          this.deptName = response.data.dept.deptName
+            ? response.data.dept.deptName
+            : null;
+        }
+        this.form = response.data.tWarehouseAgreement;
+        this.form.tPackages = this.form.tPackages
+          .replace(/\[|]/g, "")
+          .replace(/\"/g, "")
+          .split(",");
+        this.$set(this.form, "fTaskType", this.form.fTaskType + "");
+        this.$set(this.form, "fEnddate", Date.parse(this.form.fEnddate));
+        this.$set(this.form, "fBegindate", Date.parse(this.form.fBegindate));
+        this.operator = this.form.createBy;
+        this.agreementitemsList = response.data.tWarehouseAgreementitems;
+        if (response.data.tWarehouseAgreement.fBilltype) {
+          this.form.fBilltype = response.data.tWarehouseAgreement.fBilltype
+            .replace(/\[|]/g, "")
+            .replace(/\"/g, "")
+            .split(",");
+        }
+        for (let item in this.agreementitemsList) {
+          this.$set(
+            this.agreementitemsList[item],
+            "fFeeunitid",
+            this.agreementitemsList[item].fFeeunitid + ""
+          );
+        }
+        this.fWbuOptions = response.data.feesList;
+        this.open = true;
+        this.title = "查看作业费";
+      });
+    },
+    speed(row, res) {
+      this.register();
+      if (res === 1) {
+        this.tablefilter = false;
+      }
+      this.determine = true;
+      this.browseStatus = true;
+      this.approvalProhibit = false;
+      const fId = row.fId || this.ids;
+      getAgreement(fId).then((response) => {
+        if (response.data.dept) {
+          this.deptName = response.data.dept.deptName
+            ? response.data.dept.deptName
+            : null;
+        }
+        this.form = response.data.tWarehouseAgreement;
+        this.$set(this.form, "fEnddate", Date.parse(this.form.fEnddate));
+        this.$set(this.form, "fBegindate", Date.parse(this.form.fBegindate));
+        this.operator = this.form.createBy;
+        this.agreementitemsList = response.data.tWarehouseAgreementitems;
+        for (let item in this.agreementitemsList) {
+          this.$set(
+            this.agreementitemsList[item],
+            "fFeeunitid",
+            this.agreementitemsList[item].fFeeunitid + ""
+          );
+        }
+        this.fWbuOptions = response.data.feesList;
+        this.open = true;
+        this.title = "查看作业费";
+      });
+    },
+    revocationApproval(status) {
+      let data = {
+        id: this.form.fId,
+        actId: 320,
+        billId: this.form.fId,
+        fidStatus: status,
+      };
+      revocation(data).then((data) => {
+        if (data.code === 200) {
+          this.$message.success("撤销成功");
+          this.open = false;
+          this.getList();
+        }
+      });
+    },
+    // 请核
+    confirmCharge() {
+      if (this.agreementitemsList.length <= 0) {
+        this.$message.error("作业费明细为空无法操作");
+        return false;
+      }
+      for (let agr = 0; agr < this.agreementitemsList.length; agr++) {
+        if (!this.agreementitemsList[agr].fFeeid) {
+          this.$message.error("请维护费用名称");
+          return false;
+        }
+        if (!this.agreementitemsList[agr].fFeeunitid) {
+          this.$message.error("请维计价单位");
+          return false;
+        }
+        if (!this.agreementitemsList[agr].fPrice) {
+          this.$message.error("请维单价");
+          return false;
+        }
+      }
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          let formData = new window.FormData();
+          formData.append("agreement", JSON.stringify(this.form));
+          formData.append(
+            "agreementitems",
+            JSON.stringify(this.agreementitemsList)
+          );
+          collecTask(formData).then((response) => {
+            this.msgSuccess("请核成功");
+            this.open = false;
+            this.agreementitemsList = [];
+            this.getList();
+          });
+        }
+      });
+    },
+    // 撤销作业费
+    revokeCharge() {
+      this.form.fBillstatus = "1";
+      let formDate = new window.FormData();
+      formDate.append("agreement", JSON.stringify(this.form));
+      formDate.append(
+        "agreementitems",
+        JSON.stringify(this.agreementitemsList)
+      );
+      backCharge(formDate).then((response) => {
+        this.open = false;
+        this.msgSuccess("操作成功");
+        this.getList();
+      });
+    },
+    /* 远程模糊查询商品 */
+    goodsRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { fName: name };
+      listGoods(queryParams).then((response) => {
+        this.goodsOptions = response.rows;
+      });
+    },
+    // 计价单位
+    fFeeunitidFormat(row, column) {
+      return this.selectDictLabel(this.fFeeunitidOptions, row.fFeeunitid);
+    },
+    /** 查询作业费列表 */
+    getList() {
+      this.loading = true;
+      listAgreement(this.queryParams).then((response) => {
+        this.agreementList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 结算方式,也可以从表t_stltypes中下拉选择,存储id,显示name字典翻译
+    fStltypeidFormat(row, column) {
+      return this.selectDictLabel(this.fStltypeidOptions, row.fStltypeid);
+    },
+    // 货物类别,存储t_packages,f_id 显示名称,可以多选t_packages 中的no或 name,模糊查找选择后,存储f_id,显示name字典翻译
+    tPackagesFormat(row, column) {
+      // row.tPackages = row.tPackages
+      //   .replace(/\[|]/g, "")
+      //   .replace(/\"/g, "")
+      //   .split(",");
+      // return this.selectDictLabel(this.fTypeidOptions, row.tPackages);
+      let tPackages = row.tPackages
+        .replace(/\[|]/g, "")
+        .replace(/\"/g, "")
+        .split(",");
+      let changePackages = []
+      tPackages.forEach(item => {
+        let change = this.selectDictLabel(this.fTypeidOptions, item);
+        changePackages.push(change)
+      })
+      changePackages = changePackages.join(',')
+      return changePackages;
+    },
+    // 贸易方式,对应t_trademodels 字典翻译
+    fTrademodeidFormat(row, column) {
+      return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
+    },
+    // 取消按钮
+    cancel() {
+      this.idCopy = null;
+      this.reset();
+      this.getList();
+      this.open = false;
+    },
+    handleClose() {
+      this.reset();
+      this.getList();
+      this.open = false;
+    },
+    // 表单重置
+    reset() {
+      this.determine = false;
+      this.browseStatus = false;
+      this.agreementitemsList = [];
+      this.form = {
+        fId: null,
+        fBillno: null,
+        fDeptid: null,
+        fContractno: null,
+        fCorpid: null,
+        fStltypeid: null,
+        fGoodsid: null,
+        fFeetypeid: null,
+        tPackages: null,
+        fTrademodeid: null,
+        fFreedays: null,
+        fBegindate: null,
+        fEnddate: null,
+        fBillstatus: "0",
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null,
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    // 变更计价单位
+    changeFeeUnit(row) {
+      if (!row.fFeeUnitid) {
+        return false;
+      }
+      if (row.fFeeUnitid === "0") {
+        this.$set(row, "fQty", this.fCntqty);
+      } else if (row.fFeeUnitid === "1") {
+        this.$set(row, "fQty", this.fGrossweight);
+      }
+      if (row.fUnitprice) {
+        this.$set(
+          row,
+          "fAmount",
+          parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
+        );
+      }
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.fId);
+      this.idCopy = this.ids[0];
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    // 远程模糊查询费用名称
+    fWRemoteMethod(name) {
+      this.fWbuOptions = [];
+      if (name == null || name === "") {
+        return false;
+      }
+      let fDc = this.form.fDc;
+      let queryParams = { fName: name, fDc: fDc };
+      listFees(queryParams).then((response) => {
+        console.log(response);
+        this.fWbuOptions = response.rows;
+      });
+    },
+    // 作业费状态修改
+    handleStatusChange(row) {
+      if (row.fBillstatus == "6") {
+        let text = row.fStatus === "0" ? "启用" : "停用";
+        this.$confirm(
+          '确认要"' + text + '""' + row.fCorpid + '"用户吗?',
+          "警告",
+          {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          }
+        )
+          .then(function () {
+            return updateAgreements(row.fId, row.fStatus);
+          })
+          .then(() => {
+            this.msgSuccess(text + "成功");
+          })
+          .catch(function () {
+            row.fStatus = row.fStatus === "0" ? "1" : "0";
+          });
+      } else {
+        row.fStatus = 0;
+        this.$message.error("审核完成时才能启用");
+      }
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.stop = false;
+      this.determine = false;
+      this.browseStatus = false;
+      this.reset();
+      this.open = true;
+      this.title = "添加作业费";
+      this.form = {
+        fTaskType: "1",
+        fDc: "D",
+      };
+      queryUserVal().then((response) => {
+        if (response.dept) {
+          this.deptName = response.dept.deptName
+            ? response.dept.deptName
+            : null;
+        }
+        this.form.fDeptid = response.dept.deptId ? response.dept.deptId : null;
+      });
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row, num) {
+      if (num === 2) {
+        getAgreement(this.idCopy).then((response) => {
+          this.register();
+          if (response.data.dept) {
+            this.deptName = response.data.dept.deptName
+              ? response.data.dept.deptName
+              : null;
+          }
+          this.form = response.data.tWarehouseAgreement;
+          this.form.fId = null;
+          this.form.fBillstatus = "";
+          this.$set(this.form, "fTaskType", this.form.fTaskType + "");
+          this.$set(this.form, "fEnddate", Date.parse(this.form.fEnddate));
+          this.$set(this.form, "fBegindate", Date.parse(this.form.fBegindate));
+          this.operator = this.form.createBy;
+          this.agreementitemsList = response.data.tWarehouseAgreementitems;
+          for (let item in this.agreementitemsList) {
+            this.$set(
+              this.agreementitemsList[item],
+              "fFeeunitid",
+              this.agreementitemsList[item].fFeeunitid + ""
+            );
+          }
+          if (response.data.tWarehouseAgreement.tPackages) {
+            this.form.tPackages = this.form.tPackages
+              .replace(/\[|]/g, "")
+              .replace(/\"/g, "")
+              .split(",");
+          }
+          if (response.data.tWarehouseAgreement.fBilltype) {
+            this.form.fBilltype = response.data.tWarehouseAgreement.fBilltype
+              .replace(/\[|]/g, "")
+              .replace(/\"/g, "")
+              .split(",");
+          }
+          this.fWbuOptions = response.data.feesList;
+          this.open = true;
+          this.title = "修改作业费";
+        });
+      } else {
+        this.stop = false;
+        this.browseStatus = false;
+        this.determine = false;
+        this.reset();
+        this.cancelButton = true;
+        const fId = row.fId || this.ids;
+        getAgreement(fId).then((response) => {
+          console.log(response)
+          this.register();
+          if (response.data.dept) {
+            this.deptName = response.data.dept.deptName
+              ? response.data.dept.deptName
+              : null;
+          }
+          this.form = response.data.tWarehouseAgreement;
+          this.$set(this.form, "fTaskType", this.form.fTaskType + "");
+          this.$set(this.form, "fEnddate", Date.parse(this.form.fEnddate));
+          this.$set(this.form, "fBegindate", Date.parse(this.form.fBegindate));
+          this.operator = this.form.createBy;
+          this.agreementitemsList = response.data.tWarehouseAgreementitems;
+          for (let item in this.agreementitemsList) {
+            this.$set(
+              this.agreementitemsList[item],
+              "fFeeunitid",
+              this.agreementitemsList[item].fFeeunitid + ""
+            );
+          }
+          if (response.data.tWarehouseAgreement.tPackages) {
+            this.form.tPackages = this.form.tPackages
+              .replace(/\[|]/g, "")
+              .replace(/\"/g, "")
+              .split(",");
+          }
+          if (response.data.tWarehouseAgreement.fBilltype) {
+            this.form.fBilltype = response.data.tWarehouseAgreement.fBilltype
+              .replace(/\[|]/g, "")
+              .replace(/\"/g, "")
+              .split(",");
+          }
+          this.fWbuOptions = response.data.feesList;
+          this.open = true;
+          this.title = "修改作业费";
+        });
+      }
+    },
+    /** 远程模糊查询用户 */
+    corpsRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { pageNum: 1, fName: name, type: 1 };
+      listCorps(queryParams).then((response) => {
+        this.fMblnoOptions = response.rows;
+        this.KHblnoOptions = response.rows;
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.form.fBilltypeName = "";
+      if (this.addOrEdid == 2) {
+        this.$set(this.form, "fId", null);
+      }
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          let formData = new window.FormData();
+          for (let index in this.options) {
+            for (let item in this.form.fBilltype) {
+              console.log(this.options[index].key, this.form.fBilltype[item]);
+              if (this.options[index].key == this.form.fBilltype[item]) {
+                this.form.fBilltypeName += this.options[index].name + ",";
+              }
+            }
+          }
+          this.form.fBilltypeName = this.form.fBilltypeName.substring(
+            0,
+            this.form.fBilltypeName.length - 1
+          );
+          formData.append("agreement", JSON.stringify(this.form));
+          formData.append(
+            "agreementitems",
+            JSON.stringify(this.agreementitemsList)
+          );
+          addAgreement(formData).then((response) => {
+            this.msgSuccess("操作成功");
+            this.form = response.data.tWarehouseAgreement;
+            this.form.tPackages = this.form.tPackages
+              .replace(/\[|]/g, "")
+              .replace(/\"/g, "")
+              .split(",");
+            this.$set(this.form, "fTaskType", this.form.fTaskType + "");
+            this.$set(this.form, "fEnddate", Date.parse(this.form.fEnddate));
+            this.$set(
+              this.form,
+              "fBegindate",
+              Date.parse(this.form.fBegindate)
+            );
+            // this.form.fBilltype = response.data.tWarehouseAgreement.fBilltype.replace(/\[|]/g, '').replace(/\"/g, "").split(",")
+          });
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const fIds = row.fId || this.ids;
+      this.$confirm('是否确认删除作业费编号为"' + fIds + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return delAgreement(fIds);
+        })
+        .then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm("是否确认导出所有作业费数据项?", "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return exportAgreement(queryParams);
+        })
+        .then((response) => {
+          this.download(response.msg);
+        });
+    },
+    deleteRow(index, rows) {
+      rows.splice(index, 1);
+    },
+  },
+};
+</script>
+<style lang="scss">
+.avue-crud__dialog__header {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -ms-flex-align: center;
+  align-items: center;
+  -webkit-box-pack: justify;
+  -ms-flex-pack: justify;
+  justify-content: space-between;
+}
+.el-dialog__title {
+  color: rgba(0, 0, 0, 0.85);
+  font-weight: 500;
+  word-wrap: break-word;
+}
+.avue-crud__dialog__menu {
+  padding-right: 20px;
+  float: left;
+}
+.avue-crud__dialog__menu i {
+  color: #909399;
+  font-size: 15px;
+}
+.el-icon-full-screen {
+  cursor: pointer;
+}
+.el-icon-full-screen:before {
+  content: "\e719";
+}
+</style>

+ 18 - 6
src/views/approveData/configuration/mainList.json

@@ -89,12 +89,17 @@
     },
     {
       "label": "申请人",
-      "prop": "sendRealName",
+      "prop": "sendUserId",
       "overHidden": true,
       "search": true,
       "index": 7,
-      "width": 100
-    },
+      "width": 100,
+      "type": "select",
+      "props": {
+        "label": "name",
+        "value": "id"
+      }
+  },
     {
       "label": "申请日期",
       "prop": "sendTime",
@@ -123,25 +128,32 @@
       "index": 10
     },
     {
+      "label": "应收金额",
+      "prop": "amountReceivable",
+      "overHidden": true,
+      "width": 100,
+      "index": 11
+    },
+    {
       "label": "利润率",
       "prop": "grossProfitRate",
       "overHidden": true,
       "width": 100,
-      "index": 11
+      "index": 12
     },
     {
       "label": "利润",
       "prop": "grossProfit",
       "overHidden": true,
       "width": 100,
-      "index": 12
+      "index": 13
     },
     {
       "label": "订单备注",
       "prop": "orderRemark",
       "overHidden": true,
       "width": 100,
-      "index": 13
+      "index": 14
     }
   ]
 }

+ 5 - 0
src/views/approveData/index.vue

@@ -120,6 +120,7 @@ import { getList, approvePass } from "@/api/approveData/main";
 import checkSchedule from "@/components/check/checkSchedule";
 import check from "@/components/check/check";
 import { getUserInfo } from "@/api/system/user";
+import {gainUser} from "@/api/basicData/customerInquiry";
 let previousRouterName = "";
 let checkRefresh = "";
 export default {
@@ -173,6 +174,10 @@ export default {
       this.findObject(this.option.column, "auditStatus").dicData =
         res.data.data;
       });
+      gainUser().then(res => {
+        this.findObject(this.option.column, "sendUserId").dicData =
+            res.data.data;
+      });
       this.getWorkDicts("Approval_business_type").then(res => {
         console.log(res)
       this.findObject(this.option.column, "processType").dicData =

+ 11 - 9
src/views/landTransportation/dispatchingCars/index.vue

@@ -118,7 +118,7 @@
 <script>
 import detailPage from './detailPage'
 import {removeDelegationList, selectInvoiceList, totalList} from "@/api/landTransportation";
-
+import {businessStatisticsFrequency} from "@/api/wel";
 export default {
   name: "index",
   components: {
@@ -322,14 +322,16 @@ export default {
     }
   },
   mounted() {
-    let this_ = this;
-    this_.dispatchTimer = setInterval(function () {
-      if (JSON.parse(localStorage.getItem("saber-token")).content) {
-        totalList(2).then(res => {
-          this_.totalData = res.data.data
-        })
-      }
-    }, 10000)
+    businessStatisticsFrequency().then(res=>{
+      let this_ = this;
+      this_.dispatchTimer = setInterval(function () {
+        if (JSON.parse(localStorage.getItem("saber-token")).content) {
+          totalList(2).then(res => {
+            this_.totalData = res.data.data
+          })
+        }
+      },  Number(res.data.data[0].dictKey)*1000)
+    })
   },
   beforeDestroy() {
     clearInterval(this.dispatchTimer); //关闭

+ 9 - 6
src/views/landTransportation/driver/index.vue

@@ -178,6 +178,7 @@ import {
   confirmCompletion,
   fleetList, motorcadeDriver, fleetDriverSave, getAttachment, saveAttached, arrival,borrow
 } from "@/api/landTransportation";
+import {businessStatisticsFrequency} from "@/api/wel";
 
 export default {
   name: "index",
@@ -574,12 +575,14 @@ export default {
       this.goodsOptionCrud.searchMenuSpan = num * 8;
       this.goodsOptionCrud.searchMenuPosition = "right";
     }
-    let this_ = this
-    this_.driverTimer = setInterval(function(){
-      motorcadeDriver(4).then(res=>{
-        this_.totalData = res.data.data
-      })
-    },5000)
+    businessStatisticsFrequency().then(res=> {
+      let this_ = this
+      this_.driverTimer = setInterval(function () {
+        motorcadeDriver(4).then(res => {
+          this_.totalData = res.data.data
+        })
+      }, Number(res.data.data[0].dictKey) * 1000)
+    })
   },
   beforeDestroy() {
     clearInterval(this.driverTimer); //关闭

+ 9 - 6
src/views/landTransportation/motorcadeDriver/index.vue

@@ -219,6 +219,7 @@ import {
   fleetDriverSave, telephone, getAttachment, saveAttached, recordingDetails, changeVehicle
 } from "@/api/landTransportation";
 import {location} from "@/api/gaude";
+import {businessStatisticsFrequency} from "@/api/wel";
 
 export default {
   name: "index",
@@ -765,12 +766,14 @@ export default {
       this.entrustOptionTwoT.searchMenuSpan = num * 8;
       this.entrustOptionTwoT.searchMenuPosition = "right";
     }
-    let this_ = this
-    this_.dispatchACarTimer = setInterval(function(){
-      motorcadeDriver(3).then(res=>{
-        this_.totalData = res.data.data
-      })
-    },5000)
+    businessStatisticsFrequency().then(res=>{
+      let this_ = this
+      this_.dispatchACarTimer = setInterval(function(){
+        motorcadeDriver(3).then(res=>{
+          this_.totalData = res.data.data
+        })
+      },  Number(res.data.data[0].dictKey)*1000)
+    })
   },
   beforeDestroy() {
     this.map && this.map.destroy();

+ 41 - 34
src/views/landTransportation/placeAnOrder/detailPage.vue

@@ -36,40 +36,34 @@
         </el-button>
       </div>
       <div>
-        <el-button
-            class="el-button--small-yh add-customer-btn"
-            type="warning"
-            size="small"
-            v-if="goodsForm.status > 0"
-            :disabled="
+        <div class="el-button&#45;&#45;small-yh add-customer-btn">
+          <el-button
+              type="warning"
+              size="small"
+              v-if="goodsForm.status > 0"
+              :disabled="
             (this.roleName.indexOf('平台') !== -1
             ||this.roleName.indexOf('经理') !== -1
             ||this.roleName.indexOf('部门经理') !== -1
             ||this.roleName.indexOf('总经理') !== -1) && !(this.roleName.indexOf('admin') !== -1)"
-            :style="{marginRight: goodsForm.status == 2?'80px':'180px'}"
-            @click="confirmChange"
-        >变更
-        </el-button>
-        <el-button
-            class="el-button--small-yh add-customer-btn"
-            type="success"
-            v-if="goodsForm.status === 0 && typeTwo === false"
-            size="small"
-            style="margin-right: 80px;"
-            :disabled="type"
-            @click="submit(true)"
-        >提交
-        </el-button>
-        <el-button
-            class="el-button--small-yh add-customer-btn"
-            type="success"
-            v-if="goodsForm.status === 1"
-            size="small"
-            style="margin-right: 80px;"
-            @click="submit(false)"
-        >取消提交
-        </el-button>
-        <div class="el-button&#45;&#45;small-yh add-customer-btn">
+              @click="confirmChange"
+          >变更
+          </el-button>
+          <el-button
+              type="success"
+              v-if="goodsForm.status === 0 && typeTwo === false"
+              size="small"
+              :loading="type"
+              @click="submit(true)"
+          >提交
+          </el-button>
+          <el-button
+              type="success"
+              v-if="goodsForm.status === 1"
+              size="small"
+              @click="submit(false)"
+          >取消提交
+          </el-button>
           <el-button
               type="primary"
               :disabled="goodsForm.status >= 1"
@@ -1533,6 +1527,11 @@ export default {
           this.orderFilesList.forEach(item => item.id = '')
           //查询业务员
           this.salesmanQuery()
+          if (this.goodsForm.status == 2) {
+            if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('总调度') !== -1) {
+              this.goodsForm.status = 2
+            }
+          }
         })
       } else if (this.id.slice(0, 2) === '首页' || this.id.slice(0, 2) === '台账') {
         if (this.id.slice(0, 2) === '首页') {
@@ -1565,8 +1564,10 @@ export default {
           // })
           //查询业务员
           this.salesmanQuery()
-          if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('总调度') !== -1) {
-            this.goodsForm.status = 2
+          if (this.goodsForm.status == 2) {
+            if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1 || this.roleName.indexOf('总调度') !== -1) {
+              this.goodsForm.status = 2
+            }
           }
         })
       } else {
@@ -1595,8 +1596,10 @@ export default {
           // })
           //查询业务员
           this.salesmanQuery()
-          if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1) {
-            this.goodsForm.status = 2
+          if (this.goodsForm.status == 2){
+            if (this.roleName.indexOf('平台') !== -1 || this.roleName.indexOf('经理') !== -1 || this.roleName.indexOf('部门经理') !== -1 || this.roleName.indexOf('总经理') !== -1) {
+              this.goodsForm.status = 2
+            }
           }
         })
       }
@@ -2034,6 +2037,7 @@ export default {
                     item.arrivalTime = this.goodsForm.arrivalTime
                   }
                 })
+                this.type = true
                 saveSaveList({
                   ...this.goodsForm,
                   kind: '1',
@@ -2045,8 +2049,11 @@ export default {
                   saveDelegationList({
                     id: res.data.data
                   }).then(() => {
+                    this.type = false
                     this.$message.success('提交成功');
                     this.refreshData(res.data.data)
+                  }).finally(()=>{
+                    this.type = false
                   })
                 })
               } else {

+ 11 - 8
src/views/landTransportation/placeAnOrder/index.vue

@@ -182,6 +182,7 @@
 import detailPage from './detailPage'
 import {removeDelegationList, selectInvoiceList, totalList} from "@/api/landTransportation";
 import {getQueryString} from "@/util/util";
+import {businessStatisticsFrequency} from "@/api/wel";
 
 export default {
   name: "index",
@@ -412,14 +413,16 @@ export default {
     }
   },
   mounted() {
-    let this_ = this
-    this_.entrustTimer = setInterval(function () {
-      if (JSON.parse(localStorage.getItem("saber-token")).content) {
-        totalList(1).then(res => {
-          this_.totalData = res.data.data
-        })
-      }
-    }, 10000)
+    businessStatisticsFrequency().then(res=>{
+      let this_ = this
+      this_.entrustTimer = setInterval(function () {
+        if (JSON.parse(localStorage.getItem("saber-token")).content) {
+          totalList(1).then(res => {
+            this_.totalData = res.data.data
+          })
+        }
+      },  Number(res.data.data[0].dictKey)*1000)
+    })
   },
   beforeDestroy() {
     clearInterval(this.entrustTimer); //关闭

+ 1 - 1
src/views/warehousing/agreement/index.vue

@@ -1853,7 +1853,7 @@ export default {
     //自定义列重置
     async resetColumn(ref,option,optionBack,code) {
       this[option] = this[optionBack];
-      const inSave = await this.delColumnData(this.getColumnName(code), this.optionList);
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs[ref].$refs.dialogColumn.columnBox = false;

+ 49 - 49
src/views/warehousing/analysis/index.vue

@@ -34,16 +34,16 @@
         <el-col :xs="12" :sm="6">
           <el-form-item label="客户名称">
             <el-select
-              v-model="queryParams.fCorpid"
+              v-model="queryParams.corpid"
               clearable
               filterable
               placeholder="请输入客户名称"
             >
               <el-option
-                v-for="(item, index) in fMblnoOptions"
-                :key="index.fId"
-                :label="item.fName"
-                :value="item.fId"
+                v-for="(item, index) in mblnoOptions"
+                :key="index.id"
+                :label="item.name"
+                :value="item.id"
               ></el-option>
             </el-select>
           </el-form-item>
@@ -51,7 +51,7 @@
         <el-col :xs="12" :sm="6">
           <el-form-item label="提单号">
             <el-input
-              v-model="queryParams.fMblno"
+              v-model="queryParams.mblno"
               placeholder="请输入提单号"
               clearable
               style="width: 200px"
@@ -60,12 +60,12 @@
         </el-col>
         <el-col :xs="12" :sm="6">
           <el-form-item label="仓库">
-            <el-select v-model="queryParams.fWarehouseid" placeholder="请选择仓库库区" clearable filterable>
+            <el-select v-model="queryParams.warehouseid" placeholder="请选择仓库库区" clearable filterable>
               <el-option
                 v-for="(item, index) in warehouseOptions"
-                :key="index.fId"
-                :label="item.fName"
-                :value="item.fId"
+                :key="index.id"
+                :label="item.name"
+                :value="item.id"
               ></el-option>
             </el-select>
           </el-form-item>
@@ -73,7 +73,7 @@
         <el-col :xs="12" :sm="6">
           <el-form-item label="库管员">
             <el-select
-              v-model="queryParams.fStorekeeper"
+              v-model="queryParams.storekeeper"
               filterable
               clearable
               placeholder="请选择库管员"
@@ -92,7 +92,7 @@
         <el-col :xs="12" :sm="6">
           <el-form-item label="截止日期">
             <el-date-picker
-              v-model="queryParams.fBsdate"
+              v-model="queryParams.bsdate"
               type="date"
               value-format="yyyy-MM-dd"
               clearable
@@ -249,20 +249,20 @@
         v-if="item.show"
       >
         <template slot-scope="scope">
-          <span v-if="item.label == 'fBsdate'">
-            {{ scope.row.fBsdate | fBsdateFormat }}
+          <span v-if="item.label == 'bsdate'">
+            {{ scope.row.bsdate | bsdateFormat }}
           </span>
-          <span v-else-if="item.label == 'fMblno'">
+          <span v-else-if="item.label == 'mblno'">
             <el-link :underline="false" type="primary" v-if="activeName == 'outStock'">
-              <span @click="jumpPage(scope.row)">{{ scope.row.fMblno }}</span>
+              <span @click="jumpPage(scope.row)">{{ scope.row.mblno }}</span>
             </el-link>
-            <span v-else>{{ scope.row.fMblno }}</span>
+            <span v-else>{{ scope.row.mblno }}</span>
           </span>
-          <span v-else-if="item.label == 'fBilltype'">
-            {{ scope.row.fBilltype | billTypeFormat(billTypeList) }}
+          <span v-else-if="item.label == 'billtype'">
+            {{ scope.row.billtype | billTypeFormat(billTypeList) }}
           </span>
-          <span v-else-if="item.label == 'fCorpid'">
-            {{ scope.row.fCorpid | fMblnoFormat(fMblnoOptions) }}
+          <span v-else-if="item.label == 'corpid'">
+            {{ scope.row.corpid | mblnoFormat(mblnoOptions) }}
           </span>
           <span v-else>{{ scope.row[item.label] }}</span>
         </template>
@@ -304,7 +304,7 @@ export default {
       tableHeight: '300',
       // 显示搜索条件
       showSearch: true,
-      fMblnoOptions: [], //客户
+      mblnoOptions: [], //客户
       warehouseOptions: [], //仓库
       userOptions: [],
       billTypeList: [],
@@ -422,7 +422,7 @@ export default {
       tableDate:[
         {
           surface: "1",
-          label: "fBilltype",
+          label: "billtype",
           name: "业务类型",
           checked: 0,
           width: 100,
@@ -430,7 +430,7 @@ export default {
         },
         {
           surface: "2",
-          label: "fCorpid",
+          label: "corpid",
           name: "客户名称",
           checked: 0,
           width: 120,
@@ -438,7 +438,7 @@ export default {
         },
         {
           surface: "2",
-          label: "fName",
+          label: "name",
           name: "品名",
           checked: 0,
           width: 100,
@@ -446,7 +446,7 @@ export default {
         },
         {
           surface: "3",
-          label: "fMblno",
+          label: "mblno",
           name: "提单号",
           checked: 0,
           width: 130,
@@ -454,7 +454,7 @@ export default {
         },
         {
           surface: "4",
-          label: "fQty",
+          label: "qty",
           name: "件数",
           checked: 0,
           width: 80,
@@ -462,7 +462,7 @@ export default {
         },
         {
           surface: "5",
-          label: "fGrossweight",
+          label: "grossweight",
           name: "毛重",
           checked: 0,
           width: 120,
@@ -470,7 +470,7 @@ export default {
         },
         {
           surface: "6",
-          label: "fWarehouseInformation",
+          label: "warehouseInformation",
           name: "仓库",
           checked: 0,
           width: 150,
@@ -478,7 +478,7 @@ export default {
         },
         {
           surface: "7",
-          label: "fOriginalbilldate",
+          label: "originalbilldate",
           name: "入库日期",
           checked: 0,
           width: 150,
@@ -486,7 +486,7 @@ export default {
         },
         {
           surface: "8",
-          label: "fBsdate",
+          label: "bsdate",
           name: "出库日期",
           checked: 0,
           width: 150,
@@ -494,7 +494,7 @@ export default {
         },
         {
           surface: "9",
-          label: "fStorekeeper",
+          label: "storekeeper",
           name: "仓管员",
           checked: 0,
           width: 150,
@@ -535,9 +535,9 @@ export default {
       this.billTypeList = response.data;
     });
     listCorps({ type: 1 }).then((response) => {
-      this.fMblnoOptions = response.rows;
+      this.mblnoOptions = response.rows;
     });
-    listWarehousesss({fStatus: 0, delFlag: 0}).then((response) => {
+    listWarehousesss({status: 0, delFlag: 0}).then((response) => {
       this.warehouseOptions = response.rows;
     });
     queryClerkRoleList().then((response) => {
@@ -555,7 +555,7 @@ export default {
     })
   },
   filters: {
-    fBsdateFormat(row) {
+    bsdateFormat(row) {
       if (row) {
         const dateMat = new Date(row);
         const year = dateMat.getFullYear();
@@ -574,11 +574,11 @@ export default {
       });
       return type;
     },
-    fMblnoFormat(row, fMblnoOptions) {
+    mblnoFormat(row, mblnoOptions) {
       let name;
-      fMblnoOptions.map((e) => {
-        if (row == e.fId) {
-          name = e.fName;
+      mblnoOptions.map((e) => {
+        if (row == e.id) {
+          name = e.name;
         }
       });
       return name;
@@ -645,15 +645,15 @@ export default {
           sums[index] = "合计";
           return;
         }
-        if (column.property === "fGrossweight") {
-          values = data.map((item) => Number(item["fGrossweight"]));
+        if (column.property === "grossweight") {
+          values = data.map((item) => Number(item["grossweight"]));
         }
-        if (column.property === "fQty") {
-          values = data.map((item) => Number(item["fQty"]));
+        if (column.property === "qty") {
+          values = data.map((item) => Number(item["qty"]));
         }
         if (
-          column.property === "fGrossweight" ||
-          column.property === "fQty"
+          column.property === "grossweight" ||
+          column.property === "qty"
         ) {
           sums[index] = values.reduce((prev, curr) => {
             const value = Number(curr);
@@ -663,10 +663,10 @@ export default {
               return prev;
             }
           }, 0);
-          if (column.property === "fGrossweight") {
+          if (column.property === "grossweight") {
             sums[index] = (sums[index] / 1000).toFixed(4) + "(吨)";
           }
-          if (column.property === "fQty") {
+          if (column.property === "qty") {
             // sums[index] = sums[index].toFixed(2);
             sums[index] = sums[index];
           }
@@ -696,7 +696,7 @@ export default {
       }
       this.tableDate.forEach(item => {
         if (this.activeName == 'inStock') {
-          if (item.label == 'fBsdate') {
+          if (item.label == 'bsdate') {
             item.show = false
           }
         } else {
@@ -712,7 +712,7 @@ export default {
       if (this.activeName == 'outStock') {
         this.$router.push({
           path: "/business/outStock",
-          query: { id: row.fId },
+          query: { id: row.id },
         });
       }
     },

+ 255 - 30
src/views/warehousing/cargoClearance/index.vue

@@ -1,6 +1,52 @@
 <template>
   <div class="app-container">
-    <div v-show="pageShow">
+    <basic-container v-show="pageShow">
+      <avue-crud
+          ref="crud"
+          :option="option"
+          :search.sync="queryParams"
+          :data="warehousebillsList"
+          @resetColumn="resetColumn('crud','option','optionList',169)"
+          @saveColumn="saveColumn('crud','option','optionList',169)">
+        <template slot="menuLeft">
+          <el-button
+              type="primary"
+              icon="el-icon-plus"
+              size="mini"
+              @click="handleAdd"
+              v-hasPermi="['warehouseBusiness:stockTransfer:add']"
+          >新增
+          </el-button>
+          <el-button
+              type="success"
+              icon="el-icon-edit"
+              size="mini"
+              :disabled="single"
+              @click="handleUpdate"
+              v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
+          >修改
+          </el-button>
+          <el-button
+              type="warning"
+              icon="el-icon-download"
+              size="mini"
+              @click="handleExport"
+              v-hasPermi="['warehouseBusiness:stockTransfer:export']"
+          >导出
+          </el-button>
+          <el-button
+              type="info"
+              icon="el-icon-download"
+              size="mini"
+              :disabled="single"
+              @click="copyUpdate"
+              v-hasPermi="['agreement:agreementStorage:export']"
+          >复制新增
+          </el-button>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <div v-show="pageShow" v-if="false">
       <el-form
         :model="queryParams"
         ref="queryForm"
@@ -374,16 +420,14 @@
         show-summary
         :summary-method="getSum"
         ref="table"
-        :height="tableHeight"
-      >
+        :height="tableHeight">
         <el-table-column type="selection" width="60" fixed align="center" />
         <el-table-column
           type="index"
           label="行号"
           width="50"
           align="center"
-          fixed
-        />
+          fixed/>
         <el-table-column
           v-for="(item, index) in getRowList"
           :key="index"
@@ -393,15 +437,14 @@
           align="center"
           :fixed="item.fixed"
           :show-overflow-tooltip="true"
-          sortable
-        >
+          sortable>
           <template slot-scope="scope">
             <span v-if="item.label == 'fMblno'">
-              <el-link :underline="false" type="primary"
-                ><div @click="handleUpdate(scope.row)">
+              <el-link :underline="false" type="primary">
+                <div @click="handleUpdate(scope.row)">
                   {{ scope.row.fMblno }}
-                </div></el-link
-              >
+                </div>
+              </el-link>
             </span>
             <span v-else>{{ scope.row[item.label] }}</span>
           </template>
@@ -411,16 +454,15 @@
           align="center"
           class-name="small-padding fixed-width"
           min-width="200"
-          fixed="right"
-        >
+          fixed="right">
           <template slot-scope="scope">
             <el-button
               size="mini"
               type="text"
               icon="el-icon-edit"
               @click="handleUpdate(scope.row, true)"
-              v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
-              >查看
+              v-hasPermi="['warehouseBusiness:stockTransfer:edit']">
+              查看
             </el-button>
             <el-button
               size="mini"
@@ -429,11 +471,10 @@
               v-if="
                 scope.row.fBillstatus == '录入' ||
                 scope.row.fBillstatus == '暂存' ||
-                scope.row.fBillstatus == '驳回'
-              "
+                scope.row.fBillstatus == '驳回'"
               @click="handleUpdate(scope.row, false)"
-              v-hasPermi="['warehouseBusiness:stockTransfer:edit']"
-              >修改
+              v-hasPermi="['warehouseBusiness:stockTransfer:edit']">
+              修改
             </el-button>
             <el-button
               size="mini"
@@ -441,19 +482,16 @@
               icon="el-icon-delete"
               v-if="(scope.row.fItemsStatus == '待通关' || scope.row.fItemsStatus == '计划') && scope.row.isCreate == 1 || (scope.row.fItemsStatus == '待通关' || scope.row.fItemsStatus == '计划') && scope.row.isCreate == 0"
               @click="handleDelete(scope.row)"
-              v-hasPermi="['warehouseBusiness:stockTransfer:remove']"
-              >删除
+              v-hasPermi="['warehouseBusiness:stockTransfer:remove']">
+              删除
             </el-button>
             <el-button
               size="mini"
               type="text"
               icon="el-icon-delete"
-              v-if="
-                scope.row.fBillstatus == '请核' ||
-                scope.row.fBillstatus == '审核中'
-              "
-              @click="handleUpdate(scope.row, true)"
-              >审核进度
+              v-if=" scope.row.fBillstatus == '请核' || scope.row.fBillstatus == '审核中'"
+              @click="handleUpdate(scope.row, true)">
+              审核进度
             </el-button>
           </template>
         </el-table-column>
@@ -463,8 +501,7 @@
         :total="total"
         :page.sync="queryParams.pageNum"
         :limit.sync="queryParams.pageSize"
-        @pagination="getList"
-      />
+        @pagination="getList"/>
     </div>
     <add-or-update
       v-show="pageShow2"
@@ -508,6 +545,170 @@ export default {
   name: "plans",
   data() {
     return {
+      option:{},
+      optionList:{
+        border: true,
+        align: 'center',
+        stripe: true,
+        index: true,
+        menu: false,
+        addBtn: false,
+        editBtn: false,
+        delBtn: false,
+        height: "auto",
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        column:[
+          {
+            index: "0",
+            prop: "fMblno",
+            label: "提单号",
+            width: 200,
+            search: true,
+          },
+          {
+            index: "1",
+            prop: "createBy",
+            label: "制单人",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "2",
+            prop: "fStorekeeper",
+            label: "仓管员",
+            width: 100,
+          },
+          {
+            index: "3",
+            prop: "fItemsStatus",
+            label: "通关状态",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "4",
+            prop: "fCorpid",
+            label: "客户",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "6",
+            prop: "fProductName",
+            label: "品名",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "7",
+            prop: "fMarks",
+            label: "品牌",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "8",
+            prop: "fBsdate",
+            searchProp:"timeInterval",
+            label: "通关日期",
+            width: 100,
+            type:'datetime',
+            searchRange:true,
+            search:true,
+            unlinkPanels:true,
+            defaultTime: ['00:00:00', '23:59:59'],
+            format:'yyyy-MM-dd HH:mm:ss',
+            valueFormat:'yyyy-MM-dd HH:mm:ss',
+          },
+          {
+            index: "9",
+            prop: "fWarehouseid",
+            label: "调入仓库",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "10",
+            prop: "fInwarehouseid",
+            label: "调出仓库",
+            width: 100,
+          },
+          {
+            index: "11",
+            prop: "fPlanqty",
+            label: "计划通关件数",
+            width: 180,
+          },
+          {
+            index: "12",
+            prop: "fQty",
+            label: "通关件数",
+            width: 100,
+          },
+          {
+            index: "13",
+            prop: "fGrossweight",
+            label: "通关毛重(KG)",
+            width: 180,
+          },
+          {
+            index: "14",
+            prop: "fNetweight",
+            label: "通关净重(kg)",
+            width: 180,
+          },
+          {
+            index: "15",
+            prop: "fBusinessType",
+            label: "业务类别",
+            width: 100,
+          },
+          {
+            index: "16",
+            prop: "fFeeStatus",
+            label: "费用状态",
+            width: 100,
+            search: true,
+            type:'select',
+          },
+          {
+            index: "17",
+            prop: "fBillno",
+            label: "系统编号",
+            width: 100,
+            search: true,
+          },
+          {
+            index: "18",
+            prop: "fSbu",
+            label: "经营单位",
+            width: 100,
+            search: true,
+            type:'select',
+            showColumn: false,
+            hide:true
+          },
+          {
+            index: "19",
+            prop: "fTrademodeid",
+            label: "贸易方式",
+            width: 100,
+            search: true,
+            type:'select',
+            showColumn: false,
+            hide:true
+          }
+        ]
+      },
       tableHeight:'600',
       timer: "",
       pageShow: true,
@@ -704,7 +905,8 @@ export default {
   },
   // 使用子组件
   components: { draggable, AddOrUpdate },
-  created() {
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(169), this.optionList);
     let date = new Date();
     let lYear = parseInt(date.getFullYear())
     let lMonth = parseInt(date.getMonth())
@@ -766,6 +968,29 @@ export default {
     })
   },
   methods: {
+    //自定义列保存
+    async saveColumn(ref,option,optionBack,code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumn(ref,option,optionBack,code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
     // 获取当前月的第一天和最后一天
     // getMonth() {
     //   let date = new Date();

+ 1 - 1
src/views/warehousing/costModify/AddOrUpdate.vue

@@ -1109,7 +1109,7 @@ export default {
     //自定义列重置
     async resetColumn(ref,option,optionBack,code) {
       this[option] = this[optionBack];
-      const inSave = await this.delColumnData(this.getColumnName(code), this.optionList);
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs[ref].$refs.dialogColumn.columnBox = false;

+ 1 - 1
src/views/warehousing/costModify/index.vue

@@ -767,7 +767,7 @@ export default {
     //自定义列重置
     async resetColumn(ref,option,optionBack,code) {
       this[option] = this[optionBack];
-      const inSave = await this.delColumnData(this.getColumnName(code), this.optionList);
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs[ref].$refs.dialogColumn.columnBox = false;

+ 45 - 36
src/views/warehousing/warehouseCheck/index.vue

@@ -706,6 +706,7 @@ export default {
     return {
       optionTwo: {},
       optionTwoBack: {
+        border: true,
         align: 'center',
         stripe: true,
         index: true,
@@ -720,41 +721,48 @@ export default {
         searchIndex: 2,
         highlightCurrentRow: true,
         column: [{
-            index: "1",
-            prop: "warehouseFid",
-            label: "仓库名称",
-            width: 160,
-          },{
-            index: "2",
-            prop: "inspectorId",
-            label: "巡检人",
-            width: 160,
-          },{
-            index: "3",
-            prop: "inspectionDatetime",
-            label: "计划日期",
-            width: 160,
-          },{
-            index: "4",
-            prop: "updateTime",
-            label: "最新巡检日期",
-            width: 160,
-          },{
-            index: "5",
-            prop: "updateBy",
-            label: "最新巡检人",
-            width: 160,
-          },{
-            index: "6",
-            prop: "record",
-            label: "巡检记录",
-            width: 160,
-          },{
-            index: "6",
-            prop: "remark",
-            label: "备注",
-            width: 160,
-          }]
+          index: "1",
+          prop: "warehouseFid",
+          label: "仓库名称",
+          width: 160,
+          slot:true
+        }, {
+          index: "2",
+          prop: "inspectorId",
+          label: "巡检人",
+          width: 160,
+          slot:true
+        }, {
+          index: "3",
+          prop: "inspectionDatetime",
+          label: "计划日期",
+          width: 160,
+          type: "date",
+          format:'yyyy-MM-dd',
+          valueFormat:'yyyy-MM-dd',
+          cell:true
+        }, {
+          index: "4",
+          prop: "updateTime",
+          label: "最新巡检日期",
+          width: 160,
+        }, {
+          index: "5",
+          prop: "updateBy",
+          label: "最新巡检人",
+          width: 160,
+        }, {
+          index: "6",
+          prop: "record",
+          label: "巡检记录",
+          width: 160,
+        }, {
+          index: "6",
+          prop: "remark",
+          label: "备注",
+          width: 160,
+          cell:true
+        }]
       },
       option: {},
       optionBack: {
@@ -1103,7 +1111,7 @@ export default {
     //自定义列重置
     async resetColumn(ref, option, optionBack, code) {
       this[option] = this[optionBack];
-      const inSave = await this.delColumnData(this.getColumnName(code), this.optionList);
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs[ref].$refs.dialogColumn.columnBox = false;
@@ -1142,6 +1150,7 @@ export default {
     inputDetails() {
       if (this.form.tWarehouseCheckItemsList === null) this.form.tWarehouseCheckItemsList = []
       this.form.tWarehouseCheckItemsList.push({
+        $cellEdit:true,
         warehousename: '',
         warehouseFid: this.form.warehouseFid,
         latestinspectorid: '',