zx 3 éve
szülő
commit
d26c139dd1

+ 2 - 6
build/utils.js

@@ -19,18 +19,14 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 // let devModules = ["index", "statisticalReport", "appoint", "TMS"];
 // let devModules = ["index", "statisticalReport", "TMS", "appoint"];
 
-// let devModules = ["index", "appoint", "statisticalReport"];
+let devModules = ["all"];
 
-let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS","inward"];
+// let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS","inward","RMS"];
 
 // let devModules = ["index", "appoint", "statisticalReport", "WMS","TMS"];
 // let devModules = ["index", "inward", "appoint", "queue"];
-
-
 // let devModules = ["index", "appoint", "statisticalReport", "WMS"];
 // let devModules = ["index", "appoint", "inward", "statisticalReport", "RMS"];
-
-
 // let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS','WMS']
 // let devModules = ["index", "ADMINISTRATORS", "RMS"];
 // let devModules = ["index", "inward", "statisticalReport"];

+ 2 - 2
config/index.js

@@ -65,14 +65,14 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://192.168.1.110:8080",
+    target: "http://172.16.33.166:80",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"
     }
   },
   "/views/api/v1": {
-    target: "http://192.168.1.110:8080",
+    target: "http://172.16.33.166:80",
     ws: true,
     pathRewrite: {
       "^/views/api/v1": "/api/v1"

+ 2 - 2
src/views/RMS/components/contractPrice.vue

@@ -2,7 +2,7 @@
     <!-- 合同单价 -->
   <div class="contract_price">
     <div class="sache">
-      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      <el-input placeholder="请输入合同号,暂不支持单价查询" v-model="inputText" clearable>
       </el-input>
       <el-button type="primary" class="btn" @click="onclick">
         <i class="el-icon-search"></i>查询
@@ -101,7 +101,7 @@ export default {
   .sache {
     padding: 1.25rem 0.375rem;
     .el-input {
-      width: 20%;
+      width: 25%;
       margin-right: 1.25rem;
     }
   }

+ 328 - 0
src/views/TMS/components/bmsship/addMoistureDetection.vue

@@ -0,0 +1,328 @@
+<template>
+  <!-- 添加二程船水运费1-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+        <div class="searchSelect">
+          <span class="text">江船</span>
+          <el-input class="input" v-model="batchName" disabled> </el-input>
+          <el-button class="button" type="primary" @click="ondrawer(5)"
+            >浏览</el-button
+          >
+        </div>
+        <div class="switch">
+          <el-switch v-model="value1" active-text="拼装" inactive-text="不拼装">
+          </el-switch>
+        </div>
+        <div class="searchSelect">
+          <span class="text">单价</span>
+          <el-input
+            class="input"
+            v-model="form.unitPrice"
+            disabled
+            @change="calculate"
+          >
+          </el-input>
+          <el-button class="button" type="primary" @click="ondrawer(6)"
+            >浏览</el-button
+          >
+        </div>
+        <div class="preview-group">
+          <el-form-item label="港口数" v-if="spell == 'true'">
+            <el-input v-model="form.portNum" type="number"></el-input>
+          </el-form-item>
+          <el-form-item label="船数" v-if="noSpell == 'false'">
+            <el-input v-model="form.shipNum" type="number"></el-input>
+          </el-form-item>
+          <el-form-item label="开票日期">
+            <el-date-picker
+              v-model="form.makeTime"
+              type="datetime"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading"
+        >确定</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import { BigNumber } from "bignumber.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      spell: false,
+      noSpell: "false",
+      value1: false,
+      form: {},
+      portId: null,
+      ports: [],
+      isLoading: false,
+      drawer: false,
+      direction: "rtl",
+      a: 0,
+      input: null,
+      batchId: null,
+      purchaseOrderId: null,
+      batchName: null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/bms/getShipResult?apiId=112",
+        selectionType: "radio",
+        map: []
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: []
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  computed: {
+    portNum() {
+      return this.form.portNum;
+    }
+  },
+  watch: {
+    portNum() {
+      console.log(this.form.portNum);
+    },
+    value1() {
+      if (this.value1) {
+        this.spell = "true";
+        this.noSpell = "true";
+      } else {
+        this.spell = "false";
+        this.noSpell = "false";
+      }
+    }
+  },
+  methods: {
+    //右侧选中框
+    ondrawer(num) {
+      this.drawer = true;
+      this.a = num;
+      if (num == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/bms/getShipResult?apiId=112" + "&i=" + new Date();
+      } else if (num == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500" +
+          "&i=" +
+          new Date();
+      }
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+      if (a == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/bms/getShipResult?apiId=112&index=" + this.input;
+      } else if (a == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" +
+          this.input;
+      }
+    },
+    //修改选中
+    batchChange(selection) {
+      console.log(selection);
+      this.batchId = selection.batchId;
+      this.purchaseOrderId = selection.purchaseOrderId;
+      this.batchName = selection.materialName + selection.resultForeignShipName;
+    },
+    priceChange(selection) {
+      this.form.unitPriceId = selection.resultId;
+      this.form.unitPrice = selection.unitPrice;
+      this.calculate();
+    },
+    //计算水运费
+    calculate() {
+      console.log(
+        "能否计算水运费:",
+        this.form.realTonnage && this.form.unitPrice
+      );
+      if (this.form.realTonnage && this.form.unitPrice) {
+        let fee = new BigNumber(this.form.realTonnage);
+        this.$set(
+          this.form,
+          "fee",
+          fee.multipliedBy(this.form.unitPrice).toNumber()
+        );
+        console.log(this.form.fee);
+      }
+    },
+    makeSure() {
+      //this.isLoading=true;
+      let map = {
+        batchId: this.batchId,
+
+        purchaseOrderId: this.purchaseOrderId,
+        unitPrice: this.form.unitPrice,
+        unitPriceId: this.form.unitPriceId,
+        shipNum: this.form.shipNum,
+        portNum: this.form.portNum,
+        makeTime: sjTime(this.form.makeTime),
+        feeType: 5,
+        userId: getCookie("userId")
+      };
+      console.log(map);
+      if (
+        map.batchId == null ||
+        map.purchaseOrderId == null ||
+        map.unitPrice == null ||
+        map.unitPriceId == null ||
+        map.makeTime == null
+      ) {
+        this.$message.error("存在空值!");
+        this.isLoading = false;
+      } else {
+        this.axios
+          .post("/api/v1/bms/addwaterStatement", map)
+          .then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "新增成功!"
+              });
+              this.cancel();
+            } else {
+              this.$message.error(res.data.data);
+              this.isLoading = false;
+            }
+          })
+          .then(() => {
+            this.isLoading = false;
+          });
+      }
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts() {
+      this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+        if (res.data.code == 200) {
+          this.ports = res.data.data;
+          console.log(this.ports);
+        } else {
+          this.$message.error(res.data.data);
+        }
+      });
+    },
+
+    upCLick(val) {
+      this.num = val;
+    }
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 5px;
+  .text {
+    width: 40px;
+  }
+  .input {
+    width: 200px;
+  }
+  .button {
+    margin-left: 6px;
+  }
+}
+.switch {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top: 20px;
+  margin-bottom: 20px;
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 439 - 0
src/views/TMS/components/bmsship/addThreeSectionFee.vue

@@ -0,0 +1,439 @@
+<template>
+  <!-- 添加二程船水运费1-->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <!-- <dil-form :formId="271" v-model="form1" ref="from1"></dil-form> -->
+      <el-form v-model="form">
+        <div class="searchSelect">
+          <span class="text">批次</span>
+          <el-input class="input" v-model="batchName" disabled> </el-input>
+          <el-button class="button" type="primary" @click="ondrawer(5)"
+            >浏览</el-button
+          >
+        </div>
+        <div
+          class="material"
+          v-for="(item, index) in form.Array"
+          :key="index"
+          style="margin-left:30px"
+        >
+          <el-form :inline="true">
+            <el-form-item label="装船时间">
+              <el-input
+                v-model="item.resultLoadShipDate"
+                placeholder="装船时间"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="离港时间">
+              <el-input
+                v-model="item.resultOutPortTime"
+                placeholder="离港时间"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="实装吨位">
+              <el-input
+                v-model="item.resultActualInstallations"
+                placeholder="实装吨位"
+                disabled
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="水运费用">
+              <el-input v-model="item.fee" type="number" disabled></el-input>
+              <el-button type="primary" @click="ondrawer(6, index)"
+                >浏览单价</el-button
+              >
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="preview-group">
+          <el-form-item label="开票日期">
+            <el-date-picker
+              v-model="form.makeTime"
+              type="datetime"
+              placeholder="选择日期"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="上传水运单图片">
+            <el-upload
+              class="upload-demo"
+              style="width: 270px"
+              ref="upload1"
+              accept=".pdf , .jpg, .png, .jpeg, .tif, .gif, .pcx, .tga, .exif, .fpx, .svg , .bmp"
+              action="/api/v1/bms/uploadBmsshipOrder"
+              :before-upload="beforeUpload"
+              :multiple="false"
+              list-type="picture"
+              :show-file-list="false"
+              :on-success="handleAvatarSuccess"
+              :on-error="onError(1)"
+            >
+              <el-input
+                class="shippingCertificate"
+                style="width: 270px; display: flex"
+                placeholder="上传水运单图片(必填项)"
+                v-model="form.image"
+                disabled
+              >
+              </el-input>
+              <el-button
+                size="small"
+                type="primary"
+                style="
+                      width: 115px;
+                      height: 35px;
+                      margin-left: 275px;
+                      margin-top: -35px;
+                      display: flex;
+                      "
+                @click="upCLick(1)"
+              >
+                点击上传附件</el-button
+              >
+            </el-upload>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <!-- 模态框 -->
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="batchOption"
+          @radio-change="batchChange"
+        ></dilTable>
+      </div>
+      <div v-show="a == 6">
+        <dilTable
+          v-bind.sync="contractPriceOption"
+          @radio-change="priceChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
+    <!-- 底部按钮 -->
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure" :loading="isLoading"
+        >确定</el-button
+      >
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
+import { BigNumber } from "bignumber.js";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      indexNum: null,
+      form: {},
+      portId: null,
+      ports: [],
+      isLoading: false,
+      drawer: false,
+      direction: "rtl",
+      a: 0,
+      input: null,
+      batchId: null,
+      purchaseOrderId: null,
+      batchName: null,
+      cargoPictureUrl: "",
+      batchOption: {
+        requestUrl: "/api/v1/uc/findBatchHavingLoad?apiId=502",
+        selectionType: "radio",
+        map: []
+      },
+      contractPriceOption: {
+        requestUrl: "/api/v1/rms/selectbmsshipContractPriceList?apiId=500",
+        selectionType: "radio",
+        map: []
+      }
+    };
+  },
+  mounted() {
+    //this.getPorts();
+  },
+  computed: {
+    batch() {
+      return this.batchId;
+    }
+  },
+  watch: {
+    batch() {
+      console.log("无变化l");
+      this.findLoadByBatch();
+    }
+  },
+  methods: {
+    findLoadByBatch() {
+      if (this.batchId != null) {
+        this.axios
+          .post("/api/v1/bms/findLoadByBatch/" + this.batchId)
+          .then(res => {
+            console.log(res.data.data);
+            this.$set(this.form, "Array", res.data.data);
+            // this.form.Array = res.data.data;
+          });
+      }
+    },
+    //右侧选中框
+    ondrawer(num, index) {
+      if (num == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/uc/findBatchHavingLoad?apiId=502" + "&i=" + new Date();
+      } else if (num == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500" +
+          "&i=" +
+          new Date();
+      }
+      this.drawer = true;
+      this.indexNum = index;
+      this.a = num;
+      // 清空当前输入框中的数据
+      this.input = "";
+    },
+    handleClose(done) {
+      done();
+    },
+    onclick(a) {
+      if (a == 5) {
+        this.batchOption.requestUrl =
+          "/api/v1/uc/findBatchHavingLoad?apiId=502&index=" +
+          this.input +
+          "&i=" +
+          new Date();
+      } else if (a == 6) {
+        this.contractPriceOption.requestUrl =
+          "/api/v1/rms/selectbmsshipContractPriceList?apiId=500&con=" +
+          this.input;
+      }
+    },
+    //修改选中
+    batchChange(selection) {
+      console.log(JSON.stringify(selection).length);
+      if (JSON.stringify(selection).length > 2) {
+        this.batchId = selection.batchId;
+        this.purchaseOrderId = selection.purchaseOrderId;
+        this.batchName =
+          selection.materialName + selection.resultForeignShipName;
+      } else {
+        this.batchId = null;
+        this.purchaseOrderId = null;
+        this.batchName = "";
+      }
+    },
+    priceChange(selection) {
+      this.form.Array[this.indexNum].unitPriceId = selection.resultId;
+      this.form.Array[this.indexNum].unitPrice = selection.unitPrice;
+      //   this.form.unitPriceId = selection.resultId;
+      //   this.form.unitPrice = selection.unitPrice;
+      this.calculate();
+    },
+    //计算水运费
+    calculate() {
+      if (
+        this.form.Array[this.indexNum].resultActualInstallations &&
+        this.form.Array[this.indexNum].unitPrice
+      ) {
+        let fee = new BigNumber(
+          this.form.Array[this.indexNum].resultActualInstallations
+        );
+        this.$set(
+          this.form.Array[this.indexNum],
+          "fee",
+          fee.multipliedBy(this.form.Array[this.indexNum].unitPrice).toNumber()
+        );
+      }
+    },
+    makeSure() {
+      let totalFee = this.form.Array.reduce(function(prev, item) {
+        return prev + item.fee;
+      }, 0);
+      let realTonnage = this.form.Array.reduce(function(prev, item) {
+        return prev + item.resultActualInstallations;
+      }, 0);
+      //this.isLoading=true;
+      let map = {
+        batchId: this.batchId,
+        purchaseOrderId: this.purchaseOrderId,
+        unitPrice: this.form.unitPrice,
+        unitPriceId: this.form.unitPriceId,
+        realTonnage: realTonnage,
+        mapList: this.form.Array,
+        fee: totalFee,
+        makeTime: sjTime(this.form.makeTime),
+        image: this.form.image,
+        feeType: 3,
+        userId: getCookie("userId")
+      };
+      console.log(map);
+      //   if (
+      //     map.batchId == null ||
+      //     map.purchaseOrderId == null ||
+      //     map.unitPrice == null ||
+      //     map.unitPriceId == null ||
+      //     map.realTonnage == null ||
+      //     map.fee == null ||
+      //     map.makeTime == null ||
+      //     map.image == null ||
+      //     map.image == ""
+      //   ) {
+      //     this.$message.error("存在空值!");
+      //     this.isLoading = false;
+      //   } else {
+      this.axios
+        .post("/api/v1/bms/addPortHandlingFeeSecond", map)
+        .then(res => {
+          if (res.data.code == 200) {
+            this.$message({
+              type: "success",
+              message: "新增成功!"
+            });
+            this.cancel();
+          } else {
+            this.$message.error(res.data.data);
+          }
+        })
+        .then(() => {
+          this.isLoading = false;
+        });
+      //   }
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    },
+    //查询港口id
+    getPorts() {
+      this.axios.post("/api/v1/rms/getPortName?index=").then(res => {
+        if (res.data.code == 200) {
+          this.ports = res.data.data;
+          console.log(this.ports);
+        } else {
+          this.$message.error(res.data.data);
+        }
+      });
+    },
+    beforeUpload(file) {
+      this.upBool = true;
+      const isLt2M = file.size < 1024 * 1024 * 0.5;
+      if (!isLt2M) {
+        this.$message.error("上传文件大小不能超过500kb!");
+      } else {
+        let size = file.size / 1024;
+        let _URL = window.URL || window.webkitURL;
+        let img = new Image();
+        img.src = _URL.createObjectURL(file);
+      }
+      return isLt2M;
+    },
+    onError(err) {
+      if (this.upBool) {
+        if (this.num == 1) {
+          this.form.image = null;
+          this.$message.error("上传失败");
+        }
+      }
+    },
+    handleAvatarSuccess(res, file) {
+      if (res.code) {
+        this.upBool = false;
+        if (this.num == 1) {
+          this.form.image = res.data;
+        }
+        this.$message.success("上传成功");
+      }
+    },
+    upCLick(val) {
+      this.num = val;
+    }
+  }
+};
+</script>
+<style lang="scss">
+.searchSelect {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 5px;
+  .text {
+    width: 40px;
+  }
+  .input {
+    width: 200px;
+  }
+  .button {
+    margin-left: 6px;
+  }
+}
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin: 20px;
+  .el-button {
+    width: 80px;
+    margin: 10px;
+  }
+}
+.material {
+  display: flex;
+  justify-content: center;
+  margin-top: 20px;
+  margin-right: 100px;
+  .text {
+    display: inline-block;
+    width: 170px;
+    text-align: right;
+  }
+  .el-input {
+    width: 250px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 130 - 0
src/views/TMS/components/bmsship/moistureDetection.vue

@@ -0,0 +1,130 @@
+//三程船的水分检测费
+<template>
+  <!-- 二程船水运费 -->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <!-- <el-button type="text" size="small" @click="update(scope)">
+              修改
+            </el-button> -->
+            <el-button type="text" size="mini" @click="deleteOne(scope)">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      isShow: false,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=504&feeType=5"
+      }
+    };
+  },
+  methods: {
+    getRequestUrl() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=504&feeType=5&i=" +
+        new Date();
+    },
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=504&feeType=5&con=" +
+        this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addMoistureDetection");
+    },
+    // update(scope) {
+    //   console.log(scope.row.resultId);
+    //   this.$router.push("/editTwoSectionFee/" + scope.row.resultId);
+    // },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showTwoSectionFee/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true
+      })
+        .then(() => {
+          let map = {
+            resultId: scope.row.resultId
+          };
+          this.axios
+            .post(
+              "/api/v1/bms/deletePortHandlingFeeSecond/" + scope.row.resultId
+            )
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!"
+                });
+                this.getRequestUrl();
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning"
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!"
+          });
+        });
+    },
+    toPhotoClick(resultId) {
+      this.axios
+        .post("/api/v1/bms/downloadBmsshipOrder?resultId=" + resultId)
+        .then(res => {
+          console.log("res", res.data.data);
+          this.srcList = [];
+          this.src = res.data.data;
+          this.isShow = true;
+          this.srcList.push(res.data.data);
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 146 - 0
src/views/TMS/components/bmsship/threeSectionFee.vue

@@ -0,0 +1,146 @@
+<template>
+  <!-- 二程船水运费 -->
+  <div class="contract_price">
+    <div class="sache">
+      <el-input placeholder="请输入内容" v-model="inputText" clearable>
+      </el-input>
+      <el-button type="primary" class="btn" @click="onclick">
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <el-button type="primary" class="btn" @click="toInsert">
+        <i class="el-icon-plus"></i>新增
+      </el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="options">
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="update(scope)">
+              修改
+            </el-button>
+            <el-button type="text" size="mini" @click="deleteOne(scope)">
+              删除
+            </el-button>
+            <el-button
+              @click="toPhotoClick(scope.row.resultId)"
+              type="text"
+              size="small"
+            >
+              水运单图片
+            </el-button>
+          </template>
+        </el-table-column>
+      </dilTable>
+    </div>
+    <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
+      <div class="demo-image__preview">
+        <el-image
+          style=" height:731px;text-align:center"
+          :src="src"
+          :preview-src-list="srcList"
+        >
+        </el-image>
+      </div>
+    </vxe-modal>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      inputText: "",
+      isShow: false,
+      options: {
+        // first请求数据的地址
+        requestUrl: "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=3"
+      }
+    };
+  },
+  methods: {
+    getRequestUrl() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=3&i=" +
+        new Date();
+    },
+    //查询
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/bms/selectPortFeeSecondList?apiId=501&feeType=3&con=" +
+        this.inputText;
+    },
+    //新增
+    toInsert() {
+      this.$router.push("/addThreeSectionFee");
+    },
+    update(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/editTwoSectionFee/" + scope.row.resultId);
+    },
+    showCarrier(scope) {
+      console.log(scope.row.resultId);
+      this.$router.push("/showTwoSectionFee/" + scope.row.resultId);
+    },
+    deleteOne(scope) {
+      this.$confirm("是否删除", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+        center: true
+      })
+        .then(() => {
+          let map = {
+            resultId: scope.row.resultId
+          };
+          this.axios
+            .post(
+              "/api/v1/bms/deletePortHandlingFeeSecond/" + scope.row.resultId
+            )
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!"
+                });
+                this.getRequestUrl();
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning"
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "删除操作已取消!"
+          });
+        });
+    },
+    toPhotoClick(resultId) {
+      this.axios
+        .post("/api/v1/bms/downloadBmsshipOrder?resultId=" + resultId)
+        .then(res => {
+          console.log("res", res.data.data);
+          this.srcList = [];
+          this.src = res.data.data;
+          this.isShow = true;
+          this.srcList.push(res.data.data);
+        });
+    }
+  }
+};
+</script>
+
+<style lang="scss" scode>
+.contract_price {
+  .sache {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
+}
+</style>

+ 16 - 9
src/views/TMS/components/domesticMine/entrustMine.vue

@@ -24,7 +24,7 @@
       <!-- <el-button type="primary" @click="exportData()">
         <i class="el-icon-download"></i>导出(Excel)
       </el-button> -->
-      <el-button type="primary" @click="exportExcel()">
+      <el-button type="primary" @click="exportExcel">
         <i class="el-icon-download"></i>导出(Excel)
       </el-button>
        <el-button type="primary" @click="refresh()">
@@ -42,7 +42,7 @@
       </el-tab-pane>
       <el-tab-pane label="已计量" name="second">
         <dilTable
-          ref="excelDom"
+          ref="weighted"
           v-bind.sync="option2"
           @selection-change="selectionChange2"
         >
@@ -55,8 +55,6 @@
     </div>
   </div>
 </template>
-
-
 <script>
 import { sjTime } from "@/utils/sharedJsFile";
 import bignumber,{BigNumber} from 'bignumber.js';
@@ -174,6 +172,13 @@ export default {
       let excel=this.$refs.excelDom;
       console.log(XLSX);
       console.log(XLSX.version);
+      if(this.selectionListMap2.length<=0){
+         this.$message({
+          message: "请先勾选数据!",
+          type: "warning"
+        });
+        return;
+      };
       //创建工作簿对象
       let wb = XLSX.utils.book_new();
       //数据
@@ -200,7 +205,9 @@ export default {
           ]
           sheetData.push(arr);
       });
