zengyf 2 gadi atpakaļ
vecāks
revīzija
efaa249aac

+ 1 - 1
build/utils.js

@@ -17,7 +17,7 @@ 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 = ['index', 'statisticalReport', 'queue', 'sale','TMS','QMS','appoint','RMS']
 let devModules = ['all']
 //let devModules=['index']
 

+ 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

@@ -342,6 +342,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>
@@ -559,6 +566,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>