luobang 2 سال پیش
والد
کامیت
6ac2ef3a01

+ 1 - 1
config/index.js

@@ -73,7 +73,7 @@ let proxyTable = {
   // 所有数据的请求域名地址
   '/api/v1': {
     target: 'http://172.16.33.166:80',
-    //target: 'http://localhost:8080',
+    // target: 'http://localhost:8080',
     // target: 'http://192.168.1.102:8080',
     ws: true,
     pathRewrite: {

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

@@ -64,6 +64,7 @@
         align="center"
         fixed="left"
         :resizable="false"
+        v-if="isShowGroup"
       >
         <template slot-scope="scope">{{ scope.row.group + 1 }}</template>
       </el-table-column>
@@ -133,6 +134,9 @@ export default {
     comparison: {
       default: ''
     },
+    isShowGroup: {
+      default: true
+    },
     shiyHeigth: {
       default: null
     },

+ 307 - 149
src/views/inward/components/inwardBillet/addInwardBillet.vue

@@ -1,10 +1,10 @@
 // 新增内转钢坯需求
 <template>
   <div class="inwardRequirement">
-    <div>
-      <!-- 用车单位 -->
-      <div class="requireUnit form">
-        <el-form class="demo-form-inline" label-width="80px" :inline="true">
+    <!-- 用车单位 -->
+    <div class="requireUnit">
+      <el-form class="demo-form-inline" label-width="80px" :inline="true">
+        <div class="top1">
           <el-form-item label="用车单位" v-show="false">
             <el-input class="inline-input" v-model="requireUnitName" disabled>
             </el-input>
@@ -14,58 +14,87 @@
             </el-input>
           </el-form-item>
           <el-form-item label="炉号">
-            <el-input class="inline-input" v-model.number="heatNo"> </el-input>
-          </el-form-item>
-          <el-form-item label="支数">
-            <el-input class="inline-input" v-model="count"> </el-input>
+            <el-input
+              class="inline-input"
+              v-model.number="heatNo"
+              style="width:150px"
+            >
+            </el-input>
           </el-form-item>
-          <!-- 车辆我设为多选了,我觉得会省事,他们应该不希望每台车都做一次 -->
-          <el-form-item label="选择车辆">
-            <el-select class="inline-select" v-model="capacityIds" multiple>
+          <el-form-item label="选择钢种">
+            <el-select
+              class="inline-select"
+              v-model="type"
+              filterable
+              style="width:150px"
+            >
               <el-option
-                v-for="item in optionsCapacity"
-                :label="item.capacityNumber"
-                :value="item.capacityId"
-                :key="item.capacityId"
+                v-for="(item, index) in options1"
+                :key="index"
+                :label="item.value"
+                :value="item.value"
               >
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="选择班别">
-            <el-select class="inline-select" v-model="clazz">
+          <el-form-item label="选择规格">
+            <el-select
+              class="inline-select"
+              v-model="model"
+              filterable
+              style="width:150px"
+            >
               <el-option
-                v-for="item in options"
-                :key="item.value"
+                v-for="(item, index) in options2"
+                :key="index"
                 :label="item.value"
                 :value="item.value"
               >
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="选择钢种">
-            <el-select class="inline-select" v-model="type" filterable>
+          <el-form-item label="选择班别">
+            <el-select
+              class="inline-select"
+              v-model="clazz"
+              style="width:150px"
+            >
               <el-option
-                v-for="(item, index) in options1"
-                :key="index"
+                v-for="item in options"
+                :key="item.value"
                 :label="item.value"
                 :value="item.value"
               >
               </el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="选择规格">
-            <el-select class="inline-select" v-model="model" filterable>
+        </div>
+        <div class="top3">
+          <el-form-item label="选择车辆">
+            <el-select
+              class="inline-select"
+              v-model="capacityId"
+              style="width:150px"
+            >
               <el-option
-                v-for="(item, index) in options2"
-                :key="index"
-                :label="item.value"
-                :value="item.value"
+                v-for="item in optionsCapacity"
+                :label="item.capacityNumber"
+                :value="item.capacityId"
+                :key="item.capacityId"
               >
               </el-option>
             </el-select>
           </el-form-item>
+          <el-form-item label="当车支数">
+            <el-input class="inline-input" v-model="count" style="width:150px">
+            </el-input>
+          </el-form-item>
           <el-form-item label="选择装货点" v-show="false">
-            <el-select class="inline-select" v-model="loadPoint">
+            <el-select
+              class="inline-select"
+              v-model="loadPoint"
+              style="width:150px"
+            >
               <el-option
                 v-for="item in optionsLoad"
                 :key="item.warehouseId"
@@ -76,7 +105,11 @@
             </el-select>
           </el-form-item>
           <el-form-item label="选择卸货点">
-            <el-select class="inline-select" v-model="unloadPoint">
+            <el-select
+              class="inline-select"
+              v-model="unloadPoint"
+              style="width:150px"
+            >
               <el-option
                 v-for="item in optionsUnload"
                 :key="item.warehouseId"
@@ -86,14 +119,80 @@
               </el-option>
             </el-select>
           </el-form-item>
-        </el-form>
+          <el-form-item label="选择班次">
+            <el-select
+              class="inline-select"
+              v-model="shift"
+              style="width:150px"
+            >
+              <el-option
+                v-for="item in optionShift"
+                :key="item.value"
+                :label="item.value"
+                :value="item.value"
+              >
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </div>
+        <div class="button-box">
+          <el-switch
+            v-model="isMeter"
+            active-text="需要过磅"
+            inactive-text="不需要过磅"
+          >
+          </el-switch>
+          <el-button type="primary" @click="makeSure">保存</el-button>
+        </div>
+      </el-form>
+      <div class="checkBox">
+        <div class="checkTitle">
+          <span>抽取区</span>
+        </div>
+        <div class="checkArea">
+          <el-form class="demo-form-inline" label-width="80px" :inline="true">
+            <el-form-item label="炉号">
+              <el-input
+                class="inline-input"
+                v-model.number="checkHeatNo"
+                style="width:150px"
+              >
+              </el-input>
+            </el-form-item>
+            <el-form-item label="抽取支数">
+              <el-input
+                class="inline-input"
+                v-model.number.lazy="checkCount"
+                style="width:150px"
+              >
+              </el-input>
+            </el-form-item>
+            <el-form-item label="抽取重量">
+              <el-input
+                class="inline-input"
+                v-model.lazy="checkWeight"
+                style="width:150px"
+              >
+              </el-input>
+            </el-form-item>
+          </el-form>
+          <div class="checkButton">
+            <el-button type="primary" @click="checkBillet">抽取</el-button>
+          </div>
+        </div>
       </div>
     </div>
-    <div class="button-box">
-      <el-button type="primary" @click="makeSure">保存</el-button>
-    </div>
+
     <div>
-      <mergeRowTable v-bind.sync="first" ref="table"> </mergeRowTable>
+      <mergeRowTable v-bind.sync="first" ref="table" :isShowGroup="false">
+        <el-table-column label="操作" width="80px" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="text" @click="deleteOrder(scope)" size="mini">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </mergeRowTable>
     </div>
   </div>
 </template>
@@ -107,6 +206,9 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      checkWeight: null,
+      checkCount: null,
+      checkHeatNo: null,
       requireUnitId: null,
       requireUnitName: null,
       heatNo: null,
@@ -119,6 +221,18 @@ export default {
       loadPoint: null,
       unloadPoint: null,
       count: null,
+      shift: null,
+      optionShift: [
+        {
+          value: '早'
+        },
+        {
+          value: '中'
+        },
+        {
+          value: '夜'
+        }
+      ],
       options: [
         {
           value: '甲'
@@ -195,7 +309,8 @@ export default {
       first: {
         // first请求数据的地址
         requestUrl: ''
-      }
+      },
+      isMeter: '需要过磅'
     }
   },
   mounted() {
@@ -204,6 +319,29 @@ export default {
     this.getUnloadPoint()
     this.getCapacity()
   },
+  watch: {
+    heatNo() {
+      this.checkHeatNo = this.heatNo
+    },
+    checkHeatNo() {
+      this.heatNo = this.checkHeatNo
+    },
+    count() {
+      this.computeWeight()
+    },
+    singleWeight() {
+      this.computeWeight()
+    },
+    checkCount() {
+      if (
+        !(this.checkCount < 7 && this.checkCount > 3) &&
+        isNumber(this.checkCount)
+      ) {
+        this.$message.error('抽取支数不能大于7支小于4支')
+        this.checkCount = null
+      }
+    }
+  },
   created() {
     if (
       getCookie('orgCode') == 'dagangadmin' ||
@@ -217,6 +355,86 @@ export default {
     }
   },
   methods: {
+    getRequestUrl() {
+      if (
+        getCookie('orgCode') == 'dagangadmin' ||
+        getCookie('orgCode') == 'zidonghuabu'
+      ) {
+        this.first.requestUrl =
+          '/api/v1/ams/getBilletRequirementList?apiId=518&i=' + new Date()
+      } else {
+        this.first.requestUrl =
+          '/api/v1/ams/getBilletRequirementList?apiId=518&orgCode=' +
+          getCookie('orgCode') +
+          '&i=' +
+          new Date()
+      }
+    },
+    deleteOrder(scope) {
+      let map = {
+        orderId: scope.row.orderId,
+        userId: getCookie('userId')
+      }
+      this.$confirm('是否删除?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          this.axios.post('/api/v1/oms/closeOmstruckOrder', map).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: '已取消删除'
+          })
+        })
+    },
+    checkBillet() {
+      if (this.checkWeight && this.checkCount && this.checkHeatNo) {
+        if (this.checkWeight > 25 || this.checkWeight < 8) {
+          this.$message.error('抽取重量不能大于25t或者小于8t')
+          this.checkWeight = null
+          return
+        } else {
+          let map = {
+            checkWeight: this.checkWeight,
+            checkCount: this.checkCount,
+            checkHeatNo: this.checkHeatNo,
+            orgCode: getCookie('orgCode')
+          }
+          this.axios.post('/api/v1/ams/checkBillet', map).then(res => {
+            if (res.data.code == 200) {
+              this.$message.success('抽取成功')
+              this.getRequestUrl()
+              this.checkWeight = null
+              this.checkCount = null
+              this.checkHeatNo = null
+            } else if (res.data.code == '201') {
+              this.$message.error('该炉号已抽取,不能重复抽取')
+              this.checkWeight = null
+              this.checkCount = null
+              this.checkHeatNo = null
+            } else {
+              this.$message.error('抽取失败,请联系管理员')
+            }
+          })
+        }
+      }
+    },
     resetCapacity() {
       this.getCapacity()
     },
@@ -284,23 +502,24 @@ export default {
     // 新增
     makeSure() {
       let capacityList = []
-      this.capacityIds.forEach(e => {
-        let map = {}
-        map.capacityId = e
-        capacityList.push(map)
-      })
+      let e = {
+        capacityId: this.capacityId
+      }
+      capacityList.push(e)
       let map = {
         requirementShipperId: this.requireUnitId,
         heatNo: this.heatNo,
         requirementType: '计重',
         clazz: this.clazz,
+        shift: this.shift,
         type: this.type,
         model: this.model,
         requirementPlatformId: this.loadPoint,
         requirementUnloadUnitId: this.unloadPoint,
         capacityList: capacityList,
         count: this.count,
-        orgCode: getCookie('orgCode')
+        orgCode: getCookie('orgCode'),
+        isMeter: this.isMeter
       }
       console.log('map:', map)
       if (
@@ -329,87 +548,19 @@ export default {
       this.axios.post('/api/v1/ams/addBilletRequirement', map).then(res => {
         if (res.data.code == '200') {
           this.$message.success('派发成功!')
+          this.getRequestUrl()
         }
       })
-    },
-    // 返回
-    cancel() {
-      this.$router.go(-1)
     }
   }
 }
 </script>
 <style lang="scss" scoped>
 .inwardRequirement {
-  .from {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    margin-top: 5px;
-    margin-bottom: 20px;
-  }
-  .drawSty {
-    .el-input {
-      width: 240px;
-    }
-  }
-  .DueTime {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    margin-top: 5px;
-    margin-bottom: 20px;
-    .chooseDueTime {
-      margin-right: 70px;
-    }
-  }
-  .capacity {
-    display: flex;
-    text-align: center;
-    align-items: center;
-    justify-content: center;
-    margin-top: 2rem;
-    margin-bottom: 1.25rem;
-    margin-right: 10px;
-  }
-  .materialDrawer {
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    .el-input {
-      width: 320px;
-    }
-    .el-select {
-      width: 320px;
-    }
-    .el-autocomplete {
-      width: 320px;
-    }
-    .el-form {
-      padding: 10px;
-    }
-    .truckBtn {
-      width: 320px;
-    }
-  }
-  .swtichTop {
-    display: flex;
-    height: 40px;
-    align-content: center;
-    justify-content: center;
-    padding-right: 20px;
-    .titile {
-      color: red;
-      font-size: 14px;
-    }
-    .switch {
-      margin-right: -30px;
-    }
-  }
   .requireUnit {
     display: flex;
-    justify-content: center;
-    align-items: center;
+    justify-content: start;
+    align-items: flex-start;
     margin-top: 20px;
     .text {
       display: inline-block;
@@ -420,47 +571,54 @@ export default {
         margin-right: 90px;
       }
     }
-  }
-  .form-box {
-    display: flex;
-    text-align: center;
-    align-items: center;
-    justify-content: center;
-    margin-top: 20px;
-    margin-bottom: 20px;
-    margin-left: 10px;
-    ::v-deep .el-form {
+    .top1 {
+      margin-right: 100px;
+    }
+    .top4 {
       display: flex;
       justify-content: center;
       align-items: center;
-      margin-right: 600px;
-      // margin-left: -20px;
-      background-color: yellow;
-      .preview-group {
-        background-color: blue;
-        ::v-deep .el-form-item {
-          background-color: blue;
-          .el-form-item__label {
-            width: 170px !important;
-            background-color: blue;
-          }
-          ::v-deep .el-form-item__content {
-            background-color: red;
-            width: 300px;
-          }
-          .el-input {
-            width: 210px !important;
-          }
+      margin-top: 20px;
+      margin-bottom: 10px;
+    }
+    .checkBox {
+      height: 250px;
+      width: 300px;
+      background-color: aqua;
+      border-radius: 20px;
+      margin-bottom: 20px;
+      .checkTitle {
+        border: 1px solid #ffff;
+        font-size: 20px;
+        height: 40px;
+        font-weight: 600;
+        line-height: 40px;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-bottom: 5px;
+      }
+      .checkArea {
+        // display: flex;
+        // justify-content: center;
+        // align-items: center;
+        .checkButton {
+          display: flex;
+          justify-content: center;
+          align-items: flex-start;
         }
       }
     }
-  }
-  .button-box {
-    display: flex;
-    align-items: center;
-    justify-content: center;
-    margin-top: 20px;
-    margin-right: 90px;
+    .button-box {
+      margin-top: 20px;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      .el-button {
+        margin-top: 20px;
+      }
+    }
   }
 }
 </style>

+ 42 - 33
src/views/inward/components/truckAppoint/addRequirement2.vue

@@ -127,7 +127,7 @@
           <el-form-item label="运输单价"> </el-form-item>
           <el-form-item>
             <el-button type="primary" @click="onprice" class="truckBtn"
-            >浏览</el-button
+              >浏览</el-button
             >
           </el-form-item>
         </el-form>
@@ -256,7 +256,12 @@
           :show-close="false"
           :before-close="handleClose2"
         >
-          <el-input placeholder="请输入内容" v-model="inputMaterial" style="width: 240px" clearable>
+          <el-input
+            placeholder="请输入内容"
+            v-model="inputMaterial"
+            style="width: 240px"
+            clearable
+          >
           </el-input
           ><el-button type="primary" class="btn" @click="onclickMaterial">
             <i class="el-icon-search"></i>查询
@@ -328,11 +333,13 @@
           size="40%"
         >
           <div class="selectText">
-            <el-input v-model="inputP" placeholder="请输入内容" style="width: 240px"></el-input>
-            <el-button
-              type="primary"
-              @click="onpriceSelect"
-            ><i class="el-icon-search"></i>查询</el-button
+            <el-input
+              v-model="inputP"
+              placeholder="请输入内容"
+              style="width: 240px"
+            ></el-input>
+            <el-button type="primary" @click="onpriceSelect"
+              ><i class="el-icon-search"></i>查询</el-button
             >
           </div>
           <div class="LineTable">
@@ -376,19 +383,19 @@ export default {
         bar: {
           hoverStyle: true,
           onlyShowBarOnScroll: false, //是否只有滚动的时候才显示滚动条
-          background: "#5f9ea0", //滚动条颜色
+          background: '#5f9ea0', //滚动条颜色
           opacity: 0.8, //滚动条透明度
-          "overflow-x": "hidden"
+          'overflow-x': 'hidden'
         }
       },
-      PriceDrawer:false,
+      PriceDrawer: false,
       tableLoading: false,
-      isKuang:false,
+      isKuang: false,
       priceOptions: {
-        requestUrl: ""
+        requestUrl: ''
       },
-      inputP:"",
-      drawerP:false,
+      inputP: '',
+      drawerP: false,
       //--
       aaadrawer: false,
       disabled: false,
@@ -565,24 +572,25 @@ export default {
     }
   },
   methods: {
-    funcP(){
-      this.isKuang = false;
-      this.tableLoading = false;
+    funcP() {
+      this.isKuang = false
+      this.tableLoading = false
     },
-    onpriceSelect(){
+    onpriceSelect() {
       if (this.inputP == null) {
         this.priceOptions.requestUrl =
-          "/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&i=" + new Date();
+          '/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&i=' +
+          new Date()
       } else {
         this.priceOptions.requestUrl =
-          "/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&con=" +
-          this.inputP;
+          '/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&con=' +
+          this.inputP
       }
     },
-    onprice(){
-      this.drawerP=true;
+    onprice() {
+      this.drawerP = true
       this.priceOptions.requestUrl =
-        "/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&i=" + new Date();
+        '/api/v1/ams/getInwardContractPrice?apiId=464&deleted=0&i=' + new Date()
     },
     //用车单位弹出层
     handleSelectCarrier(item) {
@@ -887,7 +895,7 @@ export default {
       // console.log("进来了");
       // console.log(this.whether);
       // console.log(this.installremark);
-      if (this.capacityTypeName == null || this.capacityTypeName == "") {
+      if (this.capacityTypeName == null || this.capacityTypeName == '') {
         this.$message.warning('车辆类型必填')
         this.disabled = false
         return
@@ -971,7 +979,7 @@ export default {
           DueTime = sjTime(this.DueTime)
         }
       }
-      if (this.capacityTypeName == null || this.capacityTypeName == "") {
+      if (this.capacityTypeName == null || this.capacityTypeName == '') {
         this.$message.warning('车辆类型必填')
         this.disabled = false
         return
@@ -984,12 +992,12 @@ export default {
       }
       if (this.DueTime == null && this.isOpenDueTime == false) {
         //默认选择明天0点
-        var dd = new Date(this.form.requirementTruckTime);
-        dd.setDate(dd.getDate() + 1);//获取AddDayCount天后的日期
-        dd.setHours(null);
-        dd.setMinutes(null);
-        dd.setSeconds(null);
-        DueTime = sjTime(dd);
+        var dd = new Date(this.form.requirementTruckTime)
+        dd.setDate(dd.getDate() + 1) //获取AddDayCount天后的日期
+        dd.setHours(null)
+        dd.setMinutes(null)
+        dd.setSeconds(null)
+        DueTime = sjTime(dd)
       }
       let requiremnet = {
         requirementEstimatedDuration: this.form.requirementEstimatedDuration,
@@ -1010,7 +1018,8 @@ export default {
         capacityTypeId: this.capacityTypeId,
         mapList: this.tableData,
         orgCode: getCookie('orgCode'),
-        remark: this.form.Tel + this.capacityTypeName + this.form.typeRemarks
+        remark:
+          this.form.Tel + '-' + this.capacityTypeName + this.form.typeRemarks
       }
       this.axios
         .post('/api/v1/ams/addTruckRequirement', requiremnet)

+ 10 - 6
src/views/queue/components/qmsEnFacotory/queueFStart.vue

@@ -191,7 +191,11 @@
             max-height="500px"
           >
             <el-table-column type="selection" width="55"></el-table-column>
-            <el-table-column width="80" align="center" prop="Nosort"></el-table-column>
+            <el-table-column
+              width="80"
+              align="center"
+              prop="Nosort"
+            ></el-table-column>
             <el-table-column prop="capacityNumber" label="车牌号" fit>
             </el-table-column>
             <el-table-column prop="resultStartTime" label="排队开始时间">
@@ -492,10 +496,10 @@ export default {
 
       // 表格序号
       let Nosort = 0
-      for(let n in this.spanArr){
-        if(this.spanArr[n]>0){
+      for (let n in this.spanArr) {
+        if (this.spanArr[n] > 0) {
           Nosort += 1
-          this.$set(data[n],'Nosort',Nosort)
+          this.$set(data[n], 'Nosort', Nosort)
         }
       }
     },
@@ -636,8 +640,8 @@ export default {
           value => value.materialPriority === this.maplist[i].id
         )
         console.log('warehouse', warehouse)
-        if (warehouse && warehouse.carQueue >= 10) {
-          this.$message.error('该仓库已经有10辆车在排队,不允许放行!')
+        if (warehouse && warehouse.carQueue >= 20) {
+          this.$message.error('该仓库已经有20辆车在排队,不允许放行!')
           return
         }
         this.filterArr(this.maplist[i].resultId)