luobang 2 年之前
父節點
當前提交
d23a0d489b
共有 3 個文件被更改,包括 236 次插入290 次删除
  1. 1 1
      build/utils.js
  2. 2 2
      config/index.js
  3. 233 287
      src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

+ 1 - 1
build/utils.js

@@ -21,7 +21,7 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 // let devModules = ["index", "WMS", "inward"];
 // let devModules = ["index", "inward", "WMS", "queue"];
 // let devModules = ["index", "appoint", "statisticalReport", "sale"];
-let devModules = ["all"];
+let devModules = ["index", "appoint", "statisticalReport", "WMS"];
 //let devModules = ["BMS","index","sale","appoint","AMS","queue","QMS","RMS",'statisticalReport',"inward"];
 
 //let devModules = ["BMS","index","sale","appoint","AMS","queue","QMS","RMS",'statisticalReport'];

+ 2 - 2
config/index.js

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

+ 233 - 287
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -85,8 +85,6 @@
         border
         style="width: 100%; margin-top: 20px"
         max-height="650px"
-        @cell-click="cellClik"
-        @row-click="rowClick"
         :row-style="{ height: '30px' }"
         :cell-style="{ fontWeight: '500' }"
       >
@@ -142,11 +140,7 @@
           width="150px"
         >
         </el-table-column>
-        <el-table-column
-          prop="addressPlace"
-          label="收货地址"
-          :width="flexColumnWidth('addressPlace', tableData, 'max')"
-        >
+        <el-table-column prop="addressPlace" label="收货地址" width="200px">
         </el-table-column>
         <el-table-column prop="orderStatus" label="运单状态" align="center">
         </el-table-column>
@@ -195,6 +189,7 @@
           prop="isPrintDelivery"
           label="送货单打印状态"
           align="center"
+          width="150px"
         ></el-table-column>
         <el-table-column prop="saler" label="业务员" align="center">
         </el-table-column>
@@ -207,19 +202,6 @@
         </el-table-column>
         <el-table-column prop="truckNo" label="车序号"> </el-table-column>
         <el-table-column prop="consigneeTel" label="收货客户电话" width="120px">
-          <template slot-scope="scope">
-            <el-input
-              style="width:120px"
-              v-model="scope.row.consigneeTel"
-              placeholder="请输入电话号码"
-            ></el-input>
-            <el-button
-              @click="updateconsigneeTel(scope.row)"
-              type="primary"
-              v-if="scope.row.isconsigneeTelShow == 1"
-              >提交</el-button
-            >
-          </template>
         </el-table-column>
         <el-table-column prop="isSelfMention" label="是否自提" align="center">
         </el-table-column>
@@ -239,52 +221,170 @@
         <el-table-column prop="closeEntryId" label="金蝶分录ID" width="100px">
         </el-table-column>
         <el-table-column
-          label="分录操作"
-          fixed="right"
-          width="120px"
-          align="center"
-          v-if="operateShow == 1"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="closeEasEntryId(scope.row)"
-              v-if="scope.row.deletedStatus == null"
-              >关闭分录</el-button
-            >
-            <el-button
-              type="text"
-              size="small"
-              @click="adverseCloseSaleMaterial(scope.row)"
-              v-if="scope.row.deletedStatus != null"
-              >反关闭分录</el-button
-            >
-          </template>
-        </el-table-column>
-        <el-table-column
-          label="整车操作"
+          prop="operation"
+          label="操作"
+          width="100px"
           fixed="right"
-          width="80px"
           align="center"
-          v-if="operateShow == 1"
         >
           <template slot-scope="scope">
-            <el-button
-              type="text"
-              size="small"
-              @click="deleteEasEntryId(scope.row)"
-              v-if="
-                scope.row.carStatus == 4 ||
-                  scope.row.carStatus == 5 ||
-                  scope.row.carStatus == null
-              "
-              >关闭车辆</el-button
+            <el-button type="text" @click="operation(scope.row)"
+              >编辑</el-button
             >
           </template>
         </el-table-column>
       </el-table>
     </div>
