zouzhd 3 years ago
parent
commit
27be16f02d

+ 2 - 2
build/utils.js

@@ -16,8 +16,8 @@ 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 = ['all'];
+let devModules = ['index','appoint','sale','RMS']
 
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;

+ 2 - 2
config/index.js

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

+ 71 - 90
src/views/RMS/components/addPersonnel.vue

@@ -61,7 +61,15 @@ export default {
   components: { PageTitle },
   data() {
     return {
-      form1: {},
+      form1: {
+        personnelJobNumber : '',
+        personnelName : '',
+        personnelPost : '',
+        personnelWorkshopid : '',
+        shipperId : '',
+        personnelShifts : '',
+        personnelTeam : ''
+      },
       value: undefined,
       //新增用户的SSO主键
       personnelSsoId:'',
@@ -72,13 +80,19 @@ export default {
       //选中的二级部门名称
       value1:'',
       //选中的二级部门机构ID和机构编码
-      map1:[],
+      map1:{
+          shipperOrgCode : '',
+          shipperSsoId : ''
+      },
       // 三级部门
       options2:[],
       // 选中的三级部门名称
       value2:'',
       //选中的三级部门机构ID和机构编码
-      map2:[],
+      map2:{
+          shipperOrgCode : '',
+          shipperSsoId : ''
+      },
       // 角色
       options3:[],
       // 选中的角色名称
@@ -135,7 +149,11 @@ export default {
      //确定人员新增
      makeSure() {
       //初始化用户信息
-      let userInfo = {};
+      let userInfo = {
+        orgCode : '',
+        orgName : '',
+        orgId : '',
+      };
       //该用户没有三级部门
       if(this.options2.length==0){
       userInfo = {
@@ -169,100 +187,63 @@ export default {
       Object.keys(userInfo).forEach((key) => {
       formData.append(key, userInfo[key]);
       });
+      //判断数据是否都填了
+      if(
+            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)=>{
 
-      //再新增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
-      }
-      if(
-        RmsPersonnel.personnelJobNumber ==null ||
-        RmsPersonnel.personnelName ==null ||
-        RmsPersonnel.personnelPost ==null ||
-        // RmsPersonnel.personnelWorkshopid==null ||
-        RmsPersonnel.personnelShifts==null ||
-        RmsPersonnel.departmentId==null ||
-        RmsPersonnel.personnelTeam==null ||
-        userInfo.orgName==null ||
-        userInfo.orgCode==null ||
-        userInfo.orgId==null ||
-        this.value3==null
-      )this.$message.error("存在空值!");
-      else
-
-      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("新增失败,可能存在重复!");
+          //再新增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);
-      })    
-      });
+              //最后新增角色赋权表
 
-      //最后新增角色赋权表
-      
-      
+              this.axios.post('pass/v1/sysuserroles/addUserroles?userId='
+              +res.data.userId+'&userCode='+this.form1.personnelJobNumber+'&roleId='+this.value3)
+              .then((res)=>{
+                  this.$router.go(-1);
+              })
 
-      // 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
-      // };
-      // 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(
-      //     "/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("新增失败,可能存在重复!");
-      //     }
-      //     this.$refs['table'].resetField();
-      //   });
+      });//end
+      }
+      
     },
     // 取消
     cancel() {

+ 23 - 3
src/views/sale/components/transport_appointment/openDistribution.vue

@@ -50,7 +50,7 @@
       </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="120">
             <template slot-scope="scope">
           <el-button @click="dispatch(scope)  " type="text" size="small">
@@ -61,6 +61,26 @@
           </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;">
@@ -291,7 +311,7 @@ export default {
     // 根据销售订单物资中间表id查询物资信息
     getMaterial(dispatchId) {
       this.axios
-        .post("/api/v1/ams/getDispatchMaterialList?dispatchId=" +dispatchId)
+        .post("/api/v1/ams/getDispatchMaterialList?dispatchId="+dispatchId)
         .then((res) => {
           this.tableData = res.data.data;
         });
@@ -322,7 +342,7 @@ export default {
       this.oldRow1 = row;
       // 根据销售订单物资中间表id查询物资信息
       this.axios
-        .post("/api/v1/ams/getDispatchMaterialList?dispatchId=" +dispatchId)
+        .post("/api/v1/ams/getDispatchMaterialList?dispatchId="+row.dispatchId)
         .then((res) => {
           this.tableData1 = res.data.data;
         });

+ 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: [],
       },

+ 138 - 19
src/views/sale/components/transport_order/receiveOrder.vue

@@ -10,13 +10,13 @@
 		</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" ref="table">
 							<el-table-column fixed="right" label="操作" width="50">
 								<template slot-scope="scope">
-								<el-button @click="detailclick1(scope.row)" type="text" size="small">
+								<el-button @click="detailclick(scope.row)" type="text" size="small">
 									物资详情
 								</el-button>
 								</template>
@@ -44,12 +44,64 @@
 					</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>
@@ -59,30 +111,35 @@
 
 </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对象(接收)
+				//记录旧的row对象(接收)
 				oldRow: "",
-				//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(接收)
+				//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(接收)
 				oldRowCount: 1,
-				//记录旧的row对象(已接收)
+				//记录旧的row对象(已拒绝)
 				oldRow1: "",
-				//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已接收)
+				//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(已拒绝)
+				oldRowCount1: 1,
+				//记录旧的row对象(未接收)
+				oldRow1: "",
+				//记录上一个展开的点击次数,单数为展开状态,复数为闭合状态(未接收)
 				oldRowCount1: 1,
 				tableHead: [
 					{
@@ -107,21 +164,23 @@
 					},
 				],
 				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) {
@@ -144,16 +203,76 @@
 		}
 		// 重置上一个点击对象
 		this.oldRow = row;
-		this.getMaterial(row.dispatchId);
-		},
 		// 根据销售订单物资中间表id查询物资信息
-		getMaterial(dispatchId) {
 		this.axios
-			.post("/api/v1/ams/getDispatchMaterialList?dispatchId=" +dispatchId)
+			.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>