自动化立体仓库 - WMS系统
#
yxFwq
2024-11-19 dbc2514aad6b2b70b08e81f33d45f64aae175ccf
src/main/webapp/views/deviceOperate/jarOperate.html
@@ -18,8 +18,8 @@
            max-height="350" style="width: 100%">
            <el-table-column property="jarNo" label="硫化罐">
            </el-table-column>
            <el-table-column property="workNo" label="工作号">
            </el-table-column>
<!--            <el-table-column property="workNo" label="工作号">-->
<!--            </el-table-column>-->
            <el-table-column property="jarStatus" label="状态">
            </el-table-column>
            <el-table-column property="jarMode" label="模式">
@@ -36,90 +36,30 @@
      <div style="width: 100%;display: flex;justify-content: center;margin-top: 10px;">
         <div style="width: 55%;margin-right: 10px;">
            <el-card class="box-card">
               <div slot="header" class="clearfix">
                  <span>设备调试</span>
               <div slot="header" class="clearfix" style="display: flex;justify-content: space-between;align-items: center">
                  <span>硫化库位</span>
                  <el-button style="" type="primary" plain size="medium" @click="historicalTasks()">历史任务</el-button>
               </div>
               <div>
                  <el-form :model="formParam" label-position="top" :inline="true" class="demo-form-inline"  v-if="rgvMode !== 2 && rgvMode !== 1 ">
<!--                     <el-form-item label="源站/源库位">-->
<!--                        <el-input v-model="formParam.sourceStaNo" placeholder="源站/源库位"></el-input>-->
<!--                     </el-form-item>-->
                     <el-form-item label="起始站">
                        <el-input v-model="formParam.sourceRow" placeholder="起始站"></el-input>
                     </el-form-item>
                     <el-form-item label="目标站">
                        <el-input v-model="formParam.sourceBay" placeholder="目标站"></el-input>
                     </el-form-item>
                     <el-form-item label="启动">
                        <el-button @click="initiate" type="warning">执行任务</el-button>
                     </el-form-item>
                  </el-form>
               <div v-if="currentIndex == null">
                  <el-empty description="请选择设备"></el-empty>
               </div>
               <div v-else>
                  <el-table border :data="item" highlight-current-row max-height="350" style="width: 100%">
                     <el-table-column property="jarId" label="硫化罐">
                     </el-table-column>
                     <el-table-column property="jarWrkNo" label="工作号">
                     </el-table-column>
                     <el-table-column property="status$" label="状态">
                     </el-table-column>
                     <el-table-column property="matnr" label="物料码">
                     </el-table-column>
                     <el-table-column property="maktx" label="物料名称">
                     </el-table-column>
                     <el-table-column property="weight" label="重量">
                     </el-table-column>
                  </el-table>
               </div>
                  <div v-if="rgvMode === 2 ">
                     <el-form :model="formParamD" label-position="top" :inline="true" class="demo-form-inline">
                        <el-form-item label="起始站">
                           <el-input v-model="formParamD.sourceRow" placeholder="起始站"></el-input>
                        </el-form-item>
                        <el-form-item label="目标站">
                           <el-input v-model="formParamD.sourceBay" placeholder="目标站"></el-input>
                        </el-form-item>
                        <el-form-item label="启动">
                           <el-button @click="initiateD(1)" type="warning">取货</el-button>
                           <el-button @click="initiateD(2)" type="warning">放货</el-button>
                           <el-button @click="initiateD(3)" type="warning">XY移动</el-button>
                        </el-form-item>
                     </el-form>
                  </div>
                  <div  v-if="demo === 'N' ">
                     <el-button v-if="rgvMode === 0 " type="danger">未知</el-button>
                     <el-button v-if="rgvMode === -1 " type="danger">未知</el-button>
                     <el-button v-if="rgvMode === 3 " type="primary">联机</el-button>
                     <el-button v-if="rgvMode === 2 " type="primary">单机</el-button>
                     <el-button v-if="rgvMode === 1 " type="warning">手动</el-button>
                  </div>
                  <div  v-if="rgvMode !== 0 ">
                     <div style="margin: 10px auto 10px auto">
                        <el-button v-if="demo === 'N' " @click="demos('true')" type="info">演示</el-button>
                        <el-button v-if="demo === 'Y' " @click="demos('false')" type="info">取消演示</el-button>
                     </div>
                     <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                        <el-button v-if="rgvMode !== 3 " @click="rgvStatus(15)" type="primary">联机</el-button>
                        <el-button v-if="rgvMode !== 2 " @click="rgvStatus(14)" type="primary">单机</el-button>
                        <el-button v-if="rgvMode !== 1 " @click="rgvStatus(12)" type="warning">手动</el-button>
                     </div>
                     <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                        <el-button @click="rgvStatus(8)" type="primary">启动</el-button>
                        <el-button @click="rgvStatus(9)" type="primary">停止</el-button>
                        <el-button @click="rgvStatus(11)" type="primary">复位按钮</el-button>
                     </div>
                     <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                        <el-button @click="rgvStatus(7)" type="warning">报警消音</el-button>
                        <el-button v-if="rgvMode === 1 " @click="rgvStatus(13)" type="warning">手动定位</el-button>
                     </div>
                     <div style="margin: 10px auto 10px auto" v-if="demo === 'N' ">
                        <el-button :style="" @click="rgvStatus(5)" type="danger">强制启动</el-button>
                        <el-button @click="rgvStatus(10)" type="danger">急停</el-button>
                        <el-button @click="rgvStatus(16)" type="danger">货叉定位回中</el-button>
                     </div>
                     <div style="margin-top: 5px" v-if="demo === 'Y'">
                        <el-button  @click="staTova(2,1)" type="warning">输送-置换1</el-button>
                        <el-button  @click="staTova(2,3)" type="warning">输送-置换2</el-button>
                        <el-button  @click="staTova(2,5)" type="warning">输送-置换3</el-button>
                        <el-button  @click="staTova(2,7)" type="warning">输送-置换4</el-button>
                     </div>
                     <div style="margin-top: 5px" v-if="demo === 'Y'">
                        <el-button  @click="staTova(2,4)" type="warning">输送-灌装1</el-button>
                        <el-button  @click="staTova(2,6)" type="warning">输送-灌装2</el-button>
                        <el-button  @click="staTova(2,8)" type="warning">输送-灌装3</el-button>
                     </div>
                     <div style="margin-top: 5px" v-if="demo === 'Y'">
                        <el-button  @click="staTova(1,10)" type="warning">置换1-放货</el-button>
                        <el-button  @click="staTova(2,10)" type="warning">置换2-放货</el-button>
                        <el-button  @click="staTova(3,10)" type="warning">置换3-放货</el-button>
                        <el-button  @click="staTova(4,10)" type="warning">置换4-放货</el-button>
                     </div>
                  </div>
               </div>
            </el-card>
         </div>
         <div style="width: 45%;">