+    <div class="dialog">
+      <el-dialog
+        title="运单详情"
+        :visible.sync="centerDialogVisible"
+        width="80%"
+        center
+      >
+        <div class="steelMapClass">
+          <div class="steelMapClass1">
+            <div class="steelMapClass12">
+              <span>销售订单号:</span>
+              <span>{{ steelMap.saleOrderNo }}</span>
+            </div>
+            <div class="steelMapClass12">
+              <span>订单状态:</span>
+              <span>{{ steelMap.saleOrderStatus }}</span>
+            </div>
+            <div class="steelMapClass12">
+              <span>业务员:</span>
+              <span>{{ steelMap.saler }}</span>
+            </div>
+            <div class="steelMapClass12">
+              <span>下单客户:</span>
+              <span>{{ steelMap.consigneeName }}</span>
+            </div>
+          </div>
+          <div class="steelMapClass2">
+            <div class="steelMapClass22">
+              <span>收货地址:</span>
+              <el-select
+                v-model="steelMap.addressProvince"
+                filterable
+                placeholder="请选择"
+                @change="onchangeProvince"
+                style="width:120px"
+              >
+                <el-option
+                  v-for="item in provinceList"
+                  :key="item.id"
+                  :label="item.addressProvince"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+              <el-select
+                v-model="steelMap.addressDistrict"
+                filterable
+                placeholder="请选择"
+                @change="onchangeCity"
+                style="width:120px"
+              >
+                <el-option
+                  v-for="item in cityList"
+                  :key="item.id"
+                  :label="item.addressDistrict"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+              <el-select
+                v-model="steelMap.addressTown"
+                filterable
+                placeholder="请选择"
+                @change="onchangeCounty"
+                style="width:120px"
+              >
+                <el-option
+                  v-for="item in countyList"
+                  :key="item.id"
+                  :label="item.addressTown"
+                  :value="item.id"
+                ></el-option>
+              </el-select>
+              <el-autocomplete
+                class="inline-input"
+                v-model="steelMap.place"
+                :fetch-suggestions="querySearch1"
+                placeholder="请输入具体收货地址"
+                :trigger-on-focus="false"
+                @select="handleSelect1"
+                style="width:250px"
+              >
+              </el-autocomplete>
+              <el-button
+                type="success"
+                icon="el-icon-check"
+                circle
+                @click="addAddressClick"
+              ></el-button>
+            </div>
+          </div>
+        </div>
+        <div class="table">
+          <el-table
+            :data="steelMap.mapList"
+            border
+            style="width: 100%; margin-top: 20px"
+          >
+            <el-table-column
+              prop="materialName"
+              label="物资名称"
+              align="center"
+              width="150px"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialSpe"
+              label="物资规格"
+              align="center"
+              sortable
+            >
+            </el-table-column>
+            <el-table-column
+              prop="materialNum"
+              label="物资件数"
+              align="center"
+              width="150px"
+            >
+            </el-table-column>
+            <el-table-column prop="grossWeight" label="毛重"> </el-table-column>
+            <el-table-column
+              prop="grossWeightTime"
+              label="毛重时间"
+              width="130px"
+            >
+            </el-table-column>
+            <el-table-column prop="tareWeight" label="皮重"> </el-table-column>
+            <el-table-column
+              prop="tareWeightTime"
+              label="皮重时间"
+              width="130px"
+            >
+            </el-table-column>
+            <el-table-column prop="netWeight" label="净重"> </el-table-column>
+            <el-table-column prop="loadTime" label="装货时间" width="130px">
+            </el-table-column>
+            <el-table-column
+              prop="closeEntryId"
+              label="金蝶分录ID"
+              width="100px"
+            >
+            </el-table-column>
+          </el-table>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="centerDialogVisible = false">取 消</el-button>
+          <el-button type="primary" @click="centerDialogVisible = false"
+            >确 定</el-button
+          >
+        </span>
+      </el-dialog>
+    </div>
     <div>
       <vxe-modal width="549px" height="731px" v-model="isShow" show-footer>
         <div class="demo-image__preview">
