Pārlūkot izejas kodu

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

liyg 2 gadi atpakaļ
vecāks
revīzija
3d4f906573

+ 3 - 4
build/utils.js

@@ -16,11 +16,10 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
-//let devModules = ['all']
-//let devModules = ['index', 'statisticalReport', 'queue', 'sale','TMS','QMS','appoint']
-let devModules = ['all']
-//let devModules=['index']
 
+let devModules = ['all']
+//let devModules = ['index', 'statisticalReport', 'queue', 'sale','TMS','QMS','appoint']
+// let devModules = ['index', 'ADMINISTRATORS']
 
 if (pathSrc.indexOf('node_modules') > -1) {
   devModules = require('../../../cors.js').devModules

+ 1 - 1
config/index.js

@@ -73,7 +73,7 @@ let proxyTable = {
   // 所有数据的请求域名地址
   '/api/v1': {
     target: 'http://172.16.33.166:80',
-    //target: 'http://localhost:8080',
+    // target: 'http://localhost:8080',
     // target: 'http://192.168.1.104:8080',
     ws: true,
     pathRewrite: {

+ 100 - 26
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -308,10 +308,7 @@
               </div>
               <div class="from">
                 <span class="text">进厂门岗:</span>
-                <el-select
-                  v-model="enFactoryGatepost"
-                  placeholder="请选择"
-                >
+                <el-select v-model="enFactoryGatepost" placeholder="请选择">
                   <el-option
                     v-for="item in gatePostList"
                     :key="item.gatepostId"
@@ -319,7 +316,7 @@
                     :value="item.gatepostId"
                   >
                   </el-option>
-              </el-select>
+                </el-select>
               </div>
               <div class="button_box">
                 <el-button
@@ -361,10 +358,7 @@
               </div>
               <div class="from">
                 <span class="text">出厂门岗:</span>
-                <el-select
-                  v-model="enFactoryGatepost"
-                  placeholder="请选择"
-                >
+                <el-select v-model="enFactoryGatepost" placeholder="请选择">
                   <el-option
                     v-for="item in gatePostList"
                     :key="item.gatepostId"
@@ -460,6 +454,58 @@
               </div>
             </div>
           </el-tab-pane>
+          <el-tab-pane label="物流单向删皮/删毛接口(仅限钢材)" name="zero">
+            <div class="admin2">
+              <div class="carrier from">
+                <el-form
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
+                    <el-autocomplete
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
+                    >
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
+                    </el-autocomplete>
+                  </el-form-item>
+                </el-form>
+              </div>
+              <div class="material from">
+                <span class="text">物资:</span>
+                <el-select v-model="materialId" placeholder="请选择">
+                  <el-option
+                    v-for="item in materialList"
+                    :key="item.materialId"
+                    :label="item.materialName"
+                    :value="item.materialId"
+                  >
+                  </el-option>
+                </el-select>
+              </div>
+              <div class="block">
+                <span class="text">毛重时间:</span>
+                <el-date-picker
+                  v-model="value1"
+                  type="datetime"
+                  placeholder="选择日期时间"
+                >
+                </el-date-picker>
+              </div>
+            </div>
+            <div class="button_box">
+              <el-button type="primary" @click="linkageDeleteTransportOrder"
+                >确认</el-button
+              >
+            </div>
+          </el-tab-pane>
         </el-tabs>
       </div>
     </template>
@@ -509,6 +555,34 @@ export default {
     this.information()
   },
   methods: {
+    linkageDeleteTransportOrder() {
+      let good = ''
+      let goodspa = ''
+      let goodList = []
+      let mapList = []
+      if (this.materialId != null) {
+        goodList = this.materialList.filter(e => {
+          if (e.materialId == this.materialId) {
+            return e
+          }
+        })
+        good = goodList[0].good
+        goodspa = goodList[0].goodspa
+      }
+      let map = {
+        orderNumber: this.orderNumber,
+        good: good,
+        goodspa: goodspa,
+        resultCrossWeightTime: toDateString(this.value1)
+      }
+      mapList.push(map)
+      this.axios
+        .post('/api/v1/join/linkageDeleteTransportOrder', mapList)
+        .then(res => {
+          console.log(res)
+        })
+      console.log(toDateString(this.value1))
+    },
     updateOrderStatus() {
       if (
         this.orderNumber != null &&
@@ -540,28 +614,28 @@ export default {
         orderNumber: this.orderNumber + ' ',
         gatepostId: this.enFactoryGatepost
       }
-      this.axios.post('/api/v1/tms/enFactoryResultByPDA',map).then(res=>{
-        console.log(res);
-        if(res.data.status=='succeed'){
-          this.$message.success("进厂成功!");
-        }else{
-          this.$message.error("操作失败:"+res.data.data);
+      this.axios.post('/api/v1/tms/enFactoryResultByPDA', map).then(res => {
+        console.log(res)
+        if (res.data.status == 'succeed') {
+          this.$message.success('进厂成功!')
+        } else {
+          this.$message.error('操作失败:' + res.data.data)
         }
-      });
+      })
     },
-    leaveFactoryResultByPDA(){
-       let map = {
+    leaveFactoryResultByPDA() {
+      let map = {
         orderNumber: this.orderNumber + ' ',
-        gatepostId:  this.enFactoryGatepost
+        gatepostId: this.enFactoryGatepost
       }
-      this.axios.post('/api/v1/tms/addLeaveFactoryResult',map).then(res=>{
-        console.log(res);
-        if(res.data.status=='succeed'){
-          this.$message.success("出厂成功!");
-        }else{
-          this.$message.error("操作失败:"+res.data.data);
+      this.axios.post('/api/v1/tms/addLeaveFactoryResult', map).then(res => {
+        console.log(res)
+        if (res.data.status == 'succeed') {
+          this.$message.success('出厂成功!')
+        } else {
+          this.$message.error('操作失败:' + res.data.data)
         }
-      });
+      })
     },
     allowEnfactoryClick() {},
     queueClick() {

+ 1 - 0
src/views/appoint/components/saleContract/addTransportPrice.vue

@@ -281,6 +281,7 @@ export default {
       });
   },
   created(){
+    
     //获取所有的省
     this.getAllProvince();
   },

+ 640 - 0
src/views/appoint/components/saleContract/addTransportPriceNew.vue

@@ -0,0 +1,640 @@
+<template>
+  <!-- 添加汽运单价 111-->
+  <div class="addTransportPrice">
+    <page-title>修改</page-title>
+    <div class="form">
+      <div class="form_box">
+        <dil-form :formId="394" v-model="form1" ref="from1"></dil-form>
+        <label>运输距离:</label><el-input type="number" v-model="haulDistance" class="el-input"></el-input>
+      </div>
+      <div id="liulan1">
+          <el-button type="primary" class="btn" @click="updateAddressDeliveryAddress">提交</el-button>
+          <el-button type="primary" class="btn1" @click="updatePriceValue">提交</el-button>
+      </div>
+    </div>
+    <div class="elForm">
+      <el-form :inline="true" class="demo-form-inline" label-width="80px">
+        <el-button type="primary" id="cysbutton" @click="ondrawerOutcys">浏览所属承运商</el-button>
+      </el-form>
+    </div>
+
+    <!-- 承运商模态框 -->
+    <el-drawer
+      title="选择承运商"
+      :visible.sync="drawer"
+      direction="rtl"
+      size="40%"
+      :show-close="false"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="index"
+        style="margin-top: 10px; margin-left: 20px;width:250px"
+        clearable
+      >
+      </el-input
+      ><el-button
+      type="primary"
+      class="btn"
+      @click="onclickCarrier"
+      style="margin-left: 4px;"
+    >
+      <i class="el-icon-search"></i>查询
+    </el-button>
+      <!-- <el-button @click="open">取消</el-button> -->
+      <el-button type="primary" @click="selectMakeSure">确定</el-button>
+      <div class="tablecls">
+        <!-- 查询所有的承运商 -->
+        <dilTable
+          v-bind.sync="carrier"
+          @selection-change="currentRadioChangecys"
+          :drawer="drawer"
+        >
+        </dilTable>
+      </div>
+    </el-drawer>
+
+    <!--  所属承运商表格  -->
+    <div class="selectionTable from">
+      <el-table
+        :data="selectionList"
+        border
+        style="width: 100%"
+        highlight-current-row
+      >
+        <el-table-column type="index" label="序号" width="50">
+        </el-table-column>
+        <el-table-column
+          v-for="(item, i) in tableTop"
+          :key="i"
+          :prop="item.prop"
+          :label="item.label"
+          :width="item.width"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <!-- 操作列 -->
+        <el-table-column fixed="right" label="操作" width="100">
+          <template slot-scope="scope">
+            <el-button
+              @click="deleteRow(scope.$index)"
+              type="text"
+              icon="el-icon-close"
+              size="big"
+            ></el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <div class="button_box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+import { sjTime,isNumber } from "@/utils/sharedJsFile";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      haulDistance:"",
+      carrierIdArray:[],
+      tableTop: [
+        {
+          prop: "carrierName",
+          label: "承运商"
+        }
+      ],
+      selectionList: [],
+      carrierTypes:[],
+      carrier: {
+        requestUrl: "",
+        selectionType: "select"
+      },
+      //是否显示承运商模态框
+      drawer: false,
+      index: "",
+      //具体收货地址
+      place:null,
+      //承运商名称
+      state: null,
+      //承运商id
+      carrierIds: null,
+      //收货地址id
+      addressId:null,
+      //收货地址模态框数据
+      addressDetailed :null,
+      addres:{
+        requestUrl:"",
+        selectionType: "radio",
+      },
+      //是否打开收货地址弹出框
+      drawer1:false,
+      //所有省
+      provinceList: [],
+      //选中的省
+      province: '',
+      //所有市
+      cityList: [],
+      //选中的市
+      city: '',
+      //所有的县(区)
+      countyList: [],
+      //选中的县
+      county: '',
+      //是否点击查询
+      isKuang:false,
+      //表格加载状态
+      tableLoading:false,
+      //公式内容
+      formulaString:null,
+      //油价联动公式Id
+      oilPriceFormulaId:null,
+      //是否打开油价联动公式的模态窗口
+      oilPriceFormulaDrawer:false,
+      //油价联动公式查询条件
+      LineText:null,
+      //油价联动公式模态框查询按钮状态
+      selectLineLoading:false,
+      //油价联动公式模态窗口的数据
+      oilPriceFormula:{
+        requestUrl:"",
+        selectionType: "radio",
+      },
+      //模态窗口的打开的方向
+      direction: 'rtl',
+      //表单数据
+      form1: {
+        shipperId:1,
+        priceDate:new Date(),
+        oilTypeId:10,
+        capacityTypeId:1,
+        type: "销售钢材"
+      },
+      //提交给后端的数据
+      // map:{},
+      ops: {
+        vuescroll: {},
+        scrollPanel: {},
+        rail: {
+          keepShow: true
+        },
+        bar: {
+          hoverStyle: true,
+          onlyShowBarOnScroll: false, //是否只有滚动的时候才显示滚动条
+          background: "#5f9ea0",//滚动条颜色
+          opacity: 0.8,//滚动条透明度
+          "overflow-x": "hidden"
+        }
+      }
+    };
+  },
+  mounted() {
+    this.axios
+      .post(
+        "/api/v1/rms/getCarrierNameBySSOId?carrierSSOId=" + this.carrierUserId
+      )
+      .then((res) => {
+        if (res.data.code == "200") {
+          if (res.data.data) {
+            this.state = res.data.data.carrierName;
+            this.carrierIds = res.data.data.carrierId;
+          }
+        }
+      });
+  },
+  created(){
+    console.log(this.$route.params)
+    this.form1=this.$route.params
+    this.haulDistance=this.$route.params.haulDistance
+    this.getCarrierNameList();    
+    //获取所有的省
+    this.getAllProvince();
+  },
+  methods: {
+    //获取已有的承运商
+    async getCarrierNameList(){
+      await this.axios.post("/api/v1/ams/getCarrierListByAddress",this.form1).then(res=>{
+        if(res.data.code==200){
+          console.log("进入了获取界面")
+          this.selectionList=res.data.data
+        }
+      })
+      console.log(this.selectionList)
+    },
+    //点击删除按钮删除当前点击的对象
+    deleteRow(index) {
+      this.selectionList.splice(index, 1);
+    },
+    ondrawerOutcys(){
+      this.carrier.requestUrl =
+        "/api/v1/uc/getCarrierListByLike?apiId=412&i=" + new Date();
+      this.drawer = true;
+    },
+    currentRadioChangecys(selection) {
+      console.log("选择获取到的数据")
+      console.log(selection)
+      this.carrierTypes=[];
+      for (let i = 0; i < selection.length; i++) {
+        if (this.carrierTypes.indexOf(selection[i]) === -1) {
+          this.carrierTypes.push(selection[i]);
+        }
+      }
+      console.log("this.carrierTypes "+JSON.stringify(this.carrierTypes));
+    },
+    //承运商确定按钮
+    selectMakeSure() {
+      console.log("进入了确定")
+      console.log(this.selectionList)
+      console.log(this.carrierTypes)
+      var fatherNum;
+      var sonNum;
+      if (this.selectionList.length > this.carrierTypes.length) {
+        fatherNum=this.selectionList
+        sonNum=this.carrierTypes
+      }else{
+        fatherNum=this.carrierTypes
+        sonNum=this.selectionList
+      }
+      var breaked = false;
+      for (let i = 0; i < fatherNum.length; i++) {
+        for (let j = 0; j <sonNum.length; j++) {
+          if (fatherNum[i].carrierName==sonNum[j].carrierName){
+            this.$message({
+              type: "info",
+              message: "已有【"+sonNum[j].carrierName+"】承运商,无法重复添加~",
+            })
+            breaked = true;
+            break;
+          }
+        }
+        if (breaked) {
+          break;
+        }
+      }
+      if (breaked) {
+        return
+      }
+      for (let i = 0; i < this.carrierTypes.length; i++) {
+          this.selectionList.push(this.carrierTypes[i])
+      }
+      this.index = null;
+      this.drawer = false;
+    },
+    //模糊查询承运商
+    onclickCarrier() {
+      this.carrier.requestUrl =
+        "/api/v1/uc/getCarrierListByLike?apiId=412&index=" +
+        this.index +
+        "&i=" +
+        new Date();
+    },
+    func(res){
+        this.selectLineLoading = false;
+        this.isKuang = false;
+        this.tableLoading = false;
+    },
+    //点击外层收货地址选择事件
+    ondrawerOut(){
+      this.drawer1 = true;
+    },
+    //获取所有省数据
+    getAllProvince(){
+      this.axios.post('/api/v1/uc/getAllProvince').then((res)=>{
+        this.provinceList = res.data.data;
+      })
+    },
+    //省改变
+    onchangeProvince(){
+      this.axios.post('/api/v1/uc/getDistrictByProvince?addressProvince='+this.province).then((res)=>{
+        this.cityList = res.data.data;
+      })
+    },
+    //市改变
+    onchangeCity(){
+      this.axios.post('/api/v1/uc/getTownByDistrict?addressDistrict='+this.city).then((res)=>{
+        this.countyList = res.data.data;
+      })
+    },
+    //县(区)改变
+    onchangeCounty(){
+      let mapValue = {
+        addressProvince : this.province,
+        addressDistrict : this.city,
+        addressTown : this.county
+      }
+      this.axios.post('/api/v1/uc/getPlaceByAllAddress',mapValue).then((res)=>{
+        this.addressId = res.data.data[0].addressId;
+      })
+    },
+    selectLineClick(){
+      this.tableLoading = true;
+      this.selectLineLoading = true;
+      this.isKuang = true;
+      if(this.LineText){
+        this.oilPriceFormula.requestUrl = "api/v1/uc/getOilFormula?apiId=444&con="+this.LineText;
+      }else{
+        this.oilPriceFormula.requestUrl = "api/v1/uc/getOilFormula?apiId=444&i=" + new Date();
+      }
+    },
+    //承运商弹出层
+    handleSelect(item) {
+      this.carrierIds = item.carrierId;
+      item.carrierName = this.state;
+    },
+    //收货地址弹出层
+    handleSelect1(item) {
+        console.log("获取所有下拉值!");
+    },
+    //以下是承运商边输边查搜索
+    querySearch(queryString, cb) {
+      this.axios
+        .post("/api/v1/uc/getCarrierMesByLike?index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            var restaurants = res.data.data;
+            var results = queryString
+              ? restaurants.filter(this.createFilter(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是承运商边输边查搜索
+
+    //以下是收货地址边输边查搜索
+    querySearch1(queryString, cb){
+      this.axios
+        .post("/api/v1/ams/getRealAddressByLike?addressId="+this.addressId + "&index=" + queryString)
+        .then((res) => {
+          if (res.data.code == "200") {
+            console.log(res.data.data);
+            var restaurants = res.data.data;
+            // console.log(restaurants, "restaurants");
+            var results = queryString
+              ? restaurants.filter(this.createFilter1(queryString))
+              : restaurants;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
+    createFilter1(queryString) {
+      return (restaurants) => {
+        return (
+          restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) >
+          -1
+        );
+      };
+    },
+    //以上是收货地址边输边查搜索
+
+    //选定联动公式确定
+    addoilPriceFormula(){
+      let mapvalue = {
+        shipperId : this.form1.shipperId,
+        oilPriceFormula:this.formulaString,
+        cargonameId : this.oilPriceFormulaId,
+        capacityTypeId : this.form1.capacityTypeId,
+        priceValue : this.form1.priceValue,
+        priceDate : this.form1.priceDate,
+        addressName:this.form1.addressName,
+        type : this.form1.type,
+        oilpriceBase : this.form1.oilpriceBase,
+        oilTypeId : this.form1.oilTypeId,
+        oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
+      }
+      this.form1 = mapvalue;
+      this.oilPriceFormulaDrawer = false;
+    },
+    currentRadioChange(val){
+      this.formulaString = val.formulaString;
+      this.oilPriceFormulaId = val.formulaId;
+    },
+    //具体地址确定
+    specificAddress(){
+      let mapvalue = {
+        shipperId : this.form1.shipperId,
+        oilPriceFormula:this.formulaString,
+        capacityTypeId : this.form1.capacityTypeId,
+        cargonameId : this.oilPriceFormulaId,
+        priceValue : this.form1.priceValue,
+        priceDate : this.form1.priceDate,
+        addressName:this.province+this.city+this.county+this.place,
+        type : this.form1.type,
+        oilpriceBase : this.form1.oilpriceBase,
+        oilTypeId : this.form1.oilTypeId,
+        oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold
+      }
+      this.form1 = mapvalue;
+      this.drawer1 = false;
+    },
+    //打开线路的模态窗口
+    oilPriceFormulaClick(){
+      this.oilPriceFormulaDrawer = true;
+      this.oilPriceFormula.requestUrl = "/api/v1/uc/getOilFormula?apiId=444"
+    },
+    //模态窗口关闭时调用
+    handleClose(){
+      if(this.oilPriceFormulaDrawer){
+        this.oilPriceFormulaDrawer = false;
+        this.LineText = null;
+      }
+    },
+    makeSure() {
+      if (this.haulDistance=="" || this.haulDistance==null){
+        this.$message({
+          type: "warning",
+          message: "请输入运输距离!",});
+        return;
+      }
+      for (let i = 0; i < this.selectionList.length; i++) {
+        this.carrierIdArray.push(this.selectionList[i].carrierId)
+      }
+      this.form1.carrierIdArray=this.carrierIdArray
+      this.form1.haulDistance=this.haulDistance
+      // let mapValue={
+      //   shipperId : this.form1.shipperId,
+      //   carrierId : this.carrierIdArray,
+      //   cargonameId : this.oilPriceFormulaId,
+      //   capacityTypeId : this.form1.capacityTypeId,
+      //   priceValue : this.form1.priceValue,
+      //   priceDate : sjTime(this.form1.priceDate),
+      //   addressId : this.addressId,
+      //   type : this.form1.type,
+      //   oilpriceBase : this.form1.oilpriceBase,
+      //   oilTypeId : this.form1.oilTypeId,
+      //   oilpriceChangeThreshold : this.form1.oilpriceChangeThreshold,
+      //   place: this.place,
+      //   haulDistance: this.haulDistance
+      // }
+      // this.axios.post("/api/v1/ams/addAmsContractTransportPrice", mapValue).then((res) => {
+      //     if (res.data.code == "200") {
+      //       this.$router.go(-1);
+      //     }
+      //     this.$message({
+      //       type: "success",
+      //       message: "新增运输单价成功!",
+      //     });
+      //   });
+      this.axios.post("/api/v1/ams/updateCarrierName",this.form1).then(res=>{
+        if(res.data.code==200){
+          this.$message.success("修改承运商成功")
+        }else{
+          this.$message.warning("修改承运商失败")
+        }
+      })
+      this.$router.push('/transportPrice');
+    },
+    // 取消
+    cancel() {
+      this.$router.push('/transportPrice');
+    },
+    //修改运价
+    updatePriceValue(){
+      console.log("查看数据")
+      if(this.form1.priceValue==null||this.form1.priceValue==""){
+        this.$message.warning("运价不能为空")
+        return
+      }
+      console.log("进入了修改单价的方法")
+      console.log(this.form1)
+      this.axios.post("/api/v1/ams/updatePriceValue",this.form1).
+      then(res=>{
+        if(res.data.code==200){
+          this.$message.success("修改运价成功")
+        }else{
+          this.$message.warning("修改运价失败")
+        }
+      })
+      this.$router.push('/transportPrice');
+    },
+    //修改卸货地址
+    updateAddressDeliveryAddress(){
+      if(this.form1.addressDeliveryAddress==null||this.form1.addressDeliveryAddress==""){
+        this.$message.warning("卸货地址不能为空")
+        return
+      }
+      console.log("进入了修改卸货地址的方法")
+      console.log(this.form1)
+      this.axios.post("/api/v1/ams/updateaddressDeliveryAddress",this.form1).
+      then(res=>{
+        console.log(res)
+        if(res.data.code==200){
+          this.$message.success("修改卸货成功")
+        }else{
+          this.$message.warning("修改卸货失败")
+        }
+      })
+      this.$router.push('/transportPrice');
+    },
+  },
+};
+</script>
+<style lang='scss'>
+
+.elForm {
+    margin-left: 38%;
+  }
+.button-box{
+  display: flex;
+  text-align: center;
+  align-items: center;
+  justify-content: center;
+  margin-top: 0.3125rem;
+  margin-bottom: 1.25rem;
+}
+.addTransportPrice{
+  .form{
+    display: flex;
+    .form_box{
+      width: 320px;
+      margin-left: 38%;
+      margin-top: 30px;
+      margin-right: 20px;
+      .el-form{
+        .preview-group{
+          .el-form-item{
+            .el-form-item__label{
+              display: inline-block;
+              width: 70px !important;
+            }
+            .el-form-item__content{
+              .el-select{
+                width: 250px;
+              }
+              .el-input{
+                width: 250px;
+              }
+            }
+          }
+        }
+      }
+      label{
+        display: inline-block;
+        width: 70px !important;
+      }
+      .el-input{
+        width: 250px;
+      }
+    }
+    #liulan1{
+      width: 120px;
+      margin-top: 80px;
+      .el-button{
+        width: 100px !important;
+        margin-top: 14px;
+      }
+      .btn{
+        margin-top: 106px;
+      }
+      .btn1{
+        margin-top: 13px;
+        margin-left: 0px;
+      }
+      .btn2{
+        margin-top: 67px;
+      }
+    }
+  }
+  .button_box{
+    margin-left: 45%;
+  }
+  .selectText{
+    .el-input{
+      width: 250px;
+    }
+  }
+  .LineTable{
+    width: 100%;
+    height: 480px;
+    overflow: hidden;
+    margin-top: 10px;
+  }
+  #cysbutton{
+    margin-left: 70px;
+  }
+}
+</style>
+<style lang='scss'>
+  /deep/.__bar-is-vertical {
+    right: -1px !important;
+  }
+  /deep/.__bar-is-horizontal {
+    display: none !important;
+  }
+</style>

+ 304 - 13
src/views/appoint/components/saleContract/transportPrice.vue

@@ -10,24 +10,23 @@
         <i class="el-icon-plus"></i>新增
       </el-button>
        <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
-<!--      <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">
-          导入单价表
-        </el-button>
-      </el-upload>-->
     </div>
 
 <el-tabs v-model="activeName">
       <!-- 正在启用 -->
        <el-tab-pane label="正在启用" name="first">
           <dilTable ref="excelDom" v-bind.sync="option" :loading="loading" :isKuang="isKuang" @func="func">
+            <el-table-column
+            fixed="right"
+            label="操作"
+            width="200px"
+            align="center"
+            >
+            <template slot-scope="scope">
+              <el-button type="primary" @click="updatePriceclick(scope.row)">修改</el-button>
+              <el-button type="primary" @click="deletePrice(scope.row)">删除</el-button>
+            </template>
+            </el-table-column>
         </dilTable>
       </el-tab-pane>
       <!-- 历史启用 -->
@@ -35,8 +34,87 @@
           <dilTable ref="excelDom" v-bind.sync="option2" :loading="loading" :isKuang="isKuang" @func="func">
           </dilTable>
       </el-tab-pane>
-
     </el-tabs>
+
+    <!-- 承运商模态框 -->
+    <el-drawer
+      title="运价修改界面"
+      :visible.sync="drawer"
+      direction="rtl"
+      size="40%"
+      :show-close="false"
+    >
+      <div class="operation1">
+        <span style="width:10%;align-content: center;">卸货地点</span>
+        <el-input
+        v-model="newAddressDeliveryAddress"
+        style="width:70%"
+        ></el-input>
+        <el-button type="primary" style="width:15%" @click="updateAddressDeliveryAddress">提交</el-button>
+      </div>
+      <div class="operation2">
+        <span style="width:10%;align-content: center;">运价</span>
+        <el-input
+        v-model="newPriceValue"
+        style="width:30%"
+        ></el-input>
+        <el-button type="primary" style="width:15%" @click="updatePriceValue">提交</el-button>
+      </div>
+      <el-input
+        placeholder="请输入内容"
+        style="margin-top: 10px; margin-left: 20px;width:250px"
+        clearable
+        v-model="index"
+      >
+      </el-input
+      ><el-button
+      type="primary"
+      style="margin-left: 4px;"
+      @click="queryCarrierName"
+    >
+      <i class="el-icon-search"></i>查询
+    </el-button>
+      <el-button type="primary" @click="updateCarrierNamelist">确定修改承运商</el-button>
+      <div>
+        <!-- 查询所有的承运商 -->
+        <el-table
+        :data="carrierNameTable"
+        style="width:100%"
+        max-height="200px"
+        :row-key="getRowKeys"
+        @selection-change="handleSelectionChange"
+        :border="true"
+        ref="carrierNameTable"
+        >
+        <el-table-column
+        type="selection"
+        :reserve-selection="true"
+        >
+        </el-table-column>
+        <el-table-column
+        type="index"
+        label="序号"
+        >
+        </el-table-column>
+        <el-table-column
+        prop="carrierName"
+        label="承运商"
+        align="center"
+        >
+        </el-table-column>
+        </el-table>
+        <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        layout="total,prev,pager,next,sizes"
+        :total="carrierNametotal"
+        :page-sizes="[10, 50, 100, 1000]"
+        :page-size="currentPageSize"
+        >
+        </el-pagination>
+      </div>
+    </el-drawer>
   </div>
 </template>
 <script>
@@ -48,6 +126,29 @@ export default {
       isKuang:false,
       loading:false,
       input: "",
+      drawer:false,
+      //承运商
+      carrierNameTable:[],
+      //卸货地点
+      newAddressDeliveryAddress:'',
+      //运价
+      newPriceValue:'',
+      //执行日期
+      insertTime:'',
+      //修改单价或者卸货地址所需信息
+      datalist:{},
+      //选中的值
+      checkedList:[],
+      //承运商总数目
+      carrierNametotal:100,
+      //当前页数
+      currentPage:1,
+      //当前页数规格
+      currentPageSize:10,
+      //搜索框
+      index:'',
+      //承运商的修改
+      carrierIdArray:[],
       option: {
         // 表格请求数据的地址
         requestUrl:
@@ -80,6 +181,186 @@ export default {
     btnclick() {
       this.$router.push("/addTransportPrice");
     },
+    updatePriceclick(row) {
+      this.$router.push({
+        name:'addTransportPriceNew',
+        params:{
+          addressProvince:row.addressProvince,
+          addressDistrict:row.addressDistrict,
+          addressTown:row.addressTown,
+          addressDeliveryAddress:row.addressDeliveryAddress,
+          priceValue:row.priceValue,
+          haulDistance:row.haulDistance,
+          placeId:row.placeId,
+          priceDate:row.priceDate
+        }
+      });
+    },
+    //修改运价
+    //删除运价
+    deletePrice(row){
+      let mapValue={
+        addressProvince:row.addressProvince,
+        addressDistrict:row.addressDistrict,
+        addressTown:row.addressTown,
+        addressDeliveryAddress:row.addressDeliveryAddress
+      }
+      this.axios.post("/api/v1/ams/deleteSalelPrice",mapValue)
+      .then(res=>{
+        if(res.data.code==200){
+          this.$message.success("删除成功")
+        }else{
+          this.$message.warning("删除失败")
+        }
+      })
+      this.onclick()
+    },
+    //修改
+    async updatePrice(row){
+      this.drawer=true
+      this.newAddressDeliveryAddress=row.addressDeliveryAddress
+      this.newPriceValue=row.priceValue
+      this.datalist.placeId=row.placeId
+      this.datalist.addressProvince=row.addressProvince
+      this.datalist.addressDistrict=row.addressDistrict
+      this.datalist.addressTown=row.addressTown
+      this.datalist.addressDeliveryAddress=row.addressDeliveryAddress
+      let mapValue={
+          pageSize:this.currentPageSize,
+          pageNum:this.currentPage,
+          index:this.index
+        }
+      await this.axios.post("/api/v1/ams/getCarrierListByPrice",mapValue).then(res=>{
+        console.log("进入了查询承运商界面")
+        console.log(res.data)
+        this.carrierNameTable=res.data.data
+        this.carrierNametotal=res.data.data[1].total
+      })
+      await this.axios.post("/api/v1/ams/getCarrierListByAddress",this.datalist).
+      then(res=>{
+        //this.checkedList=res.data.data
+      })
+      //console.log("初始化时选中的数据")
+      //console.log(this.checkedList)
+    },
+    //修改运价
+    updatePriceValue(){
+      console.log("查看数据")
+      console.log(this.newPriceValue)
+      if(this.newPriceValue==null||this.newPriceValue==""){
+        this.$message.warning("运价不能为空")
+        return
+      }
+      console.log("进入了修改单价的方法")
+      this.datalist.newPriceValue=this.newPriceValue
+      console.log(this.datalist)
+      this.axios.post("/api/v1/ams/updatePriceValue",this.datalist).
+      then(res=>{
+        if(res.data.code==200){
+          this.$message.success("修改运价成功")
+        }else{
+          this.$message.warning("修改运价失败")
+        }
+      })
+      this.onclick()
+      this.drawer=false
+      this.$refs.carrierNameTable.clearSelection()
+    },
+    //修改卸货地址
+    updateAddressDeliveryAddress(){
+      if(this.newAddressDeliveryAddress==null||this.newAddressDeliveryAddress==""){
+        this.$message.warning("卸货地址不能为空")
+        return
+      }
+      console.log("进入了修改卸货地址的方法")
+      this.datalist.newAddressDeliveryAddress=this.newAddressDeliveryAddress
+      console.log(this.datalist)
+      this.axios.post("/api/v1/ams/updateaddressDeliveryAddress",this.datalist).
+      then(res=>{
+        console.log(res)
+        if(res.data.code==200){
+          this.$message.success("修改卸货成功")
+        }else{
+          this.$message.warning("修改卸货失败")
+        }
+      })
+      this.onclick()
+      this.drawer=false
+      this.$refs.carrierNameTable.clearSelection()
+    },
+    getRowKeys(row){
+      return row.carrierId
+    },
+    handleSelectionChange(list){
+      console.log("选中的值")
+      console.log(list)
+      this.checkedList=list
+      console.log(this.checkedList)
+    },
+    async handleSizeChange(val) {
+        console.log(`每页 ${val} 条`);
+        this.currentPageSize=val
+        let mapValue={
+          pageSize:this.currentPageSize,
+          pageNum:this.currentPage,
+          index:this.index
+        }
+        await this.axios.post("/api/v1/ams/getCarrierListByPrice",mapValue).then(res=>{
+        console.log("进入了查询承运商界面")
+        console.log(res.data)
+        this.carrierNameTable=res.data.data
+        this.carrierNametotal=res.data.data[1].total
+      })
+      },
+    async handleCurrentChange(val) {
+        console.log(`当前页: ${val}`);
+        this.currentPage=val
+        let mapValue={
+          pageSize:this.currentPageSize,
+          pageNum:this.currentPage,
+          index:this.index
+        }
+        await this.axios.post("/api/v1/ams/getCarrierListByPrice",mapValue).then(res=>{
+        console.log("进入了查询承运商界面")
+        console.log(res.data)
+        this.carrierNameTable=res.data.data
+        this.carrierNametotal=res.data.data[1].total
+      })
+    },
+    async queryCarrierName(){
+      let mapValue={
+          pageSize:this.currentPageSize,
+          pageNum:this.currentPage,
+          index:this.index
+        }
+        await this.axios.post("/api/v1/ams/getCarrierListByPrice",mapValue).then(res=>{
+        console.log("进入了查询承运商界面")
+        console.log(res.data)
+        this.carrierNameTable=res.data.data
+        this.carrierNametotal=res.data.data[1].total
+      })
+    },
+    //修改承运商
+    async updateCarrierNamelist(){
+      for(let i=0;i<this.checkedList.length;i++){
+        this.carrierIdArray.push(this.checkedList[i].carrierId)
+      }
+      this.datalist.carrierIdArray=this.carrierIdArray
+      await this.axios.post("/api/v1/ams/updateCarrierName",this.datalist).then(res=>{
+        if(res.data.code==200){
+          this.$message.success("修改承运商成功")
+        }else{
+          this.$message.warning("修改承运商失败")
+        }
+      })
+      console.log("看看数据对不对")
+      console.log(this.carrierIdArray)
+      console.log(this.$refs)
+      this.$refs.carrierNameTable.clearSelection()
+      this.carrierIdArray=[]
+      this.drawer=false
+      this.onclick()
+    }
     /*importExcel(file){
       let that = this;
       if (!file) {
@@ -233,5 +514,15 @@ export default {
       margin-right: 1.25rem;
     }
   }
+  .operation1{
+    display: flex;
+    flex-direction: row;
+    margin-bottom: 20px;
+  }
+  .operation2{
+    display: flex;
+    flex-direction: row;
+    margin-bottom: 20px;
+  }
 }
 </style>

+ 7 - 0
src/views/appoint/router/index.js

@@ -41,6 +41,7 @@ import addSaleOrderSteelSendCarrier from '../components/saleContract/addSaleOrde
 import addSalePlan from '../components/saleContract/addSalePlan.vue'
 import addSalePlanDetail from '../components/saleContract/addSalePlanDetail.vue'
 import addTransportPrice from '../components/saleContract/addTransportPrice.vue'
+import addTransportPriceNew from '../components/saleContract/addTransportPriceNew.vue'
 import addTruckNoDetail from '../components/saleContract/addTruckNoDetail.vue'
 import editaddress from '../components/saleContract/editaddress.vue'
 import editSaleOrder from '../components/saleContract/editSaleOrder.vue'
@@ -318,6 +319,12 @@ const constantRouterMap = [
         meta: { code: 'xtpzgl-yhgl' },
         component: addTransportPrice
       },
+      {
+        path: 'addTransportPriceNew',
+        name: 'addTransportPriceNew',
+        meta: { code: 'xtpzgl-yhgl' },
+        component: addTransportPriceNew
+      },
       {
         path: 'addTruckNoDetail/:saleOrderMaterialId',
         name: 'addTruckNoDetail',

+ 14 - 0
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -347,6 +347,13 @@
                 show-overflow-tooltip
               >
               </el-table-column>
+              <el-table-column
+                prop="recordUserName"
+                label="操作人"
+                width="120px"
+                show-overflow-tooltip
+              >
+              </el-table-column>
             </el-table>
           </div>
         </el-tab-pane>
@@ -558,6 +565,13 @@
                 show-overflow-tooltip
               >
               </el-table-column>
+              <el-table-column
+                prop="recordUserName"
+                label="操作人"
+                width="120px"
+                show-overflow-tooltip
+              >
+              </el-table-column>
             </el-table>
           </div>
         </el-tab-pane>

+ 385 - 6
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -123,6 +123,16 @@
             <i class="el-icon-finished"></i>获取制单日期</el-button
           >
         </el-form-item>
+        <el-form-item v-if="isShowOperate">
+          <el-button
+            type="primary"
+            @click="exceptionHandle()"
+            v-if="!notRoutList.includes('exceptionHandle')"
+          >
+            <i class="el-icon-s-open"></i>
+            异常处理
+          </el-button>
+        </el-form-item>
         <el-form-item>
           <label
             class="el-form-item__label"
@@ -289,6 +299,14 @@
           show-overflow-tooltip
         >
         </el-table-column>
+        <el-table-column
+          prop="truckRemark"
+          label="备注"
+          width="150"
+          align="center"
+          show-overflow-tooltip
+        >
+        </el-table-column>
         <el-table-column
           prop="capacityTel"
           label="司机电话"
@@ -393,7 +411,7 @@
           label="实际运费"
           width="100px"
         ></el-table-column>
-          <el-table-column
+        <el-table-column
           prop="isAccept"
           label="异地库接收标志"
           width="60px"
@@ -751,20 +769,20 @@
               <template slot-scope="scope">
                 <button
                   type="primary"
-                  @click="scope.row.materialNum--"
+                  @click="scope.row.materialNumber--"
                   style="height:40px"
                   v-if="!notRoutList.includes('materialNum')"
                 >
                   -
                 </button>
                 <input
-                  v-model="scope.row.materialNum"
+                  v-model="scope.row.materialNumber"
                   style="width:40px;height: 40px;font-size:16px;line-height: 40px;text-align: center;"
                   :disabled="notRoutList.includes('materialNum')"
                 />
                 <button
                   type="primary"
-                  @click="scope.row.materialNum++"
+                  @click="scope.row.materialNumber++"
                   style="height:40px"
                   v-if="!notRoutList.includes('materialNum')"
                 >
@@ -1153,6 +1171,214 @@
       <el-button @click="batchCarrierVisible = false">取 消</el-button>
       <el-button type="primary" @click="batchCarrierMakeSure">确 定</el-button>
     </el-dialog>
+    <div class="dialog">
+      <el-dialog
+        :visible.sync="exceptionHandleVisible"
+        width="90%"
+        center
+        title="异常处理"
+      >
+        <div class="exceptionHandleClass">
+          <span>新增件数,修改规格,加拼数</span>
+        </div>
+        <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>
+              <span>{{ steelMap.addressPlace }}</span>
+            </div>
+          </div>
+          <div class="steelMapClass3">
+            <div class="steelMapClass32">
+              <span>收货客户电话:</span>
+              <span>{{ steelMap.consigneeTel }}</span>
+            </div>
+            <div class="steelMapClass33" v-if="steelMap.carrierName">
+              <span>承运商:</span>
+              <span>{{ steelMap.carrierName }}</span>
+            </div>
+            <div class="steelMapClass33" v-if="steelMap.capacityNo">
+              <span>车牌号:</span>
+              <span>{{ steelMap.capacityNo }}</span>
+            </div>
+            <div class="steelMapClass33" v-if="steelMap.capacityTel != null">
+              <span>司机电话:</span>
+              <span>{{ steelMap.capacityTel }}</span>
+            </div>
+          </div>
+          <div class="steelMapClass4">
+            <div class="steelMapClass42" v-if="steelMap.orderNo != null">
+              <span>运输订单号:</span>
+              <span>{{ steelMap.orderNo }}</span>
+            </div>
+            <div class="steelMapClass43">
+              <span>运单状态:</span>
+              <span>{{ steelMap.orderStatus }}</span>
+            </div>
+            <div
+              class="steelMapClass43"
+              v-if="steelMap.orderStatusTime != null"
+            >
+              <span>状态更新时间:</span>
+              <span>{{ steelMap.orderStatusTime }}</span>
+            </div>
+          </div>
+        </div>
+        <div class="table1">
+          <el-table
+            :data="steelMap.mapList"
+            border
+            style="width: 100%; margin-top: 20px"
+          >
+            <el-table-column
+              prop="materialName"
+              label="物资名称"
+              align="center"
+              width="180px"
+            >
+              <template slot-scope="scope">
+                <el-input
+                  v-model="scope.row.materialName"
+                  :disabled="scope.row.netWeight != null"
+                >
+                </el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="materialSpecification"
+              label="物资规格"
+              align="center"
+              sortable
+            >
+              <template slot-scope="scope">
+                <el-input
+                  v-model="scope.row.materialSpecification"
+                  :disabled="scope.row.netWeight != null"
+                ></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="materialModel"
+              label="物资型号"
+              align="center"
+              width="150"
+              sortable
+            >
+              <template slot-scope="scope">
+                <el-input
+                  v-model="scope.row.materialModel"
+                  :disabled="scope.row.netWeight != null"
+                ></el-input>
+              </template>
+            </el-table-column>
+            <el-table-column
+              prop="materialNumber"
+              label="物资件数"
+              align="center"
+              width="200px"
+            >
+              <template slot-scope="scope">
+                <button
+                  type="primary"
+                  @click="scope.row.materialNumber--"
+                  style="height:40px"
+                  :disabled="scope.row.netWeight != null"
+                >
+                  -
+                </button>
+                <input
+                  v-model="scope.row.materialNumber"
+                  style="width:40px;height: 40px;font-size:16px;line-height: 40px;text-align: center;"
+                  :disabled="scope.row.netWeight != null"
+                />
+                <button
+                  type="primary"
+                  @click="scope.row.materialNumber++"
+                  style="height:40px"
+                  :disabled="scope.row.netWeight != null"
+                >
+                  +
+                </button>
+              </template>
+            </el-table-column>
+            <el-table-column prop="steelMeters" label="米数" align="center">
+              <template slot-scope="scope">
+                <el-input
+                  v-model="scope.row.steelMeters"
+                  :disabled="scope.row.netWeight != null"
+                ></el-input>
+              </template>
+            </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-column fixed="right" label="操作" width="200">
+              <template slot-scope="scope">
+                <el-button
+                  @click.native.prevent="
+                    deleteRow(scope.$index, steelMap.mapList)
+                  "
+                  type="text"
+                  icon="el-icon-close"
+                  size="big"
+                  v-if="scope.row.netWeight == null"
+                ></el-button>
+                <el-button
+                  @click.native.prevent="copyRowflu(scope.$index, scope.row)"
+                  type="text"
+                  size="big"
+                  >新增一拼</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="exceptionHandleClass">
+          <el-button @click="exceptionHandleVisible = false">取 消</el-button>
+          <el-button type="primary" @click="exceptionHandleMakeSure"
+            >确 定</el-button
+          >
+        </div>
+      </el-dialog>
+    </div>
   </div>
 </template>
 
@@ -1169,6 +1395,7 @@ export default {
   },
   data() {
     return {
+      exceptionHandleVisible: false,
       batchCarrierName: null,
       batchCarrierVisible: false,
       batchAddressProvince: '',
@@ -1275,7 +1502,8 @@ export default {
         '摘要',
         '排队开始时间',
         '钢材科放行时间',
-        '异地库接收标志'
+        '备注',
+        '订单变更时间'
       ],
       //钢材多拼车辆线路ID
       //索引从1-10为1-10拼路线ID
@@ -1416,7 +1644,8 @@ export default {
         'closeEntry',
         'capacityNo',
         'batchCarrier',
-        'select'
+        'select',
+        'exceptionHandle'
       ]
     }
     //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
@@ -1432,6 +1661,9 @@ export default {
     this.cellLeave1 = this.debounce((row, column, cell) => {
       this.cellLeave(row, column, cell)
     }, 100)
+    this.exceptionHandleMakeSure = this.debounce(() => {
+      this.exceptionHandleMakeSure1()
+    }, 500)
     this.getSteelReport()
   },
   watch: {
@@ -1498,6 +1730,142 @@ export default {
   },
   computed: {},
   methods: {
+    deleteRow(index, rows) {
+      if (rows.length > 1) {
+        rows.splice(index, 1)
+      }
+    },
+    copyRowflu(index, row) {
+      console.log(index)
+      let copyRowflu = new Object()
+      Object.keys(row).forEach(key => {
+        copyRowflu[key] = row[key]
+      })
+      delete copyRowflu.materialId
+      delete copyRowflu.netWeight
+      delete copyRowflu.grossWeight
+      delete copyRowflu.grossWeightTime
+      delete copyRowflu.tareWeight
+      delete copyRowflu.tareWeightTime
+      delete copyRowflu.loadTime
+      delete copyRowflu.closeEntryId
+      this.steelMap.mapList.splice(index + 1, 0, copyRowflu)
+    },
+    exceptionHandleMakeSure1() {
+      console.log(this.steelMap)
+      this.$confirm(
+        `该操作会将${this.steelMap.capacityNo}下未出净重的分录关闭,并重新上传金蝶,确认操作?`,
+        '提示',
+        {
+          cancelButtonText: '取消',
+          confirmButtonText: '确定',
+          center: true
+        }
+      )
+        .then(() => {
+          let saleDateOfReceipt = null
+          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) {
+            saleDateOfReceipt = loadTime2
+          } else {
+            saleDateOfReceipt = loadTime1
+          }
+          let closeEntryList = []
+          let map = this.steelMap
+          map.mapList.forEach(e => {
+            let map = {}
+            e.saleDateOfReceipt = sjTime(saleDateOfReceipt)
+            map.saleMaterialId = e.saleMaterialId
+            map.closeEntryId = e.closeEntryId
+            map.number = e.saleOrderNo
+            closeEntryList.push(map)
+          })
+          let mapList = map.mapList.filter(e => {
+            if (typeof e.netWeight == 'undefined' || e.netWeight == null) {
+              return e
+            }
+          })
+          if (mapList.length == 0) {
+            this.$message({
+              type: 'info',
+              message: '所有分录包含净重,退出!',
+              offset: '250',
+              duration: '2500'
+            })
+            return
+          }
+          map.mapList = mapList
+          map.isUploadEas = 1
+          this.axios
+            .post('/api/v1/ams/addSteelSaleOrder', map, {
+              timeout: 3 * 60 * 1000
+            })
+            .then(res => {
+              if (res.data.code == '200') {
+                this.axios
+                  .post('/api/v1/ams/closingEntries', closeEntryList, {
+                    timeout: 3 * 60 * 1000
+                  })
+                  .then(res => {
+                    if (res.data.code == '200') {
+                      this.getSteelReport()
+                      this.$message({
+                        type: 'success',
+                        offset: '250',
+                        message: '生成订单成功,关闭分录成功',
+                        duration: 2000
+                      })
+                      this.exceptionHandleVisible = false
+                    }
+                  })
+                  .catch(e => {})
+              } else {
+                this.$message({
+                  type: 'error',
+                  offset: '250',
+                  duration: '2500',
+                  message: '新增失败'
+                })
+              }
+            })
+        })
+        .catch(e => {
+          this.$message({
+            type: 'info',
+            message: '取消操作',
+            offset: '200',
+            duration: 2500
+          })
+        })
+    },
+    exceptionHandle() {
+      if (this.$refs.tableRef.selection.length == 1) {
+        console.log(this.$refs.tableRef.selection[0])
+        this.axios
+          .post(
+            '/api/v1/tms/getSteelReportDetailsBySmId?saleOrderMaterialId=' +
+              this.$refs.tableRef.selection[0].saleOrderMaterialId
+          )
+          .then(res => {
+            this.steelMap = res.data.data
+            this.exceptionHandleVisible = true
+          })
+      } else {
+        this.$message({
+          message: '异常处理单次仅能勾选一辆车',
+          offset: '250',
+          duration: '2500',
+          type: 'warning'
+        })
+      }
+    },
     getMakeDate() {
       if (this.$refs.tableRef.selection.length > 0) {
         let easPrimaryList = []
@@ -1549,12 +1917,14 @@ export default {
             this.$message.success('授权承运商成功')
             this.batchCarrierList = []
             this.batchCarrierVisible = false
+            this.batchCarrierName = null
             this.getSteelReport()
             loading.close()
           } else {
             this.$message.error('授权失败,请联系管理员')
             this.batchCarrierList = []
             this.batchCarrierVisible = false
+            this.batchCarrierName = null
             this.getSteelReport()
             loading.close()
           }
@@ -2125,6 +2495,7 @@ export default {
       this.tableRowIndex = row.group
       this.isRowClick = 1
       this.steelMap = row
+      this.$refs.tableRef.toggleRowSelection(row)
     },
     tableRowClassName({ row, rowIndex }) {
       if (row.group == this.tableRowIndex && this.tableRowIndex !== '') {
@@ -3240,6 +3611,14 @@ export default {
   }
 
   .dialog {
+    .exceptionHandleClass {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      font-size: 20px;
+      margin-top: 20px;
+      margin-bottom: 20px;
+    }
     .steelMapClass {
       .steelMapClass1 {
         display: flex;

+ 11 - 4
src/views/statisticalReport/components/salesLogisticsStatistics/unloadingSteelReports.vue

@@ -649,8 +649,15 @@ export default {
           let closeEntryList = []
           this.$refs.tableRef.selection.forEach(e => {
             let map = {}
-            e.saleRemark =
-              this.remarkDateNew + e.saleRemark.split(this.remarkDateOld)[1]
+            if (
+              typeof e.saleRemark.split(this.remarkDateOld)[1] === 'undefined'
+            ) {
+              e.saleRemark = `${this.remarkDateNew}${e.areaName},直发${e.addressDistrict}`
+            } else {
+              e.saleRemark =
+                this.remarkDateNew + e.saleRemark.split(this.remarkDateOld)[1]
+            }
+
             map.saleMaterialId = e.saleMaterialId
             map.closeEntryId = e.closeEntryId
             map.number = e.saleOrderNo
@@ -735,8 +742,8 @@ export default {
       return `${month}.${day}`
     },
     getRemarkDateOld() {
-      let day = new Date().getDate() - 1
-      let month = new Date().getMonth() + 1
+      let day = new Date(new Date().getTime() - 86400000).getDate()
+      let month = new Date(new Date().getTime() - 86400000).getMonth() + 1
       console.log(day)
       if (day < 10) {
         day = '0' + day