@@ -133,25 +73,15 @@
                  </div>
                  <div v-else>
                     <el-descriptions :title="currentTitle" direction="vertical" :column="4" border>
                        <el-descriptions-item label="RGV">{{ tableData[currentIndex].rgvNo }}
                        </el-descriptions-item>
                        <el-descriptions-item label="工作号">
                           {{ tableData[currentIndex].workNo1 }}
                        <el-descriptions-item label="硫化罐">{{ tableData[currentIndex].jarNo }}
                        </el-descriptions-item>
                        <el-descriptions-item label="模式">
                           <el-tag>{{ tableData[currentIndex].statusType }}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="任务状态">
                              <el-tag>{{ tableData[currentIndex].status}}</el-tag>
                           <el-tag>{{ tableData[currentIndex].jarMode }}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="设备状态">
                           <el-tag>{{ tableData[currentIndex].walkPos }}</el-tag>
                           <el-tag>{{ tableData[currentIndex].jarStatus }}</el-tag>
                        </el-descriptions-item>
                        <el-descriptions-item label="故障代码">{{ tableData[currentIndex].warnCode }}
                        </el-descriptions-item>
                        <el-descriptions-item label="故障描述">{{ tableData[currentIndex].alarm }}
                        <el-descriptions-item label="故障代码">{{ tableData[currentIndex].jarErr }}
                        </el-descriptions-item>
<!--                        <el-descriptions-item label="源站">{{ tableData[currentIndex].staNo }}-->
<!--                        </el-descriptions-item>-->
@@ -214,7 +144,8 @@
               }
            ],
            demo: 'X',
            rgvMode: 0
            rgvMode: 0,
            item: []
         },
         created() {
            this.init()
@@ -223,6 +154,25 @@
         },
         methods: {
            historicalTasks(){
               let that = this
               if (that.currentIndex != null){
                  $.ajax({
                     url: baseUrl + "/basJarMastLog/historicalTasks/auth",
                     headers: {
                        'token': localStorage.getItem('token')
                     },
                     data:{
                        id: that.tableData[that.currentIndex].jarNo
                     },
                     success: function (res) {
                        that.item = res.data
                        console.log(that.item)
                     }
                  });
               }
            },
            staTova(sta,end){
               let that = this
               that.$confirm('此操作存在风险,是否继续','提示',{
@@ -262,17 +212,32 @@
               setInterval(() => {
                  this.getTableData()
                  this.demoStatus()
                  // this.demoStatus()
               }, 1000)
            },
            handleRowClick(row, col, event) {
               const index = this.tableData.indexOf(row)
               this.currentRow = row;
               this.currentIndex = index
               this.currentTitle = row.jarNo + "号硫化罐"
               this.formParam.rgvNo = row.rgvNo
               this.enableIn = row.inEnable == "Y" ? true : false
               this.enableOut = row.outEnable == "Y" ? true : false
               var that = this
               const index = that.tableData.indexOf(row)
               that.currentRow = row;
               that.currentIndex = index
               that.currentTitle = row.jarNo + "号硫化罐"
               that.formParam.rgvNo = row.rgvNo
               that.enableIn = row.inEnable == "Y" ? true : false
               that.enableOut = row.outEnable == "Y" ? true : false
               $.ajax({
                  url: baseUrl + "/basJarMast/JatId/auth",
                  headers: {
                     'token': localStorage.getItem('token')
                  },
                  data: {
                     id: row.jarNo
                  },
                  success: function (res) {
                     that.item = res.data
                     console.log(that.item)
                  }
               });
            },
            getTableData() {
               let that = this;