oyq28 hai 1 ano
pai
achega
97e3d4fdc9

+ 21 - 1
imcs-ui/src/api/lineSideLibrary/toolStorge.js

@@ -69,6 +69,14 @@ const apiList = {
     method: 'POST',
     url: `/authority/customizeCuttingTool/pageList`
   },
+  getPointStorge: {
+    method: 'POST',
+    url: `/authority/toolStorge/getPointStorge`
+  },
+  saveStorge: {
+    method: 'POST',
+    url: `/authority/toolStorge/saveStorge`
+  },
 }
 
 export default {
@@ -185,5 +193,17 @@ export default {
       ...apiList.toolPageList,
       data
     })
-  }
+  },
+  getPointStorge (data) {
+    return axiosApi({
+      ...apiList.getPointStorge,
+      data
+    })
+  },
+  saveStorge (data) {
+    return axiosApi({
+      ...apiList.saveStorge,
+      data
+    })
+  },
 }

+ 13 - 2
imcs-ui/src/api/modelingCenter/toolManagement.js

@@ -60,7 +60,11 @@ const apiList = {
   getRule: {
     method: 'POST',
     url: `/authority/toolManagement/getRule`
-  }
+  },
+  toolTaskPage: {
+    method: 'POST',
+    url: `/authority/toolTask/page`
+  },
 }
 
 export default {
@@ -167,5 +171,12 @@ export default {
       ...apiList.getRule,
       data
     })
-  }
+  },
+  toolTaskPage(data) {
+    return axiosApi({
+      ...apiList.toolTaskPage,
+      data
+    })
+  },
+
 }

+ 1 - 0
imcs-ui/src/components/Plugins/Plugins.js

@@ -30,6 +30,7 @@ export default {
          	WAITINGLIST: [{ value: '', label: '全部'},{ value: '1',label: '待处理'},{ value: '2', label: '已处理' }],
          	// [程序执行状态]
          	STATUSTASKLIST: [{ value: '', label: '全部'},{ value: '1',label: '执行中'},{ value: '0', label: '停止' },{ value: '2', label: '已完成' }],
+         	TOOLTASKLSIT: [{ value: '', label: '全部'},{ value: '1',label: '未开始'},{ value: '2', label: '进行中' },{ value: '3', label: '已完成' }],
          	// 【生产资源】的[在线状态]
          	INLINESTATUSLIST: [{ value: '', label: '全部'},{ value: '2',label: '生产中'},{ value: '0', label: '离线'},{ value: '1', label: '空闲'},{ value: '3', label: '报警'}],
 

+ 4 - 4
imcs-ui/src/utils/commons.js

@@ -122,7 +122,7 @@ export const initQueryParams = params => {
     sort: 'id',
     order: 'descending',
     model: {
-
+      "status":"1"
     },
     map: {},
     timeRange: null,
@@ -165,11 +165,11 @@ export const fullScreen = ($elDom) => {
             wscript.SendKeys("{F11}");
         }
     }
-} 
+}
 
 
 //退出全屏
-export const exitFullScreen = () => {  
+export const exitFullScreen = () => {
     let el= document,
     cfs = el.cancelFullScreen || el.webkitCancelFullScreen || el.mozCancelFullScreen || el.exitFullScreen,
     wscript;
@@ -184,7 +184,7 @@ export const exitFullScreen = () => {
         if (wscript != null) {
             wscript.SendKeys("{F11}");
         }
-    }     
+    }
 }
 
 // Echarts的百分比圆环-函数

+ 236 - 412
imcs-ui/src/views/zuihou/centralToolMagazine/changeToolTask/Index.vue

@@ -1,54 +1,90 @@
 <template>
   <div class="app-container">
-  	<!-- 货架区域 -->
-  	<div class="areaDiv" style="width: 100%;overflow-x: auto;">
-
-  		<!-- 货架(单个) -->
-  		<template>
-	  		<div class="tableBlock" v-for="item in shelvesTreeList" :key="item.id">
-	  			<!-- 上部分-是个统计数据 -->
-	  			<div class="topDiv">
-	  				<span class="topSpan allTongji">
-	  					<span>{{$t("lineSide.common.allCount")}}:</span>
-	  					<countTo :duration="3000" :end-val="parseInt(item.allCount)" :start-val="0"/>
-	  				</span>
-	  				<span class="topSpan cunTongji">
-	  					<span>{{$t("lineSide.common.stockCount")}}:</span>
-	  					<countTo :duration="3000" :end-val="parseInt(item.stockCount)" :start-val="0"/>
-	  				</span>
-	  				<span class="topSpan lockTongji">
-	  					<span>{{$t("lineSide.common.lockCount")}}:</span>
-	  					<countTo :duration="3000" :end-val="parseInt(item.lockCount)" :start-val="0"/>
-	  				</span>
-	  				<span class="topSpan emptyTongji">
-	  					<span>{{$t("lineSide.common.freeCount")}}:</span>
-	  					<countTo :duration="3000" :end-val="parseInt(item.freeCount)" :start-val="0"/>
-	  				</span>
-	  			</div>
-	  			<!-- 中部-货架小格子 -->
-	  			<table class="contentDiv" border="0" cellspacing="0" cellpadding="6">
-            <tr v-for="(objTr, objIndex) in item.children" :key="objIndex">
-              <td v-for="objTd in objTr.children" :key="objTd.toolId"
-                  :class="{ 'blueBg': objTd.toolHandleId, 'redBg': objTd.tdBackground }"
-                  @click="selectCell(objTd)"
-                  @dblclick="editOne(objTd)">
-                {{objTd.no}}
-                <el-image v-if="objTd.lockStatus == '0'" class="locked" :src="resolveLogo(lockImg)" fit="contain"></el-image>
-              </td>
-            </tr>
-	  			</table>
-	  			<!-- 下部-货架名称编号 -->
-	  			<div class="footerDiv">{{item.name}}({{item.no}})</div>
-	  		</div>
-  		</template>
-
-
-  	</div>
-
+		<!-- 搜索模块 -->
+    <div class="filter-container">
+    	<span>
+    		<span>订单名称:</span>
+    		<el-input v-model="queryParams.model.orderName" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
+    	</span>
+    	<span style="margin-left: 15px;">
+    		<span>{{$t("lineSide.searchForm.status")}}:</span>
+    		<el-select v-model="queryParams.model.status" :placeholder='$t("common.pleaseSelect")' size="medium" style="width: 150px;">
+        	<el-option
+			      v-for="item in audioStatus"
+			      :key="item.value"
+			      :label="item.label"
+			      :value="item.value">
+			    </el-option>
+      	</el-select>
+    	</span>
+      <span style="margin-left: 15px;">
+	      <el-button plain type="primary" icon="el-icon-search" size="medium" @click="search">
+	        {{ $t("table.search") }}
+	      </el-button>
+	      <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
+	        {{ $t("table.reset") }}
+	      </el-button>
+      </span>
+    </div>
+		<!-- 列表数据 -->
+    <el-table
+      :key="tableKey"
+      ref="table"
+      v-loading="loading"
+      :data="tableData.records"
+      border
+      fit
+      row-key="id"
+      style="width: 100%;"
+      @selection-change="onSelectChange"
+      @cell-click="cellClick"
+    >
+    	<el-table-column label='' width="50" align="center"></el-table-column>
+      <el-table-column align="center" type="selection" width="50" :reserve-selection="true" />
+      <el-table-column prop="orderName" :label='"订单名称"' :show-overflow-tooltip="true"></el-table-column>
+      <el-table-column prop="deviceName" :label='"设备名称"' :show-overflow-tooltip="true" ></el-table-column>
+      <el-table-column prop="needToolCategory" :label='"缺少刀具类别"' :show-overflow-tooltip="true" ></el-table-column>
+      <el-table-column prop="status" :label='"任务状态"' :show-overflow-tooltip="true" >
+        <template slot-scope="{ row }">
+          <el-tag :type="getTagType(row.status)">
+            {{ getToolTypeText(row.status) }}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column prop="createTime" :label='$t("lineSide.table.toolManagement.createTime")' width="180px"></el-table-column>
+      <el-table-column
+        :label="$t('table.operation')"
+        fixed="right"
+        align="center"
+        column-key="operation"
+        width="140px"
+      >
+        <template slot-scope="{ row }">
+          <el-tooltip class="item" :content='"换刀"' effect="dark" placement="top-start">
+	          <i
+	            class="el-icon-view table-operation"
+	            style="color: #2db7f5;"
+	            @click="edit(row)"
+	          />
+          </el-tooltip>
+        </template>
+      </el-table-column>
+    </el-table>
+    <pagination
+      v-show="tableData.total > 0"
+      :limit.sync="queryParams.size"
+      :page.sync="queryParams.current"
+      :total="Number(tableData.total)"
+      @pagination="fetch"
+    />
     <tenant-edit
       ref="edit"
       :dialog-visible="dialog.isVisible"
       :title="dialog.title"
