luobang 2 years ago
parent
commit
fc0219c38f

+ 0 - 2
build/utils.js

@@ -16,8 +16,6 @@ const devPathSrc = path.resolve(__dirname, '../../../src') // node_modules应用
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 
-// >>>>>>> ecb211626d4aa9a51230114ced8866039cba10e1
-// let devModules = ['all']
 let devModules = ['all']
 // let devModules = ['index', 'statisticalReport']
 // let devModules = ['index', 'ADMINISTRATORS']

+ 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: {

+ 50 - 17
src/components/main.vue

@@ -325,6 +325,7 @@
               >
             </el-breadcrumb>
           </div>
+          <!--通知信息-->
           <div
             class="sl-header-li-websocket"
             @mouseenter="updatecss"
@@ -338,7 +339,7 @@
               :hidden="badgeshow"
             >
               <el-button type="text" size="small" @click="goMyTaskPage"
-                >通知信息</el-button
+                > <i class="el-icon-message-solid" style="width:30px;height: 30px;"></i></el-button
               >
             </el-badge>
             <div
@@ -664,7 +665,11 @@
     </el-dialog>
 
     <!--通知弹窗-->
-    <el-dialog :visible.sync="centerDialogVisible">
+    <el-dialog 
+    :visible.sync="centerDialogVisible"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    :show-close="false">
       <div style="margin-left: 30px; font-size: 20px">
         <h1>{{ noticedata1.noticetitle }}</h1>
       </div>
@@ -968,6 +973,9 @@ export default {
     console.log(this.$route, 'this.route')
     console.log('获取到的orgCode+++++++++++++' + this.orgcodezs)
     this.getinformation()
+    let timer=setInterval(()=>{
+      this.getinformation()
+    },1000*60)
   },
   destroyed() {
     // 销毁浏览器返回监听
@@ -1174,6 +1182,7 @@ export default {
             this.taskAllNum = res.data.data
           }
         })
