瀏覽代碼

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

zx 3 年之前
父節點
當前提交
81c2ff74b6
共有 29 個文件被更改,包括 2435 次插入1484 次删除
  1. 2 11
      build/utils.js
  2. 二進制
      src/assets/homepageimg/微信图片_20211128192004.jpg
  3. 二進制
      src/assets/img/test.png
  4. 0 1
      src/components/DilCommonUI/packages/table/demo/06_FilterTable.vue
  5. 4 23
      src/components/DilCommonUI/packages/table/src/table.js
  6. 15 0
      src/views/ADMINISTRATORS/app.js
  7. 422 423
      src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue
  8. 75 0
      src/views/RMS/components/addInwardContractMaterial.vue
  9. 105 92
      src/views/RMS/components/addMaterial.vue
  10. 36 44
      src/views/RMS/components/addPort.vue
  11. 0 0
      src/views/RMS/components/editInwardMaterial.vue
  12. 90 55
      src/views/RMS/components/editMaterial.vue
  13. 43 0
      src/views/RMS/components/inwardContractMaterial.vue
  14. 8 1
      src/views/RMS/router/index.js
  15. 9 10
      src/views/WMS/components/port_deposit/port_deposit_inbound.vue
  16. 64 59
      src/views/appoint/components/inward/addTransPrice.vue
  17. 51 33
      src/views/appoint/components/inward/transPrice.vue
  18. 52 12
      src/views/appoint/components/saleContract/addSaleOrder.vue
  19. 151 35
      src/views/appoint/components/saleContract/editSaleOrder.vue
  20. 45 75
      src/views/appoint/components/saleContract/saleCokeInward.vue
  21. 45 302
      src/views/appoint/components/saleContract/saleOrderCoproduct.vue
  22. 279 0
      src/views/appoint/components/saleContract/saleOrderOODetails.vue
  23. 46 62
      src/views/appoint/components/saleContract/saleOrderSteel.vue
  24. 545 0
      src/views/appoint/components/saleContract/updateSaleOrderSteel.vue
  25. 4 0
      src/views/appoint/router/index.js
  26. 21 21
      src/views/index/components/login.vue
  27. 92 62
      src/views/inward/components/truckAppoint/requirement.vue
  28. 122 81
      src/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeForm.vue
  29. 109 82
      src/views/statisticalReport/components/salesLogisticsStatistics/saleCoproductForm.vue

+ 2 - 11
build/utils.js

@@ -15,18 +15,10 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // ['index','appoint','configManager','homepage',''inward,'queue','RMS','sale','serviceManager','SporadicManage'
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
-// let devModules = ['index','statisticalReport','appoint']
-// let devModules = ['index','appoint','sale','RMS','statisticalReport','TMS','inward'];
-//let devModules = ['index','appoint','WMS'];
-// let devModules = ['index','statisticalReport']
+// let devModules = ['index','inward']
+// let devModules = ['index','appoint','sale','statisticalReport']
 // let devModules = ['index','sale']
 let devModules = ['all']
-
-// let devModules = ['index','SporadicManage','RMS','statisticalReport']
-// let devModules = ['index','inward','statisticalReport']
-//  let devModules = ['index','WMS','appoint','TMS','inward','statisticalReport','sale']
-// let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
-// let devModules = ['index','RMS'];
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;
 }