@@ -307,81 +407,6 @@
         </div>
       </vxe-modal>
     </div>
-    <div class="address">
-      <!-- 收货地址弹出框 -->
-      <el-dialog title="收货地址" :visible.sync="drawer" width="90%">
-        <el-form :inline="true">
-          <el-form-item>
-            <label class="el-form-item__label" style="width: auto;">省</label>
-            <el-select
-              v-model="province"
-              filterable
-              placeholder="请选择"
-              @change="onchangeProvince"
-            >
-              <el-option
-                v-for="item in provinceList"
-                :key="item.id"
-                :label="item.addressProvince"
-                :value="item.id"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item>
-            <label class="el-form-item__label" style="width: auto;">市</label>
-            <el-select
-              v-model="city"
-              filterable
-              placeholder="请选择"
-              @change="onchangeCity"
-            >
-              <el-option
-                v-for="item in cityList"
-                :key="item.id"
-                :label="item.addressDistrict"
-                :value="item.id"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item>
-            <label class="el-form-item__label" style="width: auto;"
-              >县(区)</label
-            >
-            <el-select
-              v-model="county"
-              filterable
-              placeholder="请选择"
-              @change="onchangeCounty"
-            >
-              <el-option
-                v-for="item in countyList"
-                :key="item.id"
-                :label="item.addressTown"
-                :value="item.id"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item>
-            <label class="el-form-item__label" style="width: auto;"
-              >具体收货地址</label
-            >
-            <el-autocomplete
-              class="inline-input"
-              v-model="place"
-              :fetch-suggestions="querySearch1"
-              placeholder="请输入具体收货地址"
-              :trigger-on-focus="false"
-              @select="handleSelect1"
-            >
-            </el-autocomplete>
-          </el-form-item>
-        </el-form>
-        <div slot="footer" class="button-box">
-          <el-button @click="drawer = false">取消</el-button>
-          <el-button type="primary" @click="addAddressClick">确定</el-button>
-        </div>
-      </el-dialog>
-    </div>
   </div>
 </template>
 
@@ -392,8 +417,13 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
+      //弹出框
+      centerDialogVisible: false,
+      //根据车序号查询的值
+      steelMap: {},
+      //钢材子表数据
+      steelList: [],
       drawer: false,
