QuKatie 3 年 前
コミット
36cbbb3292

+ 25 - 0
src/api/warehouseBusiness/restructure.js

@@ -0,0 +1,25 @@
+// 保留小数四舍五入
+export function toSuperFixed(d) {
+  let s=this+"";
+  if(!d)d=0;
+  if(s.indexOf(".")==-1)s+=".";
+  s+=new Array(d+1).join("0");
+  if(new RegExp("^(-|\\+)?(\\d+(\\.\\d{0,"+(d+1)+"})?)\\d*$").test(s)){
+    let s="0"+RegExp.$2,pm=RegExp.$1,a=RegExp.$3.length,b=true;
+    if(a==d+2){
+      a=s.match(/\d/g);
+      if(parseInt(a[a.length-1])>4){
+        for(var i=a.length-2;i>=0;i--){
+          a[i]=parseInt(a[i])+1;
+          if(a[i]==10){
+            a[i]=0;
+            b=i!=1;
+          }else break;
+        }
+      }
+      s=a.join("").replace(new RegExp("(\\d+)(\\d{"+d+"})\\d$"),"$1.$2");
+
+    }if(b)s=s.substr(1);
+    return (pm+s).replace(/\.$/,"");
+  }return this+"";
+}

+ 36 - 0
src/api/warehouseBusiness/wareHouseModify.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+
+// 查询分页信息
+export function listWarehouseModify(query) {
+  return request({
+    url: '/warehouse/modify/list',
+    method: 'get',
+    params: query
+  })
+}
+// 查询详情
+export function detailWarehouseModify(fId) {
+  return request({
+    url: '/warehouse/modify',
+    method: 'get',
+    params: {
+      fId: fId
+    }
+  })
+}
+// 保存
+export function saveWarehouseModify(data) {
+  return request({
+    url: '/warehouse/modify',
+    method: 'put',
+    data: data
+  })
+}
+// 请核
+export function checkWarehouseModify(data) {
+  return request({
+    url: '/warehouse/modify',
+    method: 'post',
+    data: data
+  })
+}

+ 5 - 0
src/main.js

@@ -24,6 +24,9 @@ import Pagination from "@/components/Pagination";
 import RightToolbar from "@/components/RightToolbar"
 import echarts from "echarts";
 import '@/utils/dialog.js'
+import {toSuperFixed} from "./api/warehouseBusiness/restructure";
+// 解决浮点数的问题
+import _ from 'lodash';
 
 import Print from '@/components/plugs/print'
 Vue.use(Print) // 注册
@@ -58,6 +61,8 @@ Vue.prototype.msgError = function (msg) {
 Vue.prototype.msgInfo = function (msg) {
   this.$message.info(msg);
 }
+// number原型链绑定四舍五入的方法
+Number.prototype.toSuperFixed = toSuperFixed
 
 // 全局组件挂载
 Vue.component('Pagination', Pagination)

+ 854 - 0
src/views/Warehousing/costModify/AddOrUpdate.vue

@@ -0,0 +1,854 @@
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="showDialog"
+    width="80%"
+    :close-on-click-modal="false"
+    @close="handleClose"
+  >
+    <el-form
+      ref="form"
+      :model="form"
+      label-width="110px"
+    >
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="业务类型" prop="">
+            <el-select
+              placeholder="请选择原业务类型"
+              clearable
+              size="small"
+              style="width: 100%"
+              :disabled="isDisabled"
+            >
+              <el-option
+                v-for="(dict, index) in billTypeList"
+                :key="index.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="客户名称">
+            <el-select
+              placeholder="请选择客户名称"
+              clearable
+              size="small"
+              style="width: 100%"
+              :disabled="isDisabled"
+            >
+              <el-option
+                v-for="(dict, index) in fMblnoOptions"
+                :key="index.fId"
+                :label="dict.fName"
+                :value="dict.fId"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="系统编码" prop="">
+            <el-input
+              placeholder="请输入系统编码"
+              size="small"
+              style="width: 100%"
+              :disabled="isDisabled"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="提单号" prop="">
+            <el-input
+              placeholder="请输入提单号"
+              size="small"
+              style="width: 100%"
+              :disabled="isDisabled"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label="业务日期" prop="">
+            <el-date-picker
+              type="daterange"
+              value-format="yyyy-MM-dd"
+              clearable
+              style="width: 100%"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              :disabled="isDisabled"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="仓库" prop="">
+            <el-input
+              placeholder="请输入仓库"
+              size="small"
+              style="width: 100%"
+              :disabled="isDisabled"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label="品名" prop="">
+            <el-input
+              placeholder="请输入品名"
+              size="small"
+              style="width: 100%"
+              :disabled="isDisabled"
+            ></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <div style="display: flex;justify-content: flex-end">
+            <el-button
+              type="primary"
+              v-if="!isDisabled"
+            >查询</el-button>
+          </div>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <el-collapse v-model="collapselist">
+      <el-collapse-item :name="1">
+        <template slot="title">
+            <span style="font-size: 16px; font-weight: bolder; margin-left: 5px"
+            >原业务费用信息</span>
+        </template>
+
+        <el-row :gutter="10" style="padding-bottom: 10px">
+          <div style="display: flex;justify-content: flex-end">
+            <div style="margin: 0 12px">
+              <el-button
+                icon="el-icon-setting"
+                size="mini"
+                circle
+                @click="showSetting = !showSetting"
+              ></el-button>
+            </div>
+          </div>
+        </el-row>
+
+        <el-dialog title="自定义列显示" append-to-body :visible.sync="showSetting" width="700px">
+          <div>配置排序列数据(拖动调整顺序)</div>
+          <div style="margin-left: 17px">
+            <el-checkbox
+              v-model="allCheck"
+              label="全选"
+              @change="allChecked"
+            ></el-checkbox>
+          </div>
+          <div style="padding: 4px; display: flex; justify-content: center">
+            <draggable
+              v-model="setRowList"
+              group="site"
+              animation="300"
+              @start="onStart"
+              @end="onEnd"
+              handle=".indraggable"
+            >
+              <transition-group>
+                <div
+                  v-for="item in setRowList"
+                  :key="item.surface"
+                  class="listStyle"
+                >
+                  <div style="width: 500px" class="indraggable">
+                    <div class="progress" :style="{ width: item.width + 'px' }">
+                      <el-checkbox
+                        :label="item.name"
+                        v-model="item.checked"
+                        :true-label="0"
+                        :false-label="1"
+                      >{{ item.name }}
+                      </el-checkbox>
+                    </div>
+                  </div>
+                  <el-input-number
+                    v-model.number="item.width"
+                    controls-position="right"
+                    :min="1"
+                    :max="500"
+                    size="mini"
+                  ></el-input-number>
+                </div>
+              </transition-group>
+            </draggable>
+          </div>
+          <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button @click="delRow" type="danger">重 置</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+        </el-dialog>
+
+        <el-table :data="feesList" style="width: 100%">
+          <el-table-column
+            v-for="(item, index) in getRowList"
+            :key="index"
+            :label="item.name"
+            :width="item.width"
+            :prop="item.label"
+            align="center"
+            sortable
+            :fixed="item.fixed"
+          >
+            <template slot-scope="scope">
+              <span id="span1" v-if="item.label == 'fCorpid'">
+                <el-select
+                  v-model="scope.row.fCorpid"
+                  placeholder="请输入客户名称"
+                  :clearable="true"
+                  filterable
+                  size="mini"
+                  :disabled="true"
+                >
+                    <el-option
+                      v-for="(dict, index) in fMblnoOptions"
+                      :key="index.fId"
+                      :label="dict.fName"
+                      :value="dict.fId"
+                    />
+                </el-select>
+              </span>
+              <span v-else-if="item.label == 'fFeeid'">
+                <el-select
+                  v-model="scope.row.fFeeid"
+                  filterable
+                  :disabled="true"
+                  remote
+                  placeholder="费用名称"
+                >
+                    <el-option
+                      v-for="(dict, index) in fCNameOptions"
+                      :key="index.fId"
+                      :label="dict.fName"
+                      :value="dict.fId"
+                    ></el-option>
+                </el-select>
+              </span>
+              <span v-else-if="item.label == 'fDc'">
+                 <el-select
+                   v-model="scope.row.fDc"
+                   placeholder="请选择"
+                   :disabled="true"
+                 >
+                  <el-option label="收" value="D"></el-option>
+                  <el-option label="付" value="C"></el-option>
+                </el-select>
+              </span>
+              <span v-else-if="item.label == 'fFeeunitid'">
+                 <el-select
+                   v-model="scope.row.fFeeunitid"
+                   placeholder="请选择计费单位"
+                   :disabled="true"
+                   clearable
+                 >
+                    <el-option
+                      v-for="dict in jFeetunitOptions"
+                      :key="dict.dictValue"
+                      :label="dict.dictLabel"
+                      :value="dict.dictValue"
+                    />
+                </el-select>
+              </span>
+              <span v-else-if="item.label == 'fBillingQty'">
+                 <el-input
+                   v-model="scope.row.fBillingQty"
+                   :disabled="true"
+                   placeholder="请输入计费数量"
+                   @input="total(scope.row)"
+                   v-input-limit="2"
+                 ></el-input>
+              </span>
+              <span v-else-if="item.label == 'fUnitprice'">
+                 <el-input
+                   v-model="scope.row.fUnitprice"
+                   :disabled="true"
+                   placeholder="请输入单价"
+                   @input="total(scope.row)"
+                   v-input-limit="2"
+                 ></el-input>
+              </span>
+              <span v-else-if="item.label == 'fCurrency'">
+                <el-input
+                  v-model="scope.row.fCurrency"
+                  :disabled="true"
+                  placeholder="请输入币种"
+                ></el-input>
+              </span>
+              <span v-else-if="item.label == 'fExrate'">
+                <el-input
+                  v-model="scope.row.fExrate"
+                  :disabled="true"
+                  placeholder="请输入汇率"
+                ></el-input>
+              </span>
+              <span v-else-if="item.label == 'fAmount'">
+                <el-input
+                  v-model="scope.row.fAmount"
+                  :disabled="true"
+                  placeholder="请输入金额"
+                ></el-input>
+              </span>
+              <span v-else-if="item.label == 'fTaxrate'">
+                <el-input
+                  v-model="scope.row.fTaxrate"
+                  :disabled="true"
+                  placeholder="请输入税率"
+                ></el-input>
+              </span>
+              <span v-else-if="item.label == 'remarks'">
+                <el-input
+                  v-model="scope.row.remarks"
+                  :disabled="true"
+                  placeholder="请输入备注"
+                ></el-input>
+              </span>
+              <span v-else-if="item.label == 'actId'">
+                <span v-if="scope.row.actId == 1080">费用确认</span>
+                <span v-if="scope.row.actId == 1090">追加费用</span>
+                <span v-if="scope.row.actId == 1100">费用变更</span>
+              </span>
+              <span v-else>{{ scope.row[item.label] }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="操作"
+            align="center"
+            class-name="small-padding fixed-width"
+            fixed="right"
+            width="100px"
+          >
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-circle-plus"
+                @click.native.prevent="change(scope.row)"
+              >导入</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-collapse-item>
+
+      <el-collapse-item :name="2">
+        <template slot="title">
+            <span style="font-size: 16px; font-weight: bolder; margin-left: 5px"
+            >更改费用信息</span>
+        </template>
+        <div>
+          <div style="display: flex; justify-content: space-between; margin: 10px 0">
+            <div>
+              <el-button
+                type="primary"
+                icon="el-icon-plus"
+                size="mini"
+              >保 存</el-button>
+            </div>
+          </div>
+        </div>
+        <el-table :data="formfeesList" style="width: 100%">
+          <el-table-column
+            prop="fCorpid"
+            label="结算单位"
+            align="center"
+            width="180"
+          >
+            <template slot-scope="scope">
+              <el-select
+                v-model="scope.row.fCorpid"
+                placeholder="请输入计算单位"
+                :clearable="true"
+                filterable
+                size="mini"
+                style="width: 160px"
+                :disabled="disabledtwo"
+              >
+                <el-option
+                  v-for="(dict, index) in fMblnoOptions"
+                  :key="index.fId"
+                  :label="dict.fName"
+                  :value="dict.fId"
+                />
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="fFeeid"
+            label="费用名称"
+            align="center"
+            width="120"
+          >
+            <template slot-scope="scope">
+              <el-select
+                v-model="scope.row.fFeeid"
+                filterable
+                :disabled="disabledtwo"
+                remote
+                placeholder="费用名称"
+              >
+                <el-option
+                  v-for="(dict, index) in fCNameOptions"
+                  :key="index.fId"
+                  :label="dict.fName"
+                  :value="dict.fId"
+                ></el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column prop="fDc" label="收付" align="center" width="100">
+            <template slot-scope="scope">
+              <el-select
+                v-model="scope.row.fDc"
+                placeholder="请选择"
+                :disabled="disabledtwo"
+              >
+                <el-option label="收" value="D"></el-option>
+                <el-option label="付" value="C"></el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="fFeeunitid"
+            label="计费单位"
+            align="center"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-select
+                v-model="scope.row.fFeeunitid"
+                placeholder="请选择计费单位"
+                :disabled="disabledtwo"
+                clearable
+              >
+                <el-option
+                  v-for="dict in jFeetunitOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                />
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="fBillingQty"
+            label="计费数量"
+            align="center"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.fBillingQty"
+                :disabled="disabledtwo"
+                placeholder="请输入内容"
+                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                @input="total(scope.row)"
+              ></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="fUnitprice"
+            label="单价"
+            align="center"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.fUnitprice"
+                :disabled="disabledtwo"
+                placeholder="请输入内容"
+                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                @input="total(scope.row)"
+              ></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="fCurrency"
+            label="币种"
+            align="center"
+            width="100">
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.fCurrency"
+                :disabled="disabledtwo"
+                placeholder="请输入内容"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="fExrate" label="汇率" align="center" width="100">
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.fExrate"
+                :disabled="disabledtwo"
+                placeholder="请输入内容"
+              ></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="fAmount" label="金额" align="center" width="100">
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.fAmount"
+                :disabled="disabledtwo"
+                placeholder="请输入内容"
+              ></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+            prop="fTaxrate"
+            label="税率"
+            align="center"
+            width="100"
+          >
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.fTaxrate"
+                :disabled="disabledtwo"
+                placeholder="请输入内容"
+              ></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="remarks" label="费用来源" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.actId == 1080">费用确认</span>
+              <span v-if="scope.row.actId == 1090">追加费用</span>
+              <span v-if="scope.row.actId == 1100">费用变更</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="remarks" label="录入人" align="center"></el-table-column>
+          <el-table-column prop="remarks" label="录入日期" align="center"></el-table-column>
+          <el-table-column prop="remarks" label="审核人" align="center"></el-table-column>
+          <el-table-column prop="remarks" label="审核日期" align="center"></el-table-column>
+          <el-table-column prop="remarks" label="备注" align="center" width="180">
+            <template slot-scope="scope">
+              <el-input
+                v-model="scope.row.remarks"
+                :disabled="disabledtwo"
+                placeholder="请输入内容"
+              ></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+            label="操作"
+            align="center"
+            class-name="small-padding fixed-width"
+            fixed="right"
+            width="140px"
+          >
+            <template slot-scope="scope">
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                :disabled="scope.row.fBillstatus === 6"
+                @click.native.prevent="deleteRow(scope,scope.$index)"
+              >删除</el-button>
+              <el-button
+                size="mini"
+                type="text"
+                icon="el-icon-delete"
+                :disabled="scope.row.fBillstatus === 6"
+                v-if="scope.row.fId"
+                @click.native.prevent="changerequest(scope)"
+              >请核</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-collapse-item>
+    </el-collapse>
+
+    <span slot="footer">
+      <el-button
+        type="success"
+        @click="submitAllowChanges"
+        v-hasPermi="['fleet:vehicleStatus:edit']"
+      >修 改</el-button>
+      <el-button
+        type="primary"
+        v-hasPermi="['fleet:vehicleStatus:edit']"
+      >保 存</el-button>
+      <el-button @click="showDialog = false;disabledtwo = true">取 消</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { listCorps } from "@/api/basicdata/corps";
+import {listFees} from "@/api/basicdata/fees";
+import { addSet, resetModule, select } from '@/api/system/set';
+import Cookies from 'js-cookie';
+import draggable from "vuedraggable";
+
+export default {
+  name: "AddOrUpdate",
+  props: {
+    addOrUpdateVisible: {
+      type: Boolean,
+      default: false,
+    },
+    title: {
+      type: String,
+      required: ''
+    },
+    form: Object,
+    // 原业务费用信息表
+    feesList: {
+      type: Array,
+      default: () => [{fCorpid: 156},{fCorpid: 166}],
+    },
+    // 更改费用信息
+    formfeesList: {
+      type: Array,
+      default: () => [],
+    },
+    // 新增FALSE,查看/跳转TRUE
+    isDisabled: {
+      type: Boolean
+    }
+  },
+  components: {
+    draggable,
+  },
+  data() {
+    return {
+      // 控制弹出框显示隐藏
+      showDialog: false,
+      // 表单
+      form: {},
+      // 折叠面板激活
+      collapselist: [1, 2],
+      billTypeList: [],
+      fMblnoOptions: [],
+      tableDate: [
+        {
+          surface: "1",
+          label: "fCorpid",
+          name: "结算单位",
+          checked: 0,
+          width: 150,
+        },
+        {
+          surface: "2",
+          label: "fFeeid",
+          name: "费用名称",
+          checked: 0,
+          width: 120,
+        },
+        {
+          surface: "3",
+          label: "fDc",
+          name: "收付",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "fFeeunitid",
+          name: "计费单位",
+          checked: 0,
+          width: 120,
+        },
+        {
+          surface: "5",
+          label: "fBillingQty",
+          name: "计费数量",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "6",
+          label: "fUnitprice",
+          name: "单价",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "7",
+          label: "fCurrency",
+          name: "币种",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "8",
+          label: "fExrate",
+          name: "汇率",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "9",
+          label: "fAmount",
+          name: "金额",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "10",
+          label: "fTaxrate",
+          name: "税率",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "11",
+          label: "remarks",
+          name: "备注",
+          checked: 0,
+          width: 150,
+        },
+        {
+          surface: "12",
+          label: "actId",
+          name: "费用来源",
+          checked: 0,
+          width: 100,
+        },
+      ],
+      setRowList: [],
+      getRowList: [],
+      // 自定义列弹窗显示
+      showSetting: false,
+      //自定义列宽
+      allCheck: false,
+      drag: false,
+      fCNameOptions: [],
+      jFeetunitOptions: [],
+      disabledtwo: false,
+    }
+  },
+  created() {
+    this.setRowList = this.tableDate;
+    this.getRowList = this.tableDate;
+    this.getDicts("data_billtype_type").then((response) => {
+      console.log(response)
+      this.billTypeList = response.data;
+    });
+    this.getDicts("data_unitfees").then((response) => {
+      if (response.data) {
+        this.jFeetunitOptions = response.data;
+      }
+    });
+    listCorps().then((response) => {
+      this.fMblnoOptions = response.rows;
+    });
+    listFees().then((response) => {
+      this.fCNameOptions = response.rows;
+    });
+  },
+  watch: {
+    addOrUpdateVisible(oldVal, newWal) {
+      this.showDialog = this.addOrUpdateVisible;
+    }
+  },
+  methods: {
+    // 弹出框关闭后触发
+    handleClose() {
+      // 子组件调用父组件方法,并传递参数
+      this.disabledtwo = true
+      this.$emit("changeShow", "false");
+      this.cntrIdList.forEach((item) => (item.noOption = false));
+      this.collapses = [];
+    },
+    //变更按钮
+    change(row){
+      console.log(row)
+      let list = JSON.parse(JSON.stringify(row))
+      list.fId = ''
+      list.fBillstatus = ''
+      list.actId = 1100
+      this.formfeesList.push(list)
+      // for (let item in this.formfeesList){
+      //   if (scope.row.fId === this.formfeesList[item].fId) {
+      //     this.$message({
+      //       showClose: true,
+      //       message: '已有相同单据',
+      //       type: 'error'
+      //     });
+      //     return
+      //   }
+      // }
+    },
+    //內容删除
+    deleteRow(rows,index) {
+      if (rows.row.fId){
+        deleteList(rows.row.fId).then(res => {
+          this.formfeesList.splice(index, 1);
+        })
+      }else {
+        this.formfeesList.splice(index, 1);
+      }
+    },
+    //修改
+    submitAllowChanges() {
+      this.msgSuccess("允许修改");
+      this.disabledtwo = false
+    },
+
+    //列设置全选
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
+    //重置列表
+    delRow() {
+      this.data = {
+        tableName: "费用变更",
+        userId: Cookies.get("userName"),
+      };
+      resetModule(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.setRowList = this.tableDate;
+          console.log(this.setRowList)
+          this.getRowList = this.tableDate;
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "船舶信息",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+      });
+    },
+    total(row) {
+      if (row.fBillingQty && row.fUnitprice) {
+        this.$set(row, "fAmount", (Number(row.fBillingQty) * Number(row.fUnitprice)).toFixed(2));
+      } else {
+        this.$set(row, "fAmount", 0);
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+
+</style>

+ 705 - 0
src/views/Warehousing/costModify/index.vue

@@ -0,0 +1,705 @@
+<template>
+  <div class="app-container">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      v-show="showSearch"
+      label-width="100px"
+      size="mini"
+    >
+      <el-row>
+        <el-col :span="6">
+          <el-form-item label-width="100px" label="系统编号" prop="mblno">
+            <el-input
+              v-model="queryParams.mblno"
+              placeholder="请输入系统编号"
+              clearable
+              size="small"
+              @keyup.enter.native="handleQuery"
+              style="max-width: 199px"
+            />
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label-width="100px" label="制单日期" prop="mblno">
+            <el-date-picker
+              type="daterange"
+              value-format="yyyy-MM-dd"
+              clearable
+              style="width: 199px"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              @keyup.enter.native="handleQuery"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label-width="100px" label="制单人" prop="">
+            <el-select
+              v-model="queryParams.corpId"
+              placeholder="请输入制单人"
+              clearable
+              size="small"
+              filterable
+            >
+              <el-option
+                v-for="(dict, index) in fMblnoOptions"
+                :key="index.fId"
+                :label="dict.fName"
+                :value="dict.fId"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :span="6">
+          <el-form-item label-width="100px" label="原业务类型" prop="billType">
+            <el-select
+              v-model="queryParams.billType"
+              placeholder="请选择原业务类型"
+              clearable
+              size="small"
+            >
+              <el-option
+                v-for="(dict, index) in billTypeList"
+                :key="index.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              />
+            </el-select>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-collapse-transition>
+        <div v-show="show">
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="原客户名称" prop="corpId">
+                <el-select
+                  v-model="queryParams.corpId"
+                  placeholder="请输入原客户名称"
+                  clearable
+                  size="small"
+                  filterable
+                >
+                  <el-option
+                    v-for="(dict, index) in fMblnoOptions"
+                    :key="index.fId"
+                    :label="dict.fName"
+                    :value="dict.fId"
+                  />
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label-width="100px" label="原系统编号" prop="">
+                <el-input
+                  placeholder="请输入原系统编号"
+                  clearable
+                  size="small"
+                  @keyup.enter.native="handleQuery"
+                  style="max-width: 199px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label-width="100px" label="原提单号" prop="">
+                <el-input
+                  placeholder="请输入原提单号"
+                  clearable
+                  size="small"
+                  @keyup.enter.native="handleQuery"
+                  style="max-width: 199px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label-width="100px" label="原业务日期" prop="">
+                <el-date-picker
+                  type="daterange"
+                  value-format="yyyy-MM-dd"
+                  clearable
+                  style="width: 199px"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                  @keyup.enter.native="handleQuery"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+      </el-collapse-transition>
+    </el-form>
+    <el-row :gutter="10" style="padding-bottom: 10px">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['fleet:plans: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="['warehouseBusiness:inStock:edit']"
+        >修改
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['warehouseBusiness:inStock:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <div class="tabSetting">
+        <div style="margin-right: 20px">
+          <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-button
+            v-show="show"
+            @click="show = !show"
+            icon="el-icon-arrow-up"
+            size="mini"
+          >展开</el-button
+          >
+          <el-button
+            v-show="!show"
+            @click="show = !show"
+            icon="el-icon-arrow-down"
+            size="mini"
+          >展开</el-button
+          >
+        </div>
+        <right-toolbar
+          :showSearch.sync="showSearch"
+          @queryTable="getList"
+        ></right-toolbar>
+        <div style="margin: 0 12px">
+          <el-button
+            icon="el-icon-setting"
+            size="mini"
+            circle
+            @click="showSetting = !showSetting"
+          ></el-button>
+        </div>
+      </div>
+    </el-row>
+
+    <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
+      <div>配置排序列数据(拖动调整顺序)</div>
+      <div style="margin-left: 17px">
+        <el-checkbox
+          v-model="allCheck"
+          label="全选"
+          @change="allChecked"
+        ></el-checkbox>
+      </div>
+      <div style="padding: 4px; display: flex; justify-content: center">
+        <draggable
+          v-model="setRowList"
+          group="site"
+          animation="300"
+          @start="onStart"
+          @end="onEnd"
+          handle=".indraggable"
+        >
+          <transition-group>
+            <div
+              v-for="item in setRowList"
+              :key="item.surface"
+              class="listStyle"
+            >
+              <div style="width: 500px" class="indraggable">
+                <div class="progress" :style="{ width: item.width + 'px' }">
+                  <el-checkbox
+                    :label="item.name"
+                    v-model="item.checked"
+                    :true-label="0"
+                    :false-label="1"
+                  >{{ item.name }}
+                  </el-checkbox>
+                </div>
+              </div>
+              <el-input-number
+                v-model.number="item.width"
+                controls-position="right"
+                :min="1"
+                :max="500"
+                size="mini"
+              ></el-input-number>
+            </div>
+          </transition-group>
+        </draggable>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button @click="delRow" type="danger">重 置</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+    </el-dialog>
+
+    <el-table
+      v-loading="loading"
+      :data="costModifyList"
+      @selection-change="handleSelectionChange"
+      style="width: 100%"
+      ref="table"
+      :height="tableHeight"
+    >
+      <el-table-column type="selection" width="55" align="center" fixed="left" />
+      <el-table-column
+        v-for="(item, index) in getRowList"
+        :key="index"
+        :label="item.name"
+        :width="item.width"
+        :prop="item.label"
+        align="center"
+        :show-overflow-tooltip="true"
+        sortable
+        :fixed="item.fixed"
+      >
+      </el-table-column>
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+        fixed="right"
+        width="150px"
+      >
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >查看</el-button
+          >
+          <!-- <el-button
+            v-if="scope.row.billStatus != 6"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['fleet:plans:edit']"
+            >修改</el-button
+          > -->
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['fleet:plans:remove']"
+          >删除</el-button
+          >
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <add-or-update
+      ref="addOrUpdateRef"
+      :title="title"
+      :isDisabled="formDisabled"
+      :addOrUpdateVisible="addOrUpdateVisible"
+      @changeShow="showAddOrUpdate"
+    ></add-or-update>
+  </div>
+</template>
+
+<script>
+import { listCorps } from "@/api/basicdata/corps";
+import { addSet, resetModule, select } from '@/api/system/set';
+import Cookies from 'js-cookie';
+import draggable from "vuedraggable";
+import AddOrUpdate from "./AddOrUpdate";
+
+export default {
+  name: "costModify",
+  components: {
+    draggable,
+    AddOrUpdate
+  },
+  data() {
+    return {
+      // 表格高度
+      tableHeight: 0,
+      // 总条数
+      total: 0,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+      },
+      showSearch: true,
+      // 搜索展开/隐藏
+      show: false,
+      billTypeList: [],
+      fMblnoOptions: [],
+      // 遮罩层
+      loading: false,
+      // 主表格数据
+      costModifyList: [
+        {mdLoadDate: '1111222'}
+      ],
+      // 选中数组
+      ids: [],
+      // 非多个禁用
+      multiple: true,
+      // 非单个禁用
+      single: true,
+      // 自定义列弹窗显示
+      showSetting: false,
+      //自定义列宽
+      allCheck: false,
+      setRowList: [],
+      getRowList: [],
+      drag: false,
+      tableDate: [
+        {
+          surface: "1",
+          label: "mdLoadDate",
+          name: "系统编号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "2",
+          label: "mdLoadDate",
+          name: "制单日期",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "3",
+          label: "mdLoadDate",
+          name: "制单人",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "4",
+          label: "mdLoadDate",
+          name: "原业务类型",
+          checked: 0,
+          width: 150,
+        },
+        {
+          surface: "5",
+          label: "mdLoadDate",
+          name: "原客户",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "6",
+          label: "mdLoadDate",
+          name: "原系统编号",
+          checked: 0,
+          width: 150,
+        },
+        {
+          surface: "7",
+          label: "mdLoadDate",
+          name: "原提单号",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "8",
+          label: "mdLoadDate",
+          name: "原业务日期",
+          checked: 0,
+          width: 150,
+        },
+        {
+          surface: "9",
+          label: "mdLoadDate",
+          name: "原仓库",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "10",
+          label: "mdLoadDate",
+          name: "原品名",
+          checked: 0,
+          width: 100,
+        },
+        {
+          surface: "11",
+          label: "mdLoadDate",
+          name: "最终审核人",
+          checked: 0,
+          width: 150,
+        },
+        {
+          surface: "12",
+          label: "mdLoadDate",
+          name: "最终审核日期",
+          checked: 0,
+          width: 180,
+        },
+        {
+          surface: "13",
+          label: "mdLoadDate",
+          name: "审批意见",
+          checked: 0,
+          width: 100,
+        },
+      ],
+      // 子组件弹窗title
+      title: '',
+      // 子组件弹窗显示开关
+      addOrUpdateVisible: false,
+      // 子组件表格是否禁用
+      formDisabled: true
+    }
+  },
+  created() {
+    this.setRowList = this.tableDate;
+    this.getRowList = this.tableDate;
+    this.getList();
+    this.getDicts("data_billtype_type").then((response) => {
+      console.log(response)
+      this.billTypeList = response.data;
+    });
+    listCorps().then((response) => {
+      this.fMblnoOptions = response.rows;
+    });
+    if (this.$route.query.id) {
+      this.reset();
+      this.$nextTick(() => {
+        this.openDialog()
+      })
+
+    }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      // 监听浏览器高度变化,改变表格高度
+      window.onresize = () => {
+        this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
+      }
+    })
+  },
+  methods: {
+    openDialog(){
+      this.formDisabled = true;
+      this.title = "查看订单";
+      // this.$nextTick(() => {
+      //   this.$refs.addOrUpdateRef.init();
+      // })
+      this.addOrUpdateVisible = true;
+    },
+    getList() {
+      this.loading = false;
+      // 根据浏览器高度设置初始高度
+      setInterval(() => {
+        this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
+      }, 300)
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.queryParams.pageSize = 10;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        billNo: null,
+        actId: null,
+        corpId: null,
+        transUserName: null,
+        planUserName: null,
+        billType: null,
+        transType: null,
+        transProp: null,
+        ifContracted: null,
+        contractNo: null,
+        refNo: null,
+        accstlType: null,
+        accdays: null,
+        goodsId: null,
+        goodsPrice: null,
+        goodsLossType: null,
+        goodsLossStd: null,
+        mblno: null,
+        ysl: null,
+        voy: null,
+        pol: null,
+        pod: null,
+        qtyPlan: null,
+        qtyDisPatch: null,
+        weightPlan: null,
+        cntrDesc: null,
+        carNoList: null,
+        loadAddr: null,
+        loadAttn: null,
+        loadAttntel: null,
+        loadDate: null,
+        mdLoadAddr: null,
+        mdLoadAttn: null,
+        mdLoadAttnTel: null,
+        mdLoadDate: null,
+        unLoadAddr: null,
+        unLoadAttn: null,
+        unLoadAttnTel: null,
+        unLoadDate: null,
+        routeId: null,
+        routeDesc: null,
+        ifWaybill: null,
+        ifNeedinvDr: null,
+        postDate: null,
+        billStatus: 0,
+        delFlag: null,
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remarks: null,
+      };
+      this.disabled = false;
+      this.resetForm("form");
+      this.relevantAttachments = [];
+      this.allfMblnoOptions = [];
+      this.feesList = [];
+    },
+    /** 查看按钮操作 */
+    handleUpdate(row) {
+
+      let id = row.id;
+      this.reset();
+      this.title = "查看订单";
+      this.addOrUpdateVisible = true;
+      this.form.id = id;
+      this.formDisabled = true
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除订单主编号为"' + ids + '"的数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(function () {
+          return delFtmsorderbills(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        });
+    },
+    // 新增操作
+    handleAdd() {
+      this.reset();
+      this.title = "新增订单";
+      this.addOrUpdateVisible = true;
+      this.formDisabled = false;
+    },
+    // 监听 子组件弹窗关闭后触发,有子组件调用
+    showAddOrUpdate(data) {
+      if (data === "false") {
+        this.addOrUpdateVisible = false;
+      } else {
+        this.addOrUpdateVisible = true;
+      }
+    },
+    // 导出
+    handleExport() {},
+
+    //列设置全选
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
+    //重置列表
+    delRow() {
+      this.data = {
+        tableName: "费用变更",
+        userId: Cookies.get("userName"),
+      };
+      resetModule(this.data).then((res) => {
+        if (res.code == 200) {
+          this.showSetting = false;
+          this.setRowList = this.tableDate;
+          console.log(this.setRowList)
+          this.getRowList = this.tableDate;
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "船舶信息",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+      });
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 40 - 21
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -3012,8 +3012,8 @@
               <td>{{ form.fPlanqty }}</td>
               <td>{{ item.fWarehouseInformation }}</td>
               <td>{{ item.fQty }}</td>
-              <td>{{ item.fNetweight / 1000 }}</td>
-              <td>{{ item.fGrossweight / 1000 }}</td>
+              <td>{{ (item.fNetweight / 1000).toSuperFixed(4) }}</td>
+              <td>{{ (item.fGrossweight / 1000).toSuperFixed(4) }}</td>
               <td>{{ item.remark }}</td>
             </tr>
             <tr>
@@ -3023,8 +3023,8 @@
               <td></td>
               <td></td>
               <td>{{ allfQty.toFixed(0) }}</td>
-              <td>{{ (allfNetweight / 1000).toFixed(4) }}</td>
-              <td>{{ (allfGrossweight / 1000).toFixed(4) }}</td>
+              <td>{{ allfNetweight.toSuperFixed(4) }}</td>
+              <td>{{ allfGrossweight.toSuperFixed(4) }}</td>
               <td></td>
             </tr>
           </table>
@@ -3309,8 +3309,8 @@
               <td>{{ item.fMblno }}</td>
               <td>{{ item.fCntrno }}</td>
               <td>{{ item.fQty }}</td>
-              <td>{{ (item.fGrossweight / 1000).toFixed(4) }}</td>
-              <td>{{ (item.fNetweight / 1000).toFixed(4) }}</td>
+              <td>{{ (item.fGrossweight / 1000).toSuperFixed(4) }}</td>
+              <td>{{ (item.fNetweight / 1000).toSuperFixed(4) }}</td>
               <td>{{ item.remark }}</td>
             </tr>
             <tr>
@@ -3320,8 +3320,8 @@
               <td></td>
               <td></td>
               <td>{{ allfQty.toFixed(0) }}</td>
-              <td>{{ (allfNetweight / 1000).toFixed(4) }}</td>
-              <td>{{ (allfGrossweight / 1000).toFixed(4) }}</td>
+              <td>{{ allfGrossweight.toSuperFixed(4) }}</td>
+              <td>{{ allfNetweight.toSuperFixed(4) }}</td>
               <td></td>
             </tr>
           </table>
@@ -3994,8 +3994,8 @@
               <td></td>
               <td></td>
               <td>{{ allfQty.toFixed(0) }}</td>
-              <td>{{ (allfNetweight / 1000).toFixed(4) }}</td>
               <td>{{ (allfGrossweight / 1000).toFixed(4) }}</td>
+              <td>{{ (allfNetweight / 1000).toFixed(4) }}</td>
               <td></td>
             </tr>
           </table>
@@ -4502,8 +4502,8 @@
               <td></td>
               <td></td>
               <td>{{ allfQty.toFixed(0) }}</td>
-              <td>{{ (allfNetweight / 1000).toFixed(4) }}</td>
-              <td>{{ (allfGrossweight / 1000).toFixed(4) }}</td>
+              <td>{{ (allfNetweight / 1000).toSuperFixed(4) }}</td>
+              <td>{{ (allfGrossweight / 1000).toSuperFixed(4) }}</td>
               <td></td>
             </tr>
           </table>
@@ -4874,8 +4874,8 @@
               <td>{{ item.fQty }}</td>
               <td>{{ item.fWarehouseInformation }}</td>
               <td>{{ item.fQty }}</td>
-              <td>{{ (item.fNetweight / 1000).toFixed(4) }}</td>
-              <td>{{ (item.fGrossweight / 1000).toFixed(4) }}</td>
+              <td>{{ (item.fNetweight / 1000).toSuperFixed(4) }}</td>
+              <td>{{ (item.fGrossweight / 1000).toSuperFixed(4) }}</td>
               <td>{{ item.remark }}</td>
             </tr>
             <tr>
@@ -4885,8 +4885,8 @@
               <td></td>
               <td></td>
               <td>{{ allfQty.toFixed(0) }}</td>
-              <td>{{ (allfNetweight / 1000).toFixed(4) }}</td>
-              <td>{{ (allfGrossweight / 1000).toFixed(4) }}</td>
+              <td>{{ allfNetweight.toSuperFixed(4) }}</td>
+              <td>{{ allfGrossweight.toSuperFixed(4) }}</td>
               <td></td>
             </tr>
           </table>
@@ -5176,8 +5176,8 @@
               <td></td>
               <td></td>
               <td>{{ allfQty.toFixed(0) }}</td>
-              <td>{{ (allfNetweight / 1000).toFixed(4) }}</td>
               <td>{{ (allfGrossweight / 1000).toFixed(4) }}</td>
+              <td>{{ (allfNetweight / 1000).toFixed(4) }}</td>
               <td></td>
             </tr>
           </table>
@@ -5669,8 +5669,8 @@
               <td>{{ item.fMblno }}</td>
               <td>{{ item.fCntrno }}</td>
               <td>{{ item.fQty }}</td>
-              <td>{{ (item.fGrossweight / 1000).toFixed(4) }}</td>
-              <td>{{ (item.fNetweight / 1000).toFixed(4) }}</td>
+              <td>{{ (item.fGrossweight / 1000).toSuperFixed(4) }}</td>
+              <td>{{ (item.fNetweight / 1000).toSuperFixed(4) }}</td>
               <td>{{ item.remark }}</td>
             </tr>
             <tr>
@@ -5680,8 +5680,8 @@
               <td></td>
               <td></td>
               <td>{{ allfQty.toFixed(0) }}</td>
-              <td>{{ (allfNetweight / 1000).toFixed(4) }}</td>
-              <td>{{ (allfGrossweight / 1000).toFixed(4) }}</td>
+              <td>{{ allfGrossweight.toSuperFixed(4) }}</td>
+              <td>{{ allfNetweight.toSuperFixed(4) }}</td>
               <td></td>
             </tr>
           </table>
@@ -8461,7 +8461,6 @@ export default {
               let _hour = (10 > now.getHours()) ? '0' + now.getHours() : now.getHours();
               let _minute = (10 > now.getMinutes()) ? '0' + now.getMinutes() : now.getMinutes();
               this.timeOut = _hour + ':' + _minute
-              console.log(this.data)
               // 把入库时间的时间戳转换为时分秒
               let inTime = new Date(this.form.fBstime);
               let h = inTime.getHours()
@@ -8486,6 +8485,16 @@ export default {
             } else if (command == "f") {
               this.print_dpxx = true;
             } else if (command == "L") {
+              this.allfGrossweight = 0;
+              this.allfNetweight = 0;
+              this.Printinglist.map((e) => {
+                if (e.fGrossweight) {
+                  this.allfGrossweight += parseFloat((e.fGrossweight / 1000).toSuperFixed(4));
+                }
+                if (e.fNetweight) {
+                  this.allfNetweight += parseFloat((e.fNetweight / 1000).toSuperFixed(4));
+                }
+              })
               this.print_ccdzrkd = true
             } else if (command == "M") {
               this.print_fxdkrkd = true
@@ -8495,6 +8504,16 @@ export default {
               //   this.$message.error("请选择单条明细")
               // }
             } else if (command == "i") {
+              this.allfGrossweight = 0;
+              this.allfNetweight = 0;
+              this.Printinglist.map((e) => {
+                if (e.fGrossweight) {
+                  this.allfGrossweight += parseFloat((e.fGrossweight / 1000).toSuperFixed(4));
+                }
+                if (e.fNetweight) {
+                  this.allfNetweight += parseFloat((e.fNetweight / 1000).toSuperFixed(4));
+                }
+              })
               this.print_khrkd = true
             } else if (command == "j") {
               let date = new Date(this.Printinglist[0].fBsdate)

+ 43 - 41
src/views/finance/contrast/index.vue

@@ -1,10 +1,9 @@
 <template>
   <div class="app-container">
     <div v-if="login == 3">
-      <kaihe-index/>
+      <kaihe-index />
     </div>
     <div v-else>
-      <!--    主列表页面-->
       <div v-show="mainTable == false">
         <el-form
           :model="tablefilter"
@@ -1738,7 +1737,7 @@ import { addSet, select, resetModule } from "@/api/system/set";
 import draggable from "vuedraggable";
 import Vue from "vue";
 import { MessageBox } from "element-ui";
-import kaiheIndex from './kaihe-index.vue'
+import kaiheIndex from "./kaihe-index.vue";
 Vue.directive("dialogDrag", {
   bind(el, binding, vnode, oldVnode) {
     const dialogHeaderEl = el.querySelector(".el-dialog__header");
@@ -1910,7 +1909,7 @@ export default {
         },
         {
           surface: "4",
-          label: "fSrcdc",
+          label: "fSrcdcName",
           name: "收/付",
           checked: 0,
           width: 100,
@@ -3026,7 +3025,7 @@ export default {
             ) {
               let number = 0;
               data.forEach((item) => {
-                if (item.fSrcdc == "") {
+                if (item.fSrcdc == "D") {
                   number = number + Number(item[column.property]);
                 } else {
                   number = number - Number(item[column.property]);
@@ -3084,13 +3083,13 @@ export default {
               if (e.fChargedate) {
                 e.fChargedate = e.fChargedate.slice(0, 10);
               }
-              if (e.fSrcdc) {
-                if (e.fSrcdc == "D") {
-                  e.fSrcdc = "收";
-                } else {
-                  e.fSrcdc = "付";
-                }
-              }
+              // if (e.fSrcdc) {
+              //   if (e.fSrcdc == "D") {
+              //     e.fSrcdc = "收";
+              //   } else {
+              //     e.fSrcdc = "付";
+              //   }
+              // }
             });
           }
           this.DzfeeList = response.data.feeDoList;
@@ -4073,13 +4072,13 @@ export default {
               if (e.fChargedate) {
                 e.fChargedate = e.fChargedate.slice(0, 10);
               }
-              if (e.fSrcdc) {
-                if (e.fSrcdc == "D") {
-                  e.fSrcdc = "收";
-                } else {
-                  e.fSrcdc = "付";
-                }
-              }
+              // if (e.fSrcdc) {
+              //   if (e.fSrcdc == "D") {
+              //     e.fSrcdc = "收";
+              //   } else {
+              //     e.fSrcdc = "付";
+              //   }
+              // }
             });
           }
           this.DzfeeList = response.data.feeDoList;
@@ -4194,13 +4193,13 @@ export default {
               if (e.fChargedate) {
                 e.fChargedate = e.fChargedate.slice(0, 10);
               }
-              if (e.fSrcdc) {
-                if (e.fSrcdc == "D") {
-                  e.fSrcdc = "收";
-                } else {
-                  e.fSrcdc = "付";
-                }
-              }
+              // if (e.fSrcdc) {
+              //   if (e.fSrcdc == "D") {
+              //     e.fSrcdc = "收";
+              //   } else {
+              //     e.fSrcdc = "付";
+              //   }
+              // }
             });
           }
           this.DzfeeList = response.data.feeDoList;
@@ -4429,20 +4428,23 @@ export default {
               if (e.fChargedate) {
                 e.fChargedate = e.fChargedate.slice(0, 10);
               }
-              if (e.fSrcdc) {
-                if (e.fSrcdc == "D") {
-                  e.fSrcdc = "收";
-                } else {
-                  e.fSrcdc = "付";
-                }
-              }
+              // if (e.fSrcdc) {
+              //   if (e.fSrcdc == "D") {
+              //     e.fSrcdc = "收";
+              //   } else {
+              //     e.fSrcdc = "付";
+              //   }
+              // }
             });
           }
           this.DzfeeList = response.data.feeDoList;
           this.fWbuOptions = response.data.feesList;
+          listCorps().then((response) => {
+            this.fMblnoOptions = response;
+          });
+          // this.fMblnoOptions = response.data.corps;
           this.queryParams = response.data.tFee;
           // this.queryParams.fSystemType = response.data.tFee.fsystemType;
-          this.fMblnoOptions = response.data.corps;
           this.mainTable = true;
           this.title = "修改财务数据主";
           if (this.DzfeeList) {
@@ -4465,13 +4467,13 @@ export default {
               if (e.fChargedate) {
                 e.fChargedate = e.fChargedate.slice(0, 10);
               }
-              if (e.fSrcdc) {
-                if (e.fSrcdc == "D") {
-                  e.fSrcdc = "收";
-                } else {
-                  e.fSrcdc = "付";
-                }
-              }
+              // if (e.fSrcdc) {
+              //   if (e.fSrcdc == "D") {
+              //     e.fSrcdc = "收";
+              //   } else {
+              //     e.fSrcdc = "付";
+              //   }
+              // }
             });
           }
           this.DzfeeList = response.data.feeDoList;