-      sheetData[2].push(totalRealWeight.toNumber);
+      console.log("totalReal:",totalRealWeight.toNumber());
+      console.log("total:",totalWeight);
+      sheetData[2].push(totalRealWeight.toNumber());
       sheetData[2].push(totalWeight);
       console.log("sheetData",sheetData);
       //把数据转化成excel的页
@@ -212,12 +219,12 @@ export default {
               e: { c: 11, r: 0 } // 合并结束位置 
           },
           {
-              s: { c: 11, r: 0 },// 合并开始位置 c:列位置 r:表示行位置
-              e: { c: 11, r: sheetData.length } // 合并结束位置 
+              s: { c: 10, r: 2 },// 合并开始位置 c:列位置 r:表示行位置
+              e: { c: 10, r: sheetData.length-1 } // 合并结束位置 
           },
           {
-              s: { c: 11, r: 0 },// 合并开始位置 c:列位置 r:表示行位置
-              e: { c: 11, r: sheetData.length } // 合并结束位置 
+              s: { c: 11, r: 2 },// 合并开始位置 c:列位置 r:表示行位置
+              e: { c: 11, r: sheetData.length-1 } // 合并结束位置 
           }
       ]
       //把这一页加入excel

+ 50 - 19
src/views/TMS/router/index.js