+      this.getinformation()
     },
     // 判断是否为公司其他平台模块且处于开发模式
     isDev(url) {
@@ -2642,7 +2651,15 @@ export default {
       })
     },
     updatecss() {
-      this.socketshow = true
+      console.log("taskAllNum")
+      console.log(this.taskAllNum)
+      if(!this.taskAllNum){
+        console.log("进入了弹出框的判断1")
+        this.socketshow = false
+      }else{
+        console.log("进入了弹出框的判断2")
+        this.socketshow=true
+      }
       //let height = document.body.clientHeight - 125
       /*this.$nextTick(() => {
         $('.Web_Notice')[0].style.height = height + 'px;'
@@ -2652,12 +2669,23 @@ export default {
       this.socketshow = false
     },
     getinformation() {
+      this.taskAllNum=0
+      this.noticedata=[]
       console.log('获取到的userId----------------' + this.userId)
       this.axios
-        .post('/api/v1/ams/getNotice', { userId: this.userId })
+        .post('/api/v1/ams/getNoticeAll', { userId: this.userId })
         .then(res => {
-          this.noticedata = res.data.data
-          this.taskAllNum = res.data.data[0].taskAllNum
+          console.log("进入了获取数据的方法")
+          res.data.data.forEach((e)=>{
+            console.log("进入了数据的遍历")
+            if(e.status==0&&e.insertusername!='销售审核'){
+              console.log("进入了数据的插入")
+              this.taskAllNum++;
+              this.noticedata.push(e)
+            }
+          })
+          //this.taskAllNum = res.data.data.length
+          console.log("获取到的数据")
           console.log(this.noticedata)
           console.log(this.taskAllNum)
           if (this.taskAllNum != null) {
@@ -2667,17 +2695,22 @@ export default {
             } else {
               console.log('进入了标记不为0')
               this.badgeshow = false
-              // if(this.$store.state.index==1){
-              //   let data={
-              //     noticetitle:this.noticedata[0].noticetitle,
-              //     noticecontent:this.noticedata[0].noticecontent,
-              //     insertusername:this.noticedata[0].insertusername,
-              //     inserttime:this.noticedata[0].inserttime,
-              //     noticeid:this.noticedata[0].noticeId
-              //   }
-              //   this.noticedata1=data
-              //   this.centerDialogVisible=true;
-              // }
+               let data={
+                  noticetitle:this.noticedata[0].noticetitle,
+                  noticecontent:this.noticedata[0].noticecontent,
+                  insertusername:this.noticedata[0].insertusername,
+                  inserttime:this.noticedata[0].inserttime,
+                  noticeid:this.noticedata[0].noticeId
+                }
+              //判断是否需要弹窗,右边的注释用于控制时间间隔 || window.top.localStorage.getItem("noticeTime")==null || new Date().getTime() - window.top.localStorage.getItem("noticeTime") > 1000*10
+              if(window.top.localStorage.getItem("noticeId")!=data.noticeid){
+                this.noticedata1=data;
+                this.centerDialogVisible=true;
+                window.top.localStorage.setItem('noticeId', data.noticeid)
+                // window.top.localStorage.setItem('noticeTime', new Date().getTime())
+              }else{
+                console.log("暂无新的通知,不展示");
+              }
             }
           } else {
             console.log('进入了标记值为null的值')

+ 3 - 3
src/views/TMS/components/importedShip/addUnloadShip.vue

@@ -101,13 +101,13 @@ export default {
       let resultArrivalDate = null
       let resultStartTime = null
       let resultEndTime = null
-      if ( !this.form.resultArrivalDate ) {
+      if (this.form.resultArrivalDate ) {
         resultArrivalDate = sjTime(this.form.resultArrivalDate)
       }
-      if (!this.form.resultStartTime) {
+      if (this.form.resultStartTime) {
         resultStartTime = sjTime(this.form.resultStartTime)
       }
-      if (!this.form.resultEndTime) {
+      if (this.form.resultEndTime) {
         resultEndTime = sjTime(this.form.resultEndTime)
       }
       let mapVal = {

+ 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',

+ 2 - 0
src/views/index/components/login.vue

@@ -219,6 +219,8 @@ export default {
                     )
                   }
                 }
+                //清空通知id
+                 window.top.localStorage.setItem('noticeId', null)
               } else {
                 //  登录失败
                 // 提示

+ 68 - 5
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -107,8 +107,7 @@
         <el-form-item v-show="activeName=='first'">
           <el-button type="primary" @click="makeSurePrice"
           v-if="!notRoutList.includes('capacityNo')"
-            ><i class="el-icon-circle-check"></i>确认执行价</el-button
-          >
+            ><i class="el-icon-circle-check"></i>确认执行价</el-button>
         </el-form-item>
          <el-form-item v-show="activeName=='second'">
           <el-button type="primary" @click="openStatement">
@@ -227,7 +226,6 @@
                 width="250px"
                 sortable
                 column-key="actualAddress"
-                :filters="filteraddressPlace"
               >
               </el-table-column>
               <el-table-column
@@ -347,6 +345,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>
@@ -438,7 +443,6 @@
                 width="250px"
                 sortable
                 column-key="actualAddress"
-                :filters="filteraddressPlace"
               >
               </el-table-column>
               <el-table-column
@@ -558,6 +562,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>
@@ -916,6 +927,7 @@ export default {
         startPointName: '',
         endPointName: ''
       },
+      someOnePriceValueList:[],
       saleSteelKey: false,
       tableRowIndex: '',
       isRowClick: 0,
@@ -965,6 +977,9 @@ export default {
       makeSurePlaceId: null,
       detailsAmount: null,
       mapValuenew:{},
+      //存放要执行的单价的位置Id,以及价格
+      amsPriceList:[],
+      placeIds:[],
       //用于赋予承运商的权限
       userId:'',
       ops: {
@@ -1089,17 +1104,59 @@ export default {
   computed: {},
   methods: {
     handleSelectionChange() {
+      this.amsPriceList=[]
       this.makeSurePriceOrderList = []
+      this.someOnePriceValueList=[]
       console.log(this.$refs.tableRef.selection, 'selection')
+      let mapvalue={
+        placeId:"",
+        priceValue:"",
+        orderId:""
+      }
+      let mapValue1={
+        priceValue:""
+      }
       this.makeSurePriceOrderList = this.$refs.tableRef.selection.map(e => {
+        //运价判断
+        mapValue1.priceValue=e.priceValue
+        this.someOnePriceValueList.push(mapValue1)
+        mapvalue.placeId=e.placeId
+        mapvalue.priceValue=e.priceValue
+        mapvalue.orderId=e.orderId
+        this.amsPriceList.push(mapvalue)
         return e.orderId
       })
       console.log(this.makeSurePriceOrderList)
+      console.log(this.amsPriceList)
+      console.log(this.someOnePriceValueList)
     },
     makeSurePrice() {
       let map = {
-        orderList: this.makeSurePriceOrderList
+        orderList: this.makeSurePriceOrderList,
+        amsPriceList:this.amsPriceList
       }
+      console.log("确认执行价的顺序")
+      console.log(this.makeSurePriceOrderList)
+      console.log(map)
+      let flag=0;
+      this.someOnePriceValueList.forEach((e)=>{
+        if(e.priceValue==null){
+          console.log("进入了flag++")
+          flag++
+        }
+      })
+      if(flag!=0){
+        this.$message({
+              type: 'error',
+              message: '没有单价',
+              duration: 2000,
+              offset: '250'
+            })
+        return
+      }
+      console.log("确认执行价的顺序")
+      console.log(this.makeSurePriceOrderList)
+      console.log(map)
       this.axios
         .post('/api/v1/bms/updateDetailsStatus', map)
         .then(res => {
@@ -1130,6 +1187,7 @@ export default {
             offset: '250'
           })
         })
+        this.amsPriceList=[]
     },
     openStatement(){
       console.log(this.$refs.tableRef1.selection, 'selection');
@@ -1249,6 +1307,7 @@ export default {
       console.log(this.userId)
       console.log(this.makeSurePriceOrderList)
       if (this.makeSurePriceOrderList.length == 0) {
+        this.amsPriceList=[]
         this.$message({
           type: 'success',
           message: '请先选择需要修改的单价',
@@ -1293,12 +1352,14 @@ export default {
             this.dialogFormVisible = false
           }
         })
+        this.amsPriceList=[]
     },
     //修改单价和收货地址
     makeSureAll(){
       console.log("获取数据")
       console.log(this.userId)
       if (this.makeSurePriceOrderList.length == 0) {
+        this.amsPriceList=[]
         this.$message({
           type: 'success',
           message: '请先选择需要修改的单价',
@@ -1335,6 +1396,7 @@ export default {
                   this.dialogFormVisible = false
                 }
               })
+              this.amsPriceList=[]
     },
     hanleScroll() {
       console.log('我滚动了')
@@ -2893,6 +2955,7 @@ export default {
     },
     //获取钢材统计报表
     getSteelReport() {
+      this.amsPriceList=[]
       const loading = this.$loading({
         lock: true,
         text: '正在获取数据,请稍候',

+ 24 - 2
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckStatementNew.vue

@@ -70,6 +70,9 @@
       :visible.sync="isShowDetails"
       style="height:600px;width:100%"
       >
+      <div>
+        <el-button icon="el-download" type="primary" @click="exportExcel('详单信息')">导出Excel</el-button>
+      </div>
        <div class="table1">
             <el-table
               :data="visibleList1"
@@ -78,7 +81,7 @@
               border
               style="width: 100%; margin-top: 20px"
               :height="350"
-              id="salesLogisticsStat_saleSteelReports_table"
+              id="details"
               individual-panel
             >
             <el-table-column
@@ -86,7 +89,6 @@
                 label="序号"
                 align="center"
                 :resizable="false"
-                fixed="left"
               >
                 <template slot-scope="scope">{{
                   scope.row.group + 1
@@ -248,6 +250,7 @@
 <script>
 import { getCookie } from '@/utils/util.js'
 import { sjTime } from '@/utils/sharedJsFile'
+import FileSaver from "file-saver";
 export default {
   data(){
     return{
@@ -355,6 +358,25 @@ export default {
           this.getSpanArr1(this.visibleList1);
       })
     },
+    exportExcel(tableTitle){
+      let tables = document.getElementById("details");//此处是拿表格document元素,也可以取父div的ref
+        let table_book = XLSX.utils.table_to_book(tables);
+        console.log("table_book",table_book);
+        var table_write = XLSX.write(table_book, {
+            bookType: "xlsx",
+            bookSST: true,
+            type: "array"
+        });
+        try {
+            FileSaver.saveAs(
+                new Blob([table_write], { type: "application/octet-stream" }),
+                tableTitle+".xlsx"
+            );
+        } catch (e) {
+            if (typeof console !== "undefined") console.log(e, table_write);
+        }
+        return table_write;
+    },
     deleteStatement(row){
       this.$confirm('此操作将永久删除该账单, 是否继续?', '提示',{
         confirmButtonText: '确定',

+ 52 - 3
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -87,9 +87,17 @@
           >
         </el-form-item>
         <el-form-item v-if="isShowOperate">
-          <el-button type="primary" @click="operation()"
-            ><i class="el-icon-edit"></i>更改</el-button
-          >
+          <el-button type="primary" @click="operation()">
+            <i class="el-icon-edit"></i>更改
+            <span>
+              <!-- || orgCode!='chengyunshang' -->
+              <el-badge
+                :value="taskAllNum"
+                :max="99"
+                :hidden="taskAllNum < 1"
+              ></el-badge>
+            </span>
+          </el-button>
           <!-- <el-button type="primary" @click="batchoperation()"
             ><i class="el-icon-edit"></i>批量更改</el-button
           > -->
@@ -1418,6 +1426,10 @@ export default {
   },
   data() {
     return {
+      userId: null,
+      orgCode: null,
+      taskAllNum: 0,
+      noticeInterval: null,
       exceptionHandleVisible: false,
       batchCarrierName: null,
       batchCarrierVisible: false,
@@ -1648,6 +1660,8 @@ export default {
     }
   },
   created() {
+    this.orgCode = getCookie('orgCode')
+    this.userId = getCookie('userId')
     if (this.orgCodeList.includes(getCookie('orgCode'))) {
       this.isShowOperate = true
     }
@@ -1671,6 +1685,9 @@ export default {
         'exceptionHandle',
         'mergeSplit'
       ]
+      this.noticeInterval = setInterval(() => {
+        this.getinformation()
+      }, 1000 * 10)
     }
     //只要涉及提交即必须设计防抖,在初始化时绑定防抖函数
     this.updateCapacityDebounce = this.debounce(() => {
@@ -1729,6 +1746,9 @@ export default {
       }
     }
   },
+  destroyed() {
+    clearInterval(this.noticeInterval)
+  },
   computed: {},
   mounted() {
     let that = this
@@ -1913,6 +1933,31 @@ export default {
           })
         })
     },
+    //获取通知数量
+    getinformation() {
+      this.axios
+        .post('/api/v1/ams/getNoticeAll', { userId: this.userId })
+        .then(res => {
+          let taskAllNum = 0
+          res.data.data.forEach(e => {
+            if (e.insertusername == '销售审核' && e.status == 0) {
+              taskAllNum++
+            }
+          })
+          this.taskAllNum = taskAllNum
+          console.log('未接收数目:', this.taskAllNum)
+        })
+    },
+    readAll() {
+      this.axios
+        .post('/api/v1/ams/readAll', {
+          userId: this.userId,
+          insertUserName: '销售审核'
+        })
+        .then(res => {
+          this.taskAllNum = 0
+        })
+    },
     deleteRow(index, rows) {
       if (rows.length > 1) {
         rows.splice(index, 1)
@@ -2768,6 +2813,10 @@ export default {
       if (typeof row === 'undefined') {
         row = this.steelMap
       }
+      //所有销售审核通知标记为已读
+      if (this.taskAllNum > 0) {
+        this.readAll()
+      }
       this.axios
         .post(
           '/api/v1/tms/getSteelReportDetailsBySmId?saleOrderMaterialId=' +