浏览代码

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

luobang 2 年之前
父节点
当前提交
0a85a09d97

+ 3 - 0
src/components/DilCommonUI/packages/mergeRowTable/src/mergeRowTable.vue

@@ -23,6 +23,7 @@
       element-loading-spinner="el-icon-loading"
       :isHeigth="isHeigth"
       :shiyHeigth="shiyHeigth"
+      :expand-row-keys="expandRowKeys"
     >
       <!-- 多选列 -->
       <el-table-column
@@ -188,6 +189,8 @@ export default {
     maxHeight: {
       default: '500px'
     },
+    //行展开的key数组,用于控制行是否展开
+    expandRowKeys:[],
     // 是否启用排序
     sortable: {
       default: 'custom'

+ 4 - 3
src/views/RMS/components/addContractPrice.vue

@@ -13,7 +13,7 @@
                 <el-input v-model="form.unitPrice" type="number"></el-input>
             </el-form-item>
             <el-form-item label="港口">
-              <el-select v-model="form.portId" filterable>
+              <el-select v-model="form.portId" filterable multiple>
                 <el-option
                   v-for="port in ports"
                   :key="port.portId"
@@ -56,7 +56,7 @@ export default {
   data() {
     return {
       form: {
-        portId:null,
+        portId:[],
         contractNo:null,
         unitPrice:null,
         startTime:null,
@@ -123,9 +123,10 @@ export default {
         }).then(()=>{
           let copy=this.$route.query;
           console.log("copy:",copy);
+          //如果有值,则复制新增
           if(copy){
             if(copy.portId){
-              copy.portId=copy.portId * 1;
+              copy.portId=[copy.portId * 1];
             }
             this.$set(this,"form",copy);
           }

+ 120 - 2
src/views/WMS/components/port_deposit/loadPortStock.vue

@@ -19,7 +19,7 @@
           font-size: 15px;
           font-weight: bold;
         "
-        >万州港合计吨位</span
+        >万州港合计吨位(截止至:{{now}})</span
       >
       <el-input
         v-model="totalNumber"
@@ -53,7 +53,45 @@
       :shiyHeigth="shiyHeigth"
       @func="func"
       :pageSize="pageSize"
+      :expandRowKeys="expandRowKeys"
     >
+    <el-table-column fixed="right" label="点后出入库详情" width="120">
+          <template slot-scope="scope">
+              <el-button @click="detailclick1(scope.row)" type="text" size="small">
+                入库详情
+              </el-button>
+              <el-button @click="detailclick2(scope.row)" type="text" size="small">
+                出库详情
+              </el-button>
+          </template>
+    </el-table-column>
+    <el-table-column type="expand" width="1">
+          <template slot-scope="props">
+            <el-form label-position="center" inline class="demo-table-expand" style="margin-left:30%">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="inbounds" border v-show="tableStatus==1">
+                  <el-table-column
+                    v-for="(item, i) in tableHead1"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+                 <el-table :data="outbounds" border v-show="tableStatus==2">
+                 <el-table-column
+                    v-for="(item, i) in tableHead2"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+    </el-table-column>
     </mergeRowTable>
   </div>
 </template>
@@ -76,18 +114,98 @@ export default {
         // 表格请求数据的地址
         requestUrl: "/api/v1/wmsh/getLoadPortStockList?apiId=158",
         comparison:"materialName",
-        columnIndexs:[0,1,2,3]
+        columnIndexs:[0,1,2]
       },
       option2: {
         requestUrl: "/api/v1/wmsh/getLoadPortStockByMaterialName?apiId=493",
       },
+      tableStatus:0,
+      focusRow:null,
+      inbounds:[],
+      outbounds:[],
+      expandRowKeys:[],
+      now:null,
+      tableHead1:[
+        {
+          prop: "resultMaterialNumber",
+          label: "入库吨位",
+          width: 150
+        },
+        {
+          prop: "insertTime",
+          label: "入库时间",
+          width: 150
+        }
+      ],
+      tableHead2:[
+         {
+          prop: "resultMaterialNumber",
+          label: "出库吨位",
+          width: 150
+        },
+        {
+          prop: "wagonNumber",
+          label: "出库车皮数",
+          width: 150
+        },
+        {
+          prop: "insertTime",
+          label: "出库时间",
+          width: 150
+        }
+      ]
     };
   },
   created() {
     this.option.requestUrl =
       "/api/v1/wmsh/getLoadPortStockList?apiId=158&i=" + new Date();
+    let now=new Date();
+    let hour=now.getHours()
+    if(hour>=8 && hour < 18){
+      now.setHours(8);
+    }else{
+      now.setHours(18);
+    }
+    now.setMinutes(0);
+    now.setSeconds(0);
+    this.now=now.toLocaleString();
   },
   methods: {
+    detailclick1(row){
+      console.log("row",row);
+      let flag=this.focusRow==row && this.tableStatus==1;//是否关闭
+       this.axios.post("/api/v1/wmsh/findInboundDetail", row).then(res => {
+        console.log("res", res);
+        this.inbounds = res.data.data;
+        this.expandRowKeys=[];//清空
+      }).then(()=>{
+        this.tableStatus=1;
+        if(!flag){
+          this.$refs.excelDom.toggleRowExpansion(row);
+          this.focusRow=row;
+        }else{
+          this.focusRow=null;
+        }
+      });
+    },
+    detailclick2(row){
+      console.log("row",row);
+      let flag=this.focusRow==row && this.tableStatus==2;
+      console.log(flag);
+      this.axios.post("/api/v1/wmsh/findOutboundDetail", row).then(res => {
+        console.log("res", res);
+        this.outbounds = res.data.data;
+        this.expandRowKeys=[]
+      }).then(()=>{
+        this.tableStatus=2;
+        if(!flag){
+          this.$refs.excelDom.toggleRowExpansion(row);
+          this.focusRow=row;
+        }else{
+          this.focusRow=null;
+        }
+      });
+    },
     func(res) {
       console.log("aaa" + res);
       var resultActualInstallations = 0;

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

@@ -889,6 +889,10 @@ export default {
         {
           values1: 'hnht',
           label1: '海南瀚途贸易有限公司'
+        },
+        {
+          values1: 'cdxc',
+          label1: '成都兴城道成物流有限公司'
         }
       ],
       values1: 'dzgt',

+ 159 - 22
src/views/appoint/components/saleContract/addTransportPrice.vue

@@ -8,34 +8,16 @@
       </div>
       <div id="liulan">
           <el-button type="primary" class="btn" @click="oilPriceFormulaClick">浏览</el-button>
-          <el-button type="primary" class="btn1" @click="ondrawerOut">选择</el-button>
+          <el-button type="primary" class="btn1" @click="ondrawerOut">浏览</el-button>
           <!-- <el-button type="primary" class="btn1" @click="addressClick">浏览</el-button> -->
       </div>
     </div>
     <div class="elForm">
       <el-form :inline="true" class="demo-form-inline" label-width="80px">
-        <el-form-item label="所属承运商">
-          <el-autocomplete
-            class="inline-input"
-            v-model="state"
-            :fetch-suggestions="querySearch"
-            placeholder="请输入承运商名称"
-            :trigger-on-focus="false"
-            @select="handleSelect"
-          >
-            <template slot-scope="{ item }">
-              <div class="name" v-if="item.carrierName">
-                {{ item.carrierName }}
-              </div>
-            </template>
-          </el-autocomplete>
-        </el-form-item>
+        <el-button type="primary" id="cysbutton" @click="ondrawerOutcys">浏览所属承运商</el-button>
       </el-form>
     </div>
-    <div class="button_box">
-      <el-button @click="cancel">取消</el-button>
-      <el-button type="primary" @click="makeSure">确定</el-button>
-    </div>
+
     <!-- 油价联动公式模态框 -->
     <el-drawer
       title="请选择油价联动公式"
@@ -107,6 +89,80 @@
       </div>
     </el-dialog>
 
+    <!-- 承运商模态框 -->
+    <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>
 
@@ -117,6 +173,22 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      carrierIdArray:[],
+      tableTop: [
+        {
+          prop: "carrierName",
+          label: "承运商"
+        }
+      ],
+      selectionList: [],
+      carrierTypes:[],
+      carrier: {
+        requestUrl: "",
+        selectionType: "select"
+      },
+      //是否显示承运商模态框
+      drawer: false,
+      index: "",
       //具体收货地址
       place:null,
       //承运商名称
@@ -211,6 +283,68 @@ export default {
     this.getAllProvince();
   },
   methods: {
+    //点击删除按钮删除当前点击的对象
+    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) {
+      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() {
+      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;
@@ -373,9 +507,12 @@ export default {
       }
     },
     makeSure() {
+      for (let i = 0; i < this.selectionList.length; i++) {
+        this.carrierIdArray.push(this.selectionList[i].carrierId)
+      }
       let mapValue={
         shipperId : this.form1.shipperId,
-        carrierId : this.carrierIds,
+        carrierId : this.carrierIdArray,
         cargonameId : this.oilPriceFormulaId,
         capacityTypeId : this.form1.capacityTypeId,
         priceValue : this.form1.priceValue,

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

@@ -841,6 +841,10 @@ export default {
         {
           values1: "hnht",
           label1: "海南瀚途贸易有限公司"
+        },
+        {
+          values1: 'cdxc',
+          label1: '成都兴城道成物流有限公司'
         }
       ],
       values1: "dzgt",

+ 2 - 1
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -273,7 +273,8 @@ export default {
         '四川省达州钢铁集团有限责任公司',
         '四川达钢商贸有限公司',
         '江西久隆贸易有限公司',
-        '海南瀚途贸易有限公司'
+        '海南瀚途贸易有限公司',
+        '成都兴城道成物流有限公司'
       ],
       option: {
         // 表格请求数据的地址