@@ -219,16 +219,19 @@ import editTwoSectionFee from "../components/bmsship/editTwoSectionFee.vue";
 import twoSectionHandleFee from "../components/bmsship/twoSectionHandleFee.vue";
 import addTwoSectionHandleFee from "../components/bmsship/addTwoSectionHandleFee.vue";
 import editTwoSectionHandleFee from "../components/bmsship/editTwoSectionHandleFee.vue";
-import importedTrainFee from "../components/bmstrain/importedTrainFee.vue"
-import addImportedTrainFee from "../components/bmstrain/addImportedTrainFee.vue"
-import editImportedTrainFee from "../components/bmstrain/editImportedTrainFee.vue"
-import domesticTrainFee from "../components/bmstrain/domesticTrainFee.vue"
-import addDomesticTrainFee from "../components/bmstrain/addDomesticTrainFee.vue"
-import editDomesticTrainFee from "../components/bmstrain/editDomesticTrainFee.vue"
+import importedTrainFee from "../components/bmstrain/importedTrainFee.vue";
+import addImportedTrainFee from "../components/bmstrain/addImportedTrainFee.vue";
+import editImportedTrainFee from "../components/bmstrain/editImportedTrainFee.vue";
+import domesticTrainFee from "../components/bmstrain/domesticTrainFee.vue";
+import addDomesticTrainFee from "../components/bmstrain/addDomesticTrainFee.vue";
+import editDomesticTrainFee from "../components/bmstrain/editDomesticTrainFee.vue";
 import threeSectionHandleFee from "../components/bmsship/threeSectionHandleFee.vue";
 import addThreeSectionHandleFee from "../components/bmsship/addThreeSectionHandleFee.vue";
 import editThreeSectionHandleFee from "../components/bmsship/editThreeSectionHandleFee.vue";
