Browse Source

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

huk 3 years ago
parent
commit
dd3eb6d256

+ 1 - 1
build/utils.js

@@ -17,7 +17,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //  'logistics', 'process', '   ', 'reportform', 'basicconfig', 'system']
 // let devModules = ['index','RMS','systemConfig','TMS']
 let devModules = ['all'];
-// let devModules = ['index','inward','appoint','sale']
+// let devModules = ['index','appoint','sale','RMS']
 
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;

+ 1 - 1
config/index.js

@@ -56,7 +56,7 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://192.168.1.113:8080",
+    target: "http://172.16.33.166:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

BIN
dist.zip


+ 1 - 1
index.html

@@ -4,7 +4,7 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <title>工业互联网平台 iCore-ICP</title>
-    <script> window.location.href='./views/download.html';
+    <script> window.location.href='./views/index.html';
     </script>
   </head>
   <body>

+ 229 - 44
src/views/RMS/components/addPersonnel.vue

@@ -5,6 +5,48 @@
      <div class="form-box" style="margin-right: 10rem">
         <dil-form :formId="325" v-model="form1" ref="from1"></dil-form>
       </div>
+
+      <div class="department">
+        <div class="department2">
+                <span>二级部门:</span>
+                <el-select v-model="value1" placeholder="请选择" @change="onchange1">
+                    <el-option
+                    v-for="(item,i) in options1"
+                    :key="i"
+                    :label="item.label"
+                    :value="item.value"
+                    >
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="department3">
+                <span>三级部门:</span>
+                <el-select v-model="value2" placeholder="请选择" @change="onchange2">
+                    <el-option
+                        v-for="(item,i) in options2"
+                        :key="i"
+                        :label="item.label"
+                        :value="item.value"
+                    >
+                    </el-option>
+                </el-select>
+            </div>
+      </div>
+      <div>
+        <div class="role">
+                <span>赋权角色:</span>
+                <el-select v-model="value3" placeholder="请选择">
+                    <el-option
+                        v-for="(item,i) in options3"
+                        :key="i"
+                        :label="item.roleName"
+                        :value="item.roleId"
+                    >
+                    </el-option>
+                </el-select>
+            </div>
+      </div>
+
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -14,64 +56,194 @@
 
 <script>
 import PageTitle from "@/components/Page/Title";
-
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
     return {
-      form1: {},
+      form1: {
+        personnelJobNumber : '',
+        personnelName : '',
+        personnelPost : '',
+        personnelWorkshopid : '',
+        shipperId : '',
+        personnelShifts : '',
+        personnelTeam : ''
+      },
       value: undefined,
+      //新增用户的SSO主键
+      personnelSsoId:'',
+      //token
+      token: null,
+      //二级部门
+      options1:[],
+      //选中的二级部门名称
+      value1:'',
+      //选中的二级部门机构ID和机构编码
+      map1:{
+          shipperOrgCode : '',
+          shipperSsoId : ''
+      },
+      // 三级部门
+      options2:[],
+      // 选中的三级部门名称
+      value2:'',
+      //选中的三级部门机构ID和机构编码
+      map2:{
+          shipperOrgCode : '',
+          shipperSsoId : ''
+      },
+      // 角色
+      options3:[],
+      // 选中的角色名称
+      value3:'',
+      // 选中的角色ID
+      roleId:''
     };
   },
-  mounted() {},
+  created(){
+    this.token = getCookie("accessToken");
+  },
+  mounted() {
+    //初始化二级机构和角色
+    this.initialization();
+  },
   methods: {
+     initialization(){
+       //初始化选择二级机构
+         this.axios.get('/api/v1/rms/getSecondShipper').then((res)=>{
+             this.options1 = res.data.data;
+         })
+         //初始化角色
+        const formData = new FormData();
+        this.$store.dispatch('system/rolesManage/list',formData)
+        .then((res)=>{
+          var roleList = [];
+          roleList=res.data;
+          roleList.forEach((item,i)=>{
+              if(item.roleId!='superadmin'){
+                this.options3.push(item);
+              }
+          })
+          // this.options3 = res.data;
+        })
+     },
+     onchange1(val){
+            //  查询选中的二级机构下的三级机构
+             this.value2 = '';
+             this.axios.get('/api/v1/rms/getThirdShipper?shipperId='+val).then((res)=>{
+             this.options2 = res.data.data;    
+         })
+         //获取二级部门的机构ID和机构编码
+         this.axios.post('/api/v1/rms/getShipperMap?shipperId='+val).then((res)=>{
+             this.map1 = res.data.data;
+         })
+     },
+     onchange2(val){
+         //获取三级部门的机构ID和机构编码
+         this.axios.post('/api/v1/rms/getShipperMap?shipperId='+val).then((res)=>{
+             this.map2 = res.data.data; 
+         })
+     },
+
+     //确定人员新增
      makeSure() {
-      console.log(this.form1)
-      let RmsPersonnel={
-        personnelId:this.form1.personnelId,
-        personnelJobNumber: this.form1.personnelJobNumber,
-        personnelName: this.form1.personnelName,
-        personnelPost: this.form1.personnelPost,
-        personnelWorkshopid: this.form1.personnelWorkshopid,
-        personnelShifts: this.form1.personnelShifts,
-        personnelTeam:this.form1.personnelTeam,
-        departmentId: this.form1.shipperId,
-        username:this.form1.username
+      //初始化用户信息
+      let userInfo = {
+        orgCode : '',
+        orgName : '',
+        orgId : '',
       };
-      let userName={
-
+      //该用户没有三级部门
+      if(this.options2.length==0){
+      userInfo = {
+        userName : this.form1.personnelName,
+        userCode : this.form1.personnelJobNumber,
+        orgCode : this.map1.shipperOrgCode,
+        orgName : this.value1,
+        orgId : this.map1.shipperSsoId,
+        // mobile : '13500000011',
+        // email : '123456789@qq.com',
+        groupId : '506514577756917769',
+        companyId : '713710108567277568'
       }
+      //该用户有三级部门
+      }else{
+        userInfo = {
+        userName : this.form1.personnelName,
+        userCode : this.form1.personnelJobNumber,
+        orgCode : this.map2.shipperOrgCode,
+        orgName : this.value1,
+        orgId : this.map2.shipperSsoId,
+        // mobile : '13500000011',
+        // email : '123456789@qq.com',
+        groupId : '506514577756917769',
+        companyId : '713710108567277568'
+      }
+      }
+       //先新增SSO中的用户
+      const formData = new FormData();
+      
+      Object.keys(userInfo).forEach((key) => {
+      formData.append(key, userInfo[key]);
+      });
+      //判断数据是否都填了
       if(
-        RmsPersonnel.personnelJobNumber ==null ||
-        RmsPersonnel.personnelName ==null ||
-        RmsPersonnel.personnelPost ==null ||
-        RmsPersonnel.personnelWorkshopid==null ||
-        RmsPersonnel.personnelShifts==null ||
-        RmsPersonnel.departmentId==null ||
-        RmsPersonnel.personnelTeam==null
-      )this.$message.error("存在空值!");
-      else
-      this.axios
-        .post(
+            this.form1.personnelJobNumber =='' ||
+            this.form1.personnelPost =='' ||
+            this.form1.personnelName =='' ||
+            // RmsPersonnel.personnelWorkshopid==null ||
+            this.form1.shipperId=='' ||
+            this.form1.personnelShifts=='' ||
+            this.form1.personnelTeam=='' ||
+            userInfo.orgName=='' ||
+            userInfo.orgCode=='' ||
+            userInfo.orgId=='' ||
+            this.value3==''
+          ){
+              this.$message.error("存在空值!");
+      }else{
+
+      //新增用户
+      this.$store.dispatch('system/usersManage/addUser',formData)
+      .then((res)=>{
 
-        )
-        .post(
-          "/api/v1/rms/insertPersonnel",
-           RmsPersonnel
-        )
-        .then((res) => {
-          if (res.data.code == 200) {
-            this.$message({
-              type: "success",
-              message: "新增成功!",
-            });
-            // this.$refs.table.refreshData();
-            this.$router.go(-1);
-          } else {
-            this.$message.error("新增失败,可能存在重复!");
+          //再新增RMS_PERSONNEL表信息
+          let rmsPersonnel = {
+            personnelJobNumber : this.form1.personnelJobNumber,
+            personnelPost : this.form1.personnelPost,
+            personnelName : this.form1.personnelName,
+            personnelDepartmentId : this.form1.shipperId,
+            // personnelWorkshopid : this.form1.personnelWorkshopid,
+            personnelShifts : this.form1.personnelShifts,
+            personnelTeam : this.form1.personnelTeam,
+            personnelSsoId : res.data.userId
           }
-          this.$refs['table'].resetField();
-        });
+              this.axios.post('/api/v1/rms/addPersonnel',rmsPersonnel)
+              .then((res)=>{
+                    if (res.data.code == 200) {
+                    this.$message({
+                      type: "success",
+                      message: "新增成功!",
+                    });
+                    // this.$refs.table.refreshData();
+                  } else {
+                    this.$message.error("新增失败,可能存在重复!");
+                  }
+                  // this.$refs['table'].resetField();
+              })
+
+              //最后新增角色赋权表
+
+              this.axios.post('pass/v1/sysuserroles/addUserroles?userId='
+              +res.data.userId+'&userCode='+this.form1.personnelJobNumber+'&roleId='+this.value3)
+              .then((res)=>{
+                  this.$router.go(-1);
+              })
+
+      });//end
+      }
+      
     },
     // 取消
     cancel() {
@@ -84,6 +256,7 @@ export default {
  .button-box{
     display: flex;
     justify-content: center;
+    margin-top: 2rem;
     .el-button{
       width: 80px;
       margin-right: 10px;
@@ -108,4 +281,16 @@ export default {
     }
   }
 }
+.department{
+  display: flex;
+  justify-content: center;
+  .department3{
+    margin-left: 2rem;
+  }
+}
+.role{
+  display: flex;
+  justify-content: center;
+  margin-top: 2rem;
+}
 </style>

+ 166 - 200
src/views/SporadicManage/components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue

@@ -1,23 +1,45 @@
 //新增运输预约
 <template>
   <!-- 新增运输作业页面 -->
-  <div id="contractDetails">
+  <div class="addSporadic">
     <page-title>运输预约</page-title>
-    <div class="truckList1">
-      <div class="forwardingUnit from">
-      <span class="text">发货单位:</span>
-      <el-input v-model="supplierName" disabled> </el-input>
-      <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
-    </div>
-    </div>
-    <div class="forwardingUnit from">
-      <span class="text">收货单位:</span>
-      <el-input v-model="receiveName" disabled> </el-input>
-      <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
-    </div>
-    <div class="orderType from">
-      <span class="text">流向:</span>
-      <el-select v-model="orderType" placeholder="请选择">
+    <div class="form-box">
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="发货单位">
+          <el-input v-model="supplierName" placeholder="必填" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
+        </el-form-item>
+        </el-form>
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="收货单位">
+          <el-input v-model="receiveName" placeholder="必填" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
+        </el-form-item>
+        </el-form>
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="流向">
+        <el-select v-model="orderType" placeholder="请选择">
         <el-option
           v-for="item in orderTypeList"
           :key="item.value"
@@ -26,45 +48,67 @@
         >
         </el-option>
       </el-select>
-    </div>
-    <div class="lineId from">
-      <span class="text">选择路线:</span>
-      <el-input v-model="lineName" disabled> </el-input>
-      <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
-    </div>
-    <div class="truckList1">
-      <div class="truckList from">
-        <span class="text">选择承运商:</span>
-       <el-autocomplete
-      class="inline-input"
-      v-model="state2"
-      :fetch-suggestions="querySearch"
-      placeholder="请输入承运商名称"
-      :trigger-on-focus="false"
-      @select="handleSelect"
-      @input="oninput"
-    >
-  <template slot-scope="{ item }">
-    <div class="name">{{ item.value }}</div>
-  </template>
-    </el-autocomplete>
-      </div>
-    </div>
-    <div class="truckList1">
-      <div class="truckList from">
-        <span class="text">选择物资:</span>
-        <el-button type="primary" @click=" table = true" class="truckBtn"
-          >浏览</el-button
+    </el-form-item>
+        </el-form>
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="选择路线">
+          <el-input v-model="lineName" placeholder="必填" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="ondrawer(5)">浏览</el-button>
+        </el-form-item>
+        </el-form>
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="选择承运商">
+         <el-autocomplete
+          class="inline-input"
+          v-model="state2"
+          :fetch-suggestions="querySearch"
+          placeholder="请输入承运商名称"
+          :trigger-on-focus="false"
+          @select="handleSelect"
+          @input="oninput"
         >
-      </div>
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.value }}</div>
+        </template>
+        </el-autocomplete>
+        </el-form-item>
+        </el-form>
+        <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="选择物资">      
+        </el-form-item>
+        <el-form-item > 
+          <el-button type="primary" @click="drawTable" class="truckBtn"
+          >浏览</el-button>
+        </el-form-item>
+        </el-form>
     </div>
-      <div class="switch" v-if="tableData.length > 0">
+    <div class="swtichTop">
+    <span class="titile">点击浏览选择物资之前请选择物资单位!</span>
+    <div class="switch" v-if="tableData.length > 0">
       <el-tooltip placement="top">
         <div slot="content">下面表格已有数据,不能进行更改!!!</div>
         <el-switch
           v-model="value"
-          active-text="重量"
-          inactive-text="件数"
+          active-text="件数"
+          inactive-text="重量"
           disabled
         >
         </el-switch>
@@ -73,10 +117,12 @@
     <div class="switch" v-else>
       <el-tooltip placement="top">
         <div slot="content">当下面表格有数据之后,将不能进行更改!!!</div>
-        <el-switch v-model="value" active-text="重量" inactive-text="件数">
+        <el-switch v-model="value" active-text="件数" inactive-text="重量">
         </el-switch>
       </el-tooltip>
     </div>
+    </div>
+
     <!-- 物资表格 -->
     <div class="truckListTable">
     <div class="selectionTable">
@@ -106,7 +152,7 @@
                   class="textinput"
                   v-model.number="scope.row.materialPriority"
                 ></el-input>
-              </template
+              </template>
               <!-- 物资件数 -->
               <template v-if="item.prop == 'orderMaterialNumber'">
                 <el-input
@@ -142,7 +188,8 @@
     </div>
     </div>
     <!-- 物资模态框 -->
-    <el-drawer
+    <div class="drawSty">
+      <el-drawer
       title="选择物资信息"
       :visible.sync="table"
       direction="rtl"
@@ -166,7 +213,7 @@
       <el-input
         placeholder="请输入内容"
         v-model="input"
-        style="margin-top: 0.625rem; margin-left: 1.25rem"
+        style="margin-top: 20px"
         clearable
       ></el-input>
       <el-button
@@ -195,12 +242,6 @@
           @selection-change="currentRadioChange3"
         ></dilTable>
       </div>
-      <div v-show="a == 4">
-        <dilTable
-          v-bind.sync="unloadPoint"
-          @radio-change="currentRadioChange4"
-        ></dilTable>
-      </div>
       <div v-show="a == 5">
         <dilTable
           v-bind.sync="line"
@@ -208,7 +249,8 @@
         ></dilTable>
       </div>
     </el-drawer>
-    <div class="button_box">
+    </div>  
+    <div class="button-box">
       <el-button @click="onClickCancel">返回</el-button>
       <el-button type="primary" @click="makeSure">确认</el-button>
     </div>
@@ -216,6 +258,7 @@
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
+import { Checkbox } from 'element-ui';
 
 export default {
   components: { PageTitle },
@@ -224,7 +267,7 @@ export default {
       receiveName:'',
       state2:null,
       restaurants: [],
-       orderTypeList:[
+      orderTypeList:[
         {
           value:12,
           label:'进厂'
@@ -259,16 +302,17 @@ export default {
           label: "规格型号",
           width: "140",
         },
-        {
-          prop: "orderMaterialNumber",
-          label: "件数",
-          slot: true,
-        },
-          {
+         {
           prop: "materialPriority",
           label: "装卸货优先级",
           slot: true,
         },
+        {
+          prop: "orderMaterialWeight",
+          label: "重量",
+          slot: true,
+        },
+       
       ],
       // 收货单位ID
       receiveId:null,
@@ -313,17 +357,6 @@ export default {
           "/api/v1/uc/queryConsigneeByLike?apiId=396",
           selectionType:"radio",
       },
-      third:{
-        requestUrl:
-        "/api/v1/uc/getCarrierMesByLike?apiId=244",
-        selectionType:"radio",
-        carriermapList:[]
-      },
-      unloadPoint: {
-        requestUrl: "/api/v1/uc/getUnloadingMesByLike?apiId=374",
-        selectionType: "radio",
-        unloadMapList:[]
-      },
       line: {
         requestUrl: "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3",
         selectionType: "radio",
@@ -334,23 +367,31 @@ export default {
   watch: {
     value() {
       if (this.value) {
+        console.log(this.value)
+        console.log(this.tableTop.length)
         this.tableTop.splice(this.tableTop.length - 1, 1);
         this.tableTop.push({
-          prop: "orderMaterialWeight",
-          label: "重量",
+          prop: "orderMaterialNumber",
+          label: "件数",
           slot: true,
         });
       } else {
         this.tableTop.splice(this.tableTop.length - 1, 1);
         this.tableTop.push({
-          prop: "orderMaterialNumber",
-          label: "件数",
+          prop: "orderMaterialWeight",
+          label: "重量",
           slot: true,
         });
       }
     },
   },
   methods: {
+    drawTable(){
+      console.log('jll')
+      this.materialOptions.requestUrl = "/api/v1/uc/selectAllMaterialName?apiId=395&test=1"
+      this.selectionList1 = []
+      this.table = true
+    },
     handleSelect(item){
       this.carrierId = item.carrierId
       item.carrierName = this.state2
@@ -383,7 +424,8 @@ export default {
     },
     // 返回主界面
     makeSure1() {
-      console.log(this.selectionList1)     
+      console.log(this.selectionList1)
+      debugger  
       this.selectionList1.forEach((e) => {
         var addmap = {
           materialCode: e.materialCode,
@@ -393,10 +435,11 @@ export default {
           materialId: e.materialId,
           materialPriority:e.materialPriority,
         };
-        this.tableData.push(addmap);
+          this.tableData.push(addmap);
+      });     
         this.selectionList1 = [];
         this.table = false;
-      }); 
+        console.log(this.selectionList1)
     },
     //取消模态框多选
     open() {
@@ -414,9 +457,6 @@ export default {
       } else {
         this.table = false;
       }
-    },
-    onClick(index) {
-      this.tableData.splice(index, 1);
     },
       // 返回选中的物资信息
     selectionChange(selection) {
@@ -430,17 +470,9 @@ export default {
           this.input;
       } else if (a == 2) {
         this.secend.requestUrl =
-          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247&materialId=" +
-          this.materialId +
+          "/api/v1/uc/getSupplierMesByMaterialId?apiId=247" +
           "&index=" +
           this.input;
-      } else if (a == 3) {
-        this.third.requestUrl =
-          "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&index=" +
-          this.input;
-      } else if (a == 4) {
-        this.third.requestUrl =
-          "/api/v1/uc/getUnloadingMesByLike?apiId=347&index=" + this.input;
       } else if (a == 5) {
         this.option.requestUrl =
           "/api/v1/rms/getAllLineDesk?apiId=249&lineType=3&con=" + this.input;
@@ -469,8 +501,13 @@ export default {
     },
     currentRadioChange5(selection) {
       console.log(selection)
-      this.lineName = selection.lineName+'  '+selection.lineDesk 
-      this.lineId = selection.lineId;
+      if(selection.lineName == null &&selection.lineDesk == null){
+          this.lineName = ''
+      }else{
+          this.lineName = selection.lineName+'  '+selection.lineDesk 
+          this.lineId = selection.lineId;
+      }
+      
     },
     currentRadioChange3(selection) {
       this.carriermapList = [];
@@ -499,122 +536,51 @@ export default {
     },
 };
 </script>
-
-<style lang="scss" >
-.contractDetails {
+<style lang="scss" scoped>
+.addSporadic{
+  .contractDetails {
   width: 100%;
 }
-.from {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  width: 40%;
-  margin-top: 5px;
-  margin-bottom: 20px;
-}
-.remark {
-  display: flex;
-  justify-content: center;
-  .text {
-    display: inline-block;
-    width: 100px;
-    text-align: right;
-  }
-  .input{
-    width: 250px;
-    margin-right: 20px;
+.drawSty{
+  .el-input{
+    width: 240px;
   }
 }
-.lineId {
+.swtichTop{
   display: flex;
+  height: 40px;
+  align-content: center;
   justify-content: center;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  padding-right:20px ;
+  .titile{
+    color: red;
+    font-size: 14px;
   }
-  .input{
-    width: 250px;
-    margin-right: 20px;
+  .switch{
+    margin-right: -60px
   }
 }
-.material {
-  display: flex;
-  justify-content: center;
-  margin-top: 20px;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
-  }
-  .input{
-    width: 250px;
-    margin-right: 20px;
+.form-box {
+  display: inline-block !important;
+  margin-left: 488px;
+  .el-input {
+    width: 320px;
   }
-}
-.orderType{
-  display: flex;
-  justify-content: center;
-  .text {
-    display: inline-block;
-    width: 110px;
-    text-align: right;
+  .el-select{
+    width: 320px;
   }
-  .select{
-    width: 250px;
-  }
-  .span{
-    display: inline-block;
-    width: 30px;height: 10px;
-  }
-}
-.contractTitle{
-  display: flex;
-  justify-content: center;
-  .el-form-item{
-    display: flex;
-    justify-content: center;
-    .el-form-item__label{
-      display: flex;
-      align-items: center;
-    }
-    .el-input{
-      width: 250px;
-    }
+  .el-autocomplete{
+    width: 320px;
   }
-}
-.forwardingUnit {
-  display: flex;
-  justify-content: center;
-  .text {
-    display: inline-block;
-    width: 170px;
-    text-align: right;
+  .el-form {
+    padding: 10px;
   }
-  .input{
-    width: 250px;
-    margin-right: 20px;
+  .truckBtn{
+    width: 320px;
   }
 }
-.truckList1 {
-  width: 100%;
-  .truckList {
-    width: 96%;
-    .text {
-      display: inline-block;
-      width: 120px;
-      text-align: right;
-    }
-    .truckBtn {
-      width: 250px;
-    }
-  }
+.button-box {
+  margin-left: 25px !important;
 }
-.button_box {
-  display: flex;
-  justify-content: center;
-  align-items: center;
-  width: 100%;
-  height: 100px;
 }
 </style>

+ 7 - 3
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -74,8 +74,8 @@
                 ></el-input>
               </template>
               <!-- 收货地址id -->
-              <template v-if="item.prop == 'saleShipperAddressName'">
-                <el-input v-model="scope.row.saleShipperAddressName" disabled>
+              <template style="width: 400px" v-if="item.prop == 'saleShipperAddressName'">
+                <el-input style="width: 200px" v-model="scope.row.saleShipperAddressName" disabled>
                 </el-input>
                 <el-button type="primary" @click="ondrawer(scope.row,scope.$index)"
                   >浏览</el-button
@@ -126,7 +126,10 @@
     <el-drawer
       :visible.sync="drawer"
       :direction="direction"
-      :before-close="handleClose"
+      :close-on-press-escape="true"
+      :show-close="true"
+      :wrapperClosable="true"
+      modal
       size="30%"
     >
       <el-input
@@ -243,6 +246,7 @@ export default {
         {
           prop: "saleShipperAddressName",
           label: "收货地址",
+          width: "300",
           slot: true,
         },
         {

+ 284 - 8
src/views/appoint/components/saleContract/saleOrder.vue

@@ -12,8 +12,8 @@
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <el-tab-pane label="未上报" name="first">
-        <dilTable v-bind.sync="option">
-          <el-table-column fixed="right" label="操作" align="center" width="150">
+        <dilTable v-bind.sync="option" ref="table3">
+          <el-table-column fixed="right" label="操作" align="center" width="200">
             <template slot-scope="scope">
               <el-button
                 @click="uploadclick(scope.row.saleOrderId)"
@@ -33,17 +33,76 @@
                 @click="deleteclick(scope.row.saleOrderId)"
                 >删除</el-button
               >
+              <el-button
+                @click="detailclick3(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">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData3" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
         </dilTable>
       </el-tab-pane>
       <!-- 已下发 -->
       <el-tab-pane label="已上报" name="second">
-        <dilTable v-bind.sync="option2"> </dilTable>
+        <dilTable v-bind.sync="option2" ref="table2">
+        <el-table-column fixed="right" label="操作" width="70">
+            <template slot-scope="scope">
+              <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">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData2" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+        </dilTable>
       </el-tab-pane>
+
+
       <!-- 财务已审批 -->
       <el-tab-pane label="财务已审批" name="third">
-        <dilTable v-bind.sync="option3">
+        <dilTable v-bind.sync="option3" ref="table1">
           <el-table-column fixed="right" label="操作" width="200">
             <template slot-scope="scope">
               <el-button
@@ -58,13 +117,40 @@
                 size="small"
                 >修改日志</el-button
               >
+              <el-button
+                @click="detailclick1(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">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData1" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+
         </dilTable>
       </el-tab-pane>
       <!-- 销售公司已审批 -->
        <el-tab-pane label="销售公司已审批" name="four">
-        <dilTable v-bind.sync="option4">
+        <dilTable v-bind.sync="option4" ref="table">
           <el-table-column fixed="right" label="操作" width="130">
             <template slot-scope="scope">
               <el-button
@@ -74,13 +160,33 @@
                 >新增车序号</el-button
               >
               <el-button
-                @click="detailedClick(scope.row.saleOrderId)"
+                @click="detailclick(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">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
         </dilTable>
       </el-tab-pane>
     </el-tabs>
@@ -114,6 +220,52 @@ export default {
           "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409",
       },
       
+      //记录旧的row对象 (销售公司已审批)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (销售公司已审批)
+      oldRowCount: 1,
+      //记录旧的row对象 (财务已审批)
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (财务已审批)
+      oldRowCount1: 1,
+      //记录旧的row对象 (已上报)
+      oldRow2: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (已上报)
+      oldRowCount2: 1,
+      //记录旧的row对象 (未上报)
+      oldRow3: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态 (未上报)
+      oldRowCount3: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      //(销售公司已审批)
+      tableData: [],
+      //(财务已审批)
+      tableData1: [],
+      //(已上报)
+      tableData2: [],
+      //(未上报)
+      tableData3: [],
     };
   },
   methods: {
@@ -136,9 +288,133 @@ export default {
     addClick(saleOrderId){
       this.$router.push("/addSaleOrderArrange/" + saleOrderId);
     },
-    detailedClick(saleOrderId){
-      this.$router.push("saleOrderMaterial/" + saleOrderId);
+    // detailedClick(saleOrderId){
+    //   this.$router.push("saleOrderMaterial/" + saleOrderId);
+    // },
+    // -------查看物资详情 (销售公司已审批)
+    detailclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (财务已审批)
+    detailclick1(row) {
+      // 记录重复点击次数
+      if (this.oldRow1 === row) {
+        this.oldRowCount1 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table1.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow1 != "") {
+        if (this.oldRow1 != row) {
+          if (this.oldRowCount1 % 2 === 1) {
+            this.$refs.table1.toggleRowExpansion(this.oldRow1);
+          } else {
+            this.oldRowCount1 = 1;
+          }
+        } else {
+          this.oldRow1 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow1 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData1 = res.data.data;
+        });
+    },
+
+    // -------查看物资详情 (已上报)
+    detailclick2(row) {
+      // 记录重复点击次数
+      if (this.oldRow2 === row) {
+        this.oldRowCount2 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table2.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow2 != "") {
+        if (this.oldRow2 != row) {
+          if (this.oldRowCount2 % 2 === 1) {
+            this.$refs.table2.toggleRowExpansion(this.oldRow2);
+          } else {
+            this.oldRowCount2 = 1;
+          }
+        } else {
+          this.oldRow2 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow2 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData2 = res.data.data;
+        });
     },
+
+    // -------查看物资详情 (未上报)
+    detailclick3(row) {
+      // 记录重复点击次数
+      if (this.oldRow3 === row) {
+        this.oldRowCount3 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table3.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow3 != "") {
+        if (this.oldRow3 != row) {
+          if (this.oldRowCount3 % 2 === 1) {
+            this.$refs.table3.toggleRowExpansion(this.oldRow3);
+          } else {
+            this.oldRowCount3 = 1;
+          }
+        } else {
+          this.oldRow3 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow3 = row;
+      // 根据销售订单id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" +row.saleOrderId)
+        .then((res) => {
+          this.tableData3 = res.data.data;
+        });
+    },
+
     // 上传
     uploadclick(saleOrderId) {
       this.$confirm("是否上传", "提示", {

+ 133 - 45
src/views/appoint/components/saleContract/saleOrderArrange.vue

@@ -13,10 +13,10 @@
     </div>
     <template>
       <div>
-        <dilTable v-bind.sync="first" @selection-change="selectionChange">
-            <el-table-column fixed="right" label="操作" width="150">
-                <template slot-scope="scope">
-                <el-button
+        <dilTable v-bind.sync="first" @selection-change="selectionChange" ref="table">
+          <el-table-column fixed="right" label="操作" width="200">
+            <template slot-scope="scope">
+              <el-button
                 @click="lookclick(scope.row.saleOrderId)"
                 type="text"
                 size="small"
@@ -28,8 +28,33 @@
                 size="small"
                 >修改日志</el-button
               >
-                </template>
-            </el-table-column>
+              <el-button
+                @click="materialclick(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">
+                <div v-if="false">{{ props }}</div>
+                <div>
+                  <el-table :data="tableData" border>
+                    <el-table-column
+                      v-for="(item, i) in tableHead"
+                      :key="i"
+                      :prop="item.prop"
+                      :label="item.label"
+                      :width="item.width"
+                    ></el-table-column>
+                  </el-table>
+                </div>
+              </el-form>
+            </template>
+          </el-table-column>
         </dilTable>
       </div>
     </template>
@@ -47,51 +72,79 @@ export default {
         mapList: [],
       },
       activeName: "first",
+      //记录旧的row对象
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态
+      oldRowCount: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      tableData: [],
     };
+    
   },
   methods: {
-    Issue(){
-    if(this.first.mapList.length==0){
-      this.$message({
-            type: "warning",
-            message: "请先选择订单!",
-          });
-    }else{
-    this.$confirm("是否下发", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true,
-      })
-      .then(() => {
-      //初始化maplist
-      var mapList = [];
-      this.first.mapList.forEach((item,i) => {
-        //初始化mapItem
-        var mapItem={
-                //销售订单物资中间表id
-                saleOrderMaterialId : 0,
-            };
-        mapItem.saleOrderMaterialId=item.saleOrderMaterialId;
-        mapList.push(mapItem);
-      });
-          this.$message({
-            type: "success",
-            message: "下发成功!",
-          });
-         this.axios.post("/api/v1/ams/issueTruckNo", mapList).then((res) => {
-          if (res.data.code == "200") {
-            this.$router.go(0);
-          }
+    Issue() {
+      if (this.first.mapList.length == 0) {
+        this.$message({
+          type: "warning",
+          message: "请先选择订单!",
         });
+      } else {
+        this.$confirm("是否下发", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+          center: true,
         })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "取消上传!",
+          .then(() => {
+            //初始化maplist
+            var mapList = [];
+            this.first.mapList.forEach((item, i) => {
+              //初始化mapItem
+              var mapItem = {
+                //销售订单物资中间表id
+                saleOrderMaterialId: 0,
+              };
+              mapItem.saleOrderMaterialId = item.saleOrderMaterialId;
+              mapList.push(mapItem);
+            });
+            this.$message({
+              type: "success",
+              message: "下发成功!",
+            });
+            this.axios.post("/api/v1/ams/issueTruckNo", mapList).then((res) => {
+              if (res.data.code == "200") {
+                this.$router.go(0);
+              }
+            });
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "取消上传!",
+            });
           });
-        });
-    }
+      }
     },
     lookclick(saleOrderId) {
       this.$router.push("/saleOrderDetailApproved/" + saleOrderId);
@@ -99,6 +152,41 @@ export default {
     passclick(saleOrderId) {
       this.$router.push("/saleOrderUpdateLog/" + saleOrderId);
     },
+    materialclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      this.getMaterial(row.saleOrderMaterialId);
+    },
+    // 根据车序号id查询物资信息
+    getMaterial(saleOrderMaterialId) {
+      this.axios
+        .post(
+          "/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +
+            saleOrderMaterialId
+        )
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
     selectionChange(selection) {
       this.first.mapList = selection;
     },

+ 8 - 6
src/views/inward/components/truckAppoint/addPlan.vue

@@ -1,6 +1,6 @@
 // 新增计划
 <template>
-  <div id="endMaintenance">
+  <div class="addInwardPlan">
     <page-title>新增计划</page-title>
 <div class="form-box">
 <el-form  class="demo-form-inline"  label-width="80px" label-position="left">
@@ -137,8 +137,9 @@ export default {
 };
 </script>
 
-<style lang="scss">
-.form-box{
+<style lang="scss" scoped>
+.addInwardPlan{
+    .form-box{
   display: inline-block;
   margin-left: 38%;
   .el-input{
@@ -148,13 +149,14 @@ export default {
     margin-left: -10px;
   }
   .el-form{
-    padding: 10px;
-    
+    padding: 10px;  
   }
 }
 .button-box
 {
-  margin-left: 45%;
+  margin-left: 25px !important;
 }
+}
+
 
 </style>

+ 232 - 187
src/views/inward/components/truckAppoint/addRequirement.vue

@@ -1,103 +1,139 @@
 // 新增采购内转需求
 <template>
-  <div id="endMaintenance">
+  <div class="addInwardRequirement">
     <page-title>新增需求</page-title>
-    <div>
-      <div class="form-box f2">
-        <el-form :inline="true" class="demo-form-inline" :label-position="left"  label-width="80px">
-          <el-form-item label="采购订单号">
-            <el-input v-model="purchaseOrder" placeholder="必填" disabled > </el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
-          </el-form-item>
-        </el-form>
-        <el-form :inline="true" class="demo-form-inline" :label-position="left" label-width="80px">
-          <el-form-item label="外轮船名">
-            <el-input v-model="foreignShipName" disabled></el-input>
-          </el-form-item>
-        </el-form>
-        <el-form :inline="true" class="demo-form-inline" :label-position="left" label-width="80px">
-          <el-form-item label="发货单位">
-            <el-input v-model="supplierName" disabled> </el-input>
-          </el-form-item>
-        </el-form>
-        <el-form :inline="true" class="demo-form-inline" :label-position="left" label-width="80px">
-          <el-form-item label="收货单位">
-            <el-input v-model="shipperName" disabled> </el-input>
-          </el-form-item>        
-        </el-form>
-        <el-form :inline="true" class="demo-form-inline" :label-position="left" label-width="80px">
-          <el-form-item label="物资名称">
-            <el-input v-model="materialName" disabled> </el-input>
-          </el-form-item>
-        </el-form>
-        <el-form :inline="true" class="demo-form-inline" :label-position="left" label-width="80px">
-          <el-form-item label="装车点">
-            <el-input v-model="truckPoint" placeholder="必填" disabled> </el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
-          </el-form-item>
-        </el-form>
-        <el-form :inline="true" class="demo-form-inline" :label-position="left" label-width="80px">
-          <el-form-item label="卸车点">
-            <el-input v-model="truckPoint1" placeholder="必填" disabled> </el-input>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="ondrawer(3)">浏览</el-button>
-          </el-form-item>
-        </el-form>
-      </div>
-      <el-drawer
-        :visible.sync="drawer"
-        :direction="direction"
-        :before-close="handleClose"
-        size="30%"
+    <div class="form-box f2">
+      <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="采购订单号">
+          <el-input v-model="purchaseOrder" placeholder="必填" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="外轮船名" class="tx">
+          <el-input v-model="foreignShipName" disabled></el-input>
+        </el-form-item>
+      </el-form>
+      <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="发货单位" class="tx">
+          <el-input v-model="supplierName" disabled></el-input>
+        </el-form-item>
+      </el-form>
+      <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="收货单位" class="tx">
+          <el-input v-model="shipperName" disabled></el-input>
+        </el-form-item>
+      </el-form>
+      <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="物资名称" class="tx">
+          <el-input v-model="materialName" disabled></el-input>
+        </el-form-item>
+      </el-form>
+      <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
       >
-        <el-input
-          placeholder="请输入内容"
-          v-model="input"
-          style="margin-top: 10px ;width:50%"
-          clearable
-        >
-        </el-input>
-        <el-button
-          type="primary"
-          class="btn"
-          @click="onclick(a)"
-          style="margin-bottom: 15px"
-        >
-          <i class="el-icon-search"></i>查询
-        </el-button>
-        <div v-show="a == 1">
-          <dilTable
-            v-bind.sync="second"
-            @radio-change="currentRadioChange1"
-          ></dilTable>
-        </div>
-        <div v-show="a == 2">
-          <dilTable
-            v-bind.sync="second1"
-            @radio-change="currentRadioChange2"
-          ></dilTable>
-        </div>
-        <div v-show="a == 3">
-          <dilTable
-            v-bind.sync="second2"
-            @radio-change="currentRadioChange3"
-          ></dilTable>
-        </div>
-         <div v-show="a == 4">
-          <dilTable
-            v-bind.sync="second3"
-            @radio-change="currentRadioChange4"
-          ></dilTable>
-        </div>
-      </el-drawer>
+        <el-form-item label="装车点">
+          <el-input v-model="truckPoint" placeholder="必填" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
+        </el-form-item>
+      </el-form>
+      <el-form
+        :inline="true"
+        class="demo-form-inline"
+        :label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="卸车点">
+          <el-input v-model="truckPoint1" placeholder="必填" disabled>
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" @click="ondrawer(3)">浏览</el-button>
+        </el-form-item>
+      </el-form>
     </div>
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="30%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px ;width:50%"
+        clearable
+      >
+      </el-input>
+      <el-button
+        type="primary"
+        class="btn"
+        @click="onclick(a)"
+        style="margin-bottom: 15px"
+      >
+        <i class="el-icon-search"></i>查询
+      </el-button>
+      <div v-show="a == 1">
+        <dilTable
+          v-bind.sync="second"
+          @radio-change="currentRadioChange1"
+        ></dilTable>
+      </div>
+      <div v-show="a == 2">
+        <dilTable
+          v-bind.sync="second1"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
+      </div>
+      <div v-show="a == 3">
+        <dilTable
+          v-bind.sync="second2"
+          @radio-change="currentRadioChange3"
+        ></dilTable>
+      </div>
+      <div v-show="a == 4">
+        <dilTable
+          v-bind.sync="second3"
+          @radio-change="currentRadioChange4"
+        ></dilTable>
+      </div>
+    </el-drawer>
     <div class="box-form">
-        <dil-form :formId="300" v-model="form"></dil-form>
+      <dil-form :formId="300" v-model="form"></dil-form>
     </div>
     <div class="button-box">
       <el-button type="primary" @click="makeSure">确认新增</el-button>
@@ -115,36 +151,36 @@ export default {
     return {
       purchaseOrder: null,
       foreignShipName: null,
-      materialName:null,
-      shipperName:null,
-      supplierName:null,
+      materialName: null,
+      shipperName: null,
+      supplierName: null,
       a: 1,
       direction: "rtl",
       input: "",
       truckPoint: null,
-      truckPoint1:null,
+      truckPoint1: null,
       drawer: false,
       form: {},
       second: {
         requestUrl: "/api/v1/ams/getPurchaseIdByBatch?apiId=252",
         selectionType: "radio",
-        mapList1: [],
+        mapList1: []
       },
       second1: {
         requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
         selectionType: "radio",
-        mapList2: [],
+        mapList2: []
       },
-      second2 :{
+      second2: {
         requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
         selectionType: "radio",
-        mapList3: [],
+        mapList3: []
       },
-      second3 :{
+      second3: {
         requestUrl: "/api/v1/ams/getWareHouse?apiId=251",
         selectionType: "radio",
-        mapList4: [],
-      },
+        mapList4: []
+      }
     };
   },
   methods: {
@@ -161,80 +197,85 @@ export default {
         this.second.requestUrl =
           "/api/v1/ams/getPurchaseIdByBatch?apiId=252&con=" + this.input;
       } else {
-        if(this.input == ""){
+        if (this.input == "") {
+          this.second1.requestUrl = "/api/v1/ams/getWareHouse?apiId=251";
+        } else {
           this.second1.requestUrl =
-          "/api/v1/ams/getWareHouse?apiId=251"
-        }else{
-            this.second1.requestUrl =
-          "/api/v1/ams/getWareHouse?apiId=251&con=" + this.input
-        }     
+            "/api/v1/ams/getWareHouse?apiId=251&con=" + this.input;
+        }
       }
     },
     currentRadioChange1(selection) {
-      this.mapList1 = selection
-      this.purchaseOrder = this.mapList1.purchaseOrderNo
-      this.foreignShipName = this.mapList1.resultForeignShipName
-      this.supplierName = this.mapList1.supplierName
-      this.shipperName = this.mapList1.shipperName
+      this.mapList1 = selection;
+      this.purchaseOrder = this.mapList1.purchaseOrderNo;
+      this.foreignShipName = this.mapList1.resultForeignShipName;
+      this.supplierName = this.mapList1.supplierName;
+      this.shipperName = this.mapList1.shipperName;
       this.materialName = this.mapList1.materialName;
     },
     currentRadioChange2(selection) {
-      this.mapList2 = selection
-      console.log(this.mapList2)     
-      if(this.mapList2.companyBranchName == null){
-          this.mapList2.companyBranchName = ''
+      this.mapList2 = selection;
+      console.log(this.mapList2);
+      if (this.mapList2.companyBranchName == null) {
+        this.mapList2.companyBranchName = "";
       }
-      if(this.mapList2.branchFactory == null){
-          this.mapList2.branchFactory = ''
+      if (this.mapList2.branchFactory == null) {
+        this.mapList2.branchFactory = "";
       }
-      if(this.mapList2.wareHouseName ==null){
-          this.mapList2.wareHouseName = ''
+      if (this.mapList2.wareHouseName == null) {
+        this.mapList2.wareHouseName = "";
       }
-      this.truckPoint= this.mapList2.companyBranchName+this.mapList2.branchFactory+this.mapList2.wareHouseName
+      this.truckPoint =
+        this.mapList2.companyBranchName +
+        this.mapList2.branchFactory +
+        this.mapList2.wareHouseName;
     },
     currentRadioChange3(selection) {
-      this.mapList3 = selection
-      console.log(selection)
-        if(this.mapList3.companyBranchName == null){
-          this.mapList3.companyBranchName = ''
+      this.mapList3 = selection;
+      console.log(selection);
+      if (this.mapList3.companyBranchName == null) {
+        this.mapList3.companyBranchName = "";
       }
-      if(this.mapList3.branchFactory == null){
-          this.mapList3.branchFactory = ''
+      if (this.mapList3.branchFactory == null) {
+        this.mapList3.branchFactory = "";
       }
-      if(this.mapList3.wareHouseName ==null){
-          this.mapList3.wareHouseName = ''
+      if (this.mapList3.wareHouseName == null) {
+        this.mapList3.wareHouseName = "";
       }
-      this.truckPoint1 = this.mapList3.companyBranchName+this.mapList3.branchFactory+this.mapList3.wareHouseName
+      this.truckPoint1 =
+        this.mapList3.companyBranchName +
+        this.mapList3.branchFactory +
+        this.mapList3.wareHouseName;
     },
     // 新增
     makeSure() {
-      if(this.purchaseOrder == null){
-          this.$alert('没有选择采购订单,请点击浏览选择采购订单!')
-          return         
-      }else if(this.truckPoint == null){
-          this.$alert('没有选择装车点,请点击浏览选择装车点!')
-          return
-      }else if(this.truckPoint1 == null){
-          this.$alert('没有选择卸货点,请点击浏览选择卸货点!')
-          return
-      }else if(typeof(this.form.materialWeight)=='undefined'){
-          this.$alert('没有输入物资重量,请输入!')
-          return
-      }else if(typeof(this.form.requirementType)=='undefined'){
-          this.$alert('没有选择需求类型,请选择!')
-          return
-      }else if(typeof(this.form.requirementTruckTime)=='undefined'){
-          this.$alert('没有选择用车时间,请选择!')
-          return
-      }else if(typeof(this.form.requirementShipperId)=='undefined'){
-          this.$alert('没有选择用车单位,请选择!')
-          return
-      }else if(typeof(this.form.requirementWorkType)=='undefined'){
-          this.$alert('没有选择费用类别,请选择!')
-          return
-      }else if(typeof(this.form.requirementEstimatedDuration)=='undefined'){
-          this.$alert('没有输入预计作业时长,请输入!')
-          return
+      if (this.purchaseOrder == null) {
+        this.$alert("没有选择采购订单,请点击浏览选择采购订单!");
+        return;
+      } else if (this.truckPoint == null) {
+        this.$alert("没有选择装车点,请点击浏览选择装车点!");
+        return;
+      } else if (this.truckPoint1 == null) {
+        this.$alert("没有选择卸货点,请点击浏览选择卸货点!");
+        return;
+      } else if (typeof this.form.materialWeight == "undefined") {
+        this.$alert("没有输入物资重量,请输入!");
+        return;
+      } else if (typeof this.form.requirementType == "undefined") {
+        this.$alert("没有选择需求类型,请选择!");
+        return;
+      } else if (typeof this.form.requirementTruckTime == "undefined") {
+        this.$alert("没有选择用车时间,请选择!");
+        return;
+      } else if (typeof this.form.requirementShipperId == "undefined") {
+        this.$alert("没有选择用车单位,请选择!");
+        return;
+      } else if (typeof this.form.requirementWorkType == "undefined") {
+        this.$alert("没有选择费用类别,请选择!");
+        return;
+      } else if (typeof this.form.requirementEstimatedDuration == "undefined") {
+        this.$alert("没有输入预计作业时长,请输入!");
+        return;
       }
       let requiremnet = {
         purchaseOrderId: this.mapList1.purchaseOrderId,
@@ -248,15 +289,15 @@ export default {
         requirementWorkContent: this.form.requirementWorkContent,
         requirementWorkEnvironment: this.form.requirementWorkEnvironment,
         requirementWorkType: this.form.requirementWorkType,
-        requirementUnloadUnitId:this.mapList3.wareHouseId
+        requirementUnloadUnitId: this.mapList3.wareHouseId
       };
       this.axios
         .post("/api/v1/ams/addTruckRequirement", requiremnet)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",
-              message: "新增成功!",
+              message: "新增成功!"
             });
             this.$router.go(-1);
           } else {
@@ -267,37 +308,41 @@ export default {
     // 返回
     cancel() {
       this.$router.go(-1);
-    }, 
-}};
+    }
+  }
+};
 </script>
-
-<style lang="scss">
-.form-box{
-  display: inline-block;
+<style lang="scss" scoped>
+.addInwardRequirement{
+.form-box {
+  display: inline-block !important;
   margin-left: 38%;
-  .el-input{
-    width:288px
+  .el-input {
+    width: 288px;
   }
-  .el-form{
+  .el-form {
     padding: 10px;
   }
+  .tx{
+    margin-left: -75px;
+  }
 }
-.box-form{
-  display: inline-block;
+.box-form {
+  display: inline-block ;
   padding-left: 38%;
-  .el-form-item{
-  display: flex;
-  padding: 10px;
-  .el-form-item__label{
-    width: 80px !important;
-  }
-  .el-input{
-    width:288px
-  }
+  .el-form-item {
+    display: flex;
+    padding: 10px;
+    .el-form-item__label {
+      width: 80px !important;
+    }
+    .el-input {
+      width: 288px;
+    }
   }
 }
-.button-box{
-  margin-left: 48%;
-  
+.button-box {
+  margin-left: 25px !important;
+}
 }
 </style>

+ 38 - 28
src/views/inward/components/truckAppoint/updateRequirement.vue

@@ -1,10 +1,9 @@
 //修改需求
 <template>
-  <div id="endMaintenance">
+  <div class="updateInwardRequirement">
     <page-title>修改需求</page-title>
-    <div>
-<div class="form-box f2">
-<el-form :inline="true"  class="demo-form-inline" label-width="80px">
+    <div class="form-box f2">
+        <el-form :inline="true"  class="demo-form-inline" label-width="80px">
   <el-form-item label="采购订单号">
     <el-input v-model="purchaseOrder" disabled>  
     </el-input>
@@ -56,11 +55,11 @@
       <el-button type="primary" @click="ondrawer(3)">浏览</el-button>
   </el-form-item>
   </el-form>
-</div>
-      <div class="form-box">
-        <dil-form :formId="300" v-model="form"></dil-form>
-      </div>
-<el-drawer
+    </div>
+    <div class="form-box">
+    <dil-form :formId="300" v-model="form"></dil-form>
+    </div>
+      <el-drawer
       :visible.sync="drawer"
       :direction="direction"
       :before-close="handleClose"
@@ -73,11 +72,10 @@
      <div v-show="a==1"><dilTable v-bind.sync="second" @radio-change="currentRadioChange1" ></dilTable></div>
       <div v-show="a==2"><dilTable v-bind.sync="second1" @radio-change="currentRadioChange2" ></dilTable></div>
     </el-drawer>
-    </div>
-    <div class="button-box">
-      <el-button type="primary" @click="makeSure">确认修改</el-button>
-      <el-button type="primary" @click="cancel">返回</el-button>
-    </div>
+      <div class="button-box">
+        <el-button type="primary" @click="makeSure">确认修改</el-button>
+        <el-button type="primary" @click="cancel">返回</el-button>
+      </div>
   </div>
 </template>
 
@@ -219,25 +217,37 @@ export default {
 };
 </script>
 
-<style lang="scss">
-.el-form-item{
-  display: flex;
-}
-.form-box{
-  display: inline-block;
+<style lang="scss" scoped>
+.updateInwardRequirement{
+.form-box {
+  display: inline-block !important;
   margin-left: 38%;
-  .el-input{
-    width:288px
+  .el-input {
+    width: 288px;
   }
-  .el-form{
+  .el-form {
     padding: 10px;
-   .el-form-item__label{
-    width: 80px !important;
   }
+  .tx{
+    margin-left: -75px;
+  }
+}
+.box-form {
+  display: inline-block ;
+  padding-left: 38%;
+  .el-form-item {
+    display: flex;
+    padding: 10px;
+    .el-form-item__label {
+      width: 80px !important;
+    }
+    .el-input {
+      width: 288px;
+    }
   }
 }
-.button-box
-{
-  margin-left: 48%;
+.button-box {
+  margin-left: 25px !important;
+}
 }
 </style>

+ 8 - 6
src/views/inward/components/truckOrder/decomposePlan.vue

@@ -1,8 +1,8 @@
 // 分解计划
 <template>
-	<div id="endMaintenance">
+	<div class="desomposePlan">
 		<page-title>分解计划</page-title>
-    <dilTable v-bind.sync="first" >
+        <dilTable v-bind.sync="first" >
 		</dilTable>
     <div class="form-box">
         <el-form :inline="true" class="demo-form-inline" :label-position="left"  label-width="80px">
@@ -273,8 +273,9 @@ export default {
 };
 </script>
 
-<style lang="scss">
-.form-box{
+<style lang="scss" scoped>
+.desomposePlan{
+  .form-box{
   display: flex;
   margin-left: 38%;
   .el-input{
@@ -284,7 +285,6 @@ export default {
     padding: 10px;
   }
 }
-
 .box-form{
   display: inline-block;
   padding-left: 38%;
@@ -300,6 +300,8 @@ export default {
   }
 }
 .button-box{
- margin-left: 45%;
+ margin-left: 25px !important;
+}
 }
+
 </style>

+ 159 - 45
src/views/sale/components/transport_appointment/directionalDispatch.vue

@@ -20,11 +20,42 @@
       <div>
         <el-tabs v-model="activeName">
           <el-tab-pane label="未下发" name="first">
-            <dilTable v-bind.sync="first" @selection-change="selectionChange">
+            <dilTable v-bind.sync="first" ref="table" @selection-change="selectionChange">
+
+              <el-table-column fixed="right" label="操作" width="70">
+            <template slot-scope="scope">
+              <el-button
+                @click="detailclick(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">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
             </dilTable>
+
           </el-tab-pane>
           <el-tab-pane label="已下发" name="second">
-            <dilTable v-bind.sync="second">
+            <dilTable v-bind.sync="second" ref="table1">
               <el-table-column fixed="right" label="操作" width="100">
                 <template slot-scope="scope">
                   <el-button
@@ -33,8 +64,35 @@
                     size="small"
                     >公开</el-button
                   >
+                  <el-button
+                    @click="detailclick1(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">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData1" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+
             </dilTable>
           </el-tab-pane>
         </el-tabs>
@@ -89,6 +147,38 @@ export default {
         mapList: [],
       },
 
+      //记录旧的row对象(未下发)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未下发)
+      oldRowCount: 1,
+      //记录旧的row对象(已下发)
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已下发)
+      oldRowCount1: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资数量(件数/重量)",
+          width: 150,
+        },
+        // {
+        //   prop: "materialWeight",
+        //   label: "物资重量",
+        //   width: 100,
+        // },
+      ],
+      tableData: [],
+      tableData1: [],
     };
   },
   methods: {
@@ -139,6 +229,7 @@ export default {
     //监听模态框点击事件
     currentRadioChange1(row) {
       this.carrierId = row.carrierId;
+      console.log("this.carrierId",this.carrierId)
     },
     //模糊查询承运商
     onclick(){
@@ -183,49 +274,72 @@ export default {
       }
       
     },
-    // Issue() {
-    //   console.log();
-    //   if (this.first.mapList.length !== 0) {
-    //     this.$confirm("是否下发", "提示", {
-    //       confirmButtonText: "确定",
-    //       cancelButtonText: "取消",
-    //       type: "warning",
-    //       center: true,
-    //     })
-    //       .then(() => {
-    //         this.axios
-    //           .post(
-    //             "/api/v1/ams/addFixedAmsDispatchSaleOrder",
-    //             this.first.mapList
-    //           )
-    //           .then((res) => {
-    //             if (res.data.code == "200") {
-    //               this.$message({
-    //                 type: "success",
-    //                 message: "下发成功!",
-    //               });
-		// 		  this.$router.go(0)
-    //             } else {
-    //               this.$message({
-    //                 message: "下发失败",
-    //                 type: "warning",
-    //               });
-    //             }
-    //           });
-    //       })
-    //       .catch(() => {
-    //         this.$message({
-    //           type: "info",
-    //           message: "取消下发!",
-    //         });
-    //       });
-    //   } else {
-    //     this.$message({
-    //       type: "warning",
-    //       message: "请选择订单后再下发!",
-    //     });
-    //   }
-    // },
+
+    // -------查看物资详情(未下发)
+    detailclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      this.getMaterial(row.saleOrderMaterialId);
+    },
+    // 根据销售订单物资中间表id查询物资信息
+    getMaterial(saleOrderMaterialId) {
+      this.axios
+        .post("/api/v1/ams/getTruckNoMaterialList?saleOrderMaterialId=" +saleOrderMaterialId)
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
+    // --------查看物资详情(已下发)
+    detailclick1(row) {
+      // 记录重复点击次数
+      if (this.oldRow1 === row) {
+        this.oldRowCount1 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table1.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow1 != "") {
+        if (this.oldRow1 != row) {
+          if (this.oldRowCount1 % 2 === 1) {
+            this.$refs.table1.toggleRowExpansion(this.oldRow1);
+          } else {
+            this.oldRowCount1 = 1;
+          }
+        } else {
+          this.oldRow1 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow1 = row;
+      //根据销售订单物资中间表id查询物资信息
+
+      this.axios
+        .post("/api/v1/ams/getDispatchMaterialList?dispatchId=" +row.dispatchId)
+        .then((res) => {
+          this.tableData1 = res.data.data;
+        });
+    },
+
   },
 };
 </script>

+ 191 - 15
src/views/sale/components/transport_appointment/openDistribution.vue

@@ -14,27 +14,73 @@
     <div class="table">
       <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 未抢单 -->
-      	<el-tab-pane label="未接收" name="first">
-						  <dilTable v-bind.sync="first">
-             <el-table-column fixed="right" label="操作" width="50">
+      	<el-tab-pane label="未接收" name="first" >
+						  <dilTable v-bind.sync="first" ref="table">
+             <el-table-column fixed="right" label="操作" width="120">
         <template slot-scope="scope">
           <el-button @click="Grab(scope)" type="text" size="small">
             接收
           </el-button>
+          <el-button @click="detailclick(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">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
+
+
       </dilTable>
 		</el-tab-pane>
      	<el-tab-pane label="已接收" name="second">
-				<dilTable v-bind.sync="second">
-          <el-table-column fixed="right" label="操作" width="50">
+				<dilTable v-bind.sync="second" ref="table1">
+          <el-table-column fixed="right" label="操作" width="120">
             <template slot-scope="scope">
           <el-button @click="dispatch(scope)  " type="text" size="small">
-            <!-- ,handleBtnClick1() -->
             派单
+          </el-button>
+          <el-button @click="detailclick1(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">
+              <div v-if="false">{{ props }}</div>
+              <div>
+                <el-table :data="tableData1" border >
+                  <el-table-column
+                    v-for="(item, i) in tableHead"
+                    :key="i"
+                    :prop="item.prop"
+                    :label="item.label"
+                    :width="item.width"
+                  ></el-table-column>
+                </el-table>
+              </div>
+            </el-form>
+          </template>
+        </el-table-column>
       </dilTable>
       <!-- <el-drawer title="司机排班信息表" :visible.sync="drawer" :direction="direction" :before-close="handleClose"
 				:modal="false" size="30%" style="margin-top: 5.625rem;">
@@ -55,10 +101,12 @@
 </template>
 
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   data(){
     return{
       drawer: false,
+      ssoId:null,
 			direction: 'rtl',
       activeName: "first",
       inputText:"",
@@ -66,29 +114,85 @@ export default {
       input:"",
       first:{
         // first请求数据的地址
-        requestUrl: "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0",
+        requestUrl: "",
       },
       second:{
-        requestUrl:"/api/v1/ams/selectDispatchSaleOrderList?apiId=233&carrierId=73",
+        requestUrl:"",
       },
       third:{
         requestUrl:"/api/v1/oms/getCapacityAndDriverList?apiId=246",
         selectionType: "radio",
 				mapList: []      
-      }
+      },
+      //记录旧的row对象(未接收)
+      oldRow: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未接收)
+      oldRowCount: 1,
+      //记录旧的row对象(已接收)
+      oldRow1: "",
+      //记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已接收)
+      oldRowCount1: 1,
+      tableHead: [
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: 150,
+        },
+        {
+          prop: "specificationModel",
+          label: "规格型号",
+          width: 150,
+        },
+        {
+          prop: "materialNumber",
+          label: "物资件数",
+          width: 100,
+        },
+        {
+          prop: "materialWeight",
+          label: "物资重量",
+          width: 100,
+        },
+      ],
+      tableData: [],
+      tableData1: [],
     }
   },
+  created(){
+      this.firstGetRequestUrl();
+      this.secondGetRequestUrl();
+  },
   methods:{
       handleClick(tab, event) {
       console.log(tab, event);
+    },
+    firstGetRequestUrl(){
+    if(getCookie("orgCode") == "chengyunshang"){
+      console.log("enter",getCookie('userId'))
+      this.first.requestUrl = "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId="+ getCookie('userId');
+    }else{
+      console.log("out",this.ssoId)
+     this.first.requestUrl = "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&dispatchType=0&carrierSsoId=" + this.ssoId;
+    }
+
+    },
+    secondGetRequestUrl(){
+    if(getCookie("orgCode") == "chengyunshang"){
+      console.log("enter",getCookie('userId'))
+      this.second.requestUrl = "/api/v1/ams/selectDispatchSaleOrderList?apiId=233&carrierSsoId="+ getCookie('userId');
+    }else{
+            console.log("out",this.ssoId)
+     this.second.requestUrl = "/api/v1/ams/selectDispatchSaleOrderList?apiId=233&carrierSsoId=" + this.ssoId;
+    }
+
     },
     onclick1(){
-       if(this.activeName == "first"){
-        this.option1.requestUrl = "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&con=" + this.input;
-      }else if
+       if(this.activeName == "first"){
+         this.option1.requestUrl = "/api/v1/ams/getPCDispatchSaleOrderList?apiId=242&con=" + this.input;
+      }else if
         (this.activeName == "second"){
-        this.option2.requestUrl = "/api/v1/ams/selectDispatchSaleOrderList?apiId=233&carrierId=1&con=" + this.input;
-      }
+        this.option2.requestUrl = "/api/v1/ams/selectDispatchSaleOrderList?apiId=233&carrierId=1&con=" + this.input;
+    }
     },
     dispatch(scope){
       this.dispatchId = scope.row.dispatchId
@@ -148,8 +252,14 @@ export default {
         center: true,
       })
         .then(() => {
+          var carrierSsoId = '';
+          if(getCookie("orgCode") == "chengyunshang"){
+            carrierSsoId =  getCookie('userId');
+          }else{
+            carrierSsoId = null;
+          }
           this.axios
-            .post("/api/v1/ams/lockDispatchSaleOrder?dispatchId="+ scope.row.dispatchId+"&carrierId=" + 73)
+            .post("/api/v1/ams/lockDispatchSaleOrder?dispatchId="+ scope.row.dispatchId+"&carrierSsoId=" + carrierSsoId)
             .then((res) => {
               if (res.data.code == 200) {
                 this.$message({
@@ -172,6 +282,72 @@ export default {
           });
         });
     },
+
+    // -------查看物资详情(未接收)
+    detailclick(row) {
+      // 记录重复点击次数
+      if (this.oldRow === row) {
+        this.oldRowCount += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow != "") {
+        if (this.oldRow != row) {
+          if (this.oldRowCount % 2 === 1) {
+            this.$refs.table.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount = 1;
+          }
+        } else {
+          this.oldRow = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow = row;
+      this.getMaterial(row.dispatchId);
+    },
+    // 根据销售订单物资中间表id查询物资信息
+    getMaterial(dispatchId) {
+      this.axios
+        .post("/api/v1/ams/getDispatchMaterialList?dispatchId="+dispatchId)
+        .then((res) => {
+          this.tableData = res.data.data;
+        });
+    },
+
+    // -------查看物资详情(已接收)
+    detailclick1(row) {
+      // 记录重复点击次数
+      if (this.oldRow1 === row) {
+        this.oldRowCount1 += 1;
+      }
+      // 切换当前详情表
+      this.$refs.table1.toggleRowExpansion(row);
+      // 打开前关闭上一个详情表
+      if (this.oldRow1 != "") {
+        if (this.oldRow1 != row) {
+          if (this.oldRowCount1 % 2 === 1) {
+            this.$refs.table1.toggleRowExpansion(this.oldRow);
+          } else {
+            this.oldRowCount1 = 1;
+          }
+        } else {
+          this.oldRow1 = null;
+          return;
+        }
+      }
+      // 重置上一个点击对象
+      this.oldRow1 = row;
+      // 根据销售订单物资中间表id查询物资信息
+      this.axios
+        .post("/api/v1/ams/getDispatchMaterialList?dispatchId="+row.dispatchId)
+        .then((res) => {
+          this.tableData1 = res.data.data;
+        });
+    },
+
   }
 }
 </script>

+ 2 - 1
src/views/sale/components/transport_appointment/openDistributionSection.vue

@@ -64,6 +64,7 @@
 <script>
 import PageTitle from "@/components/Page/Title";
 import { sjTime,isNumber,isIntegerNumber } from '@/utils/sharedJsFile'
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
   data() {
@@ -79,7 +80,7 @@ export default {
       direction: "rtl",
       input: "",
       third: {
-        requestUrl: "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248",
+        requestUrl: "/api/v1/uc/getAllCapacityByCarrierLike?apiId=248&carrierSsoId="+ getCookie('userId'),
         selectionType: "radio",
         mapList3: [],
       },

+ 5 - 0
src/views/sale/components/transport_excute/enFactoryResult.vue

@@ -70,6 +70,11 @@ export default {
           label: "物资件数",
           width: 100,
         },
+        {
+          prop: "orderMaterialWeight",
+          label: "物资重量",
+          width: 100,
+        },
       ],
       tableData: [],
     };

+ 5 - 0
src/views/sale/components/transport_excute/outFactory/outFactoryResult.vue

@@ -70,6 +70,11 @@ export default {
           label: "物资件数",
           width: 100,
         },
+        {
+          prop: "orderMaterialWeight",
+          label: "物资重量",
+          width: 100,
+        },
       ],
       tableData: [],
     };

+ 223 - 11
src/views/sale/components/transport_order/receiveOrder.vue

@@ -10,17 +10,98 @@
 		</div>
 		<template>
 			<div>
-				<el-tabs v-model="activeName" @tab-click="handleClick">
+				<el-tabs v-model="activeName">
+					<!-- 已接收 -->
 					<el-tab-pane label="已接收" name="first">
-						<dilTable v-bind.sync="first" >
+						<dilTable v-bind.sync="first" ref="table">
+							<el-table-column fixed="right" label="操作" width="50">
+								<template slot-scope="scope">
+								<el-button @click="detailclick(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">
+								<div v-if="false">{{ props }}</div>
+								<div>
+									<el-table :data="tableData" border >
+									<el-table-column
+										v-for="(item, i) in tableHead"
+										:key="i"
+										:prop="item.prop"
+										:label="item.label"
+										:width="item.width"
+									></el-table-column>
+									</el-table>
+								</div>
+								</el-form>
+							</template>
+							</el-table-column>
 						</dilTable>
 					</el-tab-pane>
+					<!-- 已拒绝 -->
 					<el-tab-pane label="已拒绝" name="second">
-						<dilTable v-bind.sync="second">
+						<dilTable v-bind.sync="second" ref="table1">
+							<el-table-column fixed="right" label="操作" width="50">
+								<template slot-scope="scope">
+								<el-button @click="detailclick1(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">
+								<div v-if="false">{{ props }}</div>
+								<div>
+									<el-table :data="tableData1" border >
+									<el-table-column
+										v-for="(item, i) in tableHead"
+										:key="i"
+										:prop="item.prop"
+										:label="item.label"
+										:width="item.width"
+									></el-table-column>
+									</el-table>
+								</div>
+								</el-form>
+							</template>
+							</el-table-column>
 						</dilTable>
 					</el-tab-pane>
+					<!-- 未接收 -->
 					<el-tab-pane label="未接收" name="third">
-						<dilTable v-bind.sync="third">
+						<dilTable v-bind.sync="third" ref="table2">
+							<el-table-column fixed="right" label="操作" width="50">
+								<template slot-scope="scope">
+								<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">
+								<div v-if="false">{{ props }}</div>
+								<div>
+									<el-table :data="tableData2" border >
+									<el-table-column
+										v-for="(item, i) in tableHead"
+										:key="i"
+										:prop="item.prop"
+										:label="item.label"
+										:width="item.width"
+									></el-table-column>
+									</el-table>
+								</div>
+								</el-form>
+							</template>
+							</el-table-column>
 						</dilTable>
 					</el-tab-pane>
 				</el-tabs>
@@ -30,37 +111,168 @@
 
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 	export default {
 		data() {
 			return {
 				inputText: "",
 				first: {
 					// first请求数据的地址,承运商(运输订单状态为已接收,接收状态为已接收)
-					requestUrl: "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=5&carrierId=73",
+					requestUrl: "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=5&carrierSsoId="+ getCookie('userId'),
 				},
 				second: {
 					// second请求数据的地址,承运商暂时设置为默认(运输订单状态为)
-					requestUrl: "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=6&carrierId=73",
+					requestUrl: "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=6&carrierSsoId="+ getCookie('userId'),
 				},
 				third: {
 					// second请求数据的地址
-					requestUrl: "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&carrierId=73",
+					requestUrl: "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&carrierSsoId="+ getCookie('userId'),
 				},
 				activeName: "first",
+				//记录旧的row对象(已接收)
+				oldRow: "",
+				//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已接收)
+				oldRowCount: 1,
+				//记录旧的row对象(已拒绝)
+				oldRow1: "",
+				//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已拒绝)
+				oldRowCount1: 1,
+				//记录旧的row对象(未接收)
+				oldRow1: "",
+				//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未接收)
+				oldRowCount1: 1,
+				tableHead: [
+					{
+					prop: "materialName",
+					label: "物资名称",
+					width: 150,
+					},
+					{
+					prop: "specificationModel",
+					label: "规格型号",
+					width: 150,
+					},
+					{
+					prop: "materialNumber",
+					label: "物资件数",
+					width: 100,
+					},
+					{
+					prop: "materialWeight",
+					label: "物资重量",
+					width: 100,
+					},
+				],
+				tableData: [],
+				tableData1: [],
+				tableData2: [],
 			}
 		},
 		methods: {
 		 onClick(){
 			  if(this.activeName == "first"){
-              this.option1.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=5&carrierId=1&con=" + this.input;
+              this.option1.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=5&carrierSsoId="+ getCookie('userId')+"&con=" + this.input;
              }else if (this.activeName == "second") {
-			          this.option1.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=6&carrierId=1&con=" + this.input;
+			          this.option1.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&carrierSsoId="+ getCookie('userId')+"&con=" + this.input;
 		     } else {
-			   this.option1.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&carrierId=1&con=" + this.input;
+			   this.option1.requestUrl = "/api/v1/oms/getDriverInfoForSale?apiId=226&orderType=1&orderStatus=4&carrierSsoId="+ getCookie('userId')+"&con=" + this.input;
 		  }
         
       
-		 }
+		 },
+		// -------查看物资详情(已接收)
+		detailclick(row) {
+		// 记录重复点击次数
+		if (this.oldRow === row) {
+			this.oldRowCount += 1;
+		}
+		// 切换当前详情表
+		this.$refs.table.toggleRowExpansion(row);
+		// 打开前关闭上一个详情表
+		if (this.oldRow != "") {
+			if (this.oldRow != row) {
+			if (this.oldRowCount % 2 === 1) {
+				this.$refs.table.toggleRowExpansion(this.oldRow);
+			} else {
+				this.oldRowCount = 1;
+			}
+			} else {
+			this.oldRow = null;
+			return;
+			}
+		}
+		// 重置上一个点击对象
+		this.oldRow = row;
+		// 根据销售订单物资中间表id查询物资信息
+		this.axios
+			.post("/api/v1/oms/getOrderMaterialList?orderId=" +row.orderId)
+			.then((res) => {
+			this.tableData = res.data.data;
+			});
+		},
+		
+		// -------查看物资详情(已拒绝)
+		detailclick1(row) {
+		// 记录重复点击次数
+		if (this.oldRow1 === row) {
+			this.oldRowCount1 += 1;
+		}
+		// 切换当前详情表
+		this.$refs.table1.toggleRowExpansion(row);
+		// 打开前关闭上一个详情表
+		if (this.oldRow1 != "") {
+			if (this.oldRow1 != row) {
+			if (this.oldRowCount1 % 2 === 1) {
+				this.$refs.table1.toggleRowExpansion(this.oldRow1);
+			} else {
+				this.oldRowCount1 = 1;
+			}
+			} else {
+			this.oldRow1 = null;
+			return;
+			}
+		}
+		// 重置上一个点击对象
+		this.oldRow1 = row;
+		// 根据销售订单物资中间表id查询物资信息
+		this.axios
+			.post("/api/v1/oms/getOrderMaterialList?orderId=" +row.orderId)
+			.then((res) => {
+			this.tableData1 = res.data.data;
+			});
+		},
+
+		// -------查看物资详情(未接收)
+		detailclick2(row) {
+		// 记录重复点击次数
+		if (this.oldRow2 === row) {
+			this.oldRowCount2 += 1;
+		}
+		// 切换当前详情表
+		this.$refs.table2.toggleRowExpansion(row);
+		// 打开前关闭上一个详情表
+		if (this.oldRow2 != "") {
+			if (this.oldRow2 != row) {
+			if (this.oldRowCount2 % 2 === 1) {
+				this.$refs.table2.toggleRowExpansion(this.oldRow2);
+			} else {
+				this.oldRowCount2 = 1;
+			}
+			} else {
+			this.oldRow2 = null;
+			return;
+			}
+		}
+		// 重置上一个点击对象
+		this.oldRow2 = row;
+		// 根据销售订单物资中间表id查询物资信息
+		this.axios
+			.post("/api/v1/oms/getOrderMaterialList?orderId=" +row.orderId)
+			.then((res) => {
+			this.tableData2 = res.data.data;
+			});
+		},
+
 		 }
 	}
 </script>