+      :tool-category="toolCategory"
+      :device-name="deviceName"
+      :plan-id="planId"
+      :device-id="deviceId"
       @close="editClose"
       @success="editSuccess"
     />
@@ -61,7 +97,7 @@
       v-el-drag-dialog
       :close-on-click-modal="false"
       :close-on-press-escape="true"
-      title="预览"
+      :title='$t("common.preview")'
       width="80%"
       top="50px"
       :visible.sync="preview.isVisible"
@@ -74,40 +110,24 @@
 </template>
 
 <script>
+	import Pagination from "@/components/Pagination"
 	import TenantEdit from "./components/Edit"
 	import TenantView from "./components/View"
-	// 【区域管理】-API
-	import areaMgrAPI from "@/api/resourceProductMgr/areaMgr"
-	// 【边线库管理】-API
-	import lineSideMgrApi from "@/api/lineSideLibrary/lineSideMgr"
-
+	// 【货架管理】-API
+	import toolManagementApi from "@/api/modelingCenter/toolManagement"
 	import elDragDialog from '@/directive/el-drag-dialog'
 	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
+	// 加载工具类
+	import { convertEnum, createTreeData } from '@/utils/utils'
 	import axios from 'axios'
-	// 加载动态数字组件
-	import countTo from 'vue-count-to'
 	export default {
-	  name: "LineSideEmulate",
+	  name: "GoodsShelvesMgr",
 	  directives: { elDragDialog },
-	  components: { TenantEdit, TenantView, countTo },
+	  components: { Pagination, TenantEdit, TenantView },
 	  props: {
-      deviceId: {
-        type: String,
-        default:''
-      }
 	  },
 	  data () {
 	    return {
-	    	url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
-	    	toolsImg: 'tools.png',
-	    	programImg: 'program.png',
-	    	lockImg: 'locked.png',
-	    	srcList: [
-          'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
-          'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
-        ],
-	    	topTongjiData: {"shelvesCount": 0, "storgeCount": 0,"instockCount": 0,"freestockCount": 0,"lockstockCount": 0},
-	    	shelvesTreeList: [], // 货架数据
 	    	audioStatus: [],
 	      dialog: {
 	        isVisible: false,
@@ -132,25 +152,31 @@
 	        TenantTypeEnum: {},
 	        TenantStatusEnum: {}
 	      },
-        cellSelections: {}
+        toolCategory:[],
+        deviceName:'',
+        planId:'',
+        deviceId:''
 	    }
 	  },
 	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
 	  created() {
-	  	// 加载列表数据-按区域
-      console.log("经过这里"+this.deviceId)
-	  	this.getTabList()
+	  	// 调用常量-审核状态
+	  	this.audioStatus = this.$constWKS.TOOLTASKLSIT
+	  	// 加载【字典】
+	  	initDicts(['NATION'], this.dicts);
+	  	// 加载列表数据
+	  	this.fetch()
 		},
-    watch: {
-      'deviceId': {
-        handler(val, oldVal) {
-          console.log("经过这里2"+this.deviceId)
-          // 加载列表数据
-          this.getTabList()
-        }
-      }
-    },
 	  computed: {
+	  	/* 转树形数据 */
+	    optionData() {
+	    	if(this.tableData.records){
+	    		let cloneData = JSON.parse(JSON.stringify(this.tableData.records)) // 对源数据深度克隆
+		      if(cloneData){
+		      	return createTreeData(cloneData)
+		      }
+	    	}
+	    },
 	    currentUser () {
 	      return this.$store.state.account.user
 	    },
@@ -162,14 +188,59 @@
 
 	  },
 	  methods: {
-	  	// 加载背景颜色
-	  	setBackground(color){
-	  		return "background: "+ color +";"
-	  	},
-	  	// 加载【本地图片】
-	  	resolveLogo(logo) {
-        return require(`@/assets/icon/${logo}`);
-      },
+	  	// 【启用/冻结】按钮-事件
+	    updateActiveStatus(status){
+	    	if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	// 传值
+	    	let obj = {};
+	    	obj = this.selection[0];
+	    	obj.status = status;
+	    	// 调用接口后的提示信息
+	    	let msg = this.$t("tips.frozen")
+	    	if(status == "1"){
+	    		msg = this.$t("tips.enable")
+	    	}
+	    	toolManagementApi.update(obj).then(response => {
+	        if (response.status == 200) {
+	          this.$message({
+	            message: msg,
+	            type: "success"
+	          })
+	          // 重新查询列表数据
+	          this.search()
+	        }
+	      })
+	    },
+	    // 【冻结】-Table的Row操作事件
+	    dongJieRow(row) {
+	    	// 传值
+	    	let obj = {};
+	    	obj = row;
+	    	obj.status = "0";
+	    	toolManagementApi.update(obj).then(response => {
+	        if (response.status == 200) {
+	          this.$message({
+	            message: this.$t("tips.frozen"),
+	            type: "success"
+	          })
+	          // 重新查询列表数据
+	          this.search()
+	        }
+	      })
+	    },
 	    viewClose () {
 	      this.tenantViewVisible = false
 	    },
@@ -177,8 +248,7 @@
 	      this.dialog.isVisible = false
 	    },
 	    editSuccess () {
-	      //this.search()
-        this.getTabList();
+	      this.search()
 	    },
 	    onSelectChange (selection) {
 	      this.selection = selection
@@ -197,8 +267,10 @@
 	    add () {
 	      this.$refs.edit.type = "add"
 	      this.$refs.edit.setTenant(false, this.dicts)
+	      // 【上级货架】数据设置
+	      this.$refs.edit.list = this.tableData.records
 	      this.dialog.title = this.$t("common.add")
-	      this.dialog.isVisible = true
+	      this.dialog.isVisible = false
 	    },
 	    singleDelete (row) {
 	      this.$refs.table.clearSelection()
@@ -214,24 +286,46 @@
 	        return
 	      }
 
-	      this.$confirm(this.$t("lineSide.tips.wareTips"), this.$t("common.tips"), {
+	      const readonlyIndex = this.selection.findIndex(item => item.readonly)
+
+	      if (readonlyIndex > -1) {
+	        this.$message({
+	          message: this.$t("tips.systemData"),
+	          type: "warning"
+	        })
+	        return
+	      }
+
+	      this.$confirm(this.$t("lineSide.tips.shelvsTips"), this.$t("common.tips"), {
 	      	distinguishCancelAndClose: true,
 	        confirmButtonText: this.$t("common.confirm"),
 	        cancelButtonText: this.$t("common.cancel"),
 	        type: "warning"
 	      }).then(() => {
 	      	const ids = []
+		      let contain = false
 		      this.selection.forEach(item => {
+		        if (item.readonly) {
+		          contain = true
+		          return
+		        }
 		        ids.push(item.id)
 		      })
-		      this.delete(ids)
+		      if (contain) {
+		        this.$message({
+		          message: this.$t("tips.systemData"),
+		          type: "warning"
+		        })
+		      } else {
+		        this.delete(ids)
+		      }
 	      }).catch(() => {})
 	    },
 	    clearSelections () {
 	      this.$refs.table.clearSelection()
 	    },
 	    delete (ids) {
-	      areaMgrAPI.remove({ ids: ids }).then(response => {
+	      toolManagementApi.remove({ ids: ids }).then(response => {
 	        const res = response.data
 	        if (res.isSuccess) {
 	          this.$message({
@@ -249,31 +343,31 @@
 	      this.tenantViewVisible = true
 	    },
 	    // 【修改】表头上Btn-事件
-	    editOne(row) {
-	    	this.edit(row);
+	    editOne() {
+	    	if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.unSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	if (this.selection.length > 1) {
+	        this.$message({
+	          message: this.$t("tips.mustOne"),
+	          type: "warning"
+	        })
+	        return
+	      }
+	    	this.edit(this.selection[0]);
 	    },
-      selectCell(objTd) {
-        objTd.selected = !objTd.selected;
-        if(objTd.selected){
-          objTd.tdBackground=true;
-        }else{
-          objTd.tdBackground=false;
-        }
-
-      },
 	    edit (row) {
-        console.log("row:",)
-	      this.$refs.edit.setTenant(row, this.dicts)
-	      this.$refs.edit.type = "edit"
-        if(this.deviceId){
-          this.$refs.edit.showFlag = false
-        }else{
-          this.$refs.edit.showFlag = true
-        }
-
-
-	      this.dialog.title = this.$t("lineSide.common.strogeTool")
-	      this.dialog.isVisible = true
+        if (row.status === '1' ){
+          this.toolCategory = row.taskNodeToolList
+          this.deviceName = row.deviceName
+          this.planId = row.planId
+          this.deviceId = row.deviceId
+          this.dialog.isVisible = true
+      }
 	    },
 	    fetch (params = {}) {
 	      this.loading = true
@@ -284,8 +378,9 @@
 
 	      this.queryParams.current = params.current ? params.current : this.queryParams.current
 	      this.queryParams.size = params.size ? params.size : this.queryParams.size
-	      areaMgrAPI.page(this.queryParams).then(response => {
+	      toolManagementApi.toolTaskPage(this.queryParams).then(response => {
 	        const res = response.data
+          console.log(res)
 	        if (res.isSuccess) {
 	          this.tableData = res.data
 	        }
@@ -309,298 +404,27 @@
 	        this.$refs.table.toggleRowSelection(row, true)
 	      }
 	    },
-	    // 获取列表数据
-	    getTabList(){
-        console.log("deviceId:"+this.deviceId)
-	    	lineSideMgrApi.iconListV2({}).then(res => {
-	    		res = res.data
-	    		console.log("方块列表:", res)
-	    		if(res.isSuccess){
-            let filteredData;
-            if(this.deviceId){
-               filteredData = res.data.shelvesTreeList.filter(item => item.deviceId === this.deviceId  && item.toolType === "1");
-            }else{
-               filteredData = res.data.shelvesTreeList.filter(item => item.toolType === "4");
-            }
-
-            console.log("filteredData:",filteredData)
-            // 设备的货架数据
-    				this.shelvesTreeList = filteredData
-    				// 统计数据
-    				this.topTongjiData = {
-    					"freestockCount": res.data.freestockCount,
-							"instockCount": res.data.instockCount,
-							"lockstockCount": res.data.lockstockCount,
-							"shelvesCount": res.data.shelvesCount,
-							"storgeCount": res.data.storgeCount
-    				}
-	    		}
-	    	})
-	    }
+      getTagType(toolType) {
+        switch (toolType) {
+          case '1':
+            return 'info'; // 第一种类型的标签颜色
+          case '2':
+            return 'warning'; // 第二种类型的标签颜色
+          case '3':
+            return 'success'; // 第三种类型的标签颜色
+        }
+      },
+      getToolTypeText(toolType) {
+        switch (toolType) {
+          case '1':
+            return "未开始"; // 第二种类型的文本
+          case '2':
+            return '进行中'; // 第三种类型的文本
+          case '3':
+            return '已完成'; // 第四种类型的文本
+        }
+      }
 	  }
 	}
 </script>
-<!-- 全局样式-通过定义父DOM的calss,来只影响本组件 -->
-<style type="text/css">
-	.areaDiv .el-progress-bar__innerText{
-		position: relative;
-		top: -2px;
-	}
-	.areaDiv .el-card__body{
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		flex-direction: column;
-		padding: 10px;
-		min-height: 190px;
-	}
-</style>
-<!-- 本组件样式 -->
-<style lang="scss" scoped>
-	.blockDiv{
-		position: relative;
-		border: 1px solid #EEEEEE;
-		padding-left: 15px;
-		-moz-border-radius: 5px;
-		-webkit-border-radius: 5px;
-		border-radius: 5px;
-		text-align: center;
-		color: white;
-		-moz-box-shadow: 1px 5px 5px #c0b7b7;
-		webkit-box-shadow: 1px 5px 5px #c0b7b7;
-		box-shadow: 1px 5px 5px #c0b7b7;
-		h1{
-			margin: 20px;
-			font-size: 45px;
-		}
-		p{
-			text-align: left;
-			color: #FFFFFF;
-		}
-	}
-	.danweiSpan{
-		display: inline-block;
-		font-size: 16px;
-		color: black;
-	}
-	.blockBg1{
-		background: #0F79DC;
-		border: 1px solid #0F79DC;
-	}
-	.blockBg2{
-		background: #8E66E4;
-		border: 1px solid #8E66E4;
-	}
-	.blockBg3{
-		background: #3EB64B;
-		border: 1px solid #3EB64B;
-	}
-	.blockBg4{
-		background: #0BA6D5;
-		border: 1px solid #0BA6D5;
-	}
-	.blockBg5{
-		background: #E57878;
-		border: 1px solid #E57878;
-	}
-	.blockBg6{
-		background: #E37B3D;
-		border: 1px solid #E37B3D;
-	}
-	.rowCls{
-		background: white;
-		box-sizing: border-box;
-		border-bottom: 2px dotted #AAAAAA;
-		margin-bottom: 15px;
-	}
-	.rowCls .el-col{
-		margin-bottom: 20px;
-	}
-	.doubleTable{
-		width: 100%;
-	}
-	.doubleTable h1{
-		margin: 17px 0;
-	}
-	.el-card{
-		display: inline-block;
-		min-width: 290px;
-		margin: 0 5px 5px 0;
-	}
-	.areaTitle{
-		margin-bottom: 15px;
-	}
-	.areaTitle span{
-		position: relative;
-		display: inline-block;
-		padding-right: 20px;
-		font-weight: bold;
-	}
-	.areaTitle span:before{
-		position: absolute;
-		content: '';
-		background: #42d885;
-		top: 0px;
-		right: 0px;
-		width: 10px;
-		height: 100%;
-	}
-	.contentView{
-		background: #CCCCCC;
-		text-align: center;
-		padding: 3px 5px;
-		margin-bottom: 5px;
-		border-bottom: 4px solid red;
-	}
-	.hebingDiv{
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		flex-wrap: wrap;
-		max-width: 140px;
-		min-height: 60px;
-		border-bottom: 8px solid red;
-		word-break: break-all;
-	}
-	.lineBianku{
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		background: #CCCCCC;
-		text-align: center;
-		padding: 3px 5px;
-		min-height: 60px;
-		max-width: 190px;
-		word-break: break-all;
-	}
-	.eqTitle{
-		width: 100%;
-		max-width: 70px;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		white-space: nowrap;
-		font-size: 12px;
-		margin-bottom: 15px;
-	}
-	.eqTitle2{
-		width: 100%;
-		max-width: 70px;
-		overflow: hidden;
-		text-overflow: ellipsis;
-		white-space: nowrap;
-		font-size: 12px;
-	}
-	.recordSpan{
-		display: inline-block;
-		background: #0F79DC;
-		font-size: 12px;
-		padding: 2px 10px;
-		color: white;
-		-moz-border-radius: 3px;
-		-webkit-border-radius: 3px;
-		border-radius: 3px;
-	}
-	.jinduTiao{
-		margin: 5px 0;
-	}
-	.statusDiv{
-		text-align: right;
-	}
-	.statusDiv span{
-		display: inline-block;
-		font-size: 12px;
-		padding: 2px 10px;
-		color: white;
-		-moz-border-radius: 2px;
-		-webkit-border-radius: 2px;
-		border-radius: 2px;
-	}
-	.linkLine{
-		/*background: #13CE66;*/
-	}
-	.jianguan{
-		/*background: #0A76A4;*/
-	}
-	.producting{
-		/*background: #3888FA;*/
-	}
-	.footerDiv{
-		text-align: center;
-		width: 100%;
-		padding: 7px 0;
-		border: 1px solid #AAAAAA;
-	}
-	.footerDiv a{
-		display: inline-block;
-		background: #0F79DC;
-		font-size: 12px;
-		padding: 5px 15px;
-		color: white;
-		-moz-border-radius: 3px;
-		-webkit-border-radius: 3px;
-		border-radius: 3px;
-	}
-	.footerDiv a:hover{
-		opacity: 0.7;
-	}
-	.tableBlock{
-		margin: 15px 30px 15px 0;
-		display: inline-block;
-    margin-left: 30%;
-	}
-	.topDiv{
-		text-align: center;
-	}
-	.topSpan{
-		display: inline-block;
-		padding: 10px;
-		color: white;
-		border: 1px solid #FFFFFF;
-		border-radius: 5px;
-		margin-right: 5px;
-	}
-	.allTongji{
-		background: #0BA6D5;
-		border: 1px solid #0BA6D5;
-	}
-	.cunTongji{
-		background: #0F79DC;
-		border: 1px solid #0F79DC;
-	}
-	.lockTongji{
-		background: #E57878;
-		border: 1px solid #E57878;
-	}
-	.emptyTongji{
-		border: 1px solid #AAAAAA;
-		color: #333333;
-	}
-	.contentDiv{
-		margin: 10px 0;
-		border-left: 1px solid #AAAAAA;
-		border-top: 1px solid #AAAAAA;
-	}
-	.contentDiv tr td{
-		position: relative;
-		cursor: pointer;
-		padding: 10px 25px;
-		border-right: 1px solid #AAAAAA;
-		border-bottom: 1px solid #AAAAAA;
-	}
-	.blueBg{
-		background: #548EC5;
-		color: white;
-	}
-	.locked{
-		position: absolute;
-		right: 2px;
-		top: 0;
-		width: 20px;
-		height: 25px;
-	}
-  .redBg {
-    background: red;
-    color: white;
-  }
-
-</style>
+<style lang="scss" scoped></style>

+ 99 - 53
imcs-ui/src/views/zuihou/centralToolMagazine/changeToolTask/components/Edit.vue

@@ -10,36 +10,42 @@
   >
     <el-form ref="form" :model="tenant" :rules="rules" label-position="right" label-width="130px">
     	<!-- 列表数据 -->
-	    <el-table
-	      :key="tableKey"
-	      ref="table"
-	      v-loading="loading"
-	      :data="tableData.data"
-	      border
-	      fit
-	      row-key="id"
-	      style="width: 100%;"
-	      @selection-change="onSelectChange"
-	      @cell-click="cellClick"
-	    >
-	    	<!-- 序号 -->
-	    	<el-table-column :label='$t("common.serialNo")' width="55px" align="center">
-		      <template slot-scope="scope">
-		        <div>
-		          {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
-		        </div>
-		      </template>
-	      </el-table-column>
-	      <!--<el-table-column align="center" type="selection" width="50" :reserve-selection="true" />-->
-	      <el-table-column prop="cuttingToolName" label='刀具名称' :show-overflow-tooltip="true"></el-table-column>
-	      <el-table-column prop="specifications" label='刀具规格' width="180px"></el-table-column>
-	      <el-table-column prop="handleCode" label='刀柄编码' width="180px">
-          <template slot-scope="scope" >
-            <el-input v-model="tenant.handleCode" type='text' />
-            </template>
+      <span style="font-size: 18px;">{{ deviceName }}需要放入 <span style="color: red;font-size: 30px;">{{ allCount }}</span> 把刀</span>
+      <span style="font-size: 18px;">,还缺 <span style="color: red;font-size: 30px;">{{ remainingToolCount }}</span> 把刀</span>
+      <el-table
+        :key="tableKey"
+        ref="table"
+        v-loading="loading"
+        :data="tableData"
+        border
+        fit
+        row-key="id"
+        style="width: 100%;"
+        @selection-change="onSelectChange"
+      >
+        <el-table-column label='' width="50" align="center"></el-table-column>
+        <el-table-column align="center"  type="selection" width="50" :reserve-selection="true" />
+        <el-table-column prop="name" :label='"库位名称"' :show-overflow-tooltip="true"></el-table-column>
+        <el-table-column prop="no" :label='"库位编码"' :show-overflow-tooltip="true" ></el-table-column>
+        <el-table-column prop="lockStatus" :label='$t("lineSide.table.side.lockStatus")' align="center" width="90px">
+          <template slot-scope="{ row }">
+            <el-tag :type="row.lockStatus=='0' ? 'success' : 'danger'">
+              {{ row.lockStatus=='0' ? $t("common.yes") : $t("common.no") }}
+            </el-tag>
+          </template>
         </el-table-column>
-        <el-table-column prop="remark" label='备注' width="180px"></el-table-column>
-	    </el-table>
+        <el-table-column prop="handleCode" label='刀柄编码' width="180px" >
+          <template slot-scope="{ row }" >
+            <el-input v-model="row.handleCode" :key="row.id" type='text' />
+          </template>
+        </el-table-column>
+        <el-table-column prop="toolCode" label='刀具编码' width="180px" >
+          <template slot-scope="{ row }" >
+            <el-input  v-model="row.toolCode" :key="row.id" type='text'  />
+          </template>
+        </el-table-column>
+      </el-table>
+
     </el-form>
     <div slot="footer" class="dialog-footer">
       <el-button plain type="warning" @click="isVisible = false">{{ $t('common.cancel') }}</el-button>
@@ -57,6 +63,7 @@ import customizeCuttingToolApi from "@/api/prepareProductMgr/customizeCuttingToo
 // 【边线库管理】-API
 import lineSideMgrApi from "@/api/lineSideLibrary/lineSideMgr"
 import locationMgrApi from "@/api/lineSideLibrary/toolStorge";
+import toolManagementApi from "@/api/modelingCenter/toolManagement";
 
 export default {
   name: 'TenantEdit',
@@ -71,7 +78,20 @@ export default {
     title: {
       type: String,
       default: ''
-    }
+    },
+    toolCategory:[],
+    deviceName: {
+      type: String,
+      default: ''
+    },
+    planId: {
+      type: String,
+      default: ''
+    },
+    deviceId: {
+      type: String,
+      default: ''
+    },
   },
   data () {
     return {
@@ -96,6 +116,8 @@ export default {
         NATION: {}
       },
       roles: [],
+      cellSelections: [],
+      shelvesTreeList: [],
       rules: {
       }
     }
@@ -103,8 +125,7 @@ export default {
   // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
   created() {
   	// 加载列表数据
-  	// this.fetch()
-    this.addRow();
+  	this.fetch()
 	},
   computed: {
     isVisible: {
@@ -114,8 +135,24 @@ export default {
       set () {
         this.close()
         this.reset()
-      }
-    }
+      },
+    },
+    allCount(){
+      return this.toolCategory.length
+    },
+    remainingToolCount: {
+      get() {
+        const count = this.toolCategory.length - this.selection.length;
+        console.log('remainingToolCount:', count);
+        if(count < 0){
+          return 0
+        }
+        return count;
+      },
+      set(value) {
+        console.log('setting remainingToolCount:', value);
+      },
+    },
   },
   mounted () {
     window.onresize = () => {
@@ -129,6 +166,7 @@ export default {
       return {
         id: '',
         handleCode:'',
+        toolCode:'',
         oldHandleId: ''
       }
     },
@@ -158,12 +196,18 @@ export default {
     },
     onSelectChange (selection) {
       this.selection = selection
+
     },
     reset () {
       // 先清除校验,再清除表单,不然有奇怪的bug
       this.$refs.form.clearValidate()
       this.$refs.form.resetFields()
       this.tenant = this.initTenant()
+      this.tableData.forEach(row => {
+        this.$set(row, 'handleCode', '');
+        this.$set(row, 'toolCode', '');
+      });
+      this.$refs.table.clearSelection(); // 清除所有选中项
     },
     submitForm () {
       this.$refs.form.validate((valid) => {
@@ -177,15 +221,27 @@ export default {
     },
     save () {
       console.log(this.tenant)
-      if (!this.tenant.handleCode || this.tenant.handleCode.trim() === '') {
+      /*if (!this.tenant.handleCode || this.tenant.handleCode.trim() === '') {
         this.$message.info('请输入刀具编码');
         this.confirmDisabled = false
         return;
+      }*/
+      if(this.selection.length != this.toolCategory.length){
+        this.$message.error('放刀数量不等于缺刀数量');
+        this.confirmDisabled = false
+        return;
+      }
+      let requestParams={
+        "planId":this.planId,
+        "deviceId":this.deviceId,
+        "toolStorgelist":this.selection
       }
-      locationMgrApi.updateStrogeTool(this.tenant)
+
+      locationMgrApi.saveStorge(requestParams)
         .then((response) => {
           const res = response.data
           if (res.isSuccess) {
+            this.reset ();
             this.isVisible = false
             this.$message({
               message: this.$t('tips.createSuccess'),
@@ -243,23 +299,13 @@ export default {
 
 	    },
 
-    fetch (params = {}) {
-	      this.loading = true
-	      if (this.queryParams.timeRange) {
-	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
-	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
-	      }
-
-	      this.queryParams.current = params.current ? params.current : this.queryParams.current
-	      this.queryParams.size = params.size ? params.size : this.queryParams.size
-	      lineSideMgrApi.page(this.queryParams).then(response => {
-	        const res = response.data
-	        if (res.isSuccess) {
-	          this.tableData = res.data
-	        }
-	        // eslint-disable-next-line no-return-assign
-	      }).finally(() => this.loading = false)
-
+    fetch () {
+      locationMgrApi.getPointStorge().then(res => {
+        res = res.data
+        if(res.isSuccess){
+          this.tableData = res.data
+        }
+      })
 	    },
 	    cellClick (row, column) {
 	      if (column['columnKey'] === "operation") {

+ 664 - 0
imcs-ui/src/views/zuihou/centralToolMagazine/changeToolTask/components/Index.vue

@@ -0,0 +1,664 @@
+<template>
+  <el-dialog
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    :title="title"
+    :append-to-body="true"
+    :visible.sync="isVisible"
+    width="1000px"
+    top="150px"
+  >
+  <div class="app-container">
+  	<!-- 货架区域 -->
+  	<div class="areaDiv" style="width: 100%;overflow-x: auto;">
+
+  		<!-- 货架(单个) -->
+  		<template>
+	  		<div class="tableBlock" v-for="item in shelvesTreeList" :key="item.id">
+	  			<!-- 上部分-是个统计数据 -->
+	  			<div class="topDiv">
+	  				<span class="topSpan allTongji">
+	  					<span>{{$t("lineSide.common.allCount")}}:</span>
+	  					<countTo :duration="3000" :end-val="parseInt(item.allCount)" :start-val="0"/>
+	  				</span>
+	  				<span class="topSpan cunTongji">
+	  					<span>{{$t("lineSide.common.stockCount")}}:</span>
+	  					<countTo :duration="3000" :end-val="parseInt(item.stockCount)" :start-val="0"/>
+	  				</span>
+	  				<span class="topSpan lockTongji">
+	  					<span>{{$t("lineSide.common.lockCount")}}:</span>
+	  					<countTo :duration="3000" :end-val="parseInt(item.lockCount)" :start-val="0"/>
+	  				</span>
+	  				<span class="topSpan emptyTongji">
+	  					<span>{{$t("lineSide.common.freeCount")}}:</span>
+	  					<countTo :duration="3000" :end-val="parseInt(item.freeCount)" :start-val="0"/>
+	  				</span>
+	  			</div>
+	  			<!-- 中部-货架小格子 -->
+	  			<table class="contentDiv" border="0" cellspacing="0" cellpadding="6">
+            <tr v-for="(objTr, objIndex) in item.children" :key="objIndex">
+              <td v-for="objTd in objTr.children" :key="objTd.toolId"
+                  :class="{ 'blueBg': objTd.toolHandleId, 'redBg': objTd.tdBackground }"
+                  @dblclick="editOne(objTd)">
+                {{objTd.no}}
+                <template slot-scope="scope">
+                  <!-- 示例中假设 scope 中有一个属性叫 inputModel,用于绑定输入框的值 -->
+                  <el-input v-model="objTd.toolHandleCode" placeholder="Input"></el-input>
+                </template>
+
+                <el-image v-if="objTd.lockStatus == '0'" class="locked" :src="resolveLogo(lockImg)" fit="contain"></el-image>
+                <div>
+
+                </div>
+              </td>
+            </tr>
+	  			</table>
+
+	  			<!-- 下部-货架名称编号 -->
+	  			<div class="footerDiv">{{item.name}}({{item.no}})</div>
+          <span style="font-size: 18px;">还需要放入 <span style="color: red;font-size: 30px;">{{ remainingToolCount }}</span> 把刀</span>
+          <el-button  class="el-button--primary generateTask" @click="taskExcute()">确定</el-button>
+	  		</div>
+  		</template>
+
+
+  	</div>
+
+    <tenant-edit
+      ref="edit"
+      :dialog-visible="dialog.isVisible"
+      :title="dialog.title"
+      @close="editClose"
+      @success="editSuccess"
+    />
+    <tenant-view
+      ref="view"
+      :dialog-visible="tenantViewVisible"
+      @close="viewClose"
+    />
+    <el-dialog
+      v-el-drag-dialog
+      :close-on-click-modal="false"
+      :close-on-press-escape="true"
+      title="预览"
+      width="80%"
+      top="50px"
+      :visible.sync="preview.isVisible"
+    >
+      <el-scrollbar>
+        <div v-html="preview.context" />
+      </el-scrollbar>
+    </el-dialog>
+  </div>
+  </el-dialog>
+</template>
+
+<script>
+	import TenantEdit from "./Edit.vue"
+	import TenantView from "./View.vue"
+	// 【区域管理】-API
+	import areaMgrAPI from "@/api/resourceProductMgr/areaMgr"
+	// 【边线库管理】-API
+	import lineSideMgrApi from "@/api/lineSideLibrary/lineSideMgr"
+
+	import elDragDialog from '@/directive/el-drag-dialog'
+	import { downloadFile, initEnums, initDicts, initQueryParams } from '@/utils/commons'
+	import axios from 'axios'
+	// 加载动态数字组件
+	import countTo from 'vue-count-to'
+	export default {
+	  name: "LineSideEmulate",
+	  directives: { elDragDialog },
+	  components: { TenantEdit, TenantView, countTo },
+	  props: {
+      deviceId: {
+        type: String,
+        default:''
+      },
+      dialogVisible: {
+        type: Boolean,
+        default: false
+      },
+      title: {
+        type: String,
+        default: ''
+      },
+      toolCategory:[]
+	  },
+	  data () {
+	    return {
+	    	url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
+	    	toolsImg: 'tools.png',
+	    	programImg: 'program.png',
+	    	lockImg: 'locked.png',
+	    	srcList: [
+          'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
+          'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
+        ],
+	    	topTongjiData: {"shelvesCount": 0, "storgeCount": 0,"instockCount": 0,"freestockCount": 0,"lockstockCount": 0},
+	    	shelvesTreeList: [], // 货架数据
+	    	audioStatus: [],
+	      dialog: {
+	        isVisible: false,
+	        title: ""
+	      },
+	      preview: {
+	        isVisible: false,
+	        context: ''
+	      },
+        toolHandleCode: '',
+        toolCode: '',
+	      tenantViewVisible: false,
+	      tableKey: 0,
+	      queryParams: initQueryParams({}),
+	      selection: [],
+	      loading: false,
+	      tableData: {
+	        total: 0
+	      },
+	      dicts: {
+          NATION: {}
+        },
+	      enums: {
+	        TenantTypeEnum: {},
+	        TenantStatusEnum: {}
+	      },
+        cellSelections: [],
+	    }
+	  },
+	  // 实例已经在内存中创建好,此时data和methods已将ok,如果要操作data中的数据或是调用methods中的方法,最早只能在created中操作
+	  created() {
+	  	// 加载列表数据-按区域
+      console.log("经过这里"+this.deviceId)
+	  	this.getTabList()
+		},
+    watch: {
+      'deviceId': {
+        handler(val, oldVal) {
+          console.log("经过这里2"+this.deviceId)
+          // 加载列表数据
+          this.getTabList()
+        }
+      }
+    },
+	  computed: {
+      isVisible: {
+        get () {
+          return this.dialogVisible
+        },
+        set () {
+          this.close()
+          this.reset()
+        },
+      },
+      remainingToolCount() {
+        const count = this.toolCategory.length - this.cellSelections.length;
+        console.log('remainingToolCount:', count);
+        return count;
+      },
+	    currentUser () {
+	      return this.$store.state.account.user
+	    },
+	    nationList() {
+        return convertEnum(this.dicts.NATION)
+      }
+	  },
+	  mounted () {
+
+	  },
+	  methods: {
+      change(){
+        this.$forceUpdate();  //强制刷新
+      },
+	  	// 加载背景颜色
+	  	setBackground(color){
+	  		return "background: "+ color +";"
+	  	},
+	  	// 加载【本地图片】
+	  	resolveLogo(logo) {
+        return require(`@/assets/icon/${logo}`);
+      },
+	    viewClose () {
+	      this.tenantViewVisible = false
+	    },
+	    editClose () {
+	      this.dialog.isVisible = false
+	    },
+	    editSuccess () {
+	      //this.search()
+        this.getTabList();
+	    },
+	    onSelectChange (selection) {
+	      this.selection = selection
+	    },
+	    search () {
+	      this.fetch({
+	        ...this.queryParams
+	      })
+	    },
+      close () {
+        this.$emit('close')
+      },
+	    reset () {
+	      this.queryParams = initQueryParams({})
+	      this.search()
+	    },
+	    add () {
+	      this.$refs.edit.type = "add"
+	      this.$refs.edit.setTenant(false, this.dicts)
+	      this.dialog.title = this.$t("common.add")
+	      this.dialog.isVisible = true
+	    },
+	    singleDelete (row) {
+	      this.$refs.table.clearSelection()
+	      this.$refs.table.toggleRowSelection(row, true)
+	      this.batchDelete()
+	    },
+	    batchDelete () {
+	      if (!this.selection.length) {
+	        this.$message({
+	          message: this.$t("tips.noDataSelected"),
+	          type: "warning"
+	        })
+	        return
+	      }
+
+	      this.$confirm(this.$t("lineSide.tips.wareTips"), this.$t("common.tips"), {
+	      	distinguishCancelAndClose: true,
+	        confirmButtonText: this.$t("common.confirm"),
+	        cancelButtonText: this.$t("common.cancel"),
+	        type: "warning"
+	      }).then(() => {
+	      	const ids = []
+		      this.selection.forEach(item => {
+		        ids.push(item.id)
+		      })
+		      this.delete(ids)
+	      }).catch(() => {})
+	    },
+	    clearSelections () {
+	      this.$refs.table.clearSelection()
+	    },
+	    delete (ids) {
+	      areaMgrAPI.remove({ ids: ids }).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.$message({
+	            message: this.$t("tips.deleteSuccess"),
+	            type: "success"
+	          })
+	          this.search()
+	          // 清理已经删除的数据
+	          this.$refs.table.clearSelection()
+	        }
+	      })
+	    },
+	    view (row) {
+	      this.$refs.view.setTenant(row)
+	      this.tenantViewVisible = true
+	    },
+	    // 【修改】表头上Btn-事件
+	    editOne(row) {
+	    	this.edit(row);
+	    },
+      selectCell(objTd) {
+        objTd.selected = !objTd.selected;
+        const count = this.toolCategory.length - this.cellSelections.length;
+        if(objTd.selected){
+          if(count <= 0){
+            return
+          }
+          objTd.tdBackground=true;
+          this.cellSelections.push(objTd.id)
+        }else{
+          objTd.tdBackground=false;
+          const index = this.cellSelections.indexOf(objTd.id);
+          if (index !== -1) {
+            this.cellSelections.splice(index, 1);
+          }
+        }
+
+      },
+	    edit (row) {
+        console.log("row:",)
+	      this.$refs.edit.setTenant(row, this.dicts)
+	      this.$refs.edit.type = "edit"
+        if(this.deviceId){
+          this.$refs.edit.showFlag = false
+        }else{
+          this.$refs.edit.showFlag = true
+        }
+
+
+	      this.dialog.title = this.$t("lineSide.common.strogeTool")
+	      this.dialog.isVisible = true
+	    },
+	    fetch (params = {}) {
+	      this.loading = true
+	      if (this.queryParams.timeRange) {
+	        this.queryParams.map.createTime_st = this.queryParams.timeRange[0]
+	        this.queryParams.map.createTime_ed = this.queryParams.timeRange[1]
+	      }
+
+	      this.queryParams.current = params.current ? params.current : this.queryParams.current
+	      this.queryParams.size = params.size ? params.size : this.queryParams.size
+	      areaMgrAPI.page(this.queryParams).then(response => {
+	        const res = response.data
+	        if (res.isSuccess) {
+	          this.tableData = res.data
+	        }
+	        // eslint-disable-next-line no-return-assign
+	      }).finally(() => this.loading = false)
+
+	    },
+	    cellClick (row, column) {
+	      if (column['columnKey'] === "operation") {
+	        return
+	      }
+	      let flag = false
+	      this.selection.forEach((item) => {
+	        if (item.id === row.id) {
+	          flag = true
+	          this.$refs.table.toggleRowSelection(row)
+	        }
+	      })
+
+	      if (!flag) {
+	        this.$refs.table.toggleRowSelection(row, true)
+	      }
+	    },
+	    // 获取列表数据
+	    getTabList(){
+        console.log("deviceId:"+this.deviceId)
+	    	lineSideMgrApi.iconListV2({}).then(res => {
+	    		res = res.data
+	    		console.log("方块列表:", res)
+	    		if(res.isSuccess){
+            let filteredData;
+            if(this.deviceId){
+               filteredData = res.data.shelvesTreeList.filter(item => item.deviceId === this.deviceId  && item.toolType === "1");
+            }else{
+               filteredData = res.data.shelvesTreeList.filter(item => item.toolType === "4");
+            }
+
+            console.log("filteredData:",filteredData)
+            // 设备的货架数据
+    				this.shelvesTreeList = filteredData
+    				// 统计数据
+    				this.topTongjiData = {
+    					"freestockCount": res.data.freestockCount,
+							"instockCount": res.data.instockCount,
+							"lockstockCount": res.data.lockstockCount,
+							"shelvesCount": res.data.shelvesCount,
+							"storgeCount": res.data.storgeCount
+    				}
+	    		}
+	    	})
+	    }
+	  }
+	}
+</script>
+<!-- 全局样式-通过定义父DOM的calss,来只影响本组件 -->
+<style type="text/css">
+	.areaDiv .el-progress-bar__innerText{
+		position: relative;
+		top: -2px;
+	}
+	.areaDiv .el-card__body{
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		padding: 10px;
+		min-height: 190px;
+	}
+</style>
+<!-- 本组件样式 -->
+<style lang="scss" scoped>
+	.blockDiv{
+		position: relative;
+		border: 1px solid #EEEEEE;
+		padding-left: 15px;
+		-moz-border-radius: 5px;
+		-webkit-border-radius: 5px;
+		border-radius: 5px;
+		text-align: center;
+		color: white;
+		-moz-box-shadow: 1px 5px 5px #c0b7b7;
+		webkit-box-shadow: 1px 5px 5px #c0b7b7;
+		box-shadow: 1px 5px 5px #c0b7b7;
+		h1{
+			margin: 20px;
+			font-size: 45px;
+		}
+		p{
+			text-align: left;
+			color: #FFFFFF;
+		}
+	}
+	.danweiSpan{
+		display: inline-block;
+		font-size: 16px;
+		color: black;
+	}
+	.blockBg1{
+		background: #0F79DC;
+		border: 1px solid #0F79DC;
+	}
+	.blockBg2{
+		background: #8E66E4;
+		border: 1px solid #8E66E4;
+	}
+	.blockBg3{
+		background: #3EB64B;
+		border: 1px solid #3EB64B;
+	}
+	.blockBg4{
+		background: #0BA6D5;
+		border: 1px solid #0BA6D5;
+	}
+	.blockBg5{
+		background: #E57878;
+		border: 1px solid #E57878;
+	}
+	.blockBg6{
+		background: #E37B3D;
+		border: 1px solid #E37B3D;
+	}
+	.rowCls{
+		background: white;
+		box-sizing: border-box;
+		border-bottom: 2px dotted #AAAAAA;
+		margin-bottom: 15px;
+	}
+	.rowCls .el-col{
+		margin-bottom: 20px;
+	}
+	.doubleTable{
+		width: 100%;
+	}
+	.doubleTable h1{
+		margin: 17px 0;
+	}
+	.el-card{
+		display: inline-block;
+		min-width: 290px;
+		margin: 0 5px 5px 0;
+	}
+	.areaTitle{
+		margin-bottom: 15px;
+	}
+	.areaTitle span{
+		position: relative;
+		display: inline-block;
+		padding-right: 20px;
+		font-weight: bold;
+	}
+	.areaTitle span:before{
+		position: absolute;
+		content: '';
+		background: #42d885;
+		top: 0px;
+		right: 0px;
+		width: 10px;
+		height: 100%;
+	}
+	.contentView{
+		background: #CCCCCC;
+		text-align: center;
+		padding: 3px 5px;
+		margin-bottom: 5px;
+		border-bottom: 4px solid red;
+	}
+	.hebingDiv{
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-wrap: wrap;
+		max-width: 140px;
+		min-height: 60px;
+		border-bottom: 8px solid red;
+		word-break: break-all;
+	}
+	.lineBianku{
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		background: #CCCCCC;
+		text-align: center;
+		padding: 3px 5px;
+		min-height: 60px;
+		max-width: 190px;
+		word-break: break-all;
+	}
+	.eqTitle{
+		width: 100%;
+		max-width: 70px;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		font-size: 12px;
+		margin-bottom: 15px;
+	}
+	.eqTitle2{
+		width: 100%;
+		max-width: 70px;
+		overflow: hidden;
+		text-overflow: ellipsis;
+		white-space: nowrap;
+		font-size: 12px;
+	}
+	.recordSpan{
+		display: inline-block;
+		background: #0F79DC;
+		font-size: 12px;
+		padding: 2px 10px;
+		color: white;
+		-moz-border-radius: 3px;
+		-webkit-border-radius: 3px;
+		border-radius: 3px;
+	}
+	.jinduTiao{
+		margin: 5px 0;
+	}
+	.statusDiv{
+		text-align: right;
+	}
+	.statusDiv span{
+		display: inline-block;
+		font-size: 12px;
+		padding: 2px 10px;
+		color: white;
+		-moz-border-radius: 2px;
+		-webkit-border-radius: 2px;
+		border-radius: 2px;
+	}
+	.linkLine{
+		/*background: #13CE66;*/
+	}
+	.jianguan{
+		/*background: #0A76A4;*/
+	}
+	.producting{
+		/*background: #3888FA;*/
+	}
+	.footerDiv{
+		text-align: center;
+		width: 100%;
+		padding: 7px 0;
+		border: 1px solid #AAAAAA;
+	}
+	.footerDiv a{
+		display: inline-block;
+		background: #0F79DC;
+		font-size: 12px;
+		padding: 5px 15px;
+		color: white;
+		-moz-border-radius: 3px;
+		-webkit-border-radius: 3px;
+		border-radius: 3px;
+	}
+	.footerDiv a:hover{
+		opacity: 0.7;
+	}
+	.tableBlock{
+		margin: 15px 30px 15px 0;
+		display: inline-block;
+    margin-left: 30%;
+	}
+	.topDiv{
+		text-align: center;
+	}
+	.topSpan{
+		display: inline-block;
+		padding: 10px;
+		color: white;
+		border: 1px solid #FFFFFF;
+		border-radius: 5px;
+		margin-right: 5px;
+	}
+	.allTongji{
+		background: #0BA6D5;
+		border: 1px solid #0BA6D5;
+	}
+	.cunTongji{
+		background: #0F79DC;
+		border: 1px solid #0F79DC;
+	}
+	.lockTongji{
+		background: #E57878;
+		border: 1px solid #E57878;
+	}
+	.emptyTongji{
+		border: 1px solid #AAAAAA;
+		color: #333333;
+	}
+	.contentDiv{
+		margin: 10px 0;
+		border-left: 1px solid #AAAAAA;
+		border-top: 1px solid #AAAAAA;
+	}
+	.contentDiv tr td{
+		position: relative;
+		cursor: pointer;
+		padding: 10px 25px;
+		border-right: 1px solid #AAAAAA;
+		border-bottom: 1px solid #AAAAAA;
+	}
+	.blueBg{
+		background: #548EC5;
+		color: white;
+	}
+	.locked{
+		position: absolute;
+		right: 2px;
+		top: 0;
+		width: 20px;
+		height: 25px;
+	}
+  .redBg {
+    background: red;
+    color: white;
+  }
+
+</style>

+ 2 - 0
imcs-ui/src/views/zuihou/centralToolMagazine/locationMgr/components/Edit.vue

@@ -116,6 +116,8 @@ export default {
       oldToolNo: '',
       tdBackground: '',
       toolHandleId: '',
+      toolHandleCode: '',
+      toolCode: '',
       tenant: this.initTenant(),
       screenWidth: 0,
       width: this.initWidth(),

+ 8 - 1
imcs-ui/src/views/zuihou/runManageCenter/orderMgr/components/runningOrder/changeToolTask/Index.vue

@@ -367,11 +367,18 @@
           list: this.toolCategory,
           storgeId: this.cellSelections
         }
+        if(this.cellSelections.length <= 0){
+          this.$message({
+            message: '请至少选择一个',
+            type: 'error'
+          })
+          return
+        }
         console.log(requestParam)
         orderMgrApi.saveDetailToolTask(requestParam).then(response => {
           const res = response.data
           if(res.isSuccess){
-            this.viewClose()
+            this.$emit('close');
           }
         }).finally(() => this.loading = false)