-
+import threeSectionFee from "../components/bmsship/threeSectionFee.vue";
+import addThreeSectionFee from "../components/bmsship/addThreeSectionFee.vue";
+import moistureDetection from "../components/bmsship/moistureDetection.vue";
+import addMoistureDetection from "../components/bmsship/addMoistureDetection.vue";
 Vue.use(Router);
 
 const constantRouterMap = [
@@ -1340,19 +1343,20 @@ const constantRouterMap = [
         name: "outBoundWagon",
         meta: { code: "xtpzgl-jggl" },
         component: outBoundWagon
-      }, 
+      },
       {
         path: "twoSectionFee",
         name: "twoSectionFee",
         meta: { code: "xtpzgl-jggl" },
         component: twoSectionFee
-      }, 
+      },
       {
         path: "addTwoSectionFee",
         name: "addTwoSectionFee",
         meta: { code: "xtpzgl-jggl" },
         component: addTwoSectionFee
-      }, {
+      },
+      {
         path: "editTwoSectionFee/:resultId",
         name: "editTwoSectionFee",
         meta: { code: "xtpzgl-jggl" },
@@ -1363,13 +1367,14 @@ const constantRouterMap = [
         name: "twoSectionHandleFee",
         meta: { code: "xtpzgl-jggl" },
         component: twoSectionHandleFee
-      }, 
+      },
       {
         path: "addTwoSectionHandleFee",
         name: "addTwoSectionHandleFee",
         meta: { code: "xtpzgl-jggl" },
         component: addTwoSectionHandleFee
-      }, {
+      },
+      {
         path: "editTwoSectionHandleFee/:resultId",
         name: "editTwoSectionHandleFee",
         meta: { code: "xtpzgl-jggl" },
@@ -1380,13 +1385,14 @@ const constantRouterMap = [
         name: "importedTrainFee",
         meta: { code: "xtpzgl-jggl" },
         component: importedTrainFee
-      }, 
+      },
       {
         path: "addImportedTrainFee",
         name: "addImportedTrainFee",
         meta: { code: "xtpzgl-jggl" },
         component: addImportedTrainFee
-      }, {
+      },
+      {
         path: "editImportedTrainFee/:resultId",
         name: "editImportedTrainFee",
         meta: { code: "xtpzgl-jggl" },
@@ -1397,13 +1403,14 @@ const constantRouterMap = [
         name: "domesticTrainFee",
         meta: { code: "xtpzgl-jggl" },
         component: domesticTrainFee
-      }, 
+      },
       {
         path: "addDomesticTrainFee",
         name: "addDomesticTrainFee",
         meta: { code: "xtpzgl-jggl" },
         component: addDomesticTrainFee
-      }, {
+      },
+      {
         path: "editDomesticTrainFee/:resultId",
         name: "editDomesticTrainFee",
         meta: { code: "xtpzgl-jggl" },
@@ -1414,19 +1421,43 @@ const constantRouterMap = [
         name: "threeSectionHandleFee",
         meta: { code: "xtpzgl-jggl" },
         component: threeSectionHandleFee
-      }, 
+      },
       {
         path: "addThreeSectionHandleFee",
         name: "addThreeSectionHandleFee",
         meta: { code: "xtpzgl-jggl" },
         component: addThreeSectionHandleFee
-      }, {
+      },
+      {
         path: "editThreeSectionHandleFee/:resultId",
         name: "editThreeSectionHandleFee",
         meta: { code: "xtpzgl-jggl" },
         component: editThreeSectionHandleFee
       },