@@ -39,7 +31,6 @@ const getEntries = function (suffix, polyfill) {
   let setEntries = function (filePath, _chunk) {
     _chunk = _chunk.substring(0, _chunk.lastIndexOf('/'));
     let flag = true;
-
     flag = false;
     for (let item of devModules) {
       if (item && (_chunk.indexOf('views/' + item) >= 0 || item === 'all')) {

二進制
src/assets/homepageimg/微信图片_20211128192004.jpg


二進制
src/assets/img/test.png


+ 0 - 1
src/components/DilCommonUI/packages/table/demo/06_FilterTable.vue

@@ -5,7 +5,6 @@
       <el-input v-model="inputValue" placeholder="请输入内容">车牌号</el-input>
       <el-button @click="onClick">筛选</el-button>
     </div>
-
     <dilTable
       requestUrl="/api/v1/td/truck/type/status2?apiId=13"
       :requestQuery="requestQuery"

+ 4 - 23
src/components/DilCommonUI/packages/table/src/table.js

@@ -29,7 +29,6 @@ export default {
       window.addEventListener('resize',this.getHeight)
       this.getHeight();
     }
-    
     this.dataCurrentPage = this.currentPage;
     this.dataPageSize = this.pageSize;
     this.requestData();
@@ -45,27 +44,6 @@ export default {
       this.height = window.innerHeight - this.shiyHeigth;
       console.log(this.height);
     },
-    //计算合计列
-    getSummaries(columns,data) {
-      const sums = [];
-      columns.forEach((column, index) => {
-       const values = data.map(item => Number(item[column.property]));
-           if (column.property =='resultNetWeight' ) {
-            sums[index] = values.reduce((prev, curr) => {
-             const value = Number(curr);
-             if (!isNaN(value)) {
-               return prev + curr;
-             } else {
-               return prev;
-             }
-            }, 0);
-            console.log(sums )
-            sums[index];
-           }
-      });
-      // console.log("净重:" + sums)
-      return sums
-      },
     // 通过请求获取数据
     requestData(options) {
       let pageNum = undefined;
@@ -87,6 +65,8 @@ export default {
         // 判断是否需要在请求体中放入参数
         if(this.requestQuery){
           this.dataRequestQuery=this.requestQuery;
+          console.log("表头数据")
+          console.log(this.dataRequestQuery)
         }
         let data = undefined;
         for (const key in this.dataRequestQuery) {
@@ -145,6 +125,8 @@ export default {
     refreshColumnData(columnData) {
       // 如果前端有写表头,则加在后端表头前面
       const d = this.columnData.concat(columnData);
+      console.log("d")
+      console.log(d)
       // 把操作列拼接到最后一列
       this.dataColumnData = d;
       this.dataDropColumn = [].concat(this.dataColumnData);
@@ -154,7 +136,6 @@ export default {
       // column : 列的数据
       // prop : 排序字段参数名
       // order : 排序方式 (ascending:升序;descending:降序;null:无)
-
       // 前端排序
       // const sort = {
       //   ascending: (a, b) => {

+ 15 - 0
src/views/ADMINISTRATORS/app.js

@@ -98,6 +98,21 @@ export function isIntegerNumber(value) {
       var DATE = Year + "-" + Month + "-" + Day + " " + Hours + ":" + Minutes + ":" + Seconds
       return DATE
   }
+//写一个方法封装date对象转换为时间字符串
+  export function toDateNo(value){
+      if(value==null){
+          return
+      }
+      var Year = value.getFullYear();
+      var Month = ("0" + (value.getMonth() + 1)).slice(-2)
+      var Day = ("0" + (value.getDate())).slice(-2)
+      var Hours = ("0" + (value.getHours())).slice(-2)
+      var Minutes = ("0" + (value.getMinutes())).slice(-2)
+      var Seconds = ("0" + (value.getSeconds())).slice(-2)
+      var DATE = Year + "" + Month + "" + Day + "" + Hours + "" + Minutes + "" + Seconds
+      return DATE
+  }
+
 /* eslint-disable no-new */
 new Vue({
   el: '#app',

+ 422 - 423
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -6,192 +6,159 @@
         <el-tabs v-model="activeName">
           <el-tab-pane label="补录计量实绩" name="first">
             <div class="switch">
-                <el-switch
+              <el-switch
                 v-model="switchValue"
                 active-text="二次过磅"
                 inactive-text="首次过磅"
-                @change = "onchange">
-                </el-switch>
+                @change="onchange"
+              >
+              </el-switch>
             </div>
-          <div class="admin2">
-            <div class="carrier from">
+            <div class="admin2">
+              <div class="carrier from">
                 <el-form
-                    :inline="true"
-                    class="demo-form-inline"
-                    label-width="80px"
-                    >
-                    <el-form-item label="车牌号:">
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
                     <el-autocomplete
-                    class="inline-input"
-                    v-model="capacityName"
-                    :fetch-suggestions="querySearchCapacity"
-                    placeholder="车牌号"
-                    :trigger-on-focus="false"
-                    @select="handleSelectCapacity"
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
                     >
-                    <template slot-scope="{ item }">
-                    <div class="name">{{ item.capacityNumber }}</div>
-                    </template>
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
                     </el-autocomplete>
-                    </el-form-item>
+                  </el-form-item>
                 </el-form>
-            </div>
-            <div class="material from">
+              </div>
+              <div class="material from">
                 <span class="text">物资:</span>
                 <el-select v-model="materialId" placeholder="请选择">
-                <el-option
+                  <el-option
                     v-for="item in materialList"
                     :key="item.materialId"
-                    :label="item.materialName" 
+                    :label="item.materialName"
                     :value="item.materialId"
-                >
-                </el-option>
+                  >
+                  </el-option>
                 </el-select>
-            </div>
-
-            <div class="poundNo from">
-                <span class="text">磅单号:</span>
-                <el-input v-model="poundNo"></el-input>
-            </div>
-            <div class="block" v-if="first">
+              </div>
+              <div class="block" v-if="first">
                 <span class="text">首次称重时间:</span>
                 <el-date-picker
-                v-model="value1"
-                type="datetime"
-                placeholder="选择日期时间">
+                  v-model="value1"
+                  type="datetime"
+                  placeholder="选择日期时间"
+                >
                 </el-date-picker>
-            </div>
-            <div class="firstWeight from " v-if="first">
+              </div>
+              <div class="firstWeight from " v-if="first">
                 <span class="text">首次称重重量(吨):</span>
                 <el-input v-model="firstWeight"></el-input>
-            </div>
-            <div class="truckCalFirst from" v-if="first">
+              </div>
+              <div class="truckCalFirst from" v-if="first">
                 <span class="text">首次汽车衡:</span>
-                <el-select v-model="truckCalFirst" placeholder="请选择" @change="onchange1">
-                <el-option
+                <el-select
+                  v-model="truckCalFirst"
+                  placeholder="请选择"
+                  @change="onchange1"
+                >
+                  <el-option
                     v-for="item in truckCalFirstList"
                     :key="item.value"
-                    :label="item.label" 
+                    :label="item.label"
                     :value="item.value"
-                >
-                </el-option>
+                  >
+                  </el-option>
                 </el-select>
-            </div>
-            <div class="block" v-if="second">
+              </div>
+              <div class="block" v-if="second">
                 <span class="text">二次称重时间:</span>
                 <el-date-picker
-                v-model="value2"
-                type="datetime"
-                placeholder="选择日期时间">
+                  v-model="value2"
+                  type="datetime"
+                  placeholder="选择日期时间"
+                >
                 </el-date-picker>
-            </div>
-            <div class="secondWeight from" v-if="second">
+              </div>
+              <div class="secondWeight from" v-if="second">
                 <span class="text">二次称重重量(吨):</span>
                 <el-input v-model="secondWeight"></el-input>
-            </div>
-            <div class="truckCalSecond from" v-if="second">
+              </div>
+              <div class="truckCalSecond from" v-if="second">
                 <span class="text">二次汽车衡:</span>
-                <el-select v-model="truckCalSecond" placeholder="请选择" @change="onchange2">
-                <el-option
+                <el-select
+                  v-model="truckCalSecond"
+                  placeholder="请选择"
+                  @change="onchange2"
+                >
+                  <el-option
                     v-for="item in truckCalSecondList"
                     :key="item.value"
-                    :label="item.label" 
+                    :label="item.label"
                     :value="item.value"
-                >
-                </el-option>
+                  >
+                  </el-option>
                 </el-select>
+              </div>
             </div>
-            <div class="netWeight from" v-if="second">
-                <span class="text">净重(吨):</span>
-                <el-input v-model="netWeight"></el-input>
+            <div class="button_box">
+              <el-button @click="onClickCancel">返回</el-button>
+              <el-button
+                type="primary"
+                @click="onClickConfirm"
+                :disabled="disabled"
+                >确认</el-button
+              >
             </div>
-          </div>
-          <div class="button_box">
-            <el-button @click="onClickCancel">返回</el-button>
-            <el-button type="primary" @click="onClickConfirm" :disabled = "disabled">确认</el-button>
-          </div>
           </el-tab-pane>
           <el-tab-pane label="修改路段顺序" name="second">
-              <div class="admin2">
-            <div class="carrier from">
+            <div class="admin2">
+              <div class="carrier from">
                 <el-form
-                    :inline="true"
-                    class="demo-form-inline"
-                    label-width="80px"
-                    >
-                    <el-form-item label="车牌号:">
+                  :inline="true"
+                  class="demo-form-inline"
+                  label-width="80px"
+                >
+                  <el-form-item label="车牌号:">
                     <el-autocomplete
-                    class="inline-input"
-                    v-model="capacityName"
-                    :fetch-suggestions="querySearchCapacity"
-                    placeholder="车牌号"
-                    :trigger-on-focus="false"
-                    @select="handleSelectCapacity"
+                      class="inline-input"
+                      v-model="capacityName"
+                      :fetch-suggestions="querySearchCapacity"
+                      placeholder="车牌号"
+                      :trigger-on-focus="false"
+                      @select="handleSelectCapacity"
                     >
-                    <template slot-scope="{ item }">
-                    <div class="name">{{ item.capacityNumber }}</div>
-                    </template>
+                      <template slot-scope="{ item }">
+                        <div class="name">{{ item.capacityNumber }}</div>
+                      </template>
                     </el-autocomplete>
-                    </el-form-item>
+                  </el-form-item>
                 </el-form>
-            </div>
-            <div class="poundNo from">
+              </div>
+              <div class="poundNo from">
                 <span class="text">运输订单号:</span>
                 <el-input v-model="orderNumber" disabled></el-input>
-            </div>
-            <div class="poundNo from">
+              </div>
+              <div class="poundNo from">
                 <span class="text">路段顺序号:</span>
                 <el-input v-model="lineQuence" @input="oninput"></el-input>
-            </div>
-            <div class="button_box">
-            <el-button type="primary" @click="updateLineSqe" :disabled = "disabled">确认</el-button>
-          </div>
-          </div>
-          </el-tab-pane>
-          <el-tab-pane label="修改卸货厂区" name="third">
-              <div class="admin2">
-            <div class="carrier from">
-                <el-form
-                    :inline="true"
-                    class="demo-form-inline"
-                    label-width="80px"
-                    >
-                    <el-form-item label="车牌号:">
-                    <el-autocomplete
-                    class="inline-input"
-                    v-model="capacityName"
-                    :fetch-suggestions="querySearchCapacity"
-                    placeholder="车牌号"
-                    :trigger-on-focus="false"
-                    @select="handleSelectCapacity"
-                    >
-                    <template slot-scope="{ item }">
-                    <div class="name">{{ item.capacityNumber }}</div>
-                    </template>
-                    </el-autocomplete>
-                    </el-form-item>
-                </el-form>
-            </div>
-            <div class="poundNo from">
-                <span class="text">运输订单号:</span>
-                <el-input v-model="orderNumber" disabled></el-input>
-            </div>
-            <div class="material from">
-                <span class="text">卸货厂区:</span>
-                <el-select v-model="materialId" placeholder="请选择">
-                <el-option
-                    v-for="item in materialList"
-                    :key="item.materialId"
-                    :label="item.materialName" 
-                    :value="item.materialId"
+              </div>
+              <div class="button_box">
+                <el-button
+                  type="primary"
+                  @click="updateLineSqe"
+                  :disabled="disabled"
+                  >确认</el-button
                 >
-                </el-option>
-                </el-select>
+              </div>
             </div>
-            <div class="button_box">
-            <el-button type="primary" @click="updateLineSqe" :disabled = "disabled">确认</el-button>
-          </div>
-          </div>
           </el-tab-pane>
         </el-tabs>
       </div>
@@ -199,344 +166,376 @@
   </div>
 </template>
 <script>
-import { toDateString } from "../app.js"
+import { toDateString, toDateNo } from "../app.js";
 export default {
   data() {
     return {
-        orderNumber:null,
-        first:true,
-        second:true,
-        activeName:"first",
-        capacityName:null,
-        stateCapacity:null,
-        materialList:[],
-        capacityId:null,
-        materialId:null,
-        value1:null,
-        value2:null,
-        disabled:false,
-        orderId:null,
-        firstWeight:null,
-        secondWeight:null,
-        netWeight:null,
-        poundNo:null,
-        truckCalFirstList:[],
-        truckCalSecondList:[],
-        truckCalFirst:null,
-        truckCalSecond:null,
-        switchValue:true,
-        truckCalFirstNum:null,
-        truckCalSecondNum:null,
-        lineQuence:null
+      orderNumber: null,
+      first: true,
+      second: true,
+      activeName: "first",
+      capacityName: null,
+      stateCapacity: null,
+      materialList: [],
+      capacityId: null,
+      materialId: null,
+      value1: null,
+      value2: null,
+      disabled: false,
+      orderId: null,
+      firstWeight: null,
+      secondWeight: null,
+      netWeight: null,
+      poundNo: null,
+      truckCalFirstList: [],
+      truckCalSecondList: [],
+      truckCalFirst: null,
+      truckCalSecond: null,
+      switchValue: true,
+      truckCalFirstNum: null,
+      truckCalSecondNum: null,
+      lineQuence: null
     };
   },
-  created(){ 
-  },
-  mounted(){
-      this.information()
+  created() {},
+  mounted() {
+    this.information();
   },
   methods: {
-    updateLineSqe(){
-        let map = {
-            orderId:this.orderId,
-            orderLineSqe:this.lineQuence
+    updateLineSqe() {
+      let map = {
+        orderId: this.orderId,
+        orderLineSqe: this.lineQuence
+      };
+      this.axios.post("/api/v1/uc/updateLineSqe", map).then(res => {
+        console.log(res.data);
+        if (res.data.code == "200") {
+          this.$message.success("修改路段顺序号成功");
+          this.$router.go(0);
         }
-        this.axios.post("/api/v1/uc/updateLineSqe",map).then((res) =>{
-            console.log(res.data);
-             if(res.data.code == "200"){
-                this.$message.success("修改路段顺序号成功")
-                this.$router.go(0)
-            }
-           
-        })
+      });
     },
-    oninput(){
-
+    oninput() {},
+    onchange() {
+      if (this.switchValue) {
+        this.first = true;
+        this.second = true;
+      } else {
+        this.second = false;
+      }
     },
-    onchange(){
-        console.log(this.switchValue)
-        console.log(typeof(this.switchValue))
-        if(this.switchValue){
-            this.first = true
-            this.second = true
-        }else{
-            this.second = false
+    onchange1() {
+      console.log(this.truckCalFirst);
+      this.truckCalFirstList.forEach(e => {
+        if (this.truckCalFirst == e.value) {
+          this.truckCalFirstNum = e.label;
         }
+      });
     },
-    onchange1(){
-        console.log(this.truckCalFirst)
-        this.truckCalFirstList.forEach(e => {
-            if(this.truckCalFirst == e.value){
-                this.truckCalFirstNum = e.label
-            }
-        });
+    onchange2() {
+      this.truckCalSecondList.forEach(e => {
+        if (this.truckCalSecond == e.value) {
+          this.truckCalSecondNum = e.label;
+        }
+      });
     },
-    onchange2(){
-        console.log(this.truckCalSecond)
-        this.truckCalSecondList.forEach(e => {
-            if(this.truckCalSecond == e.value){
-                this.truckCalSecondNum = e.label
-            }
-        });
-    },        
     //运力弹出层
-    handleSelectCapacity(item){
-      console.log(item)
-      this.capacityId = item.capacityId
-      this.capacityName = item.capacityNumber
-      this.axios.get("/api/v1/uc/getOrderNumber?capacityId=" + this.capacityId).then((res) =>{
-          if(res.data.code == "200"){
-              this.orderId = res.data.data.orderId
-              this.orderNumber = res.data.data.orderNumber
-              this.axios.get("/api/v1/uc/getMaterialIdByOrderId?orderId=" + this.orderId).then((res) =>{
-                  if(res.data.code == "200"){
-                      this.materialList = res.data.data
-                  }
-              })
-              this.axios.get("/api/v1/uc/getPurOrgId?orderId=" + this.orderId).then((res) =>{
-                  
-              })
+    handleSelectCapacity(item) {
+      this.capacityId = item.capacityId;
+      this.capacityName = item.capacityNumber;
+      this.axios
+        .get("/api/v1/uc/getOrderNumber?capacityId=" + this.capacityId)
+        .then(res => {
+          if (res.data.code == "200") {
+            this.orderId = res.data.data.orderId;
+            this.orderNumber = res.data.data.orderNumber;
+            this.axios
+              .get("/api/v1/uc/getMaterialIdByOrderId?orderId=" + this.orderId)
+              .then(res => {
+                if (res.data.code == "200") {
+                  this.materialList = res.data.data;
+                }
+              });
+            this.axios
+              .get("/api/v1/uc/getPurOrgId?orderId=" + this.orderId)
+              .then(res => {});
           }
-      })
+        });
     },
     //以下是运力边输边查搜索
     querySearchCapacity(queryString, cb) {
-        if(queryString.length < 3){
-            return
-        }
-        this.axios.get('/api/v1/uc/getCapacityNumber?index='+queryString).then((res)=>{
-        if(res.data.code == "200"){
-          var restaurantsCarrier = res.data.data
-          console.log(restaurantsCarrier,"restaurantsCarrier");
-          var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
-           // 调用 callback 返回建议列表的数据
-          cb(results);
-        }
-        })     
-      },
+      if (queryString.length < 3) {
+        return;
+      }
+      this.axios
+        .get("/api/v1/uc/getCapacityNumber?index=" + queryString)
+        .then(res => {
+          if (res.data.code == "200") {
+            var restaurantsCarrier = res.data.data;
+            console.log(restaurantsCarrier, "restaurantsCarrier");
+            var results = queryString
+              ? restaurantsCarrier.filter(this.createFilterCarrier(queryString))
+              : restaurantsCarrier;
+            // 调用 callback 返回建议列表的数据
+            cb(results);
+          }
+        });
+    },
     createFilterCarrier(queryString) {
-        return (restaurantsCarrier)  =>  {
-          return (restaurantsCarrier.capacityNumber.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
-        };
-      },
+      return restaurantsCarrier => {
+        return (
+          restaurantsCarrier.capacityNumber
+            .toLowerCase()
+            .indexOf(queryString.toLowerCase()) > -1
+        );
+      };
+    },
     //以上是承运商边输边查搜索
-    information(){
-        this.axios.get("/api/v1/uc/getAllCalculateMes").then((res) =>{
-            this.truckCalFirstList = res.data
-            this.truckCalSecondList = res.data
-        })
+    information() {
+      this.axios.get("/api/v1/uc/getAllCalculateMes").then(res => {
+        this.truckCalFirstList = res.data;
+        this.truckCalSecondList = res.data;
+      });
     },
-    onClickConfirm(){
-        if(this.switchValue){
-            if(this.orderNumber==null||this.truckCalFirst==null||this.truckCalSecond==null||
-            this.firstWeight==null||this.secondWeight==null||this.netWeight==null||this.value1==null
-            ||this.value2==null||this.poundNo==null||this.materialId==null){
-                this.$message.warning("请填写所有值!!!")
-                return
-            }
-        }else{
-            if(this.orderNumber==null||this.truckCalFirst==null||
-            this.firstWeight==null||this.value1==null
-            ||this.poundNo==null||this.materialId==null){
-                this.$message.warning("请填写所有值!!!")
-                return
-            }
+    onClickConfirm() {
+      this.poundNo = "jlbl" + toDateNo(new Date());
+      if (this.switchValue) {
+        if (
+          this.orderNumber == null ||
+          this.truckCalFirst == null ||
+          this.truckCalSecond == null ||
+          this.firstWeight == null ||
+          this.secondWeight == null ||
+          this.value1 == null ||
+          this.value2 == null ||
+          this.materialId == null
+        ) {
+          this.$message.warning("请填写所有值!!!");
+          return;
         }
-        let mapFirst = {
-            orderNumber:this.orderNumber,
-            resultTareCalculateNumber: this.truckCalFirstNum,
-            resultTareWeight: this.firstWeight + "",
-            resultTareWeightTime: toDateString(this.value1),
-            resultPoundNo: this.poundNo,
-            materialId: this.materialId + ""
+      } else {
+        if (
+          this.orderNumber == null ||
+          this.truckCalFirst == null ||
+          this.firstWeight == null ||
+          this.value1 == null ||
+          this.materialId == null
+        ) {
+          this.$message.warning("请填写所有值!!!");
+          return;
         }
-        let mapSecond = {
-            orderNumber:this.orderNumber,
-            resultTareCalculateNumber: this.truckCalFirstNum,
-            resultCrossCalculateNumber: this.truckCalSecondNum,
-            resultTareWeight: this.firstWeight + "",
-            resultCrossWeight: this.secondWeight + "",
-            resultNetWeight: this.netWeight + "",
-            resultTareWeightTime: toDateString(this.value1),
-            resultCrossWeightTime: toDateString(this.value2),
-            resultPoundNo: this.poundNo,
-            materialId: this.materialId + ""
-        }
-        var arr = []
-        if(this.switchValue){
-            arr.push(mapSecond)
-        }else{
-            arr.push(mapFirst)
-        }
-        this.axios.post("/api/v1/uc/recordingWeightResult",arr).then((res) =>{
-            this.$message.success("补录计量实绩成功")
-            this.$router.go(0)
-        })
-    },
-    onClickCancel(){
+      }
+      let mapFirst = {
+        orderNumber: this.orderNumber,
+        resultTareCalculateNumber: this.truckCalFirstNum,
+        resultTareWeight: this.firstWeight + "",
+        resultTareWeightTime: toDateString(this.value1),
+        resultPoundNo: this.poundNo,
+        materialId: this.materialId + ""
+      };
+      //如果首次大于二次,那么是先毛后皮,首次放在毛重上面,二次放在皮重上面
+      if (this.firstWeight >= this.secondWeight) {
+        var mapSecond = {
+          orderNumber: this.orderNumber,
+          resultTareCalculateNumber: this.truckCalSecondNum,
+          resultCrossCalculateNumber: this.truckCalFirstNum,
+          resultTareWeight: this.secondWeight + "",
+          resultCrossWeight: this.firstWeight + "",
+          resultNetWeight:
+            Math.abs(this.firstWeight - this.secondWeight).toFixed(2) + "",
+          resultTareWeightTime: toDateString(this.value2),
+          resultCrossWeightTime: toDateString(this.value1),
+          resultPoundNo: this.poundNo,
+          materialId: this.materialId + ""
+        };
+      } else {
+        //如果首次小于二次,那么是先皮后毛,首次放在皮重上面,二次放在毛重上面
+        var mapSecond = {
+          orderNumber: this.orderNumber,
+          resultTareCalculateNumber: this.truckCalFirstNum,
+          resultCrossCalculateNumber: this.truckCalSecondNum,
+          resultTareWeight: this.firstWeight + "",
+          resultCrossWeight: this.secondWeight + "",
+          resultNetWeight:
+            Math.abs(this.secondWeight - this.firstWeight).toFixed(2) + "",
+          resultTareWeightTime: toDateString(this.value1),
+          resultCrossWeightTime: toDateString(this.value2),
+          resultPoundNo: this.poundNo,
+          materialId: this.materialId + ""
+        };
+      }
+      var arr = [];
+      if (this.switchValue) {
+        arr.push(mapSecond);
+      } else {
+        arr.push(mapFirst);
+      }
+      this.axios.post("/api/v1/uc/recordingWeightResult", arr).then(res => {
+        this.$message.success("补录计量实绩成功");
+        this.$router.go(0);
+      });
     },
-    
-  },
+    onClickCancel() {}
+  }
 };
 </script>
 <style lang="scss">
-.admin{
+.admin {
   .admin1 {
-
+    margin-top: 40px;
+    margin-left: 40px;
+    .switch {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      margin-top: 20px;
+      color: aqua;
+    }
+    .button_box {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      width: 100%;
+      height: 100px;
+    }
+    .admin2 {
       margin-top: 40px;
-      margin-left: 40px;
-      .switch {
-          display: flex;
-          justify-content: center;
-          align-items: center;
-          margin-top: 20px;
-          color: aqua;
+      .from {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-top: 20px;
+        margin-bottom: 20px;
       }
-      .button_box {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            width: 100%;
-            height: 100px;
+      .carrier {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .el-form-item {
+          text-align: right;
+        }
+        .el-autocomplete {
+          width: 250px;
         }
-      .admin2 {    
-        margin-top: 40px; 
-        .from {
+      }
+      .material {
+        display: flex;
+        justify-content: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
+        }
+        .el-input {
+          width: 250px;
+        }
+      }
+      .poundNo {
         display: flex;
+        justify-content: center;
         align-items: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
+        }
+        .el-input {
+          width: 250px;
+        }
+      }
+      .block {
+        display: flex;
         justify-content: center;
+        align-items: center;
         margin-top: 20px;
-        margin-bottom: 20px;
+        margin-right: 100px;
+        .el-input {
+          width: 250px;
         }
-        .carrier{
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            .el-form-item {
-                text-align: right;
-            }
-            .el-autocomplete{
-            width: 250px;
-            }
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
-        .material {
+      }
+      .truckCalFirst {
         display: flex;
         justify-content: center;
         margin-top: 20px;
         margin-right: 100px;
         .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
         .el-input {
-            width: 250px;
+          width: 250px;
+        }
+      }
+      .truckCalSecond {
+        display: flex;
+        justify-content: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
+        .el-input {
+          width: 250px;
         }
-        .poundNo {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
-                  }
-            .el-input {
-            width: 250px;
-                    }
-        }  
-        .block {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .el-input {
-                width: 250px;
-            }
-            .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
-            }
+      }
+      .secondWeight {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
-        .truckCalFirst {
-            display: flex;
-            justify-content: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-                display: inline-block;
-                width: 170px;
-                text-align: right;
-            }
-            .el-input {
-                width: 250px;
-            }
+        .el-input {
+          width: 250px;
         }
-        .truckCalSecond {
-            display: flex;
-            justify-content: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-                display: inline-block;
-                width: 170px;
-                text-align: right;
-            }
-            .el-input {
-                width: 250px;
-            }
+      }
+      .firstWeight {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
-        .secondWeight {
-           display: flex;
-            justify-content: center;
-            align-items: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
-                  }
-            .el-input {
-            width: 250px;
-                    } 
+        .el-input {
+          width: 250px;
         }
-        .firstWeight {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
-                  }
-            .el-input {
-            width: 250px;
-                    }
+      }
+      .netWeight {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-top: 20px;
+        margin-right: 100px;
+        .text {
+          display: inline-block;
+          width: 170px;
+          text-align: right;
         }
-        .netWeight {
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            margin-top: 20px;
-            margin-right: 100px;
-            .text {
-            display: inline-block;
-            width: 170px;
-            text-align: right;
-                  }
-            .el-input {
-            width: 250px;
-                    }
+        .el-input {
+          width: 250px;
         }
-      }      
-  }
+      }
+    }
   }
+}
 </style>

+ 75 - 0
src/views/RMS/components/addInwardContractMaterial.vue

@@ -0,0 +1,75 @@
+<template>
+  <!-- 添加港口信息 -->
+  <div class="addWagonLoad">
+    <PageTitle>返回</PageTitle>
+    <div class="form-box">
+      <dil-form :formId="382" v-model="form1" ref="from1"></dil-form>
+    </div>
+    <div class="button-box">
+      <el-button @click="cancel">取消</el-button>
+      <el-button type="primary" @click="makeSure">确定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import PageTitle from "@/components/Page/Title";
+export default {
+  components: { PageTitle },
+  data() {
+    return {
+      form1: {}
+    };
+  },
+  mounted() {},
+  methods: {
+    makeSure() {
+      console.log(this.form1);
+      this.axios
+        .post("/api/v1/rms/insertMaterialType", this.form1)
+        .then(res => {
+          if (res.data.code == 0) {
+            this.$message.success("新增成功");
+            this.$router.go(-1);
+          } else {
+            this.$message.warning("请重试!");
+            this.$router.go(0);
+          }
+        });
+    },
+    // 取消
+    cancel() {
+      this.$router.go(-1);
+    }
+  }
+};
+</script>
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  .el-button {
+    width: 80px;
+    margin-right: 10px;
+  }
+}
+.form-box {
+  display: flex;
+  justify-content: center;
+  .el-form-item {
+    display: flex;
+    justify-content: center;
+    .el-form-item__label {
+      display: flex;
+      align-items: center;
+    }
+    .el-form-item__content {
+      .el-input {
+        .el-input__inner {
+          width: 250px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 105 - 92
src/views/RMS/components/addMaterial.vue

@@ -2,36 +2,45 @@
   <!-- 添加物资信息 -->
   <div class="addWagonLoad">
     <PageTitle>返回</PageTitle>
-     <div class="form-box" style="margin-right: 10rem">
-        <dil-form :formId="326" v-model="form1" ref="from1"></dil-form>
-      </div>
-        <div class="form-box f1">
-          <el-form :inline="true" :model="formInline" class="demo-form-inline">
-  <div class="disableBox">
-  <el-form-item>
-    <el-input v-model="materialTypeName" disabled>  
-    </el-input>
-  </el-form-item>
-  <el-form-item>
-    <el-button type="primary" @click="drawer = true">物资种类</el-button>
-  </el-form-item>
-  </div>
-    </el-form>
+    <div class="form-box" style="margin-right: 10rem">
+      <dil-form :formId="326" v-model="form1" ref="from1"></dil-form>
+    </div>
+    <div class="form-box f1">
+      <el-form :inline="true" :model="formInline">
+        <div class="disableBox">
+          <el-form-item>
+            <el-input v-model="materialTypeName" disabled> </el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" @click="openDrawer">物资种类</el-button>
+          </el-form-item>
+        </div>
+      </el-form>
     </div>
-    <el-drawer
-      :visible.sync="drawer"
-      :direction="direction"
-      :before-close="handleClose">
+    <div class="eldrawer">
+      <el-drawer
+        :visible.sync="drawer"
+        :direction="direction"
+        :before-close="handleClose"
+      >
         <el-input
-            placeholder="请输入内容"
-            v-model="inputText"
-            clearable>
-          </el-input>
-          <el-button type="primary" class="btn" @click="onclick">
-            <i class="el-icon-search"></i>查询
-          </el-button>
-            <div><dilTable v-bind.sync="options" @radio-change="currentRadioChange" ></dilTable></div>
-</el-drawer>
+          placeholder="请输入内容"
+          v-model="inputText"
+          clearable
+          style="width:250px"
+        >
+        </el-input>
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <div>
+          <dilTable
+            v-bind.sync="options"
+            @radio-change="currentRadioChange"
+          ></dilTable>
+        </div>
+      </el-drawer>
+    </div>
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -48,58 +57,58 @@ export default {
     return {
       form1: {},
       drawer: false,
-      direction: 'rtl',
-      inputText:"",
-      materialTypeId:"",
-      options:{
-        requestUrl:"/api/v1/rms/getMaterialTypeList?apiId=376",
-        selectionType:"radio",
-        mapList:[]
-      }
+      direction: "rtl",
+      inputText: "",
+      materialTypeId: "",
+      materialTypeName: null,
+      options: {
+        requestUrl: "/api/v1/rms/getMaterialTypeList?apiId=376",
+        selectionType: "radio"
+      },
+      mapList: {}
     };
   },
   mounted() {},
   methods: {
-      currentRadioChange(selection){
-      this.mapList=selection,
+    currentRadioChange(selection) {
+      console.log(selection);
+      this.mapList = selection;
       this.materialTypeId = this.mapList.materialTypeId;
-      console.log(this.mapList)
-      this.materialTypeName=this.mapList.materialTypeName
+      console.log(this.mapList);
+      this.materialTypeName = this.mapList.materialTypeName;
+    },
+    openDrawer() {
+      this.options.requestUrl =
+        "/api/v1/rms/getMaterialTypeList?apiId=376&i=" + new Date();
+      this.drawer = true;
+      this.inputText = null;
     },
-    onclick(){
-      this.options.requestUrl="/api/v1/rms/getMaterialTypeList?apiId=376&con=" +this.inputText;
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/rms/getMaterialTypeList?apiId=376&con=" + this.inputText;
     },
-     makeSure() {  
-       
+    makeSure() {
       let RmsMaterial = {
-        materialName:this.form1.materialName,
-        materialSpecification:this.form1.materialSpecification,
-        materialModel:this.form1.materialModel,
-        materialTypeId:this.materialTypeId,
-        unitOfMeasureId:this.form1.unitOfMeasureId,
-        materialTheoreticalWeight:this.form1.materialTheoreticalWeight,
+        materialName: this.form1.materialName,
+        materialSpecification: this.form1.materialSpecification,
+        materialModel: this.form1.materialModel,
+        materialTypeId: this.materialTypeId,
+        unitOfMeasureId: this.form1.unitOfMeasureId,
+        materialTheoreticalWeight: this.form1.materialTheoreticalWeight
       };
-    if(
-        RmsMaterial.materialName==null
-      )this.$message.error("存在空值!");
+      if (RmsMaterial.materialName == null) this.$message.error("存在空值!");
       else
-      this.axios
-        .post(
-          "/api/v1/rms/insertMaterial",
-           RmsMaterial
-        )
-        .then((res) => {
+        this.axios.post("/api/v1/rms/insertMaterial", RmsMaterial).then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",
-              message: "新增成功!",
+              message: "新增成功!"
             });
             // this.$refs.table.refreshData();
             this.$router.go(-1);
-          }else if(res.data.code == '201'){
-            this.$message.warning("该物资已存在")
-          } 
-          else {
+          } else if (res.data.code == "201") {
+            this.$message.warning("该物资已存在");
+          } else {
             this.$message.error("新增失败");
           }
           //this.$refs['table'].resetField();
@@ -108,27 +117,27 @@ export default {
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
+    }
   },
-   handleClose(done) {
-        this.$confirm('确认关闭?')
-          .then(_ => {
-            done();
-          })
-          .catch(_ => {});
-      }
+  handleClose(done) {
+    this.$confirm("确认关闭?")
+      .then(_ => {
+        done();
+      })
+      .catch(_ => {});
+  }
 };
 </script>
-<style lang='scss' >
- .button-box{
-    display: flex;
-    justify-content: center;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
-    }
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  .el-button {
+    width: 80px;
+    margin-right: 10px;
   }
-.disableBox{
+}
+.disableBox {
   display: flex;
   text-align: center;
   align-items: center;
@@ -143,7 +152,7 @@ export default {
 .input {
   margin-left: 90px;
 }
-.common{
+.common {
   font-weight: 700;
   font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
     Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
@@ -151,35 +160,39 @@ export default {
   cursor: default;
   color: #2c3e50;
 }
-.f1{
+.f1 {
+  display: flex;
+  justify-content: center;
+  align-items: center;
   margin-top: -2.5rem;
   margin-left: 22.3rem;
 }
-.f11{
+.f11 {
   margin-top: -3rem;
   // margin-left: 29rem;
 }
-.f2{
+.f2 {
   margin-top: -2.5rem;
   margin-left: 20.7rem;
 }
-.f3{
+.f3 {
   margin-top: -2.5rem;
   margin-left: 25rem;
 }
-.form-box{
+.form-box {
   display: flex;
   justify-content: center;
-  .el-form-item{
+  align-items: center;
+  .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;
         }
       }

+ 36 - 44
src/views/RMS/components/addPort.vue

@@ -2,9 +2,9 @@
   <!-- 添加港口信息 -->
   <div class="addWagonLoad">
     <PageTitle>返回</PageTitle>
-     <div class="form-box" >
-        <dil-form :formId="271" v-model="form1" ref="from1"></dil-form>
-      </div>
+    <div class="form-box">
+      <dil-form :formId="271" v-model="form1" ref="from1"></dil-form>
+    </div>
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -18,78 +18,70 @@ export default {
   components: { PageTitle },
   data() {
     return {
-        portName:'',
+      portName: "",
       form1: {},
-      value: undefined,
+      value: undefined
     };
   },
   mounted() {},
-  methods: {                
-     makeSure() {
-        console.log(this.form1)
-    //   let RmsCapacity = {
-          
-    //   };
-       let RmsCapacity=this.form1;
-      console.log(RmsCapacity)
-      if (
-        RmsCapacity.portName==null||
-        RmsCapacity.portTypeId==null
-        
-      ) this.$message.error("存在空值!");
-      else 
-      this.axios
-        .post(
-          "/api/v1/rms/insertPort",
-           RmsCapacity
-        )
-        .then((res) => {
+  methods: {
+    makeSure() {
+      console.log(this.form1);
+      //   let RmsCapacity = {
+
+      //   };
+      let RmsCapacity = this.form1;
+      console.log(RmsCapacity);
+      if (RmsCapacity.portName == null || RmsCapacity.portTypeId == null)
+        this.$message.error("存在空值!");
+      else
+        this.axios.post("/api/v1/rms/insertPort", RmsCapacity).then(res => {
           if (res.data.code == 200) {
             this.$message({
               type: "success",
-              message: "新增成功!",
+              message: "新增成功!"
             });
             // this.$refs.table.refreshData();
             this.$router.go(-1);
           } else {
             this.$message.error("新增失败,可能存在重复!");
           }
-         // this.$refs['table'].resetField();
+          // this.$refs['table'].resetField();
         });
     },
     // 取消
     cancel() {
       this.$router.go(-1);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' >
- .button-box{
-    display: flex;
-    justify-content: center;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
-    }
+<style lang="scss">
+.button-box {
+  display: flex;
+  justify-content: center;
+  .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;
         }
       }
     }
   }
 }
-</style>
+</style>

+ 0 - 0
src/views/RMS/components/editInwardMaterial.vue


+ 90 - 55
src/views/RMS/components/editMaterial.vue

@@ -2,8 +2,7 @@
   <!-- 修改物资信息 -->
   <div id="contractDetails">
     <page-title>编辑</page-title>
-    <div class="main">
-    </div>
+    <div class="main"></div>
     <div class="contractTitle">
       <div class="form-box">
         <div class="form-one">
@@ -11,7 +10,37 @@
         </div>
       </div>
     </div>
-    
+    <div class="form-box f1">
+      <el-form :inline="true" :model="formInline">
+        <div class="disableBox">
+          <el-form-item>
+            <el-input v-model="materialTypeName" disabled> </el-input>
+          </el-form-item>
+          <el-form-item>
+            <el-button type="primary" @click="openDrawer">物资种类</el-button>
+          </el-form-item>
+        </div>
+      </el-form>
+    </div>
+    <div class="eldrawer">
+      <el-drawer
+        :visible.sync="drawer"
+        :direction="direction"
+        :before-close="handleClose"
+      >
+        <el-input placeholder="请输入内容" v-model="inputText" clearable>
+        </el-input>
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+        <div>
+          <dilTable
+            v-bind.sync="options"
+            @radio-change="currentRadioChange"
+          ></dilTable>
+        </div>
+      </el-drawer>
+    </div>
     <div class="button-box">
       <el-button @click="onClickCancel">返回</el-button>
       <el-button type="primary" @click="onClickConfirm">确认</el-button>
@@ -26,25 +55,41 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      inputText: null,
+      materialTypeId: null,
+      drawer: false,
       form1: {},
+      mapList: {},
+      materialTypeName: null,
+      options: {
+        requestUrl: "",
+        selectionType: "radio"
+      }
     };
   },
- 
+
   mounted() {
-      console.log(this.$route)
     this.information();
   },
-  methods: {  
+  methods: {
+    openDrawer() {
+      this.drawer = true;
+      this.options.requestUrl =
+        "/api/v1/rms/getMaterialTypeList?apiId=376&i=" + new Date();
+      this.inputText = null;
+    },
+    currentRadioChange(selection) {
+      this.mapList = selection;
+      this.materialTypeId = this.mapList.materialTypeId;
+      this.materialTypeName = this.mapList.materialTypeName;
+    },
     information() {
       //编辑
       this.axios
-        .post(
-          "/api/v1/rms/getMaterialById/" +
-            this.$route.params.materialId
-        )
-        .then((res) => {
-            console.log(res)
-          res.data.data.forEach((e) => {
+        .post("/api/v1/rms/getMaterialById/" + this.$route.params.materialId)
+        .then(res => {
+          console.log(res);
+          res.data.data.forEach(e => {
             this.form1 = e;
             console.log(e);
             console.log(this.form1);
@@ -56,54 +101,44 @@ export default {
     onClickCancel() {
       this.$router.go(-1);
     },
+    onclick() {
+      this.options.requestUrl =
+        "/api/v1/rms/getMaterialTypeList?apiId=376&con=" + this.inputText;
+    },
     // 确认
     onClickConfirm() {
-      console.log(this.form1)
+      console.log(this.form1);
       let RmsMaterial = {
-        materialId:this.form1.materialId,
-        materialCode:this.form1.materialCode,
-        materialName:this.form1.materialName,
-        materialSpecification:this.form1.materialSpecification,
-        materialModel:this.form1.materialModel,
-        materialTypeId:this.form1.materialTypeId,
-        unitOfMeasureId:this.form1.unitOfMeasureId,
-        materialTheoreticalWeight:this.form1.materialTheoreticalWeight,
+        materialId: this.form1.materialId,
+        materialCode: this.form1.materialCode,
+        materialName: this.form1.materialName,
+        materialSpecification: this.form1.materialSpecification,
+        materialModel: this.form1.materialModel,
+        materialTypeId: this.materialTypeId,
+        unitOfMeasureId: this.form1.unitOfMeasureId,
+        materialTheoreticalWeight: this.form1.materialTheoreticalWeight
       };
-         if(
-        RmsMaterial.materialCode==null ||
-        RmsMaterial.materialName==null ||
-        RmsMaterial.materialSpecification==null ||
-        RmsMaterial.materialModel==null ||
-        RmsMaterial.materialTypeId==null ||
-        RmsMaterial.unitOfMeasureId==null ||
-        RmsMaterial.materialTheoreticalWeight==null 
-      )this.$message.error("存在空值!");
-        this.axios
-          .post(
-            "/api/v1/rms/updateMaterial",
-            RmsMaterial
-          )
-          .then((res) => {
-            if (res.data.code == "200") {
-              this.$router.go(-1);
-            }
-          });
-    },
+      this.axios.post("/api/v1/rms/updateMaterial", RmsMaterial).then(res => {
+        if (res.data.code == "200") {
+          this.$router.go(-1);
+        }
+      });
+    }
   },
-    // 取消
-    cancel() {
-      this.$router.go(-1);
-    },
+  // 取消
+  cancel() {
+    this.$router.go(-1);
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .form-box,
- .button-box{
-    display: flex;
-    justify-content: center;
-    .el-button{
-      width: 80px;
-      margin-right: 10px;
-    }
+.button-box {
+  display: flex;
+  justify-content: center;
+  .el-button {
+    width: 80px;
+    margin-right: 10px;
   }
-</style>
+}
+</style>

+ 43 - 0
src/views/RMS/components/inwardContractMaterial.vue

@@ -0,0 +1,43 @@
+<template>
+  <div class="inwardContractMaterial">
+    <div class="top">
+      <el-input placeholder="请输入物资名称" clearable></el-input>
+      <el-button type="primary" @click="onclick">查询</el-button>
+      <el-button type="primary" @click="onInsert">新增</el-button>
+    </div>
+    <div class="table">
+      <dilTable v-bind.sync="option" ref="table"> </dilTable>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      option: {
+        requestUrl: "/api/v1/rms/getInwardContractMaterial?apiId=482"
+      }
+    };
+  },
+  methods: {
+    onInsert() {
+      this.$router.push("/addInwardContractMaterial");
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.inwardContractMaterial {
+  .top {
+    .el-input {
+      margin-top: 30px;
+      margin-left: 30px;
+      width: 250px;
+    }
+  }
+  .table {
+    margin-left: 30px;
+    margin-top: 30px;
+  }
+}
+</style>

+ 8 - 1
src/views/RMS/router/index.js

@@ -58,6 +58,10 @@ import showCapacity from '../components/showCapacity.vue'
 import transitRouteAdd from '../components/transitRouteAdd.vue'
 import truckCalculate from '../components/truckCalculate.vue'
 import consignee from '../components/consignee.vue'
+import inwardContractMaterial from '../components/inwardContractMaterial'
+import addInwardContractMaterial from '../components/addInwardContractMaterial.vue'
+import editInwardMaterial from '../components/editInwardMaterial.vue'
+
 Vue.use(Router)
 const constantRouterMap = [
 	{
@@ -118,7 +122,10 @@ const constantRouterMap = [
 		{path: 'transitRoute', name: 'transitRoute', meta: {code: 'xtpzgl-yhgl'}, component: transitRoute},
 		{path: 'transitRouteAdd/:addup', name: 'transitRouteAdd', meta: {code: 'xtpzgl-yhgl'}, component: transitRouteAdd},
 		{path: 'truckCalculate', name: 'truckCalculate', meta: {code: 'xtpzgl-yhgl'}, component: truckCalculate},
-		{path: 'consignee', name: 'consignee', meta: {code: 'xtpzgl-yhgl'}, component: consignee}
+		{path: 'consignee', name: 'consignee', meta: {code: 'xtpzgl-yhgl'}, component: consignee},
+		{path: 'inwardContractMaterial', name: 'inwardContractMaterial', meta: {code: 'xtpzgl-yhgl'}, component: inwardContractMaterial},
+		{path: 'addInwardContractMaterial', name: 'addInwardContractMaterial', meta: {code: 'xtpzgl-yhgl'}, component: addInwardContractMaterial},
+		{path: 'editInwardMaterial/:materialTypeId', name: 'editInwardMaterial', meta: {code: 'xtpzgl-yhgl'}, component: editInwardMaterial},	
 	  ]
 	}
   ];

+ 9 - 10
src/views/WMS/components/port_deposit/port_deposit_inbound.vue

@@ -46,8 +46,8 @@ export default {
       activeName: "first",
       option1: {
         // 表格请求数据的地址
-        requestUrl: "/api/v1/wmsh/getInBoundResult?apiId=157",
-      },
+        requestUrl: "/api/v1/wmsh/getInBoundResult?apiId=157"
+      }
     };
   },
   methods: {
@@ -66,12 +66,12 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "删除成功!",
+            message: "删除成功!"
           });
           // console.log(this.arr[0].text_prop);
           this.axios
@@ -83,7 +83,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
     },
@@ -93,13 +93,12 @@ export default {
     },
     //修改
     updateClick(resultId) {
-      console.log(resultId);
       this.$router.push("/port_deposit_inbound_edit/" + resultId);
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .homeworkPath {
   .top {
     padding: 1.25rem 0.375rem;
@@ -113,4 +112,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 64 - 59
src/views/appoint/components/inward/addTransPrice.vue

@@ -15,9 +15,11 @@
                 :value="item.value"
               ></el-option>
             </el-select>
-         </el-form-item>
-         <el-button type="primary" class="btnml" @click="materialDrawer">浏览物资</el-button>
-         </el-form>
+          </el-form-item>
+          <el-button type="primary" class="btnml" @click="materialDrawer"
+            >浏览物资</el-button
+          >
+        </el-form>
       </div>
       <div class="liulan">
         <el-button type="primary" class="btn" @click="oilPriceFormulaClick"
@@ -26,7 +28,7 @@
       </div>
       <div class="rangeStyle"></div>
     </div>
-     <!-- 物资表格 -->
+    <!-- 物资表格 -->
     <div class="selectionTable from">
       <el-table
         :data="selectionList"
@@ -98,7 +100,7 @@
         </vue-scroll>
       </div>
     </el-drawer>
-     <!-- 物资模态框 -->
+    <!-- 物资模态框 -->
     <el-drawer
       title="请选择物资"
       :visible.sync="drawerMaterial"
@@ -142,10 +144,10 @@ export default {
   data() {
     return {
       //物资模态框默认隐藏
-      drawerMaterial:false,
+      drawerMaterial: false,
       //物资查询框
-      materialText:null,
-      selectionList:[],
+      materialText: null,
+      selectionList: [],
       rangeId: null,
       //是否点击查询
       isKuang: false,
@@ -167,12 +169,12 @@ export default {
         selectionType: "radio"
       },
       options: [],
-      newsArr:[],
+      newsArr: [],
       //模态窗口的打开的方向
       direction: "rtl",
-      materialOptions:{
-          requestUrl:"",
-          selectionType: "select",
+      materialOptions: {
+        requestUrl: "",
+        selectionType: "select"
       },
       //表单数据
       form1: {
@@ -183,10 +185,10 @@ export default {
       tableTop: [
         {
           prop: "materialName",
-          label: "物资名称",
+          label: "物资名称"
         }
       ],
-      
+
       //提交给后端的数据
       // map:{},
       ops: {
@@ -207,7 +209,7 @@ export default {
   },
   mounted() {
     this.axios.get("/api/v1/uc/getTransRange").then(res => {
-      console.log(res.data.data)
+      console.log(res.data.data);
       this.options = res.data.data;
     });
   },
@@ -217,41 +219,45 @@ export default {
       this.isKuang = false;
       this.tableLoading = false;
     },
-    materialDrawer(){
-      this.drawerMaterial = true
-      this.materialOptions.requestUrl = "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date()
+    materialDrawer() {
+      this.drawerMaterial = true;
+      this.materialOptions.requestUrl =
+        "/api/v1/rms/getInwardContractMaterial?apiId=482&i=" + new Date();
     },
-    selectMaterial(){
-      if(this.materialText == null){
-          this.materialOptions.requestUrl = "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date()
-      }else{
-          this.materialOptions.requestUrl = "/api/v1/uc/queryMaterialByLike?apiId=244&index=" + this.materialText
+    selectMaterial() {
+      if (this.materialText == null) {
+        this.materialOptions.requestUrl =
+          "/api/v1/uc/queryMaterialByLike?apiId=244&i=" + new Date();
+      } else {
+        this.materialOptions.requestUrl =
+          "/api/v1/rms/getInwardContractMaterial?apiId=482&con=" +
+          this.materialText;
       }
     },
-    addMaterialList(){
-      this.drawerMaterial = false
-      this.newsArr.forEach((e) => {
-          console.log((e.materialName))
-          var addmap = {
-              materialName:e.materialName,
-              materialId:e.materialId
-          }
-          this.selectionList.push(addmap)
-      })
-      console.log(this.selectionList)
-      this.newsArr = []
+    addMaterialList() {
+      this.drawerMaterial = false;
+      this.newsArr.forEach(e => {
+        console.log(e.materialName);
+        var addmap = {
+          materialName: e.materialName,
+          materialId: e.materialId
+        };
+        this.selectionList.push(addmap);
+      });
+      console.log(this.selectionList);
+      this.newsArr = [];
     },
-     //点击删除按钮删除当前点击的对象
-    deleteRow(index){
-      this.selectionList.splice(index,1)
+    //点击删除按钮删除当前点击的对象
+    deleteRow(index) {
+      this.selectionList.splice(index, 1);
     },
-    selectionChange(selection){
-        console.log(selection)
-        for (let i = 0; i < selection.length; i++) {
-        if(this.newsArr.indexOf(selection[i]) === -1){
-        this.newsArr.push(selection[i]);
-        }
+    selectionChange(selection) {
+      console.log(selection);
+      for (let i = 0; i < selection.length; i++) {
+        if (this.newsArr.indexOf(selection[i]) === -1) {
+          this.newsArr.push(selection[i]);
         }
+      }
     },
     selectLineClick() {
       this.tableLoading = true;
@@ -308,20 +314,18 @@ export default {
         oilpriceBase: this.form1.oilpriceBase,
         oilTypeId: this.form1.oilTypeId,
         oilpriceChangeThreshold: this.form1.oilpriceChangeThreshold,
-        rangeId:this.rangeId,
-        mapList:this.selectionList
+        rangeId: this.rangeId,
+        mapList: this.selectionList
       };
-      this.axios
-        .post("/api/v1/ams/insertInwardPrice", mapValue)
-        .then(res => {
-          if (res.data.code == "200") {
-            this.$router.go(-1);
-          }
-          this.$message({
-            type: "success",
-            message: "新增运输单价成功!"
-          });
+      this.axios.post("/api/v1/ams/insertInwardPrice", mapValue).then(res => {
+        if (res.data.code == "200") {
+          this.$router.go(-1);
+        }
+        this.$message({
+          type: "success",
+          message: "新增运输单价成功!"
         });
+      });
     },
     // 取消
     cancel() {
@@ -388,9 +392,10 @@ export default {
     margin-top: 10px;
   }
   .btnml {
-      width: 250px;
-      margin-left: 50px;
-  }}
+    width: 250px;
+    margin-left: 50px;
+  }
+}
 </style>
 <style lang="scss">
 /deep/.__bar-is-vertical {

+ 51 - 33
src/views/appoint/components/inward/transPrice.vue

@@ -9,22 +9,36 @@
       <el-button type="primary" @click="btnclick(0)">
         <i class="el-icon-plus"></i>新增
       </el-button>
-       <el-button type="primary" @click="exportData()"><i class="el-icon-download"></i>导出(Excel)</el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
     </div>
-
-<el-tabs v-model="activeName">
-      <!-- 正在启用 -->
-       <el-tab-pane label="正在启用" name="first">
-          <dilTable ref="excelDom" v-bind.sync="option" :loading="loading" :isKuang="isKuang" @func="func">
-        </dilTable>
-      </el-tab-pane>
-      <!-- 历史启用 -->
-      <el-tab-pane label="历史启用" name="second">
-          <dilTable ref="excelDom" v-bind.sync="option2" :loading="loading" :isKuang="isKuang" @func="func">
+    <div class="table">
+      <el-tabs v-model="activeName">
+        <!-- 正在启用 -->
+        <el-tab-pane label="正在启用" name="first">
+          <dilTable
+            ref="excelDom"
+            v-bind.sync="option"
+            :loading="loading"
+            :isKuang="isKuang"
+            @func="func"
+          >
           </dilTable>
-      </el-tab-pane>
-      
-    </el-tabs>
+        </el-tab-pane>
+        <!-- 历史启用 -->
+        <el-tab-pane label="历史启用" name="second">
+          <dilTable
+            ref="excelDom"
+            v-bind.sync="option2"
+            :loading="loading"
+            :isKuang="isKuang"
+            @func="func"
+          >
+          </dilTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
   </div>
 </template>
 <script>
@@ -33,51 +47,55 @@ export default {
   data() {
     return {
       activeName: "first",
-      isKuang:false,
-      loading:false,
+      isKuang: false,
+      loading: false,
       input: "",
       option: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0",
+        requestUrl: "/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0"
       },
       option2: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getInwardContractPrice?apiId=464&deleted=1",
+        requestUrl: "/api/v1/ams/getInwardContractPrice?apiId=464&deleted=1"
       },
-      tableTitle:'汽运单价'
+      tableTitle: "汽运单价"
     };
   },
   methods: {
-    func(){
+    func() {
       this.loading = false;
       this.isKuang = false;
     },
     onclick() {
       this.loading = true;
       this.isKuang = true;
-      if(this.input){
-        this.option.requestUrl ="/api/v1/ams/getInwardContractPrice?apiId=464&con=" +this.input;
-      }else{
-        this.option.requestUrl ="/api/v1/ams/getInwardContractPrice?apiId=464&i="+new Date();
+      if (this.input) {
+        this.option.requestUrl =
+          "/api/v1/ams/getInwardContractPrice?apiId=464&con=" + this.input;
+      } else {
+        this.option.requestUrl =
+          "/api/v1/ams/getInwardContractPrice?apiId=464&i=" + new Date();
       }
     },
     btnclick() {
       this.$router.push("/inwardAddTransPrice");
-    },
-  },
-  
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .salePlan {
-  .top{
-    padding: 1.25rem 0.375rem;
+  .top {
+    margin-left: 20px;
+    margin-top: 20px;
     .el-input {
       width: 20%;
       margin-right: 1.25rem;
     }
   }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
 }
-</style>
+</style>

+ 52 - 12
src/views/appoint/components/saleContract/addSaleOrder.vue

@@ -122,13 +122,6 @@
           >收货客户电话</label
         >
       </el-form-item>
-      <!-- <el-form-item>
-        <label
-          class="el-form-item__label"
-          style="width: auto;margin-top: 0.4rem;color:red"
-          >(注:不填无法收到发货短信)</label
-        >
-      </el-form-item> -->
       <el-form-item>
         <el-input
           style="width: 150px"
@@ -314,6 +307,7 @@
                   v-if="scope.row.haveMeter == 1"
                   class="textinput"
                   v-model.number="scope.row.meterNumber"
+                  :disabled="scope.row.isDisable == 1"
                 ></el-input>
               </template>
               <!-- 是否磅重销售 -->
@@ -1110,7 +1104,7 @@ export default {
               Specification: e.materialSpecification + e.materialModel,
               materialCode: e.materialCode,
               orderPlanWeight: null,
-              meterNumber: e.materialName.replace(/[^0-9]/gi, ""),
+              meterNumber: Number(e.materialName.replace(/[^0-9]/gi, "")),
               isPound: getisPound,
               //物资Id
               materialId: e.materialId,
@@ -1165,6 +1159,28 @@ export default {
     },
     //准备生成部分订单
     createACar() {
+      let i = 0;
+      this.materialList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.meterNumber) && e.meterNumber != null) {
+          e.meterNumber = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        i = 0;
+        this.$message.error("米数请输入正整数");
+        return;
+      }
+      this.materialList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
+          e.orderPlanWeight = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        this.$message.error("件数必填且请输入正整数");
+        return;
+      }
       if (
         !this.saleOrderConsigneeTel &&
         this.ignoreSaleOrderConsigneeTel == 0
@@ -1191,7 +1207,7 @@ export default {
     },
     //添加物资到订单
     addMaterialToSaleOrder() {
-      debugger;
+      console.log(this.materialList);
       if (this.materialList.length == 0) {
         this.$message.warning("请至少为这一车添加一个物资!");
       } else if (!this.saleShipperAddressName && this.values == "no") {
@@ -1220,7 +1236,8 @@ export default {
               saleOrderConsigneeTel: this.saleOrderConsigneeTel,
               truckRemark: this.truckRemark,
               materialId: e.materialId,
-              haveMeter: e.haveMeter
+              haveMeter: e.haveMeter,
+              isDisable: e.isDisable
             };
             this.selectionList.push(addmap);
             //最大车序号加1
@@ -1250,9 +1267,11 @@ export default {
             saleOrderConsigneeTel: this.saleOrderConsigneeTel,
             truckRemark: this.truckRemark,
             materialId: e.materialId,
-            haveMeter: e.haveMeter
+            haveMeter: e.haveMeter,
+            isDisable: e.isDisable
           };
           this.selectionList.push(addmap);
+          console.log(this.selectionList);
         });
         //清空materialList
         this.materialList = [];
@@ -1528,11 +1547,32 @@ export default {
     },
     // 确定
     makeSure() {
-      console.log(this.selectionList.length);
       if (this.selectionList.length == 0) {
         this.$message.warning("请先填写具体信息");
         return;
       }
+      let i = 0;
+      this.selectionList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.meterNumber) && e.meterNumber != null) {
+          e.meterNumber = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        i = 0;
+        this.$message.error("米数请输入正整数");
+        return;
+      }
+      this.selectionList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
+          e.orderPlanWeight = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        this.$message.error("件数必填且请输入正整数");
+        return;
+      }
       //获取是否自提字段
       this.options.forEach(e => {
         if (this.values == e.values) {

+ 151 - 35
src/views/appoint/components/saleContract/editSaleOrder.vue

@@ -184,6 +184,7 @@
                   v-if="scope.row.haveMeter == 1"
                   class="textinput111"
                   v-model.number="scope.row.meterNumber"
+                  :disabled="scope.row.isDisable == 1"
                   placeholder="(必填)"
                 ></el-input>
               </template>
@@ -313,6 +314,7 @@
                   v-if="scope.row.haveMeter == 1"
                   class="textinput"
                   v-model.number="scope.row.meterNumber"
+                  :disabled="scope.row.isDisable == 1"
                 ></el-input>
               </template>
               <!-- 是否磅重销售 -->
@@ -920,23 +922,46 @@ export default {
             } else {
               haveMeter = 0;
             }
-            var addmap = {
-              cxh: e.truckNo,
-              materialName: e.materialName,
-              Specification: e.Specification,
-              materialCode: e.materialCode,
-              orderPlanWeight: e.materialNumber,
-              meterNumber: e.steelMeters,
-              isPound: e.isPoundSale,
-              saleShipperAddressId: e.shipperAddressId,
-              place: e.place,
-              saleShipperAddressName: e.saleShipperAddressName + e.place,
-              saleDateOfReceipt: e.saleDateOfReceipt,
-              saleOrderConsigneeTel: e.saleOrderConsigneeTel,
-              materialId: e.materialId,
-              truckRemark: e.truckRemark,
-              haveMeter: haveMeter
-            };
+            if (e.materialName.includes("米")) {
+              var addmap = {
+                cxh: e.truckNo,
+                materialName: e.materialName,
+                Specification: e.Specification,
+                materialCode: e.materialCode,
+                orderPlanWeight: e.materialNumber,
+                isPound: e.isPoundSale,
+                saleShipperAddressId: e.shipperAddressId,
+                place: e.place,
+                saleShipperAddressName: e.saleShipperAddressName + e.place,
+                saleDateOfReceipt: e.saleDateOfReceipt,
+                saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+                materialId: e.materialId,
+                truckRemark: e.truckRemark,
+                haveMeter: haveMeter,
+                meterNumber: Number(e.materialName.replace(/[^0-9]/gi, "")),
+                //有米数
+                haveMeter: 1,
+                isDisable: 1
+              };
+            } else {
+              var addmap = {
+                cxh: e.truckNo,
+                materialName: e.materialName,
+                Specification: e.Specification,
+                materialCode: e.materialCode,
+                orderPlanWeight: e.materialNumber,
+                meterNumber: e.steelMeters,
+                isPound: e.isPoundSale,
+                saleShipperAddressId: e.shipperAddressId,
+                place: e.place,
+                saleShipperAddressName: e.saleShipperAddressName + e.place,
+                saleDateOfReceipt: e.saleDateOfReceipt,
+                saleOrderConsigneeTel: e.saleOrderConsigneeTel,
+                materialId: e.materialId,
+                truckRemark: e.truckRemark,
+                haveMeter: haveMeter
+              };
+            }
             this.selectionList.push(addmap);
           });
           //调用记录每一行的合并数的方法
@@ -1111,7 +1136,9 @@ export default {
         //判断物资是否为盘螺或非定尺
         if (
           e.materialName.includes("盘螺") ||
-          e.materialName.includes("乱尺")
+          e.materialName.includes("乱尺") ||
+          e.materialName.includes("盘元") ||
+          e.materialName.includes("盘圆")
         ) {
           getisPound = 0;
         } else {
@@ -1136,18 +1163,35 @@ export default {
             haveMeter: 0
           };
         } else {
-          var addmap = {
-            materialName: e.materialName,
-            Specification: e.materialSpecification + e.materialModel,
-            materialCode: e.materialCode,
-            orderPlanWeight: null,
-            meterNumber: null,
-            isPound: getisPound,
-            //物资Id
-            materialId: e.materialId,
-            //有米数
-            haveMeter: 1
-          };
+          if (e.materialName.includes("米")) {
+            console.log(e.materialName.replace(/[^0-9]/gi, ""));
+            var addmap = {
+              materialName: e.materialName,
+              Specification: e.materialSpecification + e.materialModel,
+              materialCode: e.materialCode,
+              orderPlanWeight: null,
+              meterNumber: Number(e.materialName.replace(/[^0-9]/gi, "")),
+              isPound: getisPound,
+              //物资Id
+              materialId: e.materialId,
+              //有米数
+              haveMeter: 1,
+              isDisable: 1
+            };
+          } else {
+            var addmap = {
+              materialName: e.materialName,
+              Specification: e.materialSpecification + e.materialModel,
+              materialCode: e.materialCode,
+              orderPlanWeight: null,
+              meterNumber: null,
+              isPound: getisPound,
+              //物资Id
+              materialId: e.materialId,
+              //有米数
+              haveMeter: 1
+            };
+          }
         }
         this.materialList.push(addmap);
       });
@@ -1181,6 +1225,28 @@ export default {
     },
     //准备生成部分订单
     createACar() {
+      let i = 0;
+      this.materialList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.meterNumber) && e.meterNumber != null) {
+          e.meterNumber = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        i = 0;
+        this.$message.error("米数请输入正整数");
+        return;
+      }
+      this.materialList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
+          e.orderPlanWeight = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        this.$message.error("件数必填且请输入正整数");
+        return;
+      }
       if (
         !this.saleOrderConsigneeTel &&
         this.ignoreSaleOrderConsigneeTel == 0
@@ -1234,7 +1300,8 @@ export default {
               saleDateOfReceipt: this.saleDateOfReceipt,
               saleOrderConsigneeTel: this.saleOrderConsigneeTel,
               materialId: e.materialId,
-              haveMeter: e.haveMeter
+              haveMeter: e.haveMeter,
+              isDisable: e.isDisable
             };
             this.selectionList.push(addmap);
             //最大车序号加1
@@ -1263,7 +1330,8 @@ export default {
             saleDateOfReceipt: this.saleDateOfReceipt,
             saleOrderConsigneeTel: this.saleOrderConsigneeTel,
             materialId: e.materialId,
-            haveMeter: e.haveMeter
+            haveMeter: e.haveMeter,
+            isDisable: e.isDisable
           };
           this.selectionList.push(addmap);
         });
@@ -1286,6 +1354,28 @@ export default {
     },
     //添加物资到某个车序号
     addMaterialToCxh(toCxh) {
+      let i = 0;
+      this.materialList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.meterNumber) && e.meterNumber != null) {
+          e.meterNumber = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        i = 0;
+        this.$message.error("米数请输入正整数");
+        return;
+      }
+      this.materialList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
+          e.orderPlanWeight = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        this.$message.error("件数必填且请输入正整数");
+        return;
+      }
       if (this.materialList.length == 0) {
         this.$message.warning("请至少为这车序号添加一个物资!");
       } else {
@@ -1322,7 +1412,8 @@ export default {
                   saleOrderConsigneeTel: this.selectionList[index - 1]
                     .saleOrderConsigneeTel,
                   materialId: e.materialId,
-                  haveMeter: e.haveMeter
+                  haveMeter: e.haveMeter,
+                  isDisable: e.isDisable
                 };
                 this.selectionList.push(addmap);
               });
@@ -1358,7 +1449,8 @@ export default {
               saleOrderConsigneeTel:
                 arr[this.selectionList.length - 1].saleOrderConsigneeTel,
               materialId: e.materialId,
-              haveMeter: e.haveMeter
+              haveMeter: e.haveMeter,
+              isDisable: e.isDisable
             };
             this.selectionList.push(addmap);
           });
@@ -1407,7 +1499,9 @@ export default {
         //判断物资是否为盘螺或非定尺
         if (
           this.selectedMaterialName.includes("盘螺") ||
-          this.selectedMaterialName.includes("乱尺")
+          this.selectedMaterialName.includes("乱尺") ||
+          this.selectedMaterialName.includes("盘元") ||
+          this.selectedMaterialName.includes("盘圆")
         ) {
           getisPound = 0;
         } else {
@@ -1633,6 +1727,28 @@ export default {
         this.$message.warning("请先填写具体信息");
         return;
       }
+      let i = 0;
+      this.selectionList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.meterNumber) && e.meterNumber != null) {
+          e.meterNumber = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        i = 0;
+        this.$message.error("米数请输入正整数");
+        return;
+      }
+      this.selectionList.forEach(e => {
+        if (!/(^[1-9]\d*$)/.test(e.orderPlanWeight)) {
+          e.orderPlanWeight = null;
+          i++;
+        }
+      });
+      if (i != 0) {
+        this.$message.error("件数必填且请输入正整数");
+        return;
+      }
       //获取是否自提字段
       this.options.forEach(e => {
         if (this.values == e.values) {

+ 45 - 75
src/views/appoint/components/saleContract/saleCokeInward.vue

@@ -12,26 +12,31 @@
     </div>
     <el-tabs v-model="activeName" @tab-click="handleClick">
       <!-- 已审批 -->
-       <!-- <el-tab-pane name="four"> -->
-        <dilTable v-bind.sync="option4" ref="table">
-          <el-table-column fixed="right" label="操作" width="120">
-            <template slot-scope="scope">
-              <el-button
-                @click="sendClick(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >派车</el-button
-              >
-              <el-button
-                @click="closeOrder(scope.row.saleOrderId)"
-                type="text"
-                size="small"
-                >关闭订单</el-button
-              >
-            </template>
-          </el-table-column>
-
-        </dilTable>
+      <!-- <el-tab-pane name="four"> -->
+      <dilTable v-bind.sync="option4" ref="table">
+        <el-table-column fixed="right" label="操作" width="180">
+          <template slot-scope="scope">
+            <el-button
+              @click="sendClick(scope.row.saleOrderId)"
+              type="text"
+              size="small"
+              >派车</el-button
+            >
+            <el-button
+              @click="closeOrder(scope.row.saleOrderId)"
+              type="text"
+              size="small"
+              >关闭订单</el-button
+            >
+            <el-button
+              @click="getOrderDetails(scope.row.saleOrderId)"
+              type="text"
+              size="small"
+              >运单</el-button
+            >
+          </template>
+        </el-table-column>
+      </dilTable>
       <!-- </el-tab-pane> -->
     </el-tabs>
   </div>
@@ -45,61 +50,29 @@ export default {
       input: "",
       option4: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getCokeSaleOrderList?apiId=409",
+        requestUrl: "/api/v1/ams/getCokeSaleOrderList?apiId=409"
       },
-      
-      //记录旧的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: [],
+      tableData: []
     };
   },
-//   created(){
-//       验证订单是否关闭
-      
-//       this.axios.post("/api/v1/ams/getCokeSaleOrderList?apiId=409")
-//       .then((res)=>{
-//           res.data.data.list.
-//           console.log("res",res)
-//           console.log("res111",res.data.data.list[0])
-//       })
-//   },
   methods: {
-    refresh(){
-      this.$router.go(0);
+    getOrderDetails(saleOrderId) {
+      console.log(saleOrderId);
+      this.$router.push("saleOrderOODetails/" + saleOrderId);
+    },
+    refresh() {
+      this.option4.requestUrl =
+        "/api/v1/ams/getCokeSaleOrderList?apiId=409&i=" + new Date();
     },
     handleClick(tab, event) {
       console.log(tab, event);
     },
     onclick() {
-        this.option4.requestUrl = "/api/v1/ams/getCokeSaleOrderList?apiId=409&con="+this.input;      
+      this.option4.requestUrl =
+        "/api/v1/ams/getCokeSaleOrderList?apiId=409&con=" + this.input;
     },
-    sendClick(saleOrderId){
+    sendClick(saleOrderId) {
       this.$router.push("/addSaleCokeSend/" + saleOrderId);
     },
     closeOrder(saleOrderId) {
@@ -107,18 +80,15 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.$message({
             type: "success",
-            message: "关闭成功!",
+            message: "关闭成功!"
           });
           this.axios
-            .post(
-              "/api/v1/ams/closeSaleOrder?saleOrderId=" +
-                saleOrderId
-            )
+            .post("/api/v1/ams/closeSaleOrder?saleOrderId=" + saleOrderId)
             .then(() => {
               this.$router.go(0);
             });
@@ -126,14 +96,14 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消关闭!",
+            message: "取消关闭!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
-<style lang='scss' scoped>
+<style lang="scss" scoped>
 .salePlan {
   .top {
     padding: 1.25rem 0.375rem;
@@ -143,4 +113,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 45 - 302
src/views/appoint/components/saleContract/saleOrderCoproduct.vue

@@ -13,52 +13,35 @@
         <i class="el-icon-refresh"></i>刷新
       </el-button>
     </div>
-    <el-tabs v-model="activeName" @tab-click="handleClick">
-      <!-- 已审批 -->
-      <el-tab-pane label="已审批" name="four">
-        <mergeRowTable
-          v-bind.sync="option4"
-          @selection-change="selectionChange"
-          ref="table"
-        >
-          <el-table-column fixed="right" label="操作" width="200">
-            <template slot-scope="scope">
-              <el-button
-                @click="coproductSendClick(scope.row.saleOrderId)"
-                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>
-        </mergeRowTable>
-      </el-tab-pane>
-    </el-tabs>
+    <div class="table">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
+        <!-- 已审批 -->
+        <el-tab-pane label="已审批" name="four">
+          <mergeRowTable
+            v-bind.sync="option4"
+            @selection-change="selectionChange"
+            ref="table"
+          >
+            <el-table-column fixed="right" label="操作" width="120">
+              <template slot-scope="scope">
+                <el-button
+                  @click="coproductSendClick(scope.row.saleOrderId)"
+                  type="text"
+                  size="small"
+                  >副产品派车</el-button
+                >
+                <el-button
+                  @click="checkSaleOrderDetails(scope.row.saleOrderId)"
+                  type="text"
+                  size="small"
+                  >运单</el-button
+                >
+              </template>
+            </el-table-column>
+          </mergeRowTable>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
     <!-- 承运商模态框 -->
     <el-drawer
       title="选择承运商"
@@ -107,22 +90,9 @@ export default {
       index: "",
       carrierId: null,
       carrierName: null,
-      option: {
-        // 表格请求数据的地址
-        requestUrl: "/api/v1/ams/getSaleOrderInfoes?apiId=408"
-      },
-      option2: {
-        // 表格请求数据的地址
-        requestUrl: "/api/v1/ams/getSaleOrderReportedes?apiId=408"
-      },
-      option3: {
-        // 表格请求数据的地址
-        requestUrl: "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409"
-      },
       option4: {
         // 表格请求数据的地址
-        requestUrl:
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1",
+        requestUrl: "/api/v1/ams/getFuSaleOrderList?apiId=481",
         selectionType: "select",
         comparison: "saleNumber",
         columnIndexs: [0, 1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 14, 15]
@@ -132,74 +102,23 @@ export default {
         selectionType: "radio"
       },
       mapList: [],
-      mapItemList: [],
-      //记录旧的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: []
+      mapItemList: []
     };
   },
   methods: {
-    refresh() {
-      this.$router.go(0);
+    checkSaleOrderDetails(saleOrderId) {
+      console.log(saleOrderId);
+      this.$router.push("saleOrderOODetails/" + saleOrderId);
     },
-    handleClick(tab, event) {
-      console.log(tab, event);
+    refresh() {
+      this.option4.requestUrl =
+        "/api/v1/ams/getFuSaleOrderList?apiId=481&i=" + new Date();
     },
+    handleClick(tab, event) {},
     onclick() {
-      if (this.activeName == "first") {
-        this.option.requestUrl =
-          "/api/v1/ams/getSaleOrderInfoes?apiId=408&con=" + this.input;
-      } else if (this.activeName == "second") {
-        this.option2.requestUrl =
-          "/api/v1/ams/getSaleOrderReportedes?apiId=408&con=" + this.input;
-      } else if (this.activeName == "four") {
-        this.option4.requestUrl =
-          "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=" +
-          this.input;
-      }
+      this.option4.requestUrl =
+        "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409&shipperId=1&con=" +
+        this.input;
     },
     //模糊查询承运商
     onclickCarrier() {
@@ -280,186 +199,6 @@ export default {
     },
     coproductSendClick(saleOrderId) {
       this.$router.push("/addSaleOrderCoproductSend/" + 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("是否上传", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true
-      })
-        .then(() => {
-          this.$message({
-            type: "success",
-            message: "上传成功!"
-          });
-          this.axios
-            .post("/api/v1/ams/uploadSaleOrder?saleOrderId=" + saleOrderId)
-            .then(() => {
-              this.$router.go(0);
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "取消上传!"
-          });
-        });
-    },
-    //删除
-    deleteclick(scope) {
-      let saleOrderId = scope;
-      this.$confirm("是否删除", "提示", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning",
-        center: true
-      })
-        .then(() => {
-          this.$message({
-            type: "success",
-            message: "删除成功!"
-          });
-          this.axios
-            .post(
-              "/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
-                saleOrderId
-            )
-            .then(() => {
-              this.$router.go(0);
-            });
-        })
-        .catch(() => {
-          this.$message({
-            type: "info",
-            message: "取消删除!"
-          });
-        });
     }
   }
 };
@@ -473,5 +212,9 @@ export default {
       margin-right: 1.25rem;
     }
   }
+  .table {
+    margin-left: 20px;
+    margin-top: 20px;
+  }
 }
 </style>

+ 279 - 0
src/views/appoint/components/saleContract/saleOrderOODetails.vue

@@ -0,0 +1,279 @@
+//运输派单
+<template>
+  <div class="transportOrder">
+    <div class="transportOrder_top">
+      <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="back">
+        <i class="el-icon-back"></i>返回
+      </el-button>
+    </div>
+    <div>
+      <el-dialog
+        title="车辆信息"
+        :visible.sync="dialogTableVisible"
+        :before-close="handleClose"
+      >
+        <el-input style="width:250px" v-model="truckText"></el-input>
+        <el-button type="primary" @click="getCapacity">查询</el-button>
+        <dilTable
+          v-bind.sync="truck"
+          @radio-change="currentRadioChange1"
+        ></dilTable>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogTableVisible = false">取 消</el-button>
+          <el-button type="primary" @click="updateTruckCapacity()"
+            >确 定</el-button
+          >
+        </span>
+      </el-dialog>
+    </div>
+
+    <div class="table">
+      <mergeRowTable v-bind.sync="first" ref="table">
+        <el-table-column fixed="right" label="操作" width="120">
+          <template slot-scope="scope">
+            <el-button
+              @click="updateClick(scope)"
+              type="text"
+              size="small"
+              v-if="
+                scope.row.carStatus == '未接单' ||
+                  scope.row.carStatus == '未进厂'
+              "
+            >
+              修改
+            </el-button>
+            <el-button
+              @click="deleteClick(scope)"
+              type="text"
+              size="small"
+              v-if="
+                scope.row.carStatus == '未接单' ||
+                  scope.row.carStatus == '未进厂'
+              "
+            >
+              关闭
+            </el-button>
+          </template>
+        </el-table-column>
+      </mergeRowTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getCookie } from "@/utils/util.js";
+export default {
+  data() {
+    return {
+      carrierUserId: "",
+      //模态窗的框计算
+      inputText: null,
+      //车辆输入框
+      truckText: null,
+      //是否弹出对话框
+      dialogTableVisible: false,
+      //输入框的值
+      input: "",
+      //选项卡的当前选中的值
+      activeName: "first",
+      //已下发的表格
+      first: {
+        requestUrl: "",
+        comparison: "orderNumber",
+        orderNumber: [0, 1]
+      },
+      //车辆信息的表格
+      truck: {
+        requestUrl: "",
+        // 控制显示当选列
+        selectionType: "radio"
+      },
+      //当前选中的订单id
+      selectOrderId: null,
+      //选中的车辆号
+      capacityNumber: "",
+      //选中的运力id
+      capacityId: null,
+      //是否关闭模态框
+      drawer: false,
+      //模态框从左往右打开
+      direction: "rtl",
+      orderId: null,
+      //区别点击的是添加运力,还是修改
+      index: null
+    };
+  },
+  created() {
+    this.truck.requestUrl = "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429";
+    this.first.requestUrl =
+      "/api/v1/oms/getDriverInfoForSale2?apiId=484&orderStatus=4" +
+      "&saleOrderId=" +
+      this.$route.params.saleOrderId;
+  },
+  methods: {
+    onclick() {
+      this.first.requestUrl =
+        "/api/v1/oms/getDriverInfoForSale2?apiId=484&orderStatus=4" +
+        "&saleOrderId=" +
+        this.$route.params.saleOrderId +
+        "&con=" +
+        this.input +
+        "&i=" +
+        new Date();
+    },
+    back() {
+      this.$router.go(-1);
+    },
+    handleClose(done) {
+      done();
+      this.$message.info("取消修改运力");
+    },
+    getRequestUrl() {
+      this.first.requestUrl =
+        "/api/v1/oms/getDriverInfoForSale2?apiId=484&orderStatus=4" +
+        "&saleOrderId=" +
+        this.$route.params.saleOrderId +
+        "&i=" +
+        new Date();
+    },
+    getTruckRequestUrl() {
+      this.truck.requestUrl =
+        "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+        null +
+        "&i=" +
+        new Date();
+    },
+    currentRadioChange1(row) {
+      console.log(row);
+      this.capacityId = row.capacityId;
+    },
+    //删除运输订单
+    deleteClick(scope) {
+      this.$confirm("是否删除?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.axios
+            .post("/api/v1/oms/closeOmstruckOrder?orderId=" + scope.row.orderId)
+            .then(res => {
+              if (res.data.code == 200) {
+                this.$message({
+                  type: "success",
+                  message: "删除成功!"
+                });
+                this.getRequestUrl();
+              } else {
+                this.$message({
+                  message: "删除失败",
+                  type: "warning"
+                });
+              }
+            });
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除"
+          });
+        });
+    },
+    //修改运输订单
+    updateClick(scope) {
+      this.getTruckRequestUrl();
+      this.orderId = scope.row.orderId;
+      this.dialogTableVisible = true;
+      console.log(scope.row.orderId);
+    },
+    updateTruckCapacity() {
+      if (this.capacityId == null) {
+        this.$message.error("未选中运力");
+        return;
+      }
+      this.axios
+        .post("/api/v1/oms/updateCapacityId", {
+          capacityId: this.capacityId,
+          orderId: this.orderId
+        })
+        .then(res => {
+          if (res.data.code == "200") {
+            this.$message.success("修改运力成功");
+            this.getRequestUrl();
+            this.dialogTableVisible = false;
+          } else {
+            this.$message.error("修改运力失败");
+          }
+        });
+    },
+    handleClick(tab, event) {
+      this.getRequestUrl();
+    },
+    Insert() {
+      this.$router.push("addOldSporadicOrder");
+    },
+    getCapacity() {
+      if (this.truckText != null) {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            getCookie("userId") +
+            "&index=" +
+            this.truckText;
+        } else {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            null +
+            "&index=" +
+            this.truckText;
+        }
+        this.truckText = null;
+      } else {
+        if (getCookie("orgCode") == "chengyunshang") {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            getCookie("userId") +
+            "&i=" +
+            new Date();
+        } else {
+          this.truck.requestUrl =
+            "/api/v1/uc/getAllCapacityByCarrierLike?apiId=429&carrierSsoId=" +
+            null +
+            "&i=" +
+            new Date();
+        }
+      }
+    }
+  }
+};
+</script>
+
+<style lang="scss">
+.transportOrder {
+  .transportOrder_top {
+    width: 100%;
+    height: 100px;
+    display: flex;
+    align-items: center;
+    padding-left: 50px;
+    .el-input {
+      width: 20%;
+    }
+  }
+  .drawer_top {
+    width: 100%;
+    height: 50px;
+    padding-left: 20px;
+    display: flex;
+    align-items: center;
+  }
+  .table {
+    margin-left: 30px;
+    margin-top: 10px;
+  }
+}
+</style>

+ 46 - 62
src/views/appoint/components/saleContract/saleOrderSteel.vue

@@ -59,7 +59,29 @@
       </el-tab-pane>
       <!-- 已审批 -->
       <el-tab-pane label="已审批" name="four">
-        <mergeRowTable v-bind.sync="option4" ref="table"> </mergeRowTable>
+        <mergeRowTable v-bind.sync="option4" ref="table">
+          <el-table-column
+            fixed="right"
+            label="操作"
+            align="center"
+            width="200"
+          >
+            <template slot-scope="scope">
+              <el-button
+                @click="getOrderDetails(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >运单</el-button
+              >
+              <el-button
+                @click="updateSaleOrder(scope.row.saleOrderId)"
+                type="text"
+                size="small"
+                >修改</el-button
+              >
+            </template>
+          </el-table-column>
+        </mergeRowTable>
       </el-tab-pane>
       <!-- 已上报 -->
       <el-tab-pane label="已上报" name="second">
@@ -117,57 +139,12 @@ export default {
           16,
           17,
           18,
-          20
+          20,
+          21
         ]
       },
       mapList: [],
-      mapItemList: [],
-      //记录旧的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: [],
+      mapItemList: []
     };
   },
   created() {
@@ -192,6 +169,13 @@ export default {
     }
   },
   methods: {
+    updateSaleOrder(saleOrderId) {
+      this.$router.push("updateSaleOrderSteel/" + saleOrderId);
+    },
+    getOrderDetails(saleOrderId) {
+      console.log(saleOrderId);
+      this.$router.push("saleOrderOODetails/" + saleOrderId);
+    },
     getRequestUrl() {
       if (getCookie("orgCode") == "shouhuokehu") {
         this.option.requestUrl =
@@ -234,7 +218,7 @@ export default {
       }
       this.axios
         .post("/api/v1/ams/uploadSaleOrderList", this.batchReportList)
-        .then((res) => {
+        .then(res => {
           if (res.data.code == "200") {
             this.$message.success("上传成功");
             this.getRequestUrl();
@@ -339,7 +323,7 @@ export default {
       // 根据销售订单id查询物资信息
       this.axios
         .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
-        .then((res) => {
+        .then(res => {
           this.tableData = res.data.data;
         });
     },
@@ -370,7 +354,7 @@ export default {
       // 根据销售订单id查询物资信息
       this.axios
         .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
-        .then((res) => {
+        .then(res => {
           this.tableData1 = res.data.data;
         });
     },
@@ -401,7 +385,7 @@ export default {
       // 根据销售订单id查询物资信息
       this.axios
         .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
-        .then((res) => {
+        .then(res => {
           this.tableData2 = res.data.data;
         });
     },
@@ -432,7 +416,7 @@ export default {
       // 根据销售订单id查询物资信息
       this.axios
         .post("/api/v1/ams/getSaleMaterialList?saleOrderId=" + row.saleOrderId)
-        .then((res) => {
+        .then(res => {
           this.tableData3 = res.data.data;
         });
     },
@@ -443,12 +427,12 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post("/api/v1/ams/uploadSaleOrder?saleOrderId=" + saleOrderId)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == "200") {
                 this.$message.success("上传成功!");
                 this.getRequestUrl();
@@ -461,7 +445,7 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消上传!",
+            message: "取消上传!"
           });
         });
     },
@@ -472,7 +456,7 @@ export default {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
@@ -480,7 +464,7 @@ export default {
               "/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
                 saleOrderId
             )
-            .then((res) => {
+            .then(res => {
               if (res.data.code == "200") {
                 this.$message.success("删除成功");
                 this.getRequestUrl();
@@ -493,11 +477,11 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消删除!",
+            message: "取消删除!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>

+ 545 - 0
src/views/appoint/components/saleContract/updateSaleOrderSteel.vue

@@ -0,0 +1,545 @@
+<template>
+  <div class="updateSteelDetails">
+    <!-- 车牌号查询框 -->
+    <div class="top">
+      <el-input
+        v-model="inputCapacity"
+        placeholder="请输入车牌号"
+        clearable
+      ></el-input>
+      <el-button type="primary" @click="onclick">查询</el-button>
+      <el-button type="primary" @click="back">返回</el-button>
+    </div>
+    <!-- //物资模态框多选 -->
+    <div class="edrwer">
+      <!-- 物资选择模态框 -->
+      <el-drawer
+        title="选择物资信息"
+        :visible.sync="table1"
+        direction="rtl"
+        size="90%"
+        :show-close="true"
+      >
+        <el-form :inline="true" style="margin-top: 0.5rem;">
+          <el-form-item>
+            <label class="el-form-item__label" style="width: auto;"
+              >物资名称/型号</label
+            >
+          </el-form-item>
+          <el-form-item>
+            <el-input
+              placeholder="请输入物资名称或型号"
+              v-model="materialNameText"
+              clearable
+            ></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="materialSpecificationText"
+              clearable
+              ><template slot="prepend">Φ</template></el-input
+            >
+          </el-form-item>
+          <el-button
+            type="primary"
+            class="btn"
+            @click="onclick"
+            style="margin-left: 4px;"
+            ><i class="el-icon-search"></i>查询</el-button
+          >
+          <el-button type="primary" @click="makeSureMaterial"
+            ><i class="el-icon-check"></i>确定</el-button
+          >
+        </el-form>
+        <div class="tablecls">
+          <!-- 查询所有的物资 -->
+          <dilTable
+            v-bind.sync="option"
+            @selection-change="selectionChange"
+            @rowDbClick="rowDbClick"
+          >
+          </dilTable>
+        </div>
+      </el-drawer>
+    </div>
+    <div class="table">
+      <el-table
+        :data="tableData"
+        style="width: 100%"
+        :span-method="objectSpanMethod"
+        border
+        key="orderTable"
+      >
+        <el-table-column
+          width="50"
+          label="序号"
+          align="center"
+          fixed="left"
+          :resizable="false"
+        >
+          <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
+        </el-table-column>
+        <el-table-column property="capacityNumber" label="车牌号" width="120">
+        </el-table-column>
+        <el-table-column property="consigneeCompanyName" label="收货单位">
+        </el-table-column>
+        <el-table-column property="completeAddress" label="收货地址">
+        </el-table-column>
+        <el-table-column property="carrierName" label="承运商">
+        </el-table-column>
+        <el-table-column property="materialName" label="物资名称">
+        </el-table-column>
+        <el-table-column property="materialSpecification" label="规格">
+        </el-table-column>
+        <el-table-column property="materialModel" label="型号">
+        </el-table-column>
+        <el-table-column fixed="right" label="操作" width="200">
+          <template slot-scope="scope">
+            <el-button type="text" size="mini" @click="updateMaterial(scope)">
+              物资异常
+            </el-button>
+            <el-button type="text" size="mini" @click="updateAddress(scope)">
+              收货地址异常
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <div class="dialog">
+      <el-dialog
+        :title="title"
+        :visible.sync="dialogTableVisible"
+        style="width:100%"
+      >
+        <div class="errorMaterial">
+          <el-button @click="openDrawer" type="primary">新增拼数</el-button>
+        </div>
+        <div class="">
+          <el-table
+            :data="materialList"
+            border
+            :span-method="objectSpanMethod1"
+            highlight-current-row
+            key="materialTable"
+          >
+            <el-table-column
+              v-for="(item, i) in materialTableTop"
+              :key="i"
+              :prop="item.prop"
+              :label="item.label"
+              align="center"
+              show-overflow-tooltip
+            >
+              <!-- 插入输入框 -->
+              <template slot-scope="scope">
+                <template v-if="item.slot">
+                  <!-- 物资名称 -->
+                  <template v-if="item.prop == 'materialName'">
+                    <el-input
+                      style="width: 200px"
+                      v-model="scope.row.materialName"
+                      disabled
+                    >
+                    </el-input>
+                    <el-button
+                      type="primary"
+                      @click="changeMaterial(scope.$index)"
+                      >更改</el-button
+                    >
+                  </template>
+                  <!-- 物资件数 -->
+                  <template v-if="item.prop == 'orderPlanWeight'">
+                    <el-input
+                      class="textinput111"
+                      v-model.number="scope.row.orderPlanWeight"
+                      placeholder="(必填)"
+                    ></el-input>
+                  </template>
+                  <!-- 米数 -->
+                  <template v-if="item.prop == 'meterNumber'">
+                    <el-input
+                      :disabled="scope.row.isDisable == 1"
+                      class="textinput111"
+                      v-model.number="scope.row.meterNumber"
+                      placeholder="(必填)"
+                    ></el-input>
+                  </template>
+                  <!-- 是否磅重销售 -->
+                  <template v-if="item.prop == 'isPound'">
+                    <el-select
+                      v-model="scope.row.isPound"
+                      placeholder="请选择"
+                      style="width:65px"
+                    >
+                      <el-option
+                        v-for="item in options2"
+                        :key="item.values2"
+                        :label="item.label2"
+                        :value="item.values2"
+                      >
+                      </el-option>
+                    </el-select>
+                  </template>
+                </template>
+                <template v-else>
+                  <span>{{ scope.row[item.prop] }}</span>
+                </template>
+              </template>
+            </el-table-column>
+            <!-- 操作列 -->
+            <el-table-column fixed="right" label="操作" width="100">
+              <template slot-scope="scope">
+                <el-button
+                  @click.native.prevent="
+                    deleteMaterialRow(scope.$index, materialList)
+                  "
+                  type="text"
+                  icon="el-icon-close"
+                  size="big"
+                ></el-button>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="buttonx">
+          <el-button type="primary" @click="makeSureUpdateMaterial"
+            >确定</el-button
+          >
+          <el-button type="primary" @click="cancelUpdateMaterial"
+            >取消</el-button
+          >
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      title: "",
+      capacityNumber: null,
+      //是否磅重销售
+      options2: [
+        {
+          values2: 0,
+          label2: "是"
+        },
+        {
+          values2: 1,
+          label2: "否"
+        }
+      ],
+      table1: false,
+      isDelete: false,
+      dialogTableVisible: false,
+      inputCapacity: null,
+      tableData: [],
+      tableData1: [],
+      materialList1: [],
+      materialList: [],
+      //存放每一行记录的合并数
+      spanArr: [],
+      spanArr1: [],
+      status: null,
+      //物资表格多选
+      option: {
+        // 表格请求数据的地址
+        requestUrl: "/api/v1/uc/getSteelMaterial?apiId=244",
+        // 控制显示多选列
+        selectionType: "select"
+      },
+      materialSpecificationText: null,
+      materialNameText: null,
+      spanArr: [],
+      materialTableTop: [
+        {
+          prop: "capacityNumber",
+          label: "车牌号",
+          width: "80"
+        },
+        {
+          prop: "materialName",
+          label: "物资名称",
+          width: "90",
+          slot: true
+        },
+        {
+          prop: "meterNumber",
+          label: "米数",
+          width: "60",
+          slot: true
+        },
+        {
+          prop: "Specification",
+          label: "规格型号",
+          width: "140"
+        },
+        {
+          prop: "orderPlanWeight",
+          label: "件数",
+          width: "60",
+          slot: true
+        },
+        {
+          prop: "isPound",
+          label: "是否磅重销售",
+          width: "80",
+          slot: true
+        }
+      ],
+      orderId: null
+    };
+  },
+  mounted() {
+    this.getOrderList();
+  },
+  methods: {
+    updateAddress(scope) {},
+    cancelUpdateMaterial() {
+      this.dialogTableVisible = false;
+      this.getOrderList();
+    },
+    makeSureUpdateMaterial() {
+      this.dialogTableVisible = false;
+      this.getOrderList();
+    },
+    makeSureMaterial() {
+      //记录是理重还是磅重
+      var getisPound = 1;
+      this.materialList1.forEach(e => {
+        if (!e.materialSpecification) {
+          e.materialSpecification = "";
+        }
+        if (!e.materialModel) {
+          e.materialModel = "";
+        }
+        //判断物资是否为盘螺或非定尺
+        if (
+          e.materialName.includes("盘螺") ||
+          e.materialName.includes("乱尺") ||
+          e.materialName.includes("盘元") ||
+          e.materialName.includes("盘圆")
+        ) {
+          getisPound = 0;
+        } else {
+          getisPound = 1;
+        }
+        //若物资为带有盘螺、盘圆、盘元,默认无米数
+        if (
+          e.materialName.includes("盘螺") ||
+          e.materialName.includes("盘圆") ||
+          e.materialName.includes("盘元")
+        ) {
+          var addmap = {
+            orderId: this.orderId,
+            capacityNumber: this.capacityNumber,
+            materialName: e.materialName,
+            Specification: e.materialSpecification + e.materialModel,
+            materialCode: e.materialCode,
+            orderPlanWeight: null,
+            meterNumber: null,
+            isPound: getisPound,
+            //物资Id
+            materialId: e.materialId
+          };
+        } else {
+          if (e.materialName.includes("米")) {
+            console.log("着");
+            var addmap = {
+              capacityNumber: this.capacityNumber,
+              orderId: this.orderId,
+              materialName: e.materialName,
+              Specification: e.materialSpecification + e.materialModel,
+              materialCode: e.materialCode,
+              orderPlanWeight: null,
+              meterNumber: e.materialName.replace(/[^0-9]/gi, ""),
+              isPound: getisPound,
+              //物资Id
+              materialId: e.materialId
+              //有米数
+            };
+            console.log(addmap);
+          } else {
+            var addmap = {
+              capacityNumber: this.capacityNumber,
+              orderId: this.orderId,
+              materialName: e.materialName,
+              Specification: e.materialSpecification + e.materialModel,
+              materialCode: e.materialCode,
+              orderPlanWeight: null,
+              meterNumber: null,
+              isPound: getisPound,
+              //物资Id
+              materialId: e.materialId
+            };
+          }
+        }
+        this.materialList.push(addmap);
+        this.materialList.forEach(e => {
+          this.$set(e, "capacityNumber", this.capacityNumber);
+        });
+        this.getSpanArr1(this.materialList);
+        console.log(this.materialList);
+      });
+      this.materialList1 = [];
+      this.table1 = false;
+    },
+    rowDbClick(row) {
+      this.materialList1 = [];
+      this.materialList1.push(row);
+      this.makeSureMaterial();
+    },
+    openDrawer() {
+      this.table1 = true;
+    },
+    //返回选中的物资信息
+    selectionChange(selection) {
+      this.materialList1 = [];
+      this.materialList1 = selection;
+    },
+    //物资模态框查询
+    onclick() {
+      this.option.requestUrl =
+        "/api/v1/uc/getSteelMaterial?apiId=244&materialNameText=" +
+        this.materialNameText +
+        "&materialSpecificationText=" +
+        this.materialSpecificationText;
+    },
+    //开关是否删除
+    showDelete() {
+      this.isDelete = true;
+    },
+    deleteMaterialRow(index, rows) {
+      rows.splice(index, 1);
+      this.status = 1;
+    },
+    updateMaterial(scope) {
+      this.materialList = this.tableData.filter((item, index) => {
+        return item.orderId == scope.row.orderId;
+      });
+      this.materialList.forEach(e => {
+        this.capacityNumber = e.capacityNumber;
+        this.orderId = e.orderId;
+      });
+      this.getSpanArr1(this.materialList);
+      this.title = "处理" + "-" + this.capacityNumber + "-" + "异常物资信息";
+      this.getOrderList();
+      this.dialogTableVisible = true;
+    },
+    getOrderList() {
+      this.axios
+        .post(
+          "/api/v1/oms/getDriverInfoForSale1?saleOrderId=" +
+            this.$route.params.saleOrderId +
+            "&i=" +
+            new Date()
+        )
+        .then(res => {
+          this.tableData = res.data.data;
+          this.getSpanArr(this.tableData);
+        });
+    },
+    onclick() {},
+    back() {
+      this.$router.push("/saleOrderSteel");
+    },
+    getSpanArr1(data) {
+      //每次调用方法初始化
+      this.spanArr1 = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr1.push(1);
+          this.pos1 = 0;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].capacityNumber === data[i - 1].capacityNumber) {
+            this.spanArr1[this.pos1] += 1;
+            this.spanArr1.push(0);
+          } else {
+            this.spanArr1.push(1);
+            this.pos1 = i;
+          }
+        }
+      }
+    },
+    objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex === 0) {
+        const _row = this.spanArr1[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    },
+    //记录每一行的合并数
+    getSpanArr(data) {
+      //每次调用方法初始化
+      this.spanArr = [];
+      for (var i = 0; i < data.length; i++) {
+        if (i === 0) {
+          this.spanArr.push(1);
+          this.pos = 0;
+          data[i].group = i;
+        } else {
+          // 判断当前元素与上一个元素是否相同
+          if (data[i].orderId === data[i - 1].orderId) {
+            this.spanArr[this.pos] += 1;
+            this.spanArr.push(0);
+            data[i].group = data[i - 1].group;
+          } else {
+            this.spanArr.push(1);
+            this.pos = i;
+            data[i].group = data[i - 1].group + 1;
+          }
+        }
+      }
+    },
+    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+      if (
+        columnIndex === 0 ||
+        columnIndex === 1 ||
+        columnIndex === 2 ||
+        columnIndex === 3 ||
+        columnIndex === 4 ||
+        columnIndex === 8
+      ) {
+        const _row = this.spanArr[rowIndex];
+        const _col = _row > 0 ? 1 : 0;
+        return {
+          rowspan: _row,
+          colspan: _col
+        };
+      }
+    }
+  }
+};
+</script>
+<style lang="scss" scoped>
+.updateSteelDetails {
+  .top {
+    margin-top: 20px;
+    margin-left: 20px;
+    .el-input {
+      width: 250px;
+    }
+  }
+  .table {
+    margin-top: 20px;
+    margin-left: 20px;
+  }
+  .dialog {
+    width: 600px;
+    .buttonx {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
+  }
+}
+</style>

+ 4 - 0
src/views/appoint/router/index.js

@@ -66,6 +66,8 @@ import salePlan from '../components/saleContract/salePlan.vue'
 import transportPrice from '../components/saleContract/transportPrice.vue'
 import inwardTransPrice from '../components/inward/transPrice.vue'
 import inwardAddTransPrice from '../components/inward/addTransPrice.vue'
+import saleOrderOODetails from '../components/saleContract/saleOrderOODetails.vue'
+import updateSaleOrderSteel from '../components/saleContract/updateSaleOrderSteel.vue'
 Vue.use(Router)
 
 const constantRouterMap = [
@@ -138,6 +140,8 @@ const constantRouterMap = [
       {path: 'transportPrice', name: 'transportPrice', meta: {code: 'xtpzgl-yhgl'}, component: transportPrice},
       {path: 'inwardTransPrice', name: 'inwardTransPrice', meta: {code: 'xtpzgl-yhgl'}, component: inwardTransPrice},
       {path: 'inwardAddTransPrice', name: 'inwardAddTransPrice', meta: {code: 'xtpzgl-yhgl'}, component: inwardAddTransPrice},
+      {path:'saleOrderOODetails/:saleOrderId',name:'saleOrderOODetails',meta:{code:'xtpzgl-yhgl'},component:saleOrderOODetails},
+      {path:'updateSaleOrderSteel/:saleOrderId',name:'updateSaleOrderSteel',meta:{code:'xtpzgl-yhgl'},component:updateSaleOrderSteel}
     ]
   }
 ];

+ 21 - 21
src/views/index/components/login.vue

@@ -10,7 +10,7 @@
     <section v-else>
       <div>
         <div class="frame-area">
-          <div class="desc-area"></div>
+          <!-- <div class="desc-area"></div> -->
           <div style="position: absolute; left: 30px; width: 346px; top: 105px">
             <el-form
               class="lg-form"
@@ -60,8 +60,8 @@
 import { cookieUserId, cookieTime, cookieUserName } from "@/config/config.js";
 import { setCookie, getCookie, formatDate } from "@/utils/util.js";
 import store from "@/store/index.js";
-import JsSHA from 'jssha'
-const shaObj = new JsSHA('SHA-1', 'TEXT', { encoding: 'UTF8' })
+import JsSHA from "jssha";
+const shaObj = new JsSHA("SHA-1", "TEXT", { encoding: "UTF8" });
 export default {
   data() {
     return {
@@ -71,15 +71,15 @@ export default {
       shaObj,
       loginForm: {
         loginName: "",
-        password: "",
+        password: ""
       },
       loginFormRules: {
         loginName: [
-          { required: true, message: "请输入用户名", trigger: "blur" },
+          { required: true, message: "请输入用户名", trigger: "blur" }
         ],
-        password: [{ required: true, message: "请输入密码", trigger: "blur" }],
+        password: [{ required: true, message: "请输入密码", trigger: "blur" }]
       },
-      isJump: false,
+      isJump: false
     };
   },
   beforeCreate() {
@@ -101,21 +101,21 @@ export default {
   methods: {
     loginSubmit(formName) {
       this.loginForm.loginName = this.loginForm.loginName.trim();
-      this.$refs[formName].validate((valid) => {
+      this.$refs[formName].validate(valid => {
         if (valid) {
           // 登陆中 登录按钮不可用
           this.loginBtnLoading = true;
           let form = JSON.parse(JSON.stringify(this.loginForm));
-          form.app_code = 'web'; //终端code暂时写死
-          this.shaObj.update(form.password)
-          console.log(form.password)
-          form.password = this.shaObj.getHash('HEX')
-          console.log(form.password)
+          form.app_code = "web"; //终端code暂时写死
+          this.shaObj.update(form.password);
+          console.log(form.password);
+          form.password = this.shaObj.getHash("HEX");
+          console.log(form.password);
           this.store
             .dispatch("index/login/login", form)
-            .then((res) => {
+            .then(res => {
               if (res.code === "0") {
-                console.log(res,"res")
+                console.log(res, "res");
                 //  登录成功
                 //  设置缓存信息
                 setCookie("accessToken", res.data.accessToken, cookieTime, "/");
@@ -135,7 +135,8 @@ export default {
                   if (
                     k === "sysGroup" ||
                     k === "sysCompanys" ||
-                    k === "sysRoles" || k === 'photo'
+                    k === "sysRoles" ||
+                    k === "photo"
                   ) {
                     delete info[k];
                   }
@@ -219,17 +220,16 @@ export default {
                 // 提示
                 this.$message({
                   message: res.message,
-                  type: "error",
+                  type: "error"
                 });
               }
               this.loginBtnLoading = false;
               setTimeout(() => {
-                this.$router.go(0)
+                this.$router.go(0);
               }, 2000);
             })
             .catch(() => {
               this.loginBtnLoading = false;
-              
             });
         } else {
           return false;
@@ -238,8 +238,8 @@ export default {
     },
     showPwd() {
       this.pwdShow = !this.pwdShow;
-    },
-  },
+    }
+  }
 };
 </script>
 

+ 92 - 62
src/views/inward/components/truckAppoint/requirement.vue

@@ -15,12 +15,19 @@
       >
         <i class="el-icon-plus"></i>新增
       </el-button>
+      <el-button type="primary" @click="exportData()"
+        ><i class="el-icon-download"></i>导出(Excel)</el-button
+      >
     </div>
     <template>
       <div>
         <el-tabs v-model="activeName" @tab-click="handleClick">
           <el-tab-pane label="未下发" name="first">
-            <dilTable v-bind.sync="first" @selection-change="selectionChange" ref="table1">
+            <dilTable
+              v-bind.sync="first"
+              @selection-change="selectionChange"
+              ref="table1"
+            >
               <el-table-column fixed="right" label="操作" width="120">
                 <template slot-scope="scope">
                   <el-button
@@ -35,10 +42,15 @@
             </dilTable>
           </el-tab-pane>
           <el-tab-pane label="已下发" name="second">
-            <dilTable v-bind.sync="second" ref="table">
-            <el-table-column fixed="right" label="操作" width="80">
+            <dilTable v-bind.sync="second" ref="excelDom">
+              <el-table-column fixed="right" label="操作" width="80">
                 <template slot-scope="scope">
-                 <el-button type="text" size="mini" @click="getRequirementOrder(scope)">运单</el-button>
+                  <el-button
+                    type="text"
+                    size="mini"
+                    @click="getRequirementOrder(scope)"
+                    >运单</el-button
+                  >
                 </template>
               </el-table-column>
             </dilTable>
@@ -54,54 +66,74 @@ export default {
   data() {
     return {
       inputText: "",
-      orgCode:"",
+      orgCode: "",
       first: {
         // first请求数据的地址
-        requestUrl:
-          "",
+        requestUrl: "",
         selectionType: "select",
-        mapList: [],
+        mapList: []
       },
       second: {
         // second请求数据的地址
-        requestUrl:
-          "",
+        requestUrl: ""
       },
       tableData: [],
       tableData1: [
         {
-          materialCount : 100
+          materialCount: 100
         }
       ],
-      activeName: "first",
+      activeName: "first"
     };
   },
-  created(){
-    if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"){
-      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0"
-      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1"
-    }else{
-      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" + getCookie("orgCode")
-      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" + getCookie("orgCode")
+  created() {
+    if (
+      getCookie("orgCode") == "dagangadmin" ||
+      getCookie("orgCode") == "zidonghuabu"
+    ) {
+      this.first.requestUrl =
+        "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0";
+      this.second.requestUrl =
+        "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1";
+    } else {
+      this.first.requestUrl =
+        "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" +
+        getCookie("orgCode");
+      this.second.requestUrl =
+        "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" +
+        getCookie("orgCode");
     }
   },
   methods: {
     //查看需求下面的运单
-    getRequirementOrder(scope){
-      this.$router.push(
-        "/getRequirementOrder/" + scope.row.requirementId
-      );
+    getRequirementOrder(scope) {
+      this.$router.push("/getRequirementOrder/" + scope.row.requirementId);
     },
     handleClick(tab, event) {
-      this.getRequestUrl()   
+      this.getRequestUrl();
     },
-    getRequestUrl(){
-      if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode") == "zidonghuabu"){
-      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&i=" + new Date()
-      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&i=" + new Date()
-      }else{
-      this.first.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" + getCookie("orgCode") + "&i=" + new Date()
-      this.second.requestUrl = "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" + getCookie("orgCode") + "&i=" + new Date()
+    getRequestUrl() {
+      if (
+        getCookie("orgCode") == "dagangadmin" ||
+        getCookie("orgCode") == "zidonghuabu"
+      ) {
+        this.first.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&i=" +
+          new Date();
+        this.second.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&i=" +
+          new Date();
+      } else {
+        this.first.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=0&orgCode=" +
+          getCookie("orgCode") +
+          "&i=" +
+          new Date();
+        this.second.requestUrl =
+          "/api/v1/ams/getTruckRequirementList?apiId=207&requirementStatus=1&orgCode=" +
+          getCookie("orgCode") +
+          "&i=" +
+          new Date();
       }
     },
     selectionChange(selection) {
@@ -111,33 +143,31 @@ export default {
       this.$router.push("/addRequirement2");
     },
     updateRequirement(scope) {
-      this.$router.push(
-        "/updateRequirement/" + scope.row.requirementId
-      );
+      this.$router.push("/updateRequirement/" + scope.row.requirementId);
     },
     deleteRequirement(scope) {
       this.$confirm("是否删除", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post(
               "/api/v1/ams/deleteTruckRequirement/" + scope.row.requirementId
             )
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "删除成功!",
+                  message: "删除成功!"
                 });
-                this.getRequestUrl()
+                this.getRequestUrl();
               } else {
                 this.$message({
                   message: "删除失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -145,38 +175,38 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "删除操作已取消!",
+            message: "删除操作已取消!"
           });
         });
     },
     Issue() {
       console.log(this.first.mapList);
-      if(this.first.mapList.length == 0){
-        this.$message.warning("请选择需求")
-        return
+      if (this.first.mapList.length == 0) {
+        this.$message.warning("请选择需求");
+        return;
       }
       // 权限控制,判断用户是否属于轧钢厂下面的车间
       this.$confirm("是否下发", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
-        center: true,
+        center: true
       })
         .then(() => {
           this.axios
             .post("/api/v1/ams/downRequirement", this.first.mapList)
-            .then((res) => {
+            .then(res => {
               if (res.data.code == 200) {
                 this.$message({
                   type: "success",
-                  message: "下发成功!",
+                  message: "下发成功!"
                 });
-              this.getRequestUrl()
-              this.activeName = 'second'
+                this.getRequestUrl();
+                this.activeName = "second";
               } else {
                 this.$message({
                   message: "下发失败",
-                  type: "warning",
+                  type: "warning"
                 });
               }
             });
@@ -184,23 +214,23 @@ export default {
         .catch(() => {
           this.$message({
             type: "info",
-            message: "取消下发!",
+            message: "取消下发!"
           });
         });
-    },
-  },
+    }
+  }
 };
 </script>
 <style lang="scss" scoped>
-  .inwardRequirement{
-      margin-top: 20px;
-      margin-left: 20px;
-      .sache{
-          margin-top: 30px;
-          padding-bottom: 10px;
-          .el-input {
-            width: 20%;
-            }
-          }
+.inwardRequirement {
+  margin-top: 20px;
+  margin-left: 20px;
+  .sache {
+    margin-top: 30px;
+    padding-bottom: 10px;
+    .el-input {
+      width: 20%;
+    }
   }
+}
 </style>

+ 122 - 81
src/views/statisticalReport/components/salesLogisticsStatistics/saleChemicalCokeForm.vue

@@ -3,59 +3,70 @@
   <div class="purchasFuelNewMonitor">
     <el-form :inline="true" style="margin-top :5px">
       <el-form-item>
-        <label class="el-form-item__label" style="width: auto;">计毛时间:</label>
-            <el-date-picker
-            v-model="startTime"
-            type="datetime"
-            placeholder="选择日期时间"
-          >
-          </el-date-picker>
-          <span>至</span>
-          <el-date-picker
-            v-model="endTime"
-            type="datetime"
-            placeholder="选择日期时间"
-          >
-          </el-date-picker>
-          <el-button type="primary" class="btn" @click="onclick">
-            <i class="el-icon-search"></i>查询
-          </el-button>
-      </el-form-item>
-      <el-form-item>
-        <el-input
-        v-model="inputReceiveName"
-        style="width:200px"
-        placeholder="输入收货单位"
-        clearable="true"
-      ></el-input>
-      <el-button type="primary" @click="getReceiveName">查询</el-button>
+        <label class="el-form-item__label" style="width: auto;"
+          >计毛时间:</label
+        >
+        <el-date-picker
+          v-model="startTime"
+          type="datetime"
+          placeholder="选择日期时间"
+        >
+        </el-date-picker>
+        <span>至</span>
+        <el-date-picker
+          v-model="endTime"
+          type="datetime"
+          placeholder="选择日期时间"
+        >
+        </el-date-picker>
+        <el-form-item>
+          <el-input
+            v-model="inputReceiveName"
+            style="width:200px"
+            placeholder="输入收货单位"
+            clearable="true"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-input
+            v-model="inputMaterial"
+            style="width:200px"
+            placeholder="输入物资名称或备注"
+            clearable="true"
+          ></el-input>
+        </el-form-item>
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
       </el-form-item>
+
       <el-form-item>
         <el-button type="primary" @click="exportData()"
-        ><i class="el-icon-download"></i>导出(Excel)</el-button>
+          ><i class="el-icon-download"></i>导出(Excel)</el-button
+        >
       </el-form-item>
       <el-form-item>
         <el-button type="primary" @click="refresh">
-        <i class="el-icon-refresh"></i>刷新
-      </el-button>
+          <i class="el-icon-refresh"></i>刷新
+        </el-button>
       </el-form-item>
       <el-form-item>
         <span style="margin-left: 1rem;width:68px">合计净重:</span>
-      <el-input
-        v-model="totalNumber"
-        :disabled="true"
-        style="width: 150px;"
-      ></el-input>
+        <el-input
+          v-model="totalNumber"
+          :disabled="true"
+          style="width: 150px;"
+        ></el-input>
       </el-form-item>
       <el-form-item>
         <span style="margin-left: 1rem;width:68px">合计车数:</span>
-      <el-input
-        v-model="totalCapacity"
-        :disabled="true"
-        style="width: 150px;"
-      ></el-input>
+        <el-input
+          v-model="totalCapacity"
+          :disabled="true"
+          style="width: 150px;"
+        ></el-input>
       </el-form-item>
-    </el-form> 
+    </el-form>
     <div class="table">
       <dilTable
         ref="excelDom"
@@ -77,6 +88,7 @@ import { getCookie } from "@/utils/util.js";
 export default {
   data() {
     return {
+      inputMaterial: null,
       shiyHeigth: 140,
       isHeigth: true,
       pageSize: 100,
@@ -116,41 +128,55 @@ export default {
     this.tableTitle = startTime + " 至 " + endTime;
   },
   methods: {
-    getReceiveName() {
-      if (this.inputReceiveName != null) {
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
-            getCookie("userId") +
-            "&i=" +
-            new Date() +
-            "&receiveName=" +
-            this.inputReceiveName;
-        } else {
-          this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
-            null +
-            "&i=" +
-            new Date() +
-            "&receiveName=" +
-            this.inputReceiveName;
-        }
-      } else {
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
-            getCookie("userId") +
-            "&i=" +
-            new Date();
-        } else {
-          this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
-            null +
-            "&i=" +
-            new Date();
-        }
-      }
-    },
+    // getReceiveName() {
+    //   let startTime = null;
+    //   let endTime = null;
+    //   if (this.startTime && this.endTime) {
+    //     startTime = sjTime(this.startTime);
+    //     endTime = sjTime(this.endTime);
+    //   }
+    //   if (this.inputReceiveName != null) {
+    //     if (getCookie("orgCode") == "chengyunshang") {
+    //       this.option.requestUrl =
+    //         "/api/v1/tms/getAllSaleReport?apiId=423&orderType=2&shipperId=2&carrierSsoId=" +
+    //         getCookie("userId") +
+    //         "&i=" +
+    //         new Date() +
+    //         "&receiveName=" +
+    //         this.inputReceiveName +
+    //         "&startTime=" +
+    //         startTime +
+    //         "&endTime=" +
+    //         endTime;
+    //     } else {
+    //       this.option.requestUrl =
+    //         "/api/v1/tms/getAllSaleReport?apiId=423&orderType=2&shipperId=2&carrierSsoId=" +
+    //         null +
+    //         "&i=" +
+    //         new Date() +
+    //         "&receiveName=" +
+    //         this.inputReceiveName +
+    //         "&startTime=" +
+    //         startTime +
+    //         "&endTime=" +
+    //         endTime;
+    //     }
+    //   } else {
+    //     if (getCookie("orgCode") == "chengyunshang") {
+    //       this.option.requestUrl =
+    //         "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+    //         getCookie("userId") +
+    //         "&i=" +
+    //         new Date();
+    //     } else {
+    //       this.option.requestUrl =
+    //         "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+    //         null +
+    //         "&i=" +
+    //         new Date();
+    //     }
+    //   }
+    // },
     refresh() {
       this.$router.go(0);
     },
@@ -186,7 +212,11 @@ export default {
             "&carrierSsoId=" +
             getCookie("userId") +
             "&i=" +
-            new Date();
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName +
+            "&materialName=" +
+            this.inputMaterial;
         } else {
           this.option.requestUrl =
             "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
@@ -197,7 +227,11 @@ export default {
             "&carrierSsoId=" +
             null +
             "&i=" +
-            new Date();
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName +
+            "&materialName=" +
+            this.inputMaterial;
         }
       } else {
         if (this.startTime) {
@@ -216,7 +250,11 @@ export default {
             "&carrierSsoId=" +
             getCookie("userId") +
             "&i=" +
-            new Date();
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName +
+            "&materialName=" +
+            this.inputMaterial;
         } else {
           this.option.requestUrl =
             "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
@@ -227,7 +265,11 @@ export default {
             "&carrierSsoId=" +
             null +
             "&i=" +
-            new Date();
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName +
+            "&materialName=" +
+            this.inputMaterial;
         }
       }
     },
@@ -251,5 +293,4 @@ export default {
 };
 </script>
 
-<style lang="scss">
-</style>
+<style lang="scss"></style>

+ 109 - 82
src/views/statisticalReport/components/salesLogisticsStatistics/saleCoproductForm.vue

@@ -3,59 +3,69 @@
   <div class="purchasFuelNewMonitor">
     <el-form :inline="true" style="margin-top :5px">
       <el-form-item>
-        <label class="el-form-item__label" style="width: auto;">计毛时间:</label>
-            <el-date-picker
-            v-model="startTime"
-            type="datetime"
-            placeholder="选择日期时间"
-          >
-          </el-date-picker>
-          <span>至</span>
-          <el-date-picker
-            v-model="endTime"
-            type="datetime"
-            placeholder="选择日期时间"
-          >
-          </el-date-picker>
-          <el-button type="primary" class="btn" @click="onclick">
-            <i class="el-icon-search"></i>查询
-          </el-button>
-      </el-form-item>
-      <el-form-item>
-        <el-input
-        v-model="inputReceiveName"
-        style="width:200px"
-        placeholder="输入收货单位"
-        clearable="true"
-      ></el-input>
-      <el-button type="primary" @click="getReceiveName">查询</el-button>
+        <label class="el-form-item__label" style="width: auto;"
+          >计毛时间:</label
+        >
+        <el-date-picker
+          v-model="startTime"
+          type="datetime"
+          placeholder="选择日期时间"
+        >
+        </el-date-picker>
+        <span>至</span>
+        <el-date-picker
+          v-model="endTime"
+          type="datetime"
+          placeholder="选择日期时间"
+        >
+        </el-date-picker>
+        <el-form-item>
+          <el-input
+            v-model="inputReceiveName"
+            style="width:200px"
+            placeholder="输入收货单位"
+            clearable="true"
+          ></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-input
+            v-model="inputMaterial"
+            style="width:200px"
+            placeholder="输入物资名称或备注"
+            clearable="true"
+          ></el-input>
+        </el-form-item>
+        <el-button type="primary" class="btn" @click="onclick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" @click="exportData()"
-        ><i class="el-icon-download"></i>导出(Excel)</el-button>
+          ><i class="el-icon-download"></i>导出(Excel)</el-button
+        >
       </el-form-item>
       <el-form-item>
         <el-button type="primary" @click="refresh">
-        <i class="el-icon-refresh"></i>刷新
-      </el-button>
+          <i class="el-icon-refresh"></i>刷新
+        </el-button>
       </el-form-item>
       <el-form-item>
         <span style="margin-left: 1rem;width:68px">合计净重:</span>
-      <el-input
-        v-model="totalNumber"
-        :disabled="true"
-        style="width: 150px;"
-      ></el-input>
+        <el-input
+          v-model="totalNumber"
+          :disabled="true"
+          style="width: 150px;"
+        ></el-input>
       </el-form-item>
       <el-form-item>
         <span style="margin-left: 1rem;width:68px">合计车数:</span>
-      <el-input
-        v-model="totalCapacity"
-        :disabled="true"
-        style="width: 150px;"
-      ></el-input>
+        <el-input
+          v-model="totalCapacity"
+          :disabled="true"
+          style="width: 150px;"
+        ></el-input>
       </el-form-item>
-    </el-form>       
+    </el-form>
     <div class="table">
       <dilTable
         ref="excelDom"
@@ -90,7 +100,9 @@ export default {
       totalNumber: 0,
       //合计车数
       totalCapacity: 0,
-      tableTitle: "销售统计报表"
+      tableTitle: "销售统计报表",
+      inputMaterial: null,
+      inputReceiveName: null
     };
   },
   created() {
@@ -115,41 +127,41 @@ export default {
     this.tableTitle = startTime + " 至 " + endTime;
   },
   methods: {
-    getReceiveName() {
-      if (this.inputReceiveName != null) {
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
-            getCookie("userId") +
-            "&i=" +
-            new Date() +
-            "&receiveName=" +
-            this.inputReceiveName;
-        } else {
-          this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
-            null +
-            "&i=" +
-            new Date() +
-            "&receiveName=" +
-            this.inputReceiveName;
-        }
-      } else {
-        if (getCookie("orgCode") == "chengyunshang") {
-          this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
-            getCookie("userId") +
-            "&i=" +
-            new Date();
-        } else {
-          this.option.requestUrl =
-            "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
-            null +
-            "&i=" +
-            new Date();
-        }
-      }
-    },
+    // getReceiveName() {
+    //   if (this.inputReceiveName != null) {
+    //     if (getCookie("orgCode") == "chengyunshang") {
+    //       this.option.requestUrl =
+    //         "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+    //         getCookie("userId") +
+    //         "&i=" +
+    //         new Date() +
+    //         "&receiveName=" +
+    //         this.inputReceiveName;
+    //     } else {
+    //       this.option.requestUrl =
+    //         "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+    //         null +
+    //         "&i=" +
+    //         new Date() +
+    //         "&receiveName=" +
+    //         this.inputReceiveName;
+    //     }
+    //   } else {
+    //     if (getCookie("orgCode") == "chengyunshang") {
+    //       this.option.requestUrl =
+    //         "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+    //         getCookie("userId") +
+    //         "&i=" +
+    //         new Date();
+    //     } else {
+    //       this.option.requestUrl =
+    //         "/api/v1/tms/getAllSaleReport?apiId=423&startTime=null&endTime=null&orderType=2&shipperId=2&carrierSsoId=" +
+    //         null +
+    //         "&i=" +
+    //         new Date();
+    //     }
+    //   }
+    // },
     refresh() {
       this.$router.go(0);
     },
@@ -185,7 +197,11 @@ export default {
             "&carrierSsoId=" +
             getCookie("userId") +
             "&i=" +
-            new Date();
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName +
+            "&materialName=" +
+            this.inputMaterial;
         } else {
           this.option.requestUrl =
             "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
@@ -196,7 +212,11 @@ export default {
             "&carrierSsoId=" +
             null +
             "&i=" +
-            new Date();
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName +
+            "&materialName=" +
+            this.inputMaterial;
         }
       } else {
         if (this.startTime) {
@@ -215,7 +235,11 @@ export default {
             "&carrierSsoId=" +
             getCookie("userId") +
             "&i=" +
-            new Date();
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName +
+            "&materialName=" +
+            this.inputMaterial;
         } else {
           this.option.requestUrl =
             "/api/v1/tms/getAllSaleReport?apiId=423&startTime=" +
@@ -226,7 +250,11 @@ export default {
             "&carrierSsoId=" +
             null +
             "&i=" +
-            new Date();
+            new Date() +
+            "&receiveName=" +
+            this.inputReceiveName +
+            "&materialName=" +
+            this.inputMaterial;
         }
       }
     },
@@ -250,5 +278,4 @@ export default {
 };
 </script>
 
-<style lang="scss">
-</style>
+<style lang="scss"></style>