Browse Source

修改采购辅料

luobang 3 years ago
parent
commit
8f3947a879

+ 3 - 4
build/utils.js

@@ -14,12 +14,11 @@ const devPathSrc = path.resolve(__dirname, "../../../src"); // node_modules应
 //    登录     合同                       首页       内转     排队   资源   销售                       零星物资
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
-//  'statisticalReport','systemConfig','TMS','WMS','workFlow']
+//  'statisticalReport','systemConfig','TMS','WMS','workFlow','ADMINISTRATORS']
 // let devModules = ['index','inward']
-// let devModules = ['index','appoint','sale','statisticalReport','RMS','TMS']
 // let devModules = ['index','TMS']
-let devModules = ["index", "appoint", "sale", "RMS"];
-// let devModules = ["all"];
+// let devModules = ["index", "appoint", "sale", "statisticalReport", "TMS"];
+let devModules = ["all"];
 // let devModules = ['index','statisticalReport','inward']
 if (pathSrc.indexOf("node_modules") > -1) {
   devModules = require("../../../cors.js").devModules;

+ 2 - 3
config/index.js

@@ -65,8 +65,8 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    // target: "http://172.16.33.166:8080",
-    target: "http://192.168.1.103:8080",
+    target: "http://172.16.33.166:8080",
+    // target: "http://192.168.1.103:8080",
     // target:"http://localhost:8019",
     ws: true,
     pathRewrite: {
@@ -75,7 +75,6 @@ let proxyTable = {
   },
   "/views/api/v1": {
     target: "http://172.16.33.166:8080",
-    // target: "http://192.168.1.109:8080",
     ws: true,
     pathRewrite: {
       "^/views/api/v1": "/api/v1"

+ 4 - 1
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -197,7 +197,10 @@ export default {
       lineQuence: null
     };
   },
-  created() {},
+  created() {
+    this.value1 = new Date();
+    this.value2 = new Date();
+  },
   mounted() {
     this.information();
   },

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

@@ -2,50 +2,50 @@
   <!-- 添加人员信息 -->
   <div class="addWagonLoad">
     <PageTitle>返回</PageTitle>
-     <div class="form-box" style="margin-right: 10rem">
-        <dil-form :formId="325" v-model="form1" ref="from1"></dil-form>
-      </div>
+    <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 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>
-        <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 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>
@@ -62,46 +62,46 @@ export default {
   data() {
     return {
       form1: {
-        personnelJobNumber : '',
-        personnelName : '',
-        personnelPost : '',
-        personnelWorkshopid : '',
-        shipperId : '',
-        personnelShifts : '',
-        personnelTeam : ''
+        personnelJobNumber: "",
+        personnelName: "",
+        personnelPost: "",
+        personnelWorkshopid: "",
+        shipperId: "",
+        personnelShifts: "",
+        personnelTeam: ""
       },
       value: undefined,
       //新增用户的SSO主键
-      personnelSsoId:'',
+      personnelSsoId: "",
       //token
       token: null,
       //二级部门
-      options1:[],
+      options1: [],
       //选中的二级部门名称
-      value1:'',
+      value1: "",
       //选中的二级部门机构ID和机构编码
-      map1:{
-          shipperOrgCode : '',
-          shipperSsoId : ''
+      map1: {
+        shipperOrgCode: "",
+        shipperSsoId: ""
       },
       // 三级部门
-      options2:[],
+      options2: [],
       // 选中的三级部门名称
-      value2:'',
+      value2: "",
       //选中的三级部门机构ID和机构编码
-      map2:{
-          shipperOrgCode : '',
-          shipperSsoId : ''
+      map2: {
+        shipperOrgCode: "",
+        shipperSsoId: ""
       },
       // 角色
-      options3:[],
+      options3: [],
       // 选中的角色名称
-      value3:'',
+      value3: "",
       // 选中的角色ID
-      roleId:''
+      roleId: ""
     };
   },
-  created(){
+  created() {
     this.token = getCookie("accessToken");
   },
   mounted() {
@@ -109,203 +109,217 @@ export default {
     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; 
-         })
-     },
+    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() {
+    //确定人员新增
+    makeSure() {
       //初始化用户信息
       let userInfo = {
-        orgCode : '',
-        orgName : '',
-        orgId : '',
+        orgCode: "",
+        orgName: "",
+        orgId: ""
       };
       //该用户没有三级部门
-      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{
+      if (this.options2.length == 0) {
         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'
-      }
+          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中的用户
+      //先新增SSO中的用户
       const formData = new FormData();
-      
-      Object.keys(userInfo).forEach((key) => {
-      formData.append(key, userInfo[key]);
+
+      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{
-      //判断RMS_PERSONNEL表中是否存在该人员信息,存在提示存在,否则开始赋权新增
-      this.axios.post('/api/v1/rms/isInHere?personnelJobNumber='+this.form1.personnelJobNumber)
-      .then((res)=>{
-        console.log("res",res);
-        if(res.data==0){
-          this.$message.error("新增失败,该账号已存在!");
-        }else{
-          //开始赋权新增
-          //新增用户表
-          this.$store.dispatch('system/usersManage/addUser',formData)
-          .then((res)=>{
-              //console.log("role",res)
-              //保存权限表中的用户主键Id
-              this.personnelSsoId = res.data.userId;
-              //再新增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 : this.personnelSsoId
-              }
-              //  console.log("rmsPersonnel",rmsPersonnel)
-                  this.axios.post('/api/v1/rms/addPersonnel',rmsPersonnel)
-                  .then((res)=>{
-                              // console.log("Personnel",res)
-                        if (res.data.code == 200) {
+      if (
+        this.form1.personnelJobNumber == "" ||
+        this.form1.personnelPost == "" ||
+        this.form1.personnelName == "" ||
+        // RmsPersonnel.personnelWorkshopid==null ||
+        this.form1.shipperId == "" ||
+        this.form1.personnelShifts == "" ||
+        this.form1.personnelTeam == "" ||
+        this.form1.ConcatTelephone == "" ||
+        userInfo.orgName == "" ||
+        userInfo.orgCode == "" ||
+        userInfo.orgId == "" ||
+        this.value3 == ""
+      ) {
+        this.$message.error("存在空值!");
+      } else {
+        //判断RMS_PERSONNEL表中是否存在该人员信息,存在提示存在,否则开始赋权新增
+        this.axios
+          .post(
+            "/api/v1/rms/isInHere?personnelJobNumber=" +
+              this.form1.personnelJobNumber
+          )
+          .then(res => {
+            console.log("res", res);
+            if (res.data == 0) {
+              this.$message.error("新增失败,该账号已存在!");
+            } else {
+              //开始赋权新增
+              //新增用户表
+              this.$store
+                .dispatch("system/usersManage/addUser", formData)
+                .then(res => {
+                  //console.log("role",res)
+                  //保存权限表中的用户主键Id
+                  this.personnelSsoId = res.data.userId;
+                  //再新增RMS_PERSONNEL表信息
+                  let map1 = {
+                    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: this.personnelSsoId,
+                    //联系电话
+                    ConcatTelephone: this.form1.ConcatTelephone,
+                    userId: getCookie("userId")
+                  };
+                  //  console.log("rmsPersonnel",rmsPersonnel)
+                  this.axios
+                    .post("/api/v1/rms/addPersonnel", map1)
+                    .then(res => {
+                      if (res.data.code == 200) {
                         this.$message({
                           type: "success",
-                          message: "新增成功!",
+                          message: "新增成功!"
                         });
                         // this.$refs.table.refreshData();
-                        
                         //最后新增角色赋权表
-
-                          this.axios.post('pass/v1/sysuserroles/addUserroles?userId='
-                          +this.personnelSsoId+'&userCode='+this.form1.personnelJobNumber+'&roleId='+this.value3)
-                          .then((res)=>{
+                        this.axios
+                          .post(
+                            "pass/v1/sysuserroles/addUserroles?userId=" +
+                              this.personnelSsoId +
+                              "&userCode=" +
+                              this.form1.personnelJobNumber +
+                              "&roleId=" +
+                              this.value3
+                          )
+                          .then(res => {
                             // console.log("success")
-                              this.$router.go(-1);
-                          })
-
+                            // this.$router.go(-1);
+                          });
                       } else {
                         this.$message.error("新增失败,可能存在重复!");
                       }
                       // this.$refs['table'].resetField();
-                  })
-
-          });//end
-
-        }
-      });
-      
-      }//else
-      
+                    });
+                }); //end
+            }
+          });
+      } //else
     },
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' >
- .button-box{
-    display: flex;
-    justify-content: center;
-    margin-top: 2rem;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
-    }
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  margin-top: 2rem;
+  .el-button {
+    width: 80px;
+    margin-right: 10px;
   }
-.form-box{
+}
+.form-box {
   display: flex;
   justify-content: center;
-  .el-form-item{
+  .el-form-item {
     display: flex;
     justify-content: center;
-    .el-form-item__label{
+    .el-form-item__label {
       display: flex;
       align-items: center;
     }
-    .el-form-item__content{
-      .el-input{
-        .el-input__inner{
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
           width: 250px;
         }
       }
     }
   }
 }
-.department{
+.department {
   display: flex;
   justify-content: center;
-  .department3{
+  .department3 {
     margin-left: 2rem;
   }
 }
-.role{
+.role {
   display: flex;
   justify-content: center;
   margin-top: 2rem;

+ 5 - 1
src/views/TMS/components/importedIngredients/transportReserveFuAddIngredients.vue

@@ -422,7 +422,8 @@ export default {
     getPurchaseOrderNo() {
       let map = {
         materialId: this.materialId,
-        supplierId: this.supplierId
+        supplierId: this.supplierId,
+        purchaseOrgId: 1
       };
       if (this.remark) {
         map.remark = this.remark;
@@ -495,6 +496,7 @@ export default {
             this.supplierId +
             "&con=" +
             this.input +
+            "&purchaseOrgId=1" +
             "&i=" +
             new Date();
         }
@@ -536,6 +538,7 @@ export default {
           this.purchaseOrder.requestUrl =
             "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId=" +
             this.supplierId +
+            "&purchaseOrgId=1" +
             "&i=" +
             new Date();
         }
@@ -592,6 +595,7 @@ export default {
         this.purchaseOrder.requestUrl =
           "/api/v1/ams/getPurchaseOrderList?apiId=81&sendCompId=" +
           this.supplierId +
+          "&purchaseOrgId=1" +
           "&i=" +
           new Date();
       }

+ 122 - 9
src/views/TMS/components/importedShip/addLoadShip.vue

@@ -15,14 +15,51 @@
       <!-- 第二部分 -->
       <div class="form_box">
         <dil-form :formId="120" v-model="form"></dil-form>
+            <el-form :inline="true">
+            <!-- 含水率 -->
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto;margin: left 2px;"
+              >含水率</label
+            >
+          </el-form-item>
+          <el-form-item>
+            <el-input placeholder="" v-model="resultMoistureContent"></el-input>
+          </el-form-item>
+          <!-- 合同水分值 -->
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto"
+              >合同水分值</label
+            >
+          </el-form-item>
+          <el-form-item>
+            <el-input
+              placeholder=""
+              v-model="contractMoistureValue"
+              :disabled="true"
+            ></el-input>
+          </el-form-item>
+          <!-- 水分吨位 -->
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto"
+              >水分吨位</label
+            >
+          </el-form-item>
+          <el-form-item>
+            <el-input
+              placeholder=""
+              v-model="moistureTonnage"
+              :disabled="true"
+            ></el-input>
+          </el-form-item>
+        </el-form>
       </div>
+      <!-- 下方内容 -->  
     </div>
     <div class="button_box">
       <el-button type="primary" @click="makeSure">新增装船作业</el-button>
     </div>
   </div>
 </template>
-
 <script>
 import PageTitle from "@/components/Page/Title";
 import { sjTime } from "@/utils/sharedJsFile";
@@ -32,6 +69,10 @@ export default {
   data() {
     return {
       input: "",
+      resultMoistureContent:"",
+      moistureTonnage:"",
+      contractMoistureValue:"",
+      batchInfactoryId:"",
       restaurants: [],
       state: "",
       form: {},
@@ -39,17 +80,52 @@ export default {
         // 表格请求数据的地址
         requestUrl: "/api/v1/tms/getCapacityList?apiId=138",
         // 控制显示当选列
-        selectionType: "radio"
+        selectionType: "radio",
       },
-      rowMap: {}
+      rowMap: {},
     };
   },
   mounted() {},
+    watch: {
+    resultMoistureContent() {
+      this.pipeiContarct();
+    },
+    batchId() {
+      this.pipeiContarct();
+    }
+  },
   methods: {
     currentRadioChange(row) {
       this.rowMap = row;
+      this.batchInfactoryId=this.rowMap.batchInfactoryId;
       console.log("addd", this.rowMap);
     },
+
+    pipeiContarct() {
+      if (
+        this.resultMoistureContent != null &&
+        this.resultMoistureContent != ""
+      ) {
+        let map = {
+          batchInfactoryId: this.batchInfactoryId,
+          resultMoistureContent: this.resultMoistureContent,
+          resultActualInstallations:this.form.resultActualInstallations,
+        };
+        this.axios
+          .post("/api/v1/tms/getMoistureAndInstallations", map)
+          .then(res => {
+            if (res.data.code == 200) {
+              console.log("res" +res.data.data.purchaseContractMoisture);
+              this.contractMoistureValue =
+                res.data.data.purchaseContractMoisture;
+              this.moistureTonnage = res.data.data.resultWaterTonnage;
+            } else {
+              this.$message.warning(res.data.data);
+            }
+          });
+      }
+    },
+
     // 新增
     makeSure() {
       if (JSON.stringify(this.rowMap).length == 2) {
@@ -58,16 +134,22 @@ export default {
       }
       let mapVal = {
         resultActualInstallations: this.form.resultActualInstallations,
-        //  portId: this.form.portId,
         resultLoadShipDate: sjTime(this.form.resultLoadShipDate),
         resultIsClear: this.form.resultIsClear,
-        resultPortDeclarationTime: sjTime(this.form.resultPortDeclarationTime),
-        resultPortDeclarationName: this.form.resultPortDeclarationName,
         resultArrivalTime: sjTime(this.form.resultArrivalTime),
         resultOutWharyName: this.form.resultOutWharyName,
         resultOutWharyTime: sjTime(this.form.resultOutWharyTime),
         resultMemo: this.form.resultMemo,
-        userId: getCookie("userId")
+        resultPlannedDate: sjTime(this.form.planDate),
+        expectNoticeDate: sjTime(this.form.expectNoticeDate),
+        resultEmptyHeavyWaterMeter: this.form.resultEmptyHeavyWaterMeter,
+        resultMoistureContent: this.resultMoistureContent,
+        resultInspectionFees: this.form.resultInspectionFees,
+        contractMoistureValue: this.contractMoistureValue,
+        moistureTonnage: this.moistureTonnage,
+        waterUnitPrice:this.form.waterUnitPrice,
+        isNeedAssemble:this.form.isNeedAssemble,
+        userId: getCookie("userId"),
       };
       //判断放货数量是否为数字
       function isNumber() {
@@ -81,6 +163,37 @@ export default {
         }
       }
       var val = this.value;
+      if (
+        mapVal.resultActualInstallations == null ||
+        mapVal.resultLoadShipDate == null ||
+        mapVal.resultIsClear == null ||
+        mapVal.resultArrivalTime == null ||
+        mapVal.resultOutWharyName == null ||
+        mapVal.resultOutWharyTime == null
+      )
+        this.$message.error("存在空值!");
+      else if (!isNumber(val)) this.$message.warning("实装数量必须为数字!");
+      else
+        this.axios
+          .post("/api/v1/tms/addLoadShip", {
+            mapVal: mapVal,
+            rowMap: this.rowMap,
+          })
+          .then((res) => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "新增成功!",
+              });
+              this.$router.go(-1);
+            } else if (res.data.code == 201) {
+              this.$message.warning(res.data.data);
+            } else {
+              this.$message.error("新增失败!");
+            }
+            this.$refs["table"].resetField();
+          });
+
 
       // if (
       //   mapVal.resultActualInstallations == null ||
@@ -122,8 +235,8 @@ export default {
     onclick() {
       this.option.requestUrl =
         "/api/v1/tms/getCapacityList?apiId=138&con=" + this.input;
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss">

+ 13 - 1
src/views/TMS/components/importedShip/updateLoadShip.vue

@@ -18,11 +18,14 @@
 <script>
 import PageTitle from "@/components/Page/Title";
 import { sjTime } from "@/utils/sharedJsFile";
+import { getCookie } from "@/utils/util.js";
 export default {
   components: { PageTitle },
  data(){
      return {
       form1: {},
+      waterQualiyResultId:null,
+      outWharyResultId:null,
   }
  },
   mounted() {
@@ -36,6 +39,8 @@ export default {
         .then((res) => {
           res.data.data.forEach((e) => {
             this.form1 = e;
+            this.waterQualiyResultId=e.waterQualiyResultId;
+            this.outWharyResultId=e.outWharyResultId;
           });
         });
     },
@@ -53,8 +58,10 @@ export default {
     onClickConfirm() {
       let mapVal = {
         resultId: this.$route.params.resultId,
+        waterQualiyResultId:this.waterQualiyResultId,
         resultActualInstallations: this.form1.resultActualInstallations,
-        rwarehouseMaterialId: this.form1.rwarehouseMaterialId,
+        outWharyResultId:this.outWharyResultId,
+        // rwarehouseMaterialId: this.form1.rwarehouseMaterialId,
         resultArrivalPortTime: sjTime(
           this.form1.resultArrivalPortTime
         ),
@@ -65,6 +72,11 @@ export default {
           this.form1.resultLoadShipDate
         ),
         resultIsClear: this.form1.resultIsClear,
+        resultOutPortName:this.form1.resultOutPortName,
+        planDate:sjTime(this.form1.planDate),
+        planDeliveryDate:sjTime(this.form1.planDeliveryDate),
+        resultHeavyWeight:this.form1.resultHeavyWeight,
+        userId:getCookie("userId"),
       };
               //判断放货数量是否为数字
        function isNumber() {

+ 160 - 81
src/views/appoint/components/ship/addDeliveryNotice.vue

@@ -2,34 +2,56 @@
   <!-- 添加发货通知 -->
   <div class="shipTransport">
     <page-title>返回</page-title>
-    <div class="mofrom">
+    <!-- <div class="mofrom">
       <span class="motext">物资</span>
       <el-input class="moinput" v-model="materialName" disabled> </el-input>
-      <el-button class="mobutton" type="primary" @click="ondrawer(1)">浏览</el-button>
-    </div>
+      <el-button class="mobutton" type="primary" @click="ondrawer(1)"
+        >浏览</el-button
+      >
+    </div> -->
     <!-- 货权转移送达单位 -->
     <div class="mofrom">
       <span class="motext">货权转移送达单位</span>
       <el-input class="moinput" v-model="cargo" disabled> </el-input>
-      <el-button class="mobutton" type="primary" @click="ondrawer(2)">浏览</el-button>
+      <el-button class="mobutton" type="primary" @click="ondrawer(2)"
+        >浏览</el-button
+      >
     </div>
 
     <!--大品类 -->
     <div class="mofrom">
       <span class="motext">大品类</span>
       <el-input class="moinput" v-model="materialType" disabled> </el-input>
-      <el-button class="mobutton" type="primary" @click="ondrawer(4)">浏览</el-button>
+      <el-button class="mobutton" type="primary" @click="ondrawer(4)"
+        >浏览</el-button
+      >
     </div>
 
     <!-- 货权转移送达单位 -->
     <div class="mofrom">
       <span class="motext">收货人</span>
       <el-input class="moinput" v-model="receiver" disabled> </el-input>
-      <el-button class="mobutton" type="primary" @click="ondrawer(3)">浏览</el-button>
+      <el-button class="mobutton" type="primary" @click="ondrawer(3)"
+        >浏览</el-button
+      >
+    </div>
+
+    <!-- 批次 -->
+    <div class="mofrom">
+      <span class="motext">批次</span>
+      <el-input class="moinput" v-model="batchIds" disabled> </el-input>
+      <el-button class="mobutton" type="primary" @click="ondrawer(5)"
+        >浏览</el-button
+      >
     </div>
     <div class="form">
       <div class="form_box">
-        <dil-form :formId="112" v-model="form1" ref="from1" @change="onchange"></dil-form>
+        <dil-form
+          :formId="112"
+          v-model="form1"
+          ref="from1"
+          @change="onchange"
+        ></dil-form>
       </div>
       <!-- <div class="liulan">
         <el-button type="primary" class="btn" @click="ondrawer(4)">浏览</el-button>
@@ -37,40 +59,103 @@
     </div>
 
     <!-- 模态框 -->
-    <el-drawer :visible.sync="drawer" :direction="direction" :before-close="handleClose" size="50%">
-      <el-input placeholder="请输入内容" v-model="input" style="margin-top: 10px; margin-left: 20px; width: 250px" clearable>
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
       </el-input>
-      <el-button type="primary" class="btn" @click="onclick(a)" style="margin-bottom: 15px">
+      <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 == 4">
         <dilTable v-bind.sync="options" @radio-change="currentRadioChange6"></dilTable>
       </div> -->
-      <div v-show="a == 1">
-        <dilTable v-bind.sync="second" @radio-change="currentRadioChange1"></dilTable>
-      </div>
+      <!-- <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>
+        <dilTable
+          v-bind.sync="second1"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
       </div>
       <div v-show="a == 3">
-        <dilTable v-bind.sync="second2" @radio-change="currentRadioChange3"></dilTable>
+        <dilTable
+          v-bind.sync="second2"
+          @radio-change="currentRadioChange3"
+        ></dilTable>
       </div>
       <div v-show="a == 4">
-        <dilTable v-bind.sync="second3" @radio-change="currentRadioChange4"></dilTable>
+        <dilTable
+          v-bind.sync="second3"
+          @radio-change="currentRadioChange4"
+        ></dilTable>
+      </div>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="second5"
+          @radio-change="currentRadioChange5"
+        ></dilTable>
       </div>
     </el-drawer>
-    <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:450px;display:flex;">
+    <el-form
+      :inline="true"
+      class="demo-form-inline"
+      label-width="80px"
+      style="margin-left: 450px; display: flex"
+    >
       <el-form-item label="上传货权转移附件">
-        <el-upload class="upload-demo" style="width:270px;" ref="upload1" action="/api/v1/rms/uploadCarrier1"
-          :before-upload="beforeUpload" :multiple="false" list-type="picture" :show-file-list="false"
-          :on-success="handleAvatarSuccess" :on-error="onError(1)">
+        <el-upload
+          class="upload-demo"
+          style="width: 270px"
+          ref="upload1"
+          action="/api/v1/rms/uploadCarrier1"
+          :before-upload="beforeUpload"
+          :multiple="false"
+          list-type="picture"
+          :show-file-list="false"
+          :on-success="handleAvatarSuccess"
+          :on-error="onError(1)"
+        >
           <span class="span"></span>
-          <el-input class="shippingCertificate" style="width:270px;display:flex;" placeholder="请选择货权附件(必填项)"
-            v-model="shippingCertificate" disabled>
+          <el-input
+            class="shippingCertificate"
+            style="width: 270px; display: flex"
+            placeholder="请选择货权附件(必填项)"
+            v-model="shippingCertificate"
+            disabled
+          >
           </el-input>
-          <el-button size="small" type="primary"
-            style="width:115px;height:35px;margin-left: 275px;margin-top:-35px;display:flex;" @click="upCLick(1)">
-            点击上传附件</el-button>
+          <el-button
+            size="small"
+            type="primary"
+            style="
+              width: 115px;
+              height: 35px;
+              margin-left: 275px;
+              margin-top: -35px;
+              display: flex;
+            "
+            @click="upCLick(1)"
+          >
+            点击上传附件</el-button
+          >
         </el-upload>
       </el-form-item>
     </el-form>
@@ -93,7 +178,7 @@ export default {
       a: 1,
       cargoPictureUrl: "",
       shippingCertificate: "",
-      materialName: "",
+     
       materialType: "",
       cargo: "",
       receiver: "",
@@ -102,11 +187,6 @@ export default {
       direction: "rtl",
       batchId: null,
       form1: {},
-      second: {
-        requestUrl: "/api/v1/uc/queryMaterialByLike?apiId=244",
-        selectionType: "radio",
-        mapList1: [],
-      },
       second1: {
         requestUrl: "/api/v1/tms/selectShippeByName?apiId=215",
         selectionType: "radio",
@@ -122,6 +202,11 @@ export default {
         selectionType: "radio",
         mapList4: [],
       },
+      second5: {
+        requestUrl: "/api/v1/tms/getBatchIdByForeign?apiId=489",
+        selectionType: "radio",
+        mapList5: [],
+      },
 
       value: undefined,
       value2: undefined,
@@ -130,7 +215,7 @@ export default {
       value6: undefined,
       value7: undefined,
       value8: undefined,
-
+      batchIds:null,
     };
   },
   mounted() {
@@ -185,10 +270,10 @@ export default {
       // 清空当前输入框中的数据
       this.input = "";
     },
-    currentRadioChange1(selection) {
-      (this.second.mapList1 = selection),
-        (this.materialName = selection.materialName);
-    },
+    // currentRadioChange1(selection) {
+    //   (this.second.mapList1 = selection),
+    //     (this.materialName = selection.materialName);
+    // },
     currentRadioChange2(selection) {
       (this.second1.mapList2 = selection), (this.cargo = selection.cargoName);
     },
@@ -196,14 +281,16 @@ export default {
       (this.second2.mapList3 = selection), (this.receiver = selection.pierName);
     },
     currentRadioChange4(selection) {
-      (this.second3.mapList4 = selection), (this.materialType = selection.materialTypeName);
+      (this.second3.mapList4 = selection),
+        (this.materialType = selection.materialTypeName);
     },
-    onchange(val) { },
+    currentRadioChange5(selection) {
+      (this.second5.mapList5 = selection),
+        (this.batchIds = selection.foreignShipName+""+selection.materialName);
+    },
+    onchange(val) {},
     onclick(a) {
-      if (a == 1) {
-        this.second.requestUrl =
-          "/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
-      } else if (a == 2) {
+    if (a == 2) {
         this.second1.requestUrl =
           "/api/v1/tms/selectShippeByName?apiId=215&con=" + this.input;
       } else if (a == 3) {
@@ -213,38 +300,35 @@ export default {
         // console.log("aaaa");
         this.second3.requestUrl =
           "/api/v1/rms/getMaterialTypeList?apiId=376&con=" + this.input;
+      }else if(a==5){
+         this.second5.requestUrl =
+          "/api/v1/tms/getBatchIdByForeign?apiId=489&con=" + this.input;
       }
     },
-    // currentRadioChange6(selection) {
-    //   this.maplist = selection;
-    //   if (JSON.stringify(this.maplist).length > 2) {
-    //     this.$set(
-    //       this.form1,
-    //       "batchId",
-    //       selection.resultForeignShipName + selection.materialName
-    //     );
-    //     this.batchId = selection.batchId;
-    //   }
-    // },
+
     handleClose(done) {
       done();
     },
     makeSure() {
-      if (this.second.mapList1.length == 0) {
-        this.$message.warning("请选择物资")
-        return
-      }
+      // if (this.second.mapList1.length == 0) {
+      //   this.$message.warning("请选择物资");
+      //   return;
+      // }
       if (this.second1.mapList2.length == 0) {
-        this.$message.warning("请选择送达单位")
-        return
+        this.$message.warning("请选择送达单位");
+        return;
       }
       if (this.second2.mapList3.length == 0) {
-        this.$message.warning("请选择收货人")
-        return
+        this.$message.warning("请选择收货人");
+        return;
       }
       if (this.second3.mapList4.length == 0) {
-        this.$message.warning("请选择物资品类")
-        return
+        this.$message.warning("请选择物资品类");
+        return;
+      }
+      if (this.second5.mapList5.length == 0) {
+        this.$message.warning("请选择批次");
+        return;
       }
 
       //判断是否为电话号码
@@ -270,7 +354,7 @@ export default {
         noticePortConstructionFee: this.form1.noticePortConstructionFee,
         noticeDeliveryTime: sjTime(this.form1.noticeDeliveryTime),
         noticePileFreeDays: this.form1.noticePileFreeDays,
-        // batchId: this.batchId,
+        batchIds:this.second5.mapList5.batchId,
         purchaseContractUnitPrice: this.form1.purchaseContractUnitPrice,
         purchaseContractMoisture: this.form1.purchaseContractMoisture,
         //微元素含量
@@ -287,15 +371,15 @@ export default {
         cargoId: this.second1.mapList2.cargoId,
         groupId: this.second2.mapList3.id,
         inFactoryShipName: this.form1.inFactoryShipName,
-        foreignShipName: this.form1.foreignShipName,
-        materialId: this.second.mapList1.materialId,
+        foreignShipName:  this.second5.mapList5.foreignShipName,
+        materialId: this.second5.mapList5.materialId,
         materialTypeId: this.second3.mapList4.materialTypeId,
         isNeedPortDisCharge: this.form1.isNeedPortDisCharge,
         isNeedPortFee: this.form1.isNeedPortFee,
         cargoPictureUrl: this.cargoPictureUrl,
-        userId: getCookie("userId")
+        userId: getCookie("userId"),
       };
-      console.log("mapaaa" +map);
+      console.log("mapaaa" + map);
       //判断放货数量是否为数字
       if (
         map.noticeCommerceMethod == null ||
@@ -336,17 +420,14 @@ export default {
         return;
       }
 
-
       if (
         typeof map.purchaseContractUnitPrice != "undefined" &&
         !isNumber(map.purchaseContractUnitPrice)
       ) {
         this.$message.error("单价得为数字");
         return;
-      } if (
-        typeof map.tfeContent != "undefined" &&
-        !isNumber(map.tfeContent)
-      ) {
+      }
+      if (typeof map.tfeContent != "undefined" && !isNumber(map.tfeContent)) {
         this.$message.error("tfe含量得为数字");
         return;
       }
@@ -377,18 +458,17 @@ export default {
       ) {
         this.$message.error("放货数量得为数字");
         return;
-      }
-      else
-        this.axios.post("/api/v1/tms/insertDeliveryNotice", map).then(res => {
+      } else
+        this.axios.post("/api/v1/tms/insertDeliveryNotice", map).then((res) => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",
-              message: "新增成功"
+              message: "新增成功",
             });
           } else {
             this.$message({
               type: "warning",
-              message: res.data.data
+              message: res.data.data,
             });
           }
           this.$router.go(-1);
@@ -397,8 +477,8 @@ export default {
     // 取消
     cancel() {
       this.$router.go(-1);
-    }
-  }
+    },
+  },
 };
 </script>
 <style lang="scss">
@@ -465,7 +545,6 @@ export default {
     margin-top: 30px;
 
     .el-button {
-
       margin: auto;
     }
 

+ 149 - 66
src/views/appoint/components/ship/modifyDeliveryNotice.vue

@@ -2,31 +2,43 @@
   <!-- 修改货权转移页面 -->
   <div class="shipTransport">
     <page-title>返回</page-title>
-    <div class="mofrom">
-      <span class="motext">物资</span>
-      <el-input class="moinput" v-model="materialName" disabled> </el-input>
-      <el-button class="mobutton" type="primary" @click="ondrawer(1)">浏览</el-button>
-    </div>
+
     <!-- 货权转移送达单位 -->
     <div class="mofrom">
       <span class="motext">货权转移送达单位</span>
       <el-input class="moinput" v-model="cargo" disabled> </el-input>
-      <el-button class="mobutton" type="primary" @click="ondrawer(2)">浏览</el-button>
+      <el-button class="mobutton" type="primary" @click="ondrawer(2)"
+        >浏览</el-button
+      >
     </div>
 
     <!--大品类 -->
     <div class="mofrom">
       <span class="motext">大品类</span>
       <el-input class="moinput" v-model="materialType" disabled> </el-input>
-      <el-button class="mobutton" type="primary" @click="ondrawer(4)">浏览</el-button>
+      <el-button class="mobutton" type="primary" @click="ondrawer(4)"
+        >浏览</el-button
+      >
     </div>
 
     <!-- 货权转移送达单位 -->
     <div class="mofrom">
       <span class="motext">收货人</span>
       <el-input class="moinput" v-model="receiver" disabled> </el-input>
-      <el-button class="mobutton" type="primary" @click="ondrawer(3)">浏览</el-button>
+      <el-button class="mobutton" type="primary" @click="ondrawer(3)"
+        >浏览</el-button
+      >
     </div>
+
+    <!-- 批次 -->
+    <div class="mofrom">
+      <span class="motext">批次</span>
+      <el-input class="moinput" v-model="batchId" disabled> </el-input>
+      <el-button class="mobutton" type="primary" @click="ondrawer(5)"
+        disabled>浏览</el-button
+      >
+    </div>
+
     <div class="form">
       <div class="form_box">
         <dil-form :formId="112" v-model="form1"></dil-form>
@@ -34,40 +46,98 @@
     </div>
 
     <!-- 模态框 -->
-    <el-drawer :visible.sync="drawer" :direction="direction" :before-close="handleClose" size="50%">
-      <el-input placeholder="请输入内容" v-model="input" style="margin-top: 10px; margin-left: 20px; width: 250px" clearable>
+    <el-drawer
+      :visible.sync="drawer"
+      :direction="direction"
+      :before-close="handleClose"
+      size="50%"
+    >
+      <el-input
+        placeholder="请输入内容"
+        v-model="input"
+        style="margin-top: 10px; margin-left: 20px; width: 250px"
+        clearable
+      >
       </el-input>
-      <el-button type="primary" class="btn" @click="onclick(a)" style="margin-bottom: 15px">
+      <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 == 4">
         <dilTable v-bind.sync="options" @radio-change="currentRadioChange6"></dilTable>
       </div> -->
-      <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>
+        <dilTable
+          v-bind.sync="second1"
+          @radio-change="currentRadioChange2"
+        ></dilTable>
       </div>
       <div v-show="a == 3">
-        <dilTable v-bind.sync="second2" @radio-change="currentRadioChange3"></dilTable>
+        <dilTable
+          v-bind.sync="second2"
+          @radio-change="currentRadioChange3"
+        ></dilTable>
       </div>
       <div v-show="a == 4">
-        <dilTable v-bind.sync="second3" @radio-change="currentRadioChange4"></dilTable>
+        <dilTable
+          v-bind.sync="second3"
+          @radio-change="currentRadioChange4"
+        ></dilTable>
+      </div>
+      <div v-show="a == 5">
+        <dilTable
+          v-bind.sync="second5"
+          @radio-change="currentRadioChange5"
+        ></dilTable>
       </div>
     </el-drawer>
-    <el-form :inline="true" class="demo-form-inline" label-width="80px" style="margin-left:450px;display:flex;">
+    <el-form
+      :inline="true"
+      class="demo-form-inline"
+      label-width="80px"
+      style="margin-left: 450px; display: flex"
+    >
       <el-form-item label="上传货权转移附件">
-        <el-upload class="upload-demo" style="width:270px;" ref="upload1" action="/api/v1/rms/uploadCarrier1"
-          :before-upload="beforeUpload" :multiple="false" list-type="picture" :show-file-list="false"
-          :on-success="handleAvatarSuccess" :on-error="onError(1)">
+        <el-upload
+          class="upload-demo"
+          style="width: 270px"
+          ref="upload1"
+          action="/api/v1/rms/uploadCarrier1"
+          :before-upload="beforeUpload"
+          :multiple="false"
+          list-type="picture"
+          :show-file-list="false"
+          :on-success="handleAvatarSuccess"
+          :on-error="onError(1)"
+        >
           <span class="span"></span>
-          <el-input class="shippingCertificate" style="width:270px;display:flex;" placeholder="请选择货权转移附件(必填项,可支持重新上传)"
-            v-model="shippingCertificate" disabled>
+          <el-input
+            class="shippingCertificate"
+            style="width: 270px; display: flex"
+            placeholder="请选择货权转移附件(必填项,可支持重新上传)"
+            v-model="shippingCertificate"
+            disabled
+          >
           </el-input>
-          <el-button size="small" type="primary"
-            style="width:115px;height:35px;margin-left: 275px;margin-top:-35px;display:flex;" @click="upCLick(1)">
-            点击上传附件</el-button>
+          <el-button
+            size="small"
+            type="primary"
+            style="
+              width: 115px;
+              height: 35px;
+              margin-left: 275px;
+              margin-top: -35px;
+              display: flex;
+            "
+            @click="upCLick(1)"
+          >
+            点击上传附件</el-button
+          >
         </el-upload>
       </el-form-item>
     </el-form>
@@ -93,8 +163,11 @@ export default {
       shippingCertificate: "",
       materialName: "",
       materialType: "",
-      materialId:"",
+      foreignShipName:"",
+      materialId: "",
+      batchIds: "",
       cargo: "",
+      disabled:null,
       receiver: "",
       input: "",
       drawer: false,
@@ -119,7 +192,12 @@ export default {
         selectionType: "radio",
         mapList4: [],
       },
-    }
+      second5: {
+        requestUrl: "/api/v1/tms/getBatchIdByForeign?apiId=489",
+        selectionType: "radio",
+        mapList5: [],
+      },
+    };
   },
   mounted() {
     this.information();
@@ -130,18 +208,20 @@ export default {
         .post("/api/v1/tms/selectByNoticeId/" + this.$route.params.noticeId)
         .then((res) => {
           res.data.data.forEach((e) => {
-            console.log("aaa",e);
-             this.form1 = e;
-             this.materialName=e.materialName;
-             this.materialId=e.materialId;
-             this.cargo=e.cargoName;
-             this.cargoId=e.cargoId;
-             this.shippingCertificate=e.cargoPictureUrl;
-             this.cargoPictureUrl=e.cargoPictureUrl;
-             this.receiver=e.reciveName;
-             this.materialType=e.materialType;
+            console.log("aaa", e);
+            this.form1 = e;
+            this.batchId =  e.foreignShipName + e.materialName;
+            this.batchIds=e.batchId;
+            this.foreignShipName=e.foreignShipName;
+            this.materialId=e.materialId;
+            // this.materialId = e.materialId;
+            this.cargo = e.cargoName;
+            this.cargoId = e.cargoId;
+            this.shippingCertificate = e.cargoPictureUrl;
+            this.cargoPictureUrl = e.cargoPictureUrl;
+            this.receiver = e.reciveName;
+            this.materialType = e.materialType;
           });
-
         });
     },
     handleClose(done) {
@@ -194,11 +274,11 @@ export default {
       // 清空当前输入框中的数据
       this.input = "";
     },
-    currentRadioChange1(selection) {
-      (this.second.mapList1 = selection),
-        (this.materialName = selection.materialName);
-        (this.materialId=selection.materialId);
-    },
+    // currentRadioChange1(selection) {
+    //   (this.second.mapList1 = selection),
+    //     (this.materialName = selection.materialName);
+    //     (this.materialId=selection.materialId);
+    // },
     currentRadioChange2(selection) {
       (this.second1.mapList2 = selection), (this.cargo = selection.cargoName);
     },
@@ -206,14 +286,21 @@ export default {
       (this.second2.mapList3 = selection), (this.receiver = selection.pierName);
     },
     currentRadioChange4(selection) {
-      (this.second3.mapList4 = selection), (this.materialType = selection.materialTypeName);
+      (this.second3.mapList4 = selection),
+        (this.materialType = selection.materialTypeName);
+    },
+    currentRadioChange5(selection) {
+      (this.second5.mapList5 = selection),
+        (this.batchIds =
+          selection.foreignShipName + "" + selection.materialName);
+            (this.batchIds =
+          selection.batchId);
+            (this.foreignShipName =
+          selection.foreignShipName);
     },
-    onchange(val) { },
+    onchange(val) {},
     onclick(a) {
-      if (a == 1) {
-        this.second.requestUrl =
-          "/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.input;
-      } else if (a == 2) {
+       if (a == 2) {
         this.second1.requestUrl =
           "/api/v1/tms/selectShippeByName?apiId=215&con=" + this.input;
       } else if (a == 3) {
@@ -223,6 +310,9 @@ export default {
         // console.log("aaaa");
         this.second3.requestUrl =
           "/api/v1/rms/getMaterialTypeList?apiId=376&con=" + this.input;
+      }else if(a==5){
+        this.second5.requestUrl =
+          "/api/v1/tms/getBatchIdByForeign?apiId=489&con=" + this.input;
       }
     },
 
@@ -255,7 +345,8 @@ export default {
         cargoId: this.second1.mapList2.cargoId,
         groupId: this.second2.mapList3.id,
         inFactoryShipName: this.form1.inFactoryShipName,
-        foreignShipName: this.form1.foreignShipName,
+        foreignShipName:  this.foreignShipName,
+        batchIds:this.batchIds,
         materialId: this.materialId,
         materialTypeId: this.second3.mapList4.materialTypeId,
         isNeedPortDisCharge: this.form1.isNeedPortDisCharge,
@@ -282,32 +373,25 @@ export default {
       // else
       // if (!isNumber(val)) this.$message.error("联系电话必须是数字!");
       // else
-  
-      this.axios
-        .post("/api/v1/tms/editDeliveryNotice", map
-        )
-        .then((res) => {
-          if(res.data.code=="200"){
+
+      this.axios.post("/api/v1/tms/editDeliveryNotice", map).then((res) => {
+        if (res.data.code == "200") {
           this.$message({
             type: "success",
             message: "修改成功!",
           });
           this.$router.go(-1);
-          }
-           else{
-            this.$message.error("修改失败!!")
-          }
-        });
+        } else {
+          this.$message.error("修改失败!!");
+        }
+      });
     },
     // 返回
     onClickCancel() {
       this.$router.go(-1);
     },
   },
-
 };
-
-
 </script>
 <style lang="scss">
 .shipTransport {
@@ -362,7 +446,6 @@ export default {
     }
   }
 
-
   .button_box {
     margin-left: 45%;
   }

+ 53 - 2
src/views/statisticalReport/components/Ship_dynamic_table.vue

@@ -2,6 +2,21 @@
   <div>
     <div class="shipReport">
       <div class="title">船舶动态表</div>
+      <div class="top">
+        <el-input
+          class="el-input"
+          placeholder="请输入品名"
+          v-model="input"
+          clearable
+        >
+        </el-input>
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+         <el-button type="primary" @click="gotoexcel()"
+          ><i class="el-icon-download"></i>导出(Excel)</el-button
+        >
+      </div>
       <table-item :tableData="tableData" :col="col"> </table-item>
     </div>
   </div>
@@ -125,15 +140,44 @@ export default {
         }
       ],
       // 表格数据
-      tableData: []
+
+      tableData: [],
+      input:"",
+
     };
   },
   created() {},
   mounted() {
     this.initialization();
-    console.log(this.$refs.excelDom);
+    // console.log(this.$refs.excelDom);
   },
   methods: {
+    onclick(){
+        this.axios.post("/api/v1/tms/selectAllShipDynamaics?con=" + this.input).then((res) => {
+        if (res.data.code == "200") {
+          this.tableData = res.data.data;
+          console.log("aaad" +res.data.data);
+        } else {
+          this.$message({
+            type: "warning",
+            message: res.data.data,
+          });
+        }
+      });
+    },
+    gotoexcel() {
+      let _this = this;
+      let result = JSON.parse(JSON.stringify(_this.tableData));
+      console.log(result);
+      result.unshift({
+        pm: "品名",
+        portName: "港口名称",
+        tonnage: "下游港口吨位",
+        capacity1: "船名",
+        capacityNumber1: "吨位",
+        locationValue1: "位置",
+      });
+    },
     initialization() {
       this.axios.post("/api/v1/tms/selectAllShipDynamaics").then(res => {
         if (res.data.code == "200") {
@@ -155,6 +199,13 @@ export default {
 .shipReport {
   margin-top: 20px;
   margin-left: 20px;
+  .top {
+    padding: 1.25rem 0.375rem;
+    .el-input {
+      width: 20%;
+      margin-right: 1.25rem;
+    }
+  }
   .title {
     display: flex;
     justify-content: center;

+ 1 - 1
src/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeForm.vue

@@ -31,7 +31,7 @@
           <el-input
             v-model="inputMaterial"
             style="width:200px"
-            placeholder="输入物资名称或备注"
+            placeholder="输入仓库或物资名称或备注"
             clearable="true"
           ></el-input>
         </el-form-item>