-
+      {
+        path: "threeSectionFee",
+        name: "threeSectionFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: threeSectionFee
+      },
+      {
+        path: "addThreeSectionFee",
+        name: "addThreeSectionFee",
+        meta: { code: "xtpzgl-jggl" },
+        component: addThreeSectionFee
+      },
+      {
+        path: "addMoistureDetection",
+        name: "addMoistureDetection",
+        meta: { code: "xtpzgl-jggl" },
+        component: addMoistureDetection
+      },
+      {
+        path: "moistureDetection",
+        name: "moistureDetection",
+        meta: { code: "xtpzgl-jggl" },
+        component: moistureDetection
+      }
     ]
   }
 ];

+ 4 - 0
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -1002,6 +1002,10 @@ export default {
       this.remarks = item.value;
     },
     onclikSaleArea() {
+      if (this.saleAreaId == null) {
+        this.$message.warning("请先选择片区");
+        return;
+      }
       this.axios
         .post("/api/v1/uc/bandSaleArea", {
           areaId: this.saleAreaId,

+ 134 - 0
src/views/appoint/components/saleContract/importExcelSaleOrder.vue

@@ -0,0 +1,134 @@
+<template>
+  <div>
+    <el-table
+      :data="tableData1"
+      :span-method="objectSpanMethod"
+      border
+      highlight-current-row
+    >
+      <el-table-column
+        property="receiveName"
+        label="下单客户"
+        width="200"
+      ></el-table-column>
+      <el-table-column property="truckNo" label="车序号"></el-table-column>
+      <el-table-column
+        property="materialName"
+        label="物资名称"
+      ></el-table-column>
+      <el-table-column
+        property="materialSpecification"
+        label="物资规格"
+      ></el-table-column>
+      <el-table-column
+        property="materialModel"
+        label="物资型号"
+      ></el-table-column>
+      <el-table-column property="steelMeters" label="米数"></el-table-column>
+      <el-table-column
+        property="materialNumber"
+        label="物资件数"
+      ></el-table-column>
+      <el-table-column property="province" label="省"></el-table-column>
+      <el-table-column property="district" label="市"></el-table-column>
+      <el-table-column property="town" label="县"></el-table-column>
+      <el-table-column property="place" label="具体收货地址"></el-table-column>
+
+      <el-table-column
+        property="isSelfMention"
+        label="是否自提"
+        width="150"
+      ></el-table-column>
+      <el-table-column
+        property="saleRemark"
+        label="摘要"
+        width="150"
+      ></el-table-column>
+      <el-table-column
+        property="saleOrderReceiveCustomer"
+        label="收款客户"
+        width="150"
+      ></el-table-column>
+      <el-table-column
+        property="truckRemark"
+        label="车号备注"
+      ></el-table-column>
+
+      <el-table-column
+        property="saleOrderConsigneeTel"
+        label="收货方电话"
+      ></el-table-column>
+      <el-table-column
+        property="saleDateOfReceipt"
+        label="截止日期"
+      ></el-table-column>
+
+      <el-table-column
+        property="isPoundSale"
+        label="是否磅重交货"
+      ></el-table-column>
+      <el-table-column
+        property="shipperName"
+        label="发货单位"
+        width="150"
+      ></el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "ExcelSaleOrder",
+  props: {
+    tableData: {
+      type: Array,
+      default: () => []
+    }
+  },
+  data() {
+    return {
+      columnIndexList: [0, 1, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17],
+      spanArr: [],
+      tableData1: this.tableData
+    };
+  },
+  mounted() {
+    this.getSpanArr(this.tableData1);
+  },
+  methods: {
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          this.pos = 0;
+          data[i].group = i;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].truckNo === data[i - 1].truckNo) {
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+            data[i].group = data[i - 1].group;
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (this.columnIndexList.indexOf(columnIndex) != -1) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    }
+  }
+};
+</script>