-      clickIndex: null,
       input: null,
       screen: "",
       options: [
@@ -422,29 +452,6 @@ export default {
       tableData: [],
       spanArr: [],
       pos: 0,
-      isCellClick: 0,
-      columnIndexs: [
-        0,
-        1,
-        2,
-        3,
-        7,
-        8,
-        14,
-        16,
-        17,
-        18,
-        19,
-        20,
-        21,
-        22,
-        23,
-        24,
-        25,
-        26,
-        27,
-        29
-      ],
       mergeList: [
         "序号",
         "整车操作",
@@ -461,7 +468,14 @@ export default {
         "车牌号",
         "承运商",
         "下单客户",
-        "收货地址"
+        "收货地址",
+        "业务员",
+        "送货单打印状态",
+        "车序号",
+        "收货客户电话",
+        "金蝶分录ID",
+        "是否自提",
+        "操作"
       ],
       //钢材多拼车辆线路ID
       //索引从1-10为1-10拼路线ID
@@ -502,7 +516,6 @@ export default {
       //省市县Id
       addressId: null,
       addressRow: {},
-      operateShow: 0,
       srcList: [],
       src: "",
       isShow: false,
@@ -511,11 +524,29 @@ export default {
       isShow2: false
     };
   },
-  created() {},
-  mounted() {
+  created() {
     this.getSteelReport();
   },
+  mounted() {},
   methods: {
+    //点击操作弹出框
+    operation(row) {
+      console.log(row);
+      this.steelMap = {};
+      this.axios
+        .post(
+          "/api/v1/tms/getSteelReportDetailsBySmId?saleOrderMaterialId=" +
+            row.saleOrderMaterialId
+        )
+        .then(res => {
+          this.steelMap = res.data.data;
+          this.addressId = row.shipperAddressId;
+          this.getAllProvince();
+          this.onchangeProvince();
+          this.onchangeCity();
+        });
+      this.centerDialogVisible = true;
+    },
     //查看抵达图
     toPhotoClick(orderNo) {
       this.axios
@@ -543,13 +574,6 @@ export default {
           }
         });
     },
-    rowClick() {
-      if (this.operateShow == 1) {
-        this.operateShow = 0;
-      } else {
-        this.operateShow = 1;
-      }
-    },
     //反关闭整条分录
     adverseCloseSaleMaterial(row) {
       console.log(row.saleMaterialId);
@@ -610,48 +634,7 @@ export default {
       });
       loading.close();
     },
-    changeScreen() {
-      console.log(this.screen);
-    },
-    cellClik(row, column, cell, event) {
-      if (row.group != this.clickIndex) {
-        // this.getSteelReport();
-        this.tableData.forEach(item => {
-          if (item.group == this.clickIndex) {
-            this.$set(item, "isCapacityShow", 0);
-            this.$set(item, "isCarrierShow", 0);
-            this.$set(item, "isTelShow", 0);
-            this.$set(item, "isAddressShow", 0);
-            this.$set(item, "isNumShow", 0);
-            this.$set(item, "isconsigneeTelShow", 0);
-          }
-        });
-      }
-      if (column.property == "capacityNo") {
-        this.$set(row, "isCapacityShow", 1);
-        this.clickIndex = row.group;
-      }
-      if (column.property == "carrierName") {
-        this.$set(row, "isCarrierShow", 1);
-        this.clickIndex = row.group;
-      }
-      if (column.property == "capacityTel") {
-        this.$set(row, "isTelShow", 1);
-        this.clickIndex = row.group;
-      }
-      if (column.property == "addressPlace") {
-        this.$set(row, "isAddressShow", 1);
-        this.clickIndex = row.group;
-      }
-      if (column.property == "materialNum") {
-        this.$set(row, "isNumShow", 1);
-        this.clickIndex = row.group;
-      }
-      if (column.property == "consigneeTel") {
-        this.$set(row, "isconsigneeTelShow", 1);
-        this.clickIndex = row.group;
-      }
-    },
+    changeScreen() {},
     //承运商弹出层
     handleSelectCarrier(row, index, item) {
       this.carrierList.forEach(item => {
@@ -1000,7 +983,7 @@ export default {
       this.axios
         .post(
           "/api/v1/uc/getDistrictByProvince?addressProvince=" +
-            this.province +
+            this.steelMap.addressProvince +
             "&i=" +
             new Date()
         )
@@ -1015,7 +998,7 @@ export default {
       this.axios
         .post(
           "/api/v1/uc/getTownByDistrict?addressDistrict=" +
-            this.city +
+            this.steelMap.addressDistrict +
             "&i=" +
             new Date()
         )
@@ -1026,9 +1009,9 @@ export default {
     //县(区)改变
     onchangeCounty() {
       let mapValue = {
-        addressProvince: this.province,
-        addressDistrict: this.city,
-        addressTown: this.county
+        addressProvince: this.steelMap.addressProvince,
+        addressDistrict: this.steelMap.addressDistrict,
+        addressTown: this.steelMap.addressTown
       };
       this.axios.post("/api/v1/uc/getPlaceByAllAddress", mapValue).then(res => {
         this.addressId = res.data.data[0].addressId;
@@ -1074,10 +1057,9 @@ export default {
         spinner: "el-icon-loading",
         background: "rgba(0, 0, 0, 0.7)"
       });
-      let map = this.addressRow;
+      let map = this.steelMap;
       map.isCloseEas = Number(1);
       map.isNewCar = Number(1);
-      map.place = this.place;
       map.shipperAddressId = this.addressId;
       this.axios
         .post("/api/v1/ams/updateCarAddress", map)
@@ -1278,7 +1260,6 @@ export default {
         )
         .then(res => {
           this.tableData = res.data.data;
-          this.operateShow = 0;
           this.getSpanArr(res.data.data);
         });
     },
@@ -1324,9 +1305,9 @@ export default {
       this.axios
         .post(
           "/api/v1/tms/getSaleSteelReport?startTime=" +
-            null +
+            startTime +
             "&endTime=" +
-            null +
+            endTime +
             "&carrierSsoId=" +
             carrierSsoId +
             "&saler=" +
@@ -1345,75 +1326,7 @@ export default {
         .then(res => {
           this.tableData = res.data.data;
           this.getSpanArr(res.data.data);
-          this.operateShow = 0;
         });
-    },
-    //控制列自动撑开
-    flexColumnWidth(str, tableData, flag) {
-      // str为该列的字段名(传字符串);tableData为该表格的数据源(传变量);
-      // flag为可选值,可不传该参数,传参时可选'max'或'equal',默认为'max'
-      // flag为'max'则设置列宽适配该列中最长的内容,flag为'equal'则设置列宽适配该列中第一行内容的长度。
-      str = str + "";
-      let columnContent = "";
-      if (
-        !tableData ||
-        !tableData.length ||
-        tableData.length === 0 ||
-        tableData === undefined
-      ) {
-        return;
-      }
-      if (!str || !str.length || str.length === 0 || str === undefined) {
-        return;
-      }
-      if (flag === "equal") {
-        // 获取该列中第一个不为空的数据(内容)
-        for (let i = 0; i < tableData.length; i++) {
-          if (tableData[i][str].length > 0) {
-            columnContent = tableData[i][str] + "";
-            break;
-          }
-        }
-      } else {
-        // 获取该列中最长的数据(内容)
-        let index = 0;
-        for (let i = 0; i < tableData.length; i++) {
-          if (tableData[i][str] === null) {
-            // 当数据为空时跳过本次循环获取下一条数据长度
-            continue;
-          }
-          const now_temp = tableData[i][str] + "";
-          const max_temp = tableData[index][str] + "";
-          if (now_temp.length > max_temp.length) {
-            index = i;
-          }
-        }
-        columnContent = tableData[index][str] + "";
-      } // 以下分配的单位长度可根据实际需求进行调整
-      let flexWidth = 0;
-      if (columnContent != undefined) {
-        for (const char of columnContent) {
-          if ((char >= "A" && char <= "Z") || (char >= "a" && char <= "z")) {
-            // 如果是英文字符,为字符分配10个单位宽度
-            flexWidth += 10;
-          } else if (char >= "\u4e00" && char <= "\u9fa5") {
-            // 如果是中文字符,为字符分配16个单位宽度
-            flexWidth += 14;
-          } else {
-            // 其他种类字符,为字符分配10个单位宽度
-            flexWidth += 10;
-          }
-        }
-      }
-      if (flexWidth < 80) {
-        // 设置最小宽度
-        flexWidth = 80;
-      }
-      if (flexWidth > 500) {
-        // 设置最大宽度
-        flexWidth = 500;
-      }
-      return flexWidth + "px";
     }
   }
 };
@@ -1434,6 +1347,39 @@ export default {
       background-color: transparent;
     }
   }
+  .dialog {
+    .steelMapClass {
+      .steelMapClass1 {
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass12 {
+          margin-left: 50px;
+          margin-right: 10px;
+        }
+      }
+      .steelMapClass2 {
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: flex-start;
+        font-size: 16px;
+        .steelMapClass22 {
+          margin-left: 50px;
+          margin-right: 10px;
+          .el-select {
+            .el-input .el-input--suffix {
+              .el-input__inner {
+                border: 0px solid !important;
+              }
+            }
+          }
+        }
+      }
+    }
+  }
   .address {
     .button-box {
       display: flex;