+ 299 - 17
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -28,7 +28,7 @@
             style="width:250px"
           >
           </el-input>
-          <el-button type="primary" class="btn" @click="onclick">
+          <el-button type="primary" @click="onclick">
             <i class="el-icon-search"></i>
           </el-button>
         </el-form-item>
@@ -46,8 +46,22 @@
             type="primary"
             @click="exportData()"
             v-if="activeName == 'first'"
-            ><i class="el-icon-download"></i>Excel</el-button
+            ><i class="el-icon-download"></i>导出Excel</el-button
           >
+          <el-form-item v-if="activeName == 'first'">
+            <el-upload
+              class="upload-excel"
+              action=""
+              :on-change="importExcel"
+              :show-file-list="false"
+              accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"
+              :auto-upload="false"
+            >
+              <el-button type="primary" icon="el-icon-upload"
+                >导入Excel</el-button
+              >
+            </el-upload>
+          </el-form-item>
           <el-button disabled>物资总件数</el-button>
           <el-input
             placeholder=""
@@ -212,16 +226,40 @@
         </el-tab-pane>
       </el-tabs>
     </div>
+    <div>
+      <el-dialog
+        title="销售订单预览"
+        :visible.sync="dialogTableVisible"
+        :center="true"
+        width="100%"
+      >
+        <ExcelSaleOrder :tableData="tableData"></ExcelSaleOrder>
+        <div class="btn">
+          <el-button
+            type="primary"
+            @click="addExcelInport"
+            @keyup.native.enter="addExcelInport"
+            >确认</el-button
+          >
+          <el-button type="primary" @click="cancelExcelInport">取消</el-button>
+        </div>
+      </el-dialog>
+    </div>
   </div>
 </template>
 <script>
 import { getCookie } from "@/utils/util.js";
 import { sjTime } from "@/utils/sharedJsFile";
-import returnResultVue from "../../../inward/components/offsetSteel/truckTransport/returnResult.vue";
+import { isNumber } from "../../../ADMINISTRATORS/app";
+import ExcelSaleOrder from "../saleContract/importExcelSaleOrder.vue";
 export default {
   name: "saleOrder",
+  components: {
+    ExcelSaleOrder
+  },
   data() {
     return {
+      dialogTableVisible: false,
       startTime: null,
       endTime: null,
       batchReportList: [],
@@ -232,6 +270,12 @@ export default {
       index: "",
       carrierId: null,
       carrierName: null,
+      shipperName: "四川省达州钢铁集团有限责任公司",
+      shipperId: 1,
+      receivingCompany: [
+        "四川省达州钢铁集团有限责任公司",
+        "四川达钢商贸有限公司"
+      ],
       option: {
         // 表格请求数据的地址
         requestUrl: "",
@@ -299,7 +343,31 @@ export default {
       mapItemList: [],
       matSum: null,
       tableData: [],
-      saleDateOfReceipt: null
+      saleDateOfReceipt: null,
+      //销售订单主表数据
+      saleOrderList: [
+        "receiveName",
+        "isSelfMention",
+        "saleRemark",
+        "saleOrderReceiveCustomer",
+        "salerName"
+      ],
+      saleOrderMapList: [
+        "truckNo",
+        "province",
+        "district",
+        "town",
+        "truckRemark",
+        "place",
+        "saleOrderConsigneeTel",
+        "saleDateOfReceipt",
+        "materialName",
+        "materialSpecification",
+        "materialModel",
+        "materialNumber",
+        "steelMeters",
+        "isPoundSale"
+      ]
     };
   },
   created() {
@@ -376,10 +444,55 @@ export default {
     } else {
       this.saleDateOfReceipt = loadTime1;
     }
+    // document.addEventListener("keydown", e => {
+    //   let key = window.event.keyCode;
+    //   if (key == 13) {
+    //     // 13是enter键的键盘码 如果等于13 就调用click的登录方法
+    //     this.addExcelInport();
+    //   }
+    // });
+  },
+  // beforeDestroy() {
+  //   //这里的 this.login('loginForm') 指的是键盘事件的方法名
+  //   document.removeEventListener("keydown", this.addExcelInport());
+  // },
+  activated() {
+    if (getCookie("orgCode") == "shouhuokehu") {
+      this.option.requestUrl =
+        "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
+        getCookie("userId") +
+        "&i=" +
+        new Date();
+    } else if (getCookie("orgCode") == "xiaoshouyewuyuan") {
+      this.option.requestUrl =
+        "/api/v1/ams/getSaleOrderInfoes?apiId=408&saler=" +
+        getCookie("loginName") +
+        "&i=" +
+        new Date();
+    } else {
+      this.option.requestUrl =
+        "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
+        null +
+        "&i=" +
+        new Date();
+    }
+    let loadTime1 = new Date(
+      new Date(new Date().toLocaleDateString()).getTime() +
+        (3600 * 1000 * 8 - 1)
+    ); // 当天8点前
+    let loadTime2 = new Date(
+      new Date(new Date().toLocaleDateString()).getTime() +
+        (3600 * 1000 * 32 - 1)
+    ); // 次天8点前
+    if (new Date().getTime() - loadTime1 > 0) {
+      this.saleDateOfReceipt = loadTime2;
+    } else {
+      this.saleDateOfReceipt = loadTime1;
+    }
   },
   methods: {
     //导入Excel格式
-    // 导入excel
+    //导入excel
     importExcel(file) {
       let that = this;
       if (!file) {
@@ -400,27 +513,172 @@ export default {
         workbook = XLSX.read(data, {
           type: "binary"
         });
-        console.log(workbook);
         let rows = XLSX.utils.sheet_to_json(
           workbook.Sheets[workbook.SheetNames[0]]
         ); //只取第一页
         console.log("rows", rows);
-        Array.from(rows).forEach(e => {
+        Array.from(rows).forEach((e, index) => {
           let map = {};
-          console.log(e, "e");
-          Object.keys(e).forEach(e1 => {
-            console.log("e1", e1);
-            if (e1.includes("物资名称")) {
-              map.materialName = e[e1];
-            }
-          });
-          that.tableData.push(map);
-          console.log(that.tableData);
+          try {
+            Object.keys(e).forEach(e1 => {
+              if (e1.includes("物资名称")) {
+                map.materialName = e[e1];
+              }
+              if (e1.includes("下单客户")) {
+                map.receiveName = e[e1];
+              }
+              if (e1.includes("米数")) {
+                map.steelMeters = e[e1];
+              }
+              if (e1.includes("物资规格")) {
+                if ((e[e1] + "").includes("Φ")) {
+                  map.materialSpecification = e[e1];
+                } else {
+                  map.materialSpecification = "Φ" + e[e1];
+                }
+              }
+              if (e1.includes("物资型号")) {
+                map.materialModel = e[e1];
+              }
+              if (e1.includes("物资件数")) {
+                if (isNumber(e[e1])) {
+                  map.materialNumber = e[e1];
+                } else {
+                  throw new Error(
+                    `该Excel第--${index +
+                      2}--行-“物资件数”错误,请核实后再输入(件数输入整数)`
+                  );
+                }
+              }
+              if (e1.includes("车序号")) {
+                if (isNumber(e[e1])) {
+                  map.truckNo = e[e1];
+                } else {
+                  throw new Error(
+                    `该Excel第--${index +
+                      2}--行-“车序号”错误,请核实后再输入(车序号输入正整数)`
+                  );
+                }
+              }
+              if (e1.includes("收款公司")) {
+                if (that.receivingCompany.indexOf(e[e1]) === -1) {
+                  throw new Error(
+                    `该Excel第--${index + 2}--行-“收款公司”错误,请核实后再输入`
+                  );
+                } else {
+                  map.saleOrderReceiveCustomer = e[e1];
+                }
+              }
+              if (e1.includes("业务员")) {
+                map.salerName = e[e1];
+              }
+              if (e1.includes("摘要")) {
+                map.saleRemark = e[e1];
+              }
+              if (e1.includes("省")) {
+                map.province = e[e1];
+              }
+              if (e1.includes("市")) {
+                map.district = e[e1];
+              }
+              if (e1.includes("县/区")) {
+                map.town = e[e1];
+              }
+              if (e1.includes("具体收货地址")) {
+                map.place = e[e1];
+              }
+              if (e1.includes("收货客户电话")) {
+                map.saleOrderConsigneeTel = e[e1];
+              }
+              if (e1.includes("备注")) {
+                map.truckRemark = e[e1];
+              }
+              if (e1.includes("是否磅重交货")) {
+                if (e[e1] == "是") {
+                  map.isPoundSale = 0;
+                } else if (e[e1] == "否") {
+                  map.isPoundSale = 1;
+                } else {
+                  throw new Error(
+                    `该Excel第--${index +
+                      2}--行-“是否磅重交货”-错误,请核实后再输入`
+                  );
+                }
+              }
+              if (e1.includes("是否自提")) {
+                if (e[e1] === "是" || e[e1] === "否") {
+                  map.isSelfMention = e[e1];
+                } else {
+                  throw new Error(
+                    `该Excel第--${index + 2}--行-“是否自提”-错误,请核实后再输入`
+                  );
+                }
+              }
+            });
+            map.shipperName = that.shipperName;
+            that.tableData.push(map);
+          } catch (e) {
+            that.$message.error(e.message);
+          }
         });
+        that.dialogTableVisible = true;
         return;
       };
       reader.readAsBinaryString(file.raw); //以二进制方式读取
     },
+    addExcelInport() {
+      this.$confirm("以上均核对正确,确定导入Excel", "提示", {
+        cancelButtonText: "取消",
+        confirmButtonText: "确认",
+        center: true
+      })
+        .then(() => {
+          let map = {};
+          let arr = [];
+          this.tableData.forEach(e => {
+            let mapMaterial = {};
+            Object.keys(e).forEach(e1 => {
+              if (this.saleOrderList.includes(e1)) {
+                map[e1] = e[e1];
+              }
+              if (this.saleOrderMapList.includes(e1)) {
+                mapMaterial[e1] = e[e1];
+              }
+            });
+            mapMaterial.saleDateOfReceipt = sjTime(this.saleDateOfReceipt);
+            arr.push(mapMaterial);
+          });
+          map.shipperId = 1;
+          map.mapList = arr;
+          console.log(map);
+          this.axios
+            .post("/api/v1/ams/addSteelSaleOrder", map)
+            .then(res => {
+              if (res.data.code == "200") {
+                this.$message.success("新增销售订单成功!");
+                this.getRequestUrl();
+                this.dialogTableVisible = false;
+                this.tableData = [];
+              } else {
+                this.$message.error(res.data.data);
+                this.getRequestUrl();
+                this.dialogTableVisible = false;
+                this.tableData = [];
+              }
+            })
+            .catch(e => {
+              this.$message.error("生成错误!");
+              this.dialogTableVisible = false;
+              this.tableData = [];
+            });
+        })
+        .catch(() => {
+          this.$message.info("取消导入");
+        });
+    },
+    cancelExcelInport() {
+      this.dialogTableVisible = false;
+    },
     adverseCloseSaleOrder(row) {
       console.log(row);
       this.$confirm("确定反关闭整条订单吗?", "继续?", {
@@ -606,6 +864,25 @@ export default {
           getCookie("userId") +
           "&i=" +
           new Date();
+      } else if (getCookie("orgCode") == "xiaoshouyewuyuan") {
+        this.option.requestUrl =
+          "/api/v1/ams/getSaleOrderInfoes?apiId=408&saler=" +
+          getCookie("loginName") +
+          "&i=" +
+          new Date();
+        this.option2.requestUrl =
+          "/api/v1/ams/getSaleOrderReportedes?apiId=408&saler=" +
+          getCookie("loginName") +
+          "&i=" +
+          new Date();
+        this.option4.requestUrl =
+          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&saleType=1&saler=" +
+          getCookie("loginName") +
+          "&i=" +
+          new Date();
+        this.option5.requestUrl =
+          "/api/v1/ams/getSteelOrderDeletedList?apiId=409&saler=" +
+          getCookie("loginName");
       } else {
         this.option.requestUrl =
           "/api/v1/ams/getSaleOrderInfoes?apiId=408&consigneeSsoId=" +
@@ -663,7 +940,7 @@ export default {
       this.batchReportList = selection;
     },
     refresh() {
-      this.$router.go(0);
+      this.getRequestUrl();
     },
     handleClick(tab, event) {
       console.log(tab, event);
@@ -844,5 +1121,10 @@ export default {
     margin-left: 20px;
     margin-top: 20px;
   }
+  .btn {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
 }
 </style>

+ 8 - 3
src/views/inward/components/inwardSettlement/detailOrder.vue

@@ -8,7 +8,7 @@
             v-model="screen"
             placeholder="请选择需筛选的内容"
             clearable
-            style="width:120px"
+            class="elSelect"
           >
             <el-option
               v-for="item in options"
@@ -30,7 +30,7 @@
             v-model="screen1"
             placeholder="请选择需筛选的内容"
             clearable
-            style="width:120px"
+            class="elSelect"
           >
             <el-option
               v-for="item in optionsF"
@@ -392,11 +392,16 @@ export default {
 };
 </script>
 
-<style lang="scss" scode>
+<style lang="scss" scoped>
 .steel_inbound {
   .sache {
     margin-left: 20px;
     margin-top: 20px;
+    .elSelect /deep/ {
+      .el-input--suffix .el-input__inner {
+        width: 120px !important;
+      }
+    }
   }
   .table {
     margin-left: 20px;

+ 0 - 3
src/views/sale/components/transport_order/saleSteelOrder.vue

@@ -7,9 +7,6 @@
       <el-button type="primary" class="btn" @click="onClick">
         <i class="el-icon-search"></i>查询
       </el-button>
-      <el-button type="primary" class="btn" @click="batchCloseOrder">
-        <i></i>批量关闭订单
-      </el-button>
       <el-button type="primary" @click="refresh">
         <i class="el-icon-refresh"></i>刷新
       </el-button>

+ 1 - 0
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelAllReport.vue

@@ -1097,6 +1097,7 @@ export default {
       arr.push(map);
       let updateMap = {
         orderId: row.orderId,
+        saleOrderId: row.saleOrderId,
         saleOrderMaterialId: row.saleOrderMaterialId,
         mapList: arr
       };

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1 - 0
static/lib/XLSX/xlsx.core